autoscaling_start_instance_refresh: Starts a new instance refresh operation, which triggers a...

Description Usage Arguments Value Request syntax Examples

View source: R/autoscaling_operations.R

Description

Starts a new instance refresh operation, which triggers a rolling replacement of all previously launched instances in the Auto Scaling group with a new group of instances.

If successful, this call creates a new instance refresh request with a unique ID that you can use to track its progress. To query its status, call the describe_instance_refreshes API. To describe the instance refreshes that have already run, call the describe_instance_refreshes API. To cancel an instance refresh operation in progress, use the cancel_instance_refresh API.

For more information, see Replacing Auto Scaling Instances Based on an Instance Refresh.

Usage

1
2
autoscaling_start_instance_refresh(AutoScalingGroupName, Strategy,
  Preferences)

Arguments

AutoScalingGroupName

[required] The name of the Auto Scaling group.

Strategy

The strategy to use for the instance refresh. The only valid value is Rolling.

A rolling update is an update that is applied to all instances in an Auto Scaling group until all instances have been updated. A rolling update can fail due to failed health checks or if instances are on standby or are protected from scale in. If the rolling update process fails, any instances that were already replaced are not rolled back to their previous configuration.

Preferences

Set of preferences associated with the instance refresh request.

If not provided, the default values are used. For MinHealthyPercentage, the default value is 90. For InstanceWarmup, the default is to use the value specified for the health check grace period for the Auto Scaling group.

For more information, see RefreshPreferences in the Amazon EC2 Auto Scaling API Reference.

Value

A list with the following syntax:

1
2
3
list(
  InstanceRefreshId = "string"
)

Request syntax

1
2
3
4
5
6
7
8
svc$start_instance_refresh(
  AutoScalingGroupName = "string",
  Strategy = "Rolling",
  Preferences = list(
    MinHealthyPercentage = 123,
    InstanceWarmup = 123
  )
)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
# This example starts an instance refresh for the specified Auto Scaling
# group.
svc$start_instance_refresh(
  AutoScalingGroupName = "my-auto-scaling-group",
  Preferences = list(
    InstanceWarmup = 400L,
    MinHealthyPercentage = 50L
  )
)

## End(Not run)

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