CfnWarmPoolPropsMixin
- class aws_cdk.mixins_preview.aws_autoscaling.mixins.CfnWarmPoolPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::AutoScaling::WarmPoolresource 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 . .. epigraph:
CloudFormation supports the ``UpdatePolicy`` attribute for Auto Scaling groups. During an update, if ``UpdatePolicy`` is set to ``AutoScalingRollingUpdate`` , CloudFormation replaces ``InService`` instances 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. If ``UpdatePolicy`` is set to ``AutoScalingReplacingUpdate`` , you do not encounter this issue because CloudFormation replaces both the Auto Scaling group and the warm pool.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-warmpool.html
- CloudformationResource:
AWS::AutoScaling::WarmPool
- Mixin:
true
- 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.mixins_preview import mixins from aws_cdk.mixins_preview.aws_autoscaling import mixins as autoscaling_mixins cfn_warm_pool_props_mixin = autoscaling_mixins.CfnWarmPoolPropsMixin(autoscaling_mixins.CfnWarmPoolMixinProps( auto_scaling_group_name="autoScalingGroupName", instance_reuse_policy=autoscaling_mixins.CfnWarmPoolPropsMixin.InstanceReusePolicyProperty( reuse_on_scale_in=False ), max_group_prepared_capacity=123, min_size=123, pool_state="poolState" ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::AutoScaling::WarmPool.- Parameters:
props (
Union[CfnWarmPoolMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['autoScalingGroupName', 'instanceReusePolicy', 'maxGroupPreparedCapacity', 'minSize', 'poolState']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
InstanceReusePolicyProperty
- class CfnWarmPoolPropsMixin.InstanceReusePolicyProperty(*, reuse_on_scale_in=None)
Bases:
objectA structure that specifies an instance reuse policy for the
InstanceReusePolicyproperty of the AWS::AutoScaling::WarmPool resource.For more information, see Warm pools for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide .
- Parameters:
reuse_on_scale_in (
Union[bool,IResolvable,None]) – Specifies whether instances in the Auto Scaling group can be returned to the warm pool on scale in.- See:
- 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.mixins_preview.aws_autoscaling import mixins as autoscaling_mixins instance_reuse_policy_property = autoscaling_mixins.CfnWarmPoolPropsMixin.InstanceReusePolicyProperty( reuse_on_scale_in=False )
Attributes
- reuse_on_scale_in
Specifies whether instances in the Auto Scaling group can be returned to the warm pool on scale in.