Class WarmPool.Builder

java.lang.Object
software.amazon.awscdk.services.autoscaling.WarmPool.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<WarmPool>
Enclosing class:
WarmPool

@Stability(Stable) public static final class WarmPool.Builder extends Object implements software.amazon.jsii.Builder<WarmPool>
A fluent builder for WarmPool.
  • Method Details

    • create

      @Stability(Stable) public static WarmPool.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of WarmPool.Builder.
    • maxGroupPreparedCapacity

      @Stability(Stable) public WarmPool.Builder maxGroupPreparedCapacity(Number 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.

      Default: - max size of the Auto Scaling group

      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. This parameter is required.
      Returns:
      this
    • minSize

      @Stability(Stable) public WarmPool.Builder minSize(Number minSize)
      The minimum number of instances to maintain in the warm pool.

      Default: 0

      Parameters:
      minSize - The minimum number of instances to maintain in the warm pool. This parameter is required.
      Returns:
      this
    • poolState

      @Stability(Stable) public WarmPool.Builder poolState(PoolState poolState)
      The instance state to transition to after the lifecycle actions are complete.

      Default: PoolState.STOPPED

      Parameters:
      poolState - The instance state to transition to after the lifecycle actions are complete. This parameter is required.
      Returns:
      this
    • reuseOnScaleIn

      @Stability(Stable) public WarmPool.Builder reuseOnScaleIn(Boolean 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.

      Default: false

      Parameters:
      reuseOnScaleIn - Indicates whether instances in the Auto Scaling group can be returned to the warm pool on scale in. This parameter is required.
      Returns:
      this
    • autoScalingGroup

      @Stability(Stable) public WarmPool.Builder autoScalingGroup(IAutoScalingGroup autoScalingGroup)
      The Auto Scaling group to add the warm pool to.

      Parameters:
      autoScalingGroup - The Auto Scaling group to add the warm pool to. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public WarmPool build()
      Specified by:
      build in interface software.amazon.jsii.Builder<WarmPool>
      Returns:
      a newly built instance of WarmPool.