Package software.amazon.awscdk
Class CfnAutoScalingInstanceRefreshPreferences.Builder
java.lang.Object
software.amazon.awscdk.CfnAutoScalingInstanceRefreshPreferences.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnAutoScalingInstanceRefreshPreferences>
- Enclosing interface:
CfnAutoScalingInstanceRefreshPreferences
@Stability(Stable)
public static final class CfnAutoScalingInstanceRefreshPreferences.Builder
extends Object
implements software.amazon.jsii.Builder<CfnAutoScalingInstanceRefreshPreferences>
A builder for
CfnAutoScalingInstanceRefreshPreferences-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionalarmSpecification(CfnAutoScalingInstanceRefreshAlarmSpecification alarmSpecification) Sets the value ofCfnAutoScalingInstanceRefreshPreferences.getAlarmSpecification()Sets the value ofCfnAutoScalingInstanceRefreshPreferences.getBakeTime()build()Builds the configured instance.checkpointDelay(Number checkpointDelay) Sets the value ofCfnAutoScalingInstanceRefreshPreferences.getCheckpointDelay()checkpointPercentages(List<? extends Number> checkpointPercentages) Sets the value ofCfnAutoScalingInstanceRefreshPreferences.getCheckpointPercentages()instanceWarmup(Number instanceWarmup) Sets the value ofCfnAutoScalingInstanceRefreshPreferences.getInstanceWarmup()maxHealthyPercentage(Number maxHealthyPercentage) Sets the value ofCfnAutoScalingInstanceRefreshPreferences.getMaxHealthyPercentage()minHealthyPercentage(Number minHealthyPercentage) Sets the value ofCfnAutoScalingInstanceRefreshPreferences.getMinHealthyPercentage()scaleInProtectedInstances(String scaleInProtectedInstances) Sets the value ofCfnAutoScalingInstanceRefreshPreferences.getScaleInProtectedInstances()skipMatching(Boolean skipMatching) Sets the value ofCfnAutoScalingInstanceRefreshPreferences.getSkipMatching()standbyInstances(String standbyInstances) Sets the value ofCfnAutoScalingInstanceRefreshPreferences.getStandbyInstances()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
alarmSpecification
@Stability(Stable) public CfnAutoScalingInstanceRefreshPreferences.Builder alarmSpecification(CfnAutoScalingInstanceRefreshAlarmSpecification alarmSpecification) Sets the value ofCfnAutoScalingInstanceRefreshPreferences.getAlarmSpecification()- Parameters:
alarmSpecification- The CloudWatch alarms to monitor during the instance refresh. If any alarm goes into ALARM state, the instance refresh fails.- Returns:
this
-
bakeTime
@Stability(Stable) public CfnAutoScalingInstanceRefreshPreferences.Builder bakeTime(Number bakeTime) Sets the value ofCfnAutoScalingInstanceRefreshPreferences.getBakeTime()- Parameters:
bakeTime- The number of seconds after an instance refresh completes successfully before CloudFormation considers the update successful.- Returns:
this
-
checkpointDelay
@Stability(Stable) public CfnAutoScalingInstanceRefreshPreferences.Builder checkpointDelay(Number checkpointDelay) Sets the value ofCfnAutoScalingInstanceRefreshPreferences.getCheckpointDelay()- Parameters:
checkpointDelay- The number of seconds to wait after a checkpoint is reached before continuing.- Returns:
this
-
checkpointPercentages
@Stability(Stable) public CfnAutoScalingInstanceRefreshPreferences.Builder checkpointPercentages(List<? extends Number> checkpointPercentages) Sets the value ofCfnAutoScalingInstanceRefreshPreferences.getCheckpointPercentages()- Parameters:
checkpointPercentages- Threshold values for each checkpoint in ascending order. Each number is a percentage of the total number of instances in the group. When the percentage of instances that have been replaced reaches a checkpoint, the refresh waits for the configured checkpoint delay before continuing.- Returns:
this
-
instanceWarmup
@Stability(Stable) public CfnAutoScalingInstanceRefreshPreferences.Builder instanceWarmup(Number instanceWarmup) Sets the value ofCfnAutoScalingInstanceRefreshPreferences.getInstanceWarmup()- Parameters:
instanceWarmup- The number of seconds to wait after a new instance enters the InService state before moving on to replacing the next instance.- Returns:
this
-
maxHealthyPercentage
@Stability(Stable) public CfnAutoScalingInstanceRefreshPreferences.Builder maxHealthyPercentage(Number maxHealthyPercentage) Sets the value ofCfnAutoScalingInstanceRefreshPreferences.getMaxHealthyPercentage()- Parameters:
maxHealthyPercentage- The maximum percentage of the group that can be in service and healthy, or pending, to support your workload during the instance refresh. Used to control batch size.- Returns:
this
-
minHealthyPercentage
@Stability(Stable) public CfnAutoScalingInstanceRefreshPreferences.Builder minHealthyPercentage(Number minHealthyPercentage) Sets the value ofCfnAutoScalingInstanceRefreshPreferences.getMinHealthyPercentage()- Parameters:
minHealthyPercentage- The minimum percentage of the group to keep in service, healthy, and ready to use to support your workload during the instance refresh.- Returns:
this
-
scaleInProtectedInstances
@Stability(Stable) public CfnAutoScalingInstanceRefreshPreferences.Builder scaleInProtectedInstances(String scaleInProtectedInstances) Sets the value ofCfnAutoScalingInstanceRefreshPreferences.getScaleInProtectedInstances()- Parameters:
scaleInProtectedInstances- Specifies the behavior of instances that are protected from scale in during an instance refresh.- Returns:
this
-
skipMatching
@Stability(Stable) public CfnAutoScalingInstanceRefreshPreferences.Builder skipMatching(Boolean skipMatching) Sets the value ofCfnAutoScalingInstanceRefreshPreferences.getSkipMatching()- Parameters:
skipMatching- Indicates whether skip matching is enabled. If true, instances that already match the desired configuration are not replaced.- Returns:
this
-
standbyInstances
@Stability(Stable) public CfnAutoScalingInstanceRefreshPreferences.Builder standbyInstances(String standbyInstances) Sets the value ofCfnAutoScalingInstanceRefreshPreferences.getStandbyInstances()- Parameters:
standbyInstances- Specifies the behavior of instances in standby during an instance refresh.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnAutoScalingInstanceRefreshPreferences>- Returns:
- a new instance of
CfnAutoScalingInstanceRefreshPreferences - Throws:
NullPointerException- if any required attribute was not provided
-