CfnUpdatePolicy¶
-
class
aws_cdk.core.
CfnUpdatePolicy
(*, auto_scaling_replacing_update=None, auto_scaling_rolling_update=None, auto_scaling_scheduled_action=None, code_deploy_lambda_alias_update=None, enable_version_upgrade=None, use_online_resharding=None)¶ Bases:
object
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource.
AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
- Parameters
auto_scaling_replacing_update (
Optional
[CfnAutoScalingReplacingUpdate
]) – Specifies whether an Auto Scaling group and the instances it contains are replaced during an update. During replacement, AWS CloudFormation retains the old group until it finishes creating the new one. If the update fails, AWS CloudFormation can roll back to the old Auto Scaling group and delete the new Auto Scaling group.auto_scaling_rolling_update (
Optional
[CfnAutoScalingRollingUpdate
]) – To specify how AWS CloudFormation handles rolling updates for an Auto Scaling group, use the AutoScalingRollingUpdate policy. Rolling updates enable you to specify whether AWS CloudFormation updates instances that are in an Auto Scaling group in batches or all at once.auto_scaling_scheduled_action (
Optional
[CfnAutoScalingScheduledAction
]) – To specify how AWS CloudFormation handles updates for the MinSize, MaxSize, and DesiredCapacity properties when the AWS::AutoScaling::AutoScalingGroup resource has an associated scheduled action, use the AutoScalingScheduledAction policy.code_deploy_lambda_alias_update (
Optional
[CfnCodeDeployLambdaAliasUpdate
]) – To perform an AWS CodeDeploy deployment when the version changes on an AWS::Lambda::Alias resource, use the CodeDeployLambdaAliasUpdate update policy.enable_version_upgrade (
Optional
[bool
]) – To upgrade an Amazon ES domain to a new version of Elasticsearch rather than replacing the entire AWS::Elasticsearch::Domain resource, use the EnableVersionUpgrade update policy.use_online_resharding (
Optional
[bool
]) – To modify a replication group’s shards by adding or removing shards, rather than replacing the entire AWS::ElastiCache::ReplicationGroup resource, use the UseOnlineResharding update policy.
Attributes
-
auto_scaling_replacing_update
¶ Specifies whether an Auto Scaling group and the instances it contains are replaced during an update.
During replacement, AWS CloudFormation retains the old group until it finishes creating the new one. If the update fails, AWS CloudFormation can roll back to the old Auto Scaling group and delete the new Auto Scaling group.
- Return type
Optional
[CfnAutoScalingReplacingUpdate
]
-
auto_scaling_rolling_update
¶ To specify how AWS CloudFormation handles rolling updates for an Auto Scaling group, use the AutoScalingRollingUpdate policy.
Rolling updates enable you to specify whether AWS CloudFormation updates instances that are in an Auto Scaling group in batches or all at once.
- Return type
Optional
[CfnAutoScalingRollingUpdate
]
-
auto_scaling_scheduled_action
¶ To specify how AWS CloudFormation handles updates for the MinSize, MaxSize, and DesiredCapacity properties when the AWS::AutoScaling::AutoScalingGroup resource has an associated scheduled action, use the AutoScalingScheduledAction policy.
- Return type
Optional
[CfnAutoScalingScheduledAction
]
-
code_deploy_lambda_alias_update
¶ To perform an AWS CodeDeploy deployment when the version changes on an AWS::Lambda::Alias resource, use the CodeDeployLambdaAliasUpdate update policy.
- Return type
Optional
[CfnCodeDeployLambdaAliasUpdate
]
-
enable_version_upgrade
¶ To upgrade an Amazon ES domain to a new version of Elasticsearch rather than replacing the entire AWS::Elasticsearch::Domain resource, use the EnableVersionUpgrade update policy.
- Return type
Optional
[bool
]
-
use_online_resharding
¶ To modify a replication group’s shards by adding or removing shards, rather than replacing the entire AWS::ElastiCache::ReplicationGroup resource, use the UseOnlineResharding update policy.
- Return type
Optional
[bool
]