Skip to content
v2.278.0

WarmPoolProps Struct ​

Properties for a warm pool.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_autoscaling as autoscaling } from 'aws-cdk-lib';
import { aws_autoscaling as interfaces_autoscaling } from 'aws-cdk-lib/interfaces';

declare const autoScalingGroupRef: interfaces_autoscaling.IAutoScalingGroupRef;
const warmPoolProps: autoscaling.WarmPoolProps = {
  autoScalingGroup: autoScalingGroupRef,

  // the properties below are optional
  maxGroupPreparedCapacity: 123,
  minSize: 123,
  poolState: autoscaling.PoolState.HIBERNATED,
  reuseOnScaleIn: false,
};
python
# 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
from aws_cdk.interfaces import aws_autoscaling as interfaces_autoscaling

# auto_scaling_group_ref: interfaces_autoscaling.IAutoScalingGroupRef

warm_pool_props = autoscaling.WarmPoolProps(
    auto_scaling_group=auto_scaling_group_ref,

    # the properties below are optional
    max_group_prepared_capacity=123,
    min_size=123,
    pool_state=autoscaling.PoolState.HIBERNATED,
    reuse_on_scale_in=False
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.autoscaling.*;
import software.amazon.awscdk.interfaces.autoscaling.*;

IAutoScalingGroupRef autoScalingGroupRef;

WarmPoolProps warmPoolProps = WarmPoolProps.builder()
        .autoScalingGroup(autoScalingGroupRef)

        // the properties below are optional
        .maxGroupPreparedCapacity(123)
        .minSize(123)
        .poolState(PoolState.HIBERNATED)
        .reuseOnScaleIn(false)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AutoScaling;
using Amazon.CDK.Interfaces.AutoScaling;

IAutoScalingGroupRef autoScalingGroupRef;

var warmPoolProps = new WarmPoolProps {
    AutoScalingGroup = autoScalingGroupRef,

    // the properties below are optional
    MaxGroupPreparedCapacity = 123,
    MinSize = 123,
    PoolState = PoolState.HIBERNATED,
    ReuseOnScaleIn = false
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var autoScalingGroupRef IAutoScalingGroupRef

warmPoolProps := &WarmPoolProps{
	AutoScalingGroup: autoScalingGroupRef,

	// the properties below are optional
	MaxGroupPreparedCapacity: jsii.Number(123),
	MinSize: jsii.Number(123),
	PoolState: awscdk.Aws_autoscaling.PoolState_HIBERNATED,
	ReuseOnScaleIn: jsii.Boolean(false),
}

Properties ​

autoScalingGroupIAutoScalingGroupRefauto_scaling_groupIAutoScalingGroupRefautoScalingGroupIAutoScalingGroupRefAutoScalingGroupIAutoScalingGroupRefAutoScalingGroupIAutoScalingGroupRef required #
The Auto Scaling group to add the warm pool to.
maxGroupPreparedCapacityoptionalnumbermax_group_prepared_capacityoptionalint | floatmaxGroupPreparedCapacityoptionalNumberMaxGroupPreparedCapacityoptionaldoubleMaxGroupPreparedCapacityoptional*float64 #
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.

Default: max size of 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.

minSizeoptionalnumbermin_sizeoptionalint | floatminSizeoptionalNumberMinSizeoptionaldoubleMinSizeoptional*float64 = 0 #
The minimum number of instances to maintain in the warm pool.
poolStateoptionalPoolStatepool_stateoptionalPoolStatepoolStateoptionalPoolStatePoolStateoptionalPoolStatePoolStateoptionalPoolState = PoolState.STOPPED #
The instance state to transition to after the lifecycle actions are complete.
reuseOnScaleInoptionalbooleanreuse_on_scale_inoptionalboolreuseOnScaleInoptionalBooleanReuseOnScaleInoptionalboolReuseOnScaleInoptional*bool = false #
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.