autoscaling_set_instance_health: Sets the health status of the specified instance

Description Usage Arguments Value Request syntax Examples

View source: R/autoscaling_operations.R

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.

Usage

1
2
autoscaling_set_instance_health(InstanceId, HealthStatus,
  ShouldRespectGracePeriod)

Arguments

InstanceId

[required] The ID of the instance.

HealthStatus

[required] 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.

ShouldRespectGracePeriod

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 create_auto_scaling_group in the Amazon EC2 Auto Scaling API Reference.

Value

An empty list.

Request syntax

1
2
3
4
5
svc$set_instance_health(
  InstanceId = "string",
  HealthStatus = "string",
  ShouldRespectGracePeriod = TRUE|FALSE
)

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# This example sets the health status of the specified instance to
# Unhealthy.
svc$set_instance_health(
  HealthStatus = "Unhealthy",
  InstanceId = "i-93633f9b"
)

## End(Not run)

paws.management documentation built on Aug. 23, 2021, 9:11 a.m.