autoscaling_set_desired_capacity: Sets the size of the specified Auto Scaling group

Description Usage Arguments Value Request syntax Examples

View source: R/autoscaling_operations.R

Description

Sets the size of the specified Auto Scaling group.

If a scale-in activity occurs as a result of a new DesiredCapacity value that is lower than the current size of the group, the Auto Scaling group uses its termination policy to determine which instances to terminate.

For more information, see Manual scaling in the Amazon EC2 Auto Scaling User Guide.

Usage

1
2
autoscaling_set_desired_capacity(AutoScalingGroupName, DesiredCapacity,
  HonorCooldown)

Arguments

AutoScalingGroupName

[required] The name of the Auto Scaling group.

DesiredCapacity

[required] The desired capacity is the initial capacity of the Auto Scaling group after this operation completes and the capacity it attempts to maintain.

HonorCooldown

Indicates whether Amazon EC2 Auto Scaling waits for the cooldown period to complete before initiating a scaling activity to set your Auto Scaling group to its new capacity. By default, Amazon EC2 Auto Scaling does not honor the cooldown period during manual scaling activities.

Value

An empty list.

Request syntax

1
2
3
4
5
svc$set_desired_capacity(
  AutoScalingGroupName = "string",
  DesiredCapacity = 123,
  HonorCooldown = TRUE|FALSE
)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
# This example sets the desired capacity for the specified Auto Scaling
# group.
svc$set_desired_capacity(
  AutoScalingGroupName = "my-auto-scaling-group",
  DesiredCapacity = 2L,
  HonorCooldown = TRUE
)

## End(Not run)

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