Interface InstanceRefreshOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
InstanceRefreshOptions.Jsii$Proxy
Example:
Vpc vpc;
InstanceType instanceType;
IMachineImage machineImage;
Alarm alarm;
AutoScalingGroup.Builder.create(this, "ASG")
.vpc(vpc)
.instanceType(instanceType)
.machineImage(machineImage)
.updatePolicy(UpdatePolicy.instanceRefresh(InstanceRefreshOptions.builder()
.strategy(InstanceRefreshStrategy.ROLLING)
.minHealthyPercentage(90)
.maxHealthyPercentage(100)
.instanceWarmup(Duration.seconds(300))
.checkpointPercentages(List.of(50, 100))
.checkpointDelay(Duration.minutes(10))
.alarms(List.of(alarm))
.build()))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forInstanceRefreshOptionsstatic final classAn implementation forInstanceRefreshOptions -
Method Summary
Modifier and TypeMethodDescriptionbuilder()The CloudWatch alarms to monitor during the instance refresh.default DurationThe amount of time after an instance refresh completes successfully before CloudFormation considers the update successful.default DurationThe amount of time to wait after a checkpoint is reached before continuing.Threshold values for each checkpoint in ascending order.default DurationThe amount of time to wait after a new instance enters the InService state before moving on to refresh the next instance.default NumberThe maximum percentage of the group that can be in service and healthy, or pending, to support your workload during the instance refresh.default NumberThe minimum percentage of the group to keep in service, healthy, and ready to use to support your workload during the instance refresh, expressed as a percentage of the group's desired capacity.default ScaleInProtectedInstancesSpecifies the behavior of instances that are protected from scale in during an instance refresh.default BooleanIndicates whether skip matching is enabled.default StandbyInstancesSpecifies the behavior of instances in standby during an instance refresh.The strategy to use for the instance refresh.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getStrategy
The strategy to use for the instance refresh. -
getAlarms
The CloudWatch alarms to monitor during the instance refresh.If any of the alarms goes into ALARM state, the instance refresh fails. You can specify up to 10 alarms.
Default: - no alarms
-
getBakeTime
The amount of time after an instance refresh completes successfully before CloudFormation considers the update successful.Default: Duration.seconds(0)
-
getCheckpointDelay
The amount of time to wait after a checkpoint is reached before continuing.Default: - 3600 seconds (1 hour), applied only when checkpointPercentages is set
-
getCheckpointPercentages
Threshold values for each checkpoint in ascending order.Each number must be unique. To replace all instances in the group, the last number in the array must be 100.
Default: - no checkpoints
-
getInstanceWarmup
The amount of time to wait after a new instance enters the InService state before moving on to refresh the next instance.Default: - the group's DefaultInstanceWarmup if defined; otherwise the group's HealthCheckGracePeriod
-
getMaxHealthyPercentage
The maximum percentage of the group that can be in service and healthy, or pending, to support your workload during the instance refresh.The difference between
maxHealthyPercentageandminHealthyPercentagecannot be greater than 100. A larger range increases the number of instances that can be replaced at the same time.Default: - the value set in the Auto Scaling group's instance maintenance policy, if defined; otherwise 110 when the strategy is Rolling, or 100 when the strategy is ReplaceRootVolume
-
getMinHealthyPercentage
The minimum percentage of the group to keep in service, healthy, and ready to use to support your workload during the instance refresh, expressed as a percentage of the group's desired capacity.Default: - the value set in the Auto Scaling group's instance maintenance policy, if defined; otherwise 100 when the strategy is Rolling, or 90 when the strategy is ReplaceRootVolume
-
getScaleInProtectedInstances
Specifies the behavior of instances that are protected from scale in during an instance refresh.Default: ScaleInProtectedInstances.WAIT
-
getSkipMatching
Indicates whether skip matching is enabled.Default: true
-
getStandbyInstances
Specifies the behavior of instances in standby during an instance refresh.Default: StandbyInstances.WAIT
-
builder
- Returns:
- a
InstanceRefreshOptions.BuilderofInstanceRefreshOptions
-