All Products
Search
Document Center

Auto Scaling:EnterStandby

Last Updated:Apr 30, 2024

Puts Elastic Compute Service (ECS) instances or elastic container instances in a scaling group into the Standby state. You can call the EnterStandby operation to manage the lifecycles of ECS instances or elastic container instances.

Usage notes

  • If load balancers are attached to your scaling group, the weight of each instance as a backend server is reset to 0.

  • For an instance that is in the Standby state, you can manually remove the instance from your scaling group and release the instance as expected.

  • During the effective period of a scale-in caused by instance number changes in your scaling group or an event-triggered task, Auto Scaling does not remove instances that are in the Standby state from the scaling group.

  • If a Standby instance is currently undergoing a stop or restart process that renders it unhealthy, its health status is not updated to reflect this condition, and no automatic scale-in is triggered to remove the unhealthy instance from the scaling group. To enable the health status update, you must first move the instance out of 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 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 ECS instance N or elastic container instance N.

Async

Boolean

No

false

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

  • true

  • false

Default value: false.

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=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, 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

Instance "XXX" does not exist.

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.