InstanceRefreshStrategy Enum
The strategy to use for the instance refresh.
Example
ts
declare const vpc: ec2.Vpc;
declare const instanceType: ec2.InstanceType;
declare const machineImage: ec2.IMachineImage;
declare const alarm: cloudwatch.Alarm;
new autoscaling.AutoScalingGroup(this, 'ASG', {
vpc,
instanceType,
machineImage,
updatePolicy: autoscaling.UpdatePolicy.instanceRefresh({
strategy: autoscaling.InstanceRefreshStrategy.ROLLING,
minHealthyPercentage: 90,
maxHealthyPercentage: 100,
instanceWarmup: Duration.seconds(300),
checkpointPercentages: [50, 100],
checkpointDelay: Duration.minutes(10),
alarms: [alarm],
}),
});
Members
| Member | Description |
|---|---|
ROLLING | Terminate instances and launch new ones to replace them. |
REPLACE_ROOT_VOLUME | Replace the root volume of instances in place. |
Referenced by
InstanceRefreshOptions.strategystrategystrategyStrategyStrategy