Puts an Elastic Compute Service (ECS) instance into the Standby state.

Description

  • If you call the operation to put an ECS instance in a scaling group that is associated with a Server Load Balancer (SLB) instance into the Standby state, the weight of the ECS instance as the backend server of the SLB instance is set to 0.
  • You can remove an instance that is in the Standby state from a scaling group, and then release the instance.
  • ECS instances that are in the Standby state are not removed from the scaling group during scale-in activities triggered by event-triggered tasks.
  • If Auto Scaling considers an ECS instance that is in the Standby state unhealthy, for example, the ECS instance is being stopped or being restarted, Auto Scaling does not update the health status of the ECS instance or trigger scale-in activities to remove the ECS instance from the scaling group. Auto Scaling updates the health status of the ECS instance only when the ECS instance is no longer in the Standby state.

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 EnterStandby

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

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 value, but you must ensure that it is unique among different requests.

The token can only contain ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence.

Async Boolean No test

Specifies whether to put the ECS instance into the Standby state in an asynchronous manner. Valid values:

  • true
  • false

Default value: false.

InstanceId.N String Yes i-28wt4****

The ID of ECS instance N.

Response parameters

Parameter Type Example Description
RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3****

The ID of the request.

ScalingActivityId String asa-2zeb04oym05qaceq****

The ID of the scaling activity.

Examples

Sample requests

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

Sample success responses

XML format

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

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

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, visit the API Error Center.

HTTP status code

Error code

Error message

Description

403

Forbidden.Unauthorized

A required authorization for the specified action is not supplied.

The error message returned because the RAM user is not authorized to call the operation. Contact the owner of the Alibaba Cloud account for the authorization and try again.

404

InvalidInstanceId.NotFound

Instance "XXX" does not exist.

The error message returned because the ECS instance does not exist.

404

InvalidScalingGroupId.NotFound

The specified scaling group does not exist.

The error message returned because the scaling group does not exist.