All Products
Search
Document Center

Auto Scaling:ExitStandby

更新時間:Jun 13, 2024

Removes instances from the Standby state. During scale-in events, Auto Scaling does not remove Elastic Compute Service (ECS) instances or elastic container instances that are in the Standby state from scaling groups. If you want to reuse these instances that are in the Standby state, you can call the ExitStandby operation to remove them from the Standby state and put them into the In Service state.

Usage notes

After you remove instances from the Standby state, the following rules apply:

  • The ECS instances or elastic container instances enter the In Service state.

  • If a load balancer is attached to the scaling group that contains the ECS instances or elastic container instances, the weight of each instance as a backend server of the load balancer is 50.

  • When the ECS instances or elastic container instances are stopped or restarted, their heath check status will be updated.

  • During scale-in events, Auto Scaling may remove the ECS instances or elastic container instances from their respective scaling groups.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action

String

Yes

ExitStandby

The operation that you want to perform. Set the value to ExitStandby.

ScalingGroupId

String

Yes

asg-bp1fo0dbtsbmqa9h****

The ID of the scaling group.

ClientToken

String

No

123e4567-e89b-12d3-a456-42665544****

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see Ensure idempotence.

InstanceId.N

String

No

i-28wt4****

The ID of instance N. The value of this parameter can be a JSON array that contains up to 20 instance IDs. Separate multiple instance IDs with commas (,).

Async

Boolean

No

false

Specifies whether to asynchronously remove the instance from the Standby state. Valid values:

  • true

  • false

Default value: false.

RegionId

String

No

cn-hangzhou

The region ID of the scaling group.

Response parameters

Parameter

Type

Example

Description

RequestId

String

473469C7-AA6F-4DC5-B3DB-A3DC0DE3****

The request ID.

ScalingActivityId

String

asa-2zeb04oym05qaceq****

The ID of the scaling activity.

Examples

Sample requests

http(s)://ess.aliyuncs.com]/?Action=ExitStandby
&ScalingGroupId=asg-bp1fo0dbtsbmqa9h****
&ClientToken=123e4567-e89b-12d3-a456-42665544****
&InstanceId=["i-28wt4****"]
&Async=false
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ExitStandbyResponse>
    <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3****</RequestId>
    <ScalingActivityId>asa-2zeb04oym05qaceq****</ScalingActivityId>
</ExitStandbyResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
  "ScalingActivityId" : "asa-2zeb04oym05qaceq****"
}

Error codes

For a list of error codes, see Service error codes.

HTTP status code

Error code

Error message

Description

403

Forbidden.Unauthorized

A required authorization for the specified action is not supplied.

The RAM user is not authorized to call this operation. Contact the owner of the Alibaba Cloud account to obtain the required permissions, and then try again.

404

InvalidInstanceId.NotFound

A required authorization for the specified action is not supplied.

The specified ECS instance or elastic container instance does not exist within the Alibaba Cloud account.

404

InvalidScalingGroupId.NotFound

The specified scaling group does not exist.

The specified scaling group does not exist within the Alibaba Cloud account.