Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . autoscaling ]

set-instance-health

Description

Sets the health status of the specified instance.

For more information, see Health Checks for Auto Scaling Instances in the Amazon EC2 Auto Scaling User Guide .

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  set-instance-health
--instance-id <value>
--health-status <value>
[--should-respect-grace-period | --no-should-respect-grace-period]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--instance-id (string)

The ID of the instance.

--health-status (string)

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.

--should-respect-grace-period | --no-should-respect-grace-period (boolean)

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

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Examples

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-93633f9b --health-status Unhealthy

Output

None