Class WarmPoolProps.Builder
java.lang.Object
software.amazon.awscdk.services.autoscaling.WarmPoolProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<WarmPoolProps>
- Enclosing interface:
- WarmPoolProps
@Stability(Stable)
public static final class WarmPoolProps.Builder
extends Object
implements software.amazon.jsii.Builder<WarmPoolProps>
A builder for
WarmPoolProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionautoScalingGroup
(IAutoScalingGroup autoScalingGroup) Sets the value ofWarmPoolProps.getAutoScalingGroup()
build()
Builds the configured instance.maxGroupPreparedCapacity
(Number maxGroupPreparedCapacity) Sets the value ofWarmPoolOptions.getMaxGroupPreparedCapacity()
Sets the value ofWarmPoolOptions.getMinSize()
Sets the value ofWarmPoolOptions.getPoolState()
reuseOnScaleIn
(Boolean reuseOnScaleIn) Sets the value ofWarmPoolOptions.getReuseOnScaleIn()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
autoScalingGroup
@Stability(Stable) public WarmPoolProps.Builder autoScalingGroup(IAutoScalingGroup autoScalingGroup) Sets the value ofWarmPoolProps.getAutoScalingGroup()
- Parameters:
autoScalingGroup
- The Auto Scaling group to add the warm pool to. This parameter is required.- Returns:
this
-
maxGroupPreparedCapacity
@Stability(Stable) public WarmPoolProps.Builder maxGroupPreparedCapacity(Number maxGroupPreparedCapacity) Sets the value ofWarmPoolOptions.getMaxGroupPreparedCapacity()
- Parameters:
maxGroupPreparedCapacity
- The maximum number of instances that are allowed to be in the warm pool or in any state except Terminated for the Auto Scaling group. If the value is not specified, Amazon EC2 Auto Scaling launches and maintains the difference between the group's maximum capacity and its desired capacity.- Returns:
this
-
minSize
Sets the value ofWarmPoolOptions.getMinSize()
- Parameters:
minSize
- The minimum number of instances to maintain in the warm pool.- Returns:
this
-
poolState
Sets the value ofWarmPoolOptions.getPoolState()
- Parameters:
poolState
- The instance state to transition to after the lifecycle actions are complete.- Returns:
this
-
reuseOnScaleIn
Sets the value ofWarmPoolOptions.getReuseOnScaleIn()
- Parameters:
reuseOnScaleIn
- Indicates whether instances in the Auto Scaling group can be returned to the warm pool on scale in. If the value is not specified, instances in the Auto Scaling group will be terminated when the group scales in.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<WarmPoolProps>
- Returns:
- a new instance of
WarmPoolProps
- Throws:
NullPointerException
- if any required attribute was not provided
-