Menu
Auto Scaling
API Reference (API Version 2011-01-01)

SetInstanceHealth

Sets the health status of the specified instance.

For more information, see Health Checks in the Auto Scaling User Guide.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

HealthStatus

The health status of the instance. Set to Healthy if you want the instance to remain in service. Set to Unhealthy if you want the instance to be out of service. Auto Scaling will terminate and replace the unhealthy instance.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 32.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes

InstanceId

The ID of the instance.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 19.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes

ShouldRespectGracePeriod

If the Auto Scaling group of the specified instance has a HealthCheckGracePeriod specified for the group, by default, this call will respect the grace period. Set this to False, if you do not want the call to respect the grace period associated with the group.

For more information, see the description of the health check grace period for CreateAutoScalingGroup.

Type: Boolean

Required: No

Errors

For information about the errors that are common to all actions, see Common Errors.

ResourceContention

You already have a pending update to an Auto Scaling resource (for example, a group, instance, or load balancer).

HTTP Status Code: 500

Example

Sample Request

Copy
https://autoscaling.amazonaws.com/?Action=SetInstanceHealth &InstanceId=i-12345678 &HealthStatus=Unhealthy &Version=2011-01-01 &AUTHPARAMS

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: