autoscaling_detach_instances: Removes one or more instances from the specified Auto Scaling...

Description Usage Arguments Value Request syntax Examples

View source: R/autoscaling_operations.R

Description

Removes one or more instances from the specified Auto Scaling group.

After the instances are detached, you can manage them independent of the Auto Scaling group.

If you do not specify the option to decrement the desired capacity, Amazon EC2 Auto Scaling launches instances to replace the ones that are detached.

If there is a Classic Load Balancer attached to the Auto Scaling group, the instances are deregistered from the load balancer. If there are target groups attached to the Auto Scaling group, the instances are deregistered from the target groups.

For more information, see Detach EC2 instances from your Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.

Usage

1
2
autoscaling_detach_instances(InstanceIds, AutoScalingGroupName,
  ShouldDecrementDesiredCapacity)

Arguments

InstanceIds

The IDs of the instances. You can specify up to 20 instances.

AutoScalingGroupName

[required] The name of the Auto Scaling group.

ShouldDecrementDesiredCapacity

[required] Indicates whether the Auto Scaling group decrements the desired capacity value by the number of instances detached.

Value

A list with the following syntax:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
list(
  Activities = list(
    list(
      ActivityId = "string",
      AutoScalingGroupName = "string",
      Description = "string",
      Cause = "string",
      StartTime = as.POSIXct(
        "2015-01-01"
      ),
      EndTime = as.POSIXct(
        "2015-01-01"
      ),
      StatusCode = "PendingSpotBidPlacement"|"WaitingForSpotInstanceRequestId"|"WaitingForSpotInstanceId"|"WaitingForInstanceId"|"PreInService"|"InProgress"|"WaitingForELBConnectionDraining"|"MidLifecycleAction"|"WaitingForInstanceWarmup"|"Successful"|"Failed"|"Cancelled",
      StatusMessage = "string",
      Progress = 123,
      Details = "string"
    )
  )
)

Request syntax

1
2
3
4
5
6
7
svc$detach_instances(
  InstanceIds = list(
    "string"
  ),
  AutoScalingGroupName = "string",
  ShouldDecrementDesiredCapacity = TRUE|FALSE
)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
# This example detaches the specified instance from the specified Auto
# Scaling group.
svc$detach_instances(
  AutoScalingGroupName = "my-auto-scaling-group",
  InstanceIds = list(
    "i-93633f9b"
  ),
  ShouldDecrementDesiredCapacity = TRUE
)

## End(Not run)

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