WarmPoolProps

class aws_cdk.aws_autoscaling.WarmPoolProps(*, max_group_prepared_capacity=None, min_size=None, pool_state=None, reuse_on_scale_in=None, auto_scaling_group)

Bases: WarmPoolOptions

Properties for a warm pool.

Parameters:
  • max_group_prepared_capacity (Union[int, float, None]) – 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

  • min_size (Union[int, float, None]) – The minimum number of instances to maintain in the warm pool. Default: 0

  • pool_state (Optional[PoolState]) – The instance state to transition to after the lifecycle actions are complete. Default: PoolState.STOPPED

  • reuse_on_scale_in (Optional[bool]) – 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

  • auto_scaling_group (IAutoScalingGroup) – The Auto Scaling group to add the warm pool to.

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_autoscaling as autoscaling

# auto_scaling_group: autoscaling.AutoScalingGroup

warm_pool_props = autoscaling.WarmPoolProps(
    auto_scaling_group=auto_scaling_group,

    # the properties below are optional
    max_group_prepared_capacity=123,
    min_size=123,
    pool_state=autoscaling.PoolState.HIBERNATED,
    reuse_on_scale_in=False
)

Attributes

auto_scaling_group

The Auto Scaling group to add the warm pool to.

max_group_prepared_capacity

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

min_size

The minimum number of instances to maintain in the warm pool.

Default:

0

pool_state

The instance state to transition to after the lifecycle actions are complete.

Default:

PoolState.STOPPED

reuse_on_scale_in

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