class CfnWarmPoolPropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.AutoScaling.Mixins.CfnWarmPoolPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsautoscaling/mixins#CfnWarmPoolPropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.autoscaling.mixins.CfnWarmPoolPropsMixin |
Python | aws_cdk.mixins_preview.aws_autoscaling.mixins.CfnWarmPoolPropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_autoscaling » mixins » CfnWarmPoolPropsMixin |
Implements
IMixin
Extends
Mixin
The AWS::AutoScaling::WarmPool resource creates a pool of pre-initialized EC2 instances that sits alongside the Auto Scaling group.
Whenever your application needs to scale out, the Auto Scaling group can draw on the warm pool to meet its new desired capacity.
When you create a warm pool, you can define a minimum size. When your Auto Scaling group scales out and the size of the warm pool shrinks, Amazon EC2 Auto Scaling launches new instances into the warm pool to maintain its minimum size.
For more information, see Warm pools for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide .
CloudFormation supports the
UpdatePolicyattribute for Auto Scaling groups. During an update, ifUpdatePolicyis set toAutoScalingRollingUpdate, CloudFormation replacesInServiceinstances only. Instances in the warm pool are not replaced. The difference in which instances are replaced can potentially result in different instance configurations after the stack update completes. IfUpdatePolicyis set toAutoScalingReplacingUpdate, you do not encounter this issue because CloudFormation replaces both the Auto Scaling group and the warm pool.
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-warmpool.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { mixins } from '@aws-cdk/mixins-preview';
import { mixins as autoscaling_mixins } from '@aws-cdk/mixins-preview/aws-autoscaling';
const cfnWarmPoolPropsMixin = new autoscaling_mixins.CfnWarmPoolPropsMixin({
autoScalingGroupName: 'autoScalingGroupName',
instanceReusePolicy: {
reuseOnScaleIn: false,
},
maxGroupPreparedCapacity: 123,
minSize: 123,
poolState: 'poolState',
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnWarmPoolPropsMixin(props: CfnWarmPoolMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Warm Pool Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::AutoScaling::WarmPool.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript