쿠키 기본 설정 선택

당사는 사이트와 서비스를 제공하는 데 필요한 필수 쿠키 및 유사한 도구를 사용합니다. 고객이 사이트를 어떻게 사용하는지 파악하고 개선할 수 있도록 성능 쿠키를 사용해 익명의 통계를 수집합니다. 필수 쿠키는 비활성화할 수 없지만 '사용자 지정' 또는 ‘거부’를 클릭하여 성능 쿠키를 거부할 수 있습니다.

사용자가 동의하는 경우 AWS와 승인된 제3자도 쿠키를 사용하여 유용한 사이트 기능을 제공하고, 사용자의 기본 설정을 기억하고, 관련 광고를 비롯한 관련 콘텐츠를 표시합니다. 필수가 아닌 모든 쿠키를 수락하거나 거부하려면 ‘수락’ 또는 ‘거부’를 클릭하세요. 더 자세한 내용을 선택하려면 ‘사용자 정의’를 클릭하세요.

DetachInstances - Amazon EC2 Auto Scaling
이 페이지는 귀하의 언어로 번역되지 않았습니다. 번역 요청

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.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

AutoScalingGroupName

The name of the Auto Scaling group.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes

InstanceIds.member.N

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

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 19.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

ShouldDecrementDesiredCapacity

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

Type: Boolean

Required: Yes

Response Elements

The following element is returned by the service.

Activities.member.N

The activities related to detaching the instances from the Auto Scaling group.

Type: Array of Activity objects

Errors

For information about the errors that are common to all actions, see Common Errors.

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto Scaling group, instance, or load balancer).

HTTP Status Code: 500

Examples

Example

This example illustrates one usage of DetachInstances.

Sample Request

https://autoscaling.amazonaws.com/?Action=DetachInstances &AutoScalingGroupName=my-asg &InstanceIds.member.1=i-1234567890abcdef0 &ShouldDecrementDesiredCapacity=true &Version=2011-01-01 &AUTHPARAMS

Sample Response

<DetachInstancesResponse xmlns="https://autoscaling.amazonaws.com/doc/2011-01-01/"> <DetachInstancesResult> <Activities> <member> <ActivityId>12345678-1234-1234-1234-123456789012</ActivityId> <AutoScalingGroupName>my-asg</AutoScalingGroupName> <Description>Detaching EC2 instance: i-1234567890abcdef0</Description> <Cause>At 2022-06-14T00:07:30Z instance i-1234567890abcdef0 was detached in response to a user request, shrinking the capacity from 4 to 3.</Cause> <Progress>50</Progress> <StartTime>2022-06-14T00:07:30.280Z</StartTime> <Details>{"Availability Zone":"us-east-1a","SubnetID":"subnet-057fa0918fEXAMPLE"}</Details> <StatusCode>InProgress</StatusCode> </member> </Activities> </DetachInstancesResult> <ResponseMetadata> <RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId> </ResponseMetadata> </DetachInstancesResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

프라이버시사이트 이용 약관쿠키 기본 설정
© 2025, Amazon Web Services, Inc. 또는 계열사. All rights reserved.