You can call this operation to set the health status of the ECS instances in a scaling group.


Auto Scaling performs health checks on ECS instances in a scaling group and removes unhealthy ECS instances. If you want to reserve an ECS instance, you can switch the ECS instance to the Standby or Protected state. For more information, see EnterStandby and SetInstancesProtection.


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 SetInstanceHealth

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

HealthStatus String Yes Healthy

The health status of an ECS instance. Valid values:

  • Healthy
  • Unhealthy
InstanceId String Yes i-bp1ap6bro51a7fsa****

The ID of an ECS instance in a scaling group.

Response parameters

Parameter Type Example Description
RequestId String B755AE57-6093-43E4-938E-DEA422A9B10F

The ID of the request.


Sample requests
&<Common request parameters>

Sample success responses

XML format


JSON format

    "RequestId": "B755AE57-6093-43E4-938E-DEA422A9B10F"

Error codes

For a list of error codes, visit the API Error Center.

HTTP status code

Error code

Error message




Instance "%s" does not exist.

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



The specified value of parameter "%s" is not valid.

The error message returned because a specified parameter is invalid.