Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can click “Customize cookies” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To continue without accepting these cookies, click “Continue without accepting.” To make more detailed choices or learn more, click “Customize cookies.”

Skip to content

/AWS1/CL_ASC=>SETINSTANCEHEALTH()

About 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.

Method Signature

IMPORTING

Required arguments:

IV_INSTANCEID TYPE /AWS1/ASCXMLSTRINGMAXLEN19 /AWS1/ASCXMLSTRINGMAXLEN19

The ID of the instance.

IV_HEALTHSTATUS TYPE /AWS1/ASCXMLSTRINGMAXLEN32 /AWS1/ASCXMLSTRINGMAXLEN32

The health status of the instance. Set to Healthy to have the instance remain in service. Set to Unhealthy to have the instance be out of service. Amazon EC2 Auto Scaling terminates and replaces the unhealthy instance.

Optional arguments:

IV_SHOULDRESPECTGRACEPERIOD TYPE /AWS1/ASCSHOULDRESPECTGRACEPER /AWS1/ASCSHOULDRESPECTGRACEPER

If the Auto Scaling group of the specified instance has a HealthCheckGracePeriod specified for the group, by default, this call respects the grace period. Set this to False, to have the call not respect the grace period associated with the group.

For more information about the health check grace period, see Set the health check grace period for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.