The following code examples show how to use SetInstanceHealth
.
- AWS CLI
-
To set the health status of an instance
This example sets the health status of the specified instance to
Unhealthy
.aws autoscaling set-instance-health \ --instance-id
i-061c63c5eb45f0416
\ --health-statusUnhealthy
This command produces no output.
-
For API details, see SetInstanceHealth
in AWS CLI Command Reference.
-
For a complete list of AWS SDK developer guides and code examples, see Using this service with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions.