setInstanceHealth

Sets the health status of the specified instance.

For more information, see Set up a custom health check for your Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.

Samples


fun main() { 
   //sampleStart 
   // This example sets the health status of the specified instance to Unhealthy.
autoScalingClient.setInstanceHealth {
    instanceId = "i-93633f9b"
    healthStatus = "Unhealthy"
} 
   //sampleEnd
}