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


The scaling group performs health checks and removes unhealthy ECS instances. If you want to reserve an ECS instances, 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
HealthStatus String Yes Healthy

Specifies the health status of the ECS instance. Valid values:

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

The ID of the ECS instance in a scaling group.

Action String Yes SetInstanceHealth

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

Response parameters

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

The ID of the request.


Sample requests

http(s):// Action=SetInstanceHealth
&<Common request parameters>

Sample success responses

XML format


JSON format


Error codes

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

HTTP status code

Error code

Error message




Instance "XXX" 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 the specified parameter is invalid.