Enum InstanceRefreshStrategy
java.lang.Object
java.lang.Enum<InstanceRefreshStrategy>
software.amazon.awscdk.services.autoscaling.InstanceRefreshStrategy
- All Implemented Interfaces:
Serializable,Comparable<InstanceRefreshStrategy>,java.lang.constant.Constable
@Generated(value="jsii-pacmak/1.138.0 (build 0ca7ee8)",
date="2026-07-31T10:49:23.690Z")
@Stability(Stable)
public enum InstanceRefreshStrategy
extends Enum<InstanceRefreshStrategy>
The strategy to use for the instance refresh.
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 classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionReplace the root volume of instances in place.Terminate instances and launch new ones to replace them. -
Method Summary
Modifier and TypeMethodDescriptionstatic InstanceRefreshStrategyReturns the enum constant of this type with the specified name.static InstanceRefreshStrategy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ROLLING
Terminate instances and launch new ones to replace them. -
REPLACE_ROOT_VOLUME
Replace the root volume of instances in place.When this strategy is used, only
ImageIdchanges within the launch template or mixed instances policy are allowed. Other property changes may cause the stack update to fail.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-