Terminates the specified instance and optionally adjusts the desired group size.
autoscaling_terminate_instance_in_auto_scaling_group(InstanceId,
ShouldDecrementDesiredCapacity)
[required] The ID of the instance.
[required] Indicates whether terminating the instance also decrements the size of the Auto Scaling group.
svc$terminate_instance_in_auto_scaling_group( InstanceId = "string", ShouldDecrementDesiredCapacity = TRUE|FALSE )
This call simply makes a termination request. The instance is not terminated immediately.
# NOT RUN {
# This example terminates the specified instance from the specified Auto
# Scaling group without updating the size of the group. Auto Scaling
# launches a replacement instance after the specified instance terminates.
# }
# NOT RUN {
svc$terminate_instance_in_auto_scaling_group(
InstanceId = "i-93633f9b",
ShouldDecrementDesiredCapacity = FALSE
)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab