Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can click “Customize cookies” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To continue without accepting these cookies, click “Continue without accepting.” To make more detailed choices or learn more, click “Customize cookies.”

Skip to content

/AWS1/CL_ASC=>DETACHINSTANCES()

About DetachInstances

Removes one or more instances from the specified Auto Scaling group.

After the instances are detached, you can manage them independent of the Auto Scaling group.

If you do not specify the option to decrement the desired capacity, Amazon EC2 Auto Scaling launches instances to replace the ones that are detached.

If there is a Classic Load Balancer attached to the Auto Scaling group, the instances are deregistered from the load balancer. If there are target groups attached to the Auto Scaling group, the instances are deregistered from the target groups.

For more information, see Detach or attach instances in the Amazon EC2 Auto Scaling User Guide.

Method Signature

IMPORTING

Required arguments:

IV_AUTOSCALINGGROUPNAME TYPE /AWS1/ASCXMLSTRINGMAXLEN255 /AWS1/ASCXMLSTRINGMAXLEN255

The name of the Auto Scaling group.

IV_SHOULDDECREMENTDESIREDCAP TYPE /AWS1/ASCSHOULDDECREMENTDESI00 /AWS1/ASCSHOULDDECREMENTDESI00

Indicates whether the Auto Scaling group decrements the desired capacity value by the number of instances detached.

Optional arguments:

IT_INSTANCEIDS TYPE /AWS1/CL_ASCINSTANCEIDS_W=>TT_INSTANCEIDS TT_INSTANCEIDS

The IDs of the instances. You can specify up to 20 instances.

RETURNING

OO_OUTPUT TYPE REF TO /AWS1/CL_ASCDETACHINSTSANSWER /AWS1/CL_ASCDETACHINSTSANSWER

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC