Interface InstanceRefreshOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
InstanceRefreshOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.138.0 (build 0ca7ee8)", date="2026-07-31T10:49:23.689Z") @Stability(Stable) public interface InstanceRefreshOptions extends software.amazon.jsii.JsiiSerializable
Options for customizing the instance refresh update policy.

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();
 
  • Method Details

    • getStrategy

      @Stability(Stable) @NotNull InstanceRefreshStrategy getStrategy()
      The strategy to use for the instance refresh.
    • getAlarms

      @Stability(Stable) @Nullable default List<IAlarmRef> 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

      @Stability(Stable) @Nullable default Duration getBakeTime()
      The amount of time after an instance refresh completes successfully before CloudFormation considers the update successful.

      Default: Duration.seconds(0)

    • getCheckpointDelay

      @Stability(Stable) @Nullable default Duration 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

      @Stability(Stable) @Nullable default List<Number> 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

      @Stability(Stable) @Nullable default Duration 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

      @Stability(Stable) @Nullable default Number 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 maxHealthyPercentage and minHealthyPercentage cannot 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

      @Stability(Stable) @Nullable default Number 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

      @Stability(Stable) @Nullable default ScaleInProtectedInstances getScaleInProtectedInstances()
      Specifies the behavior of instances that are protected from scale in during an instance refresh.

      Default: ScaleInProtectedInstances.WAIT

    • getSkipMatching

      @Stability(Stable) @Nullable default Boolean getSkipMatching()
      Indicates whether skip matching is enabled.

      Default: true

    • getStandbyInstances

      @Stability(Stable) @Nullable default StandbyInstances getStandbyInstances()
      Specifies the behavior of instances in standby during an instance refresh.

      Default: StandbyInstances.WAIT

    • builder

      @Stability(Stable) static InstanceRefreshOptions.Builder builder()
      Returns:
      a InstanceRefreshOptions.Builder of InstanceRefreshOptions