2021/03/18 - Auto Scaling - 1 updated api methods
Changes Amazon EC2 Auto Scaling Instance Refresh now supports phased deployments.
{'Preferences': {'CheckpointDelay': 'integer', 'CheckpointPercentages': ['integer']}}
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 DescribeInstanceRefreshes API. To describe the instance refreshes that have already run, call the DescribeInstanceRefreshes API. To cancel an instance refresh operation in progress, use the CancelInstanceRefresh API.
For more information, see Replacing Auto Scaling instances based on an instance refresh in the Amazon EC2 Auto Scaling User Guide.
See also: AWS API Documentation
Request Syntax
client.start_instance_refresh( AutoScalingGroupName='string', Strategy='Rolling', Preferences={ 'MinHealthyPercentage': 123, 'InstanceWarmup': 123, 'CheckpointPercentages': [ 123, ], 'CheckpointDelay': 123 } )
string
[REQUIRED]
The name of the Auto Scaling group.
string
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.
dict
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.
MinHealthyPercentage (integer) --
The amount of capacity in the Auto Scaling group that must remain healthy during an instance refresh to allow the operation to continue, as a percentage of the desired capacity of the Auto Scaling group (rounded up to the nearest integer). The default is 90.
InstanceWarmup (integer) --
The number of seconds until a newly launched instance is configured and ready to use. During this time, Amazon EC2 Auto Scaling does not immediately move on to the next replacement. The default is to use the value for the health check grace period defined for the group.
CheckpointPercentages (list) --
Threshold values for each checkpoint in ascending order. Each number must be unique. To replace all instances in the Auto Scaling group, the last number in the array must be 100.
For usage examples, see Adding checkpoints to an instance refresh in the Amazon EC2 Auto Scaling User Guide.
(integer) --
CheckpointDelay (integer) --
The amount of time, in seconds, to wait after a checkpoint before continuing. This property is optional, but if you specify a value for it, you must also specify a value for CheckpointPercentages. If you specify a value for CheckpointPercentages and not for CheckpointDelay, the CheckpointDelay defaults to 3600 (1 hour).
dict
Response Syntax
{ 'InstanceRefreshId': 'string' }
Response Structure
(dict) --
InstanceRefreshId (string) --
A unique ID for tracking the progress of the request.