Class RollingUpdateOptions.Builder
java.lang.Object
software.amazon.awscdk.services.autoscaling.RollingUpdateOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<RollingUpdateOptions>
- Enclosing interface:
RollingUpdateOptions
@Stability(Stable)
public static final class RollingUpdateOptions.Builder
extends Object
implements software.amazon.jsii.Builder<RollingUpdateOptions>
A builder for
RollingUpdateOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.maxBatchSize
(Number maxBatchSize) Sets the value ofRollingUpdateOptions.getMaxBatchSize()
minInstancesInService
(Number minInstancesInService) Sets the value ofRollingUpdateOptions.getMinInstancesInService()
minSuccessPercentage
(Number minSuccessPercentage) Sets the value ofRollingUpdateOptions.getMinSuccessPercentage()
Sets the value ofRollingUpdateOptions.getPauseTime()
suspendProcesses
(List<? extends ScalingProcess> suspendProcesses) Sets the value ofRollingUpdateOptions.getSuspendProcesses()
waitOnResourceSignals
(Boolean waitOnResourceSignals) Sets the value ofRollingUpdateOptions.getWaitOnResourceSignals()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
maxBatchSize
Sets the value ofRollingUpdateOptions.getMaxBatchSize()
- Parameters:
maxBatchSize
- The maximum number of instances that AWS CloudFormation updates at once. This number affects the speed of the replacement.- Returns:
this
-
minInstancesInService
@Stability(Stable) public RollingUpdateOptions.Builder minInstancesInService(Number minInstancesInService) Sets the value ofRollingUpdateOptions.getMinInstancesInService()
- Parameters:
minInstancesInService
- The minimum number of instances that must be in service before more instances are replaced. This number affects the speed of the replacement.- Returns:
this
-
minSuccessPercentage
@Stability(Stable) public RollingUpdateOptions.Builder minSuccessPercentage(Number minSuccessPercentage) Sets the value ofRollingUpdateOptions.getMinSuccessPercentage()
- Parameters:
minSuccessPercentage
- The percentage of instances that must signal success for the update to succeed.- Returns:
this
-
pauseTime
Sets the value ofRollingUpdateOptions.getPauseTime()
- Parameters:
pauseTime
- The pause time after making a change to a batch of instances.- Returns:
this
-
suspendProcesses
@Stability(Stable) public RollingUpdateOptions.Builder suspendProcesses(List<? extends ScalingProcess> suspendProcesses) Sets the value ofRollingUpdateOptions.getSuspendProcesses()
- Parameters:
suspendProcesses
- Specifies the Auto Scaling processes to suspend during a stack update. Suspending processes prevents Auto Scaling from interfering with a stack update.- Returns:
this
-
waitOnResourceSignals
@Stability(Stable) public RollingUpdateOptions.Builder waitOnResourceSignals(Boolean waitOnResourceSignals) Sets the value ofRollingUpdateOptions.getWaitOnResourceSignals()
- Parameters:
waitOnResourceSignals
- Specifies whether the Auto Scaling group waits on signals from new instances during an update.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<RollingUpdateOptions>
- Returns:
- a new instance of
RollingUpdateOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-