paws.management (version 0.1.0)

autoscaling_set_instance_protection: Updates the instance protection settings of the specified instances

Description

Updates the instance protection settings of the specified instances.

Usage

autoscaling_set_instance_protection(InstanceIds, AutoScalingGroupName,
  ProtectedFromScaleIn)

Arguments

InstanceIds

[required] One or more instance IDs.

AutoScalingGroupName

[required] The name of the Auto Scaling group.

ProtectedFromScaleIn

[required] Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.

Request syntax

svc$set_instance_protection(
  InstanceIds = list(
    "string"
  ),
  AutoScalingGroupName = "string",
  ProtectedFromScaleIn = TRUE|FALSE
)

Details

For more information about preventing instances that are part of an Auto Scaling group from terminating on scale in, see Instance Protection in the Amazon EC2 Auto Scaling User Guide.

Examples

Run this code
# NOT RUN {
# This example enables instance protection for the specified instance.
# }
# NOT RUN {
svc$set_instance_protection(
  AutoScalingGroupName = "my-auto-scaling-group",
  InstanceIds = list(
    "i-93633f9b"
  ),
  ProtectedFromScaleIn = TRUE
)
# }
# NOT RUN {
# This example disables instance protection for the specified instance.
# }
# NOT RUN {
svc$set_instance_protection(
  AutoScalingGroupName = "my-auto-scaling-group",
  InstanceIds = list(
    "i-93633f9b"
  ),
  ProtectedFromScaleIn = FALSE
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab