Interface ICfnUpdatePolicy
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource.
Namespace: Amazon.CDK
Assembly: Amazon.CDK.dll
Syntax (csharp)
public interface ICfnUpdatePolicy
Syntax (vb)
Public Interface ICfnUpdatePolicy
Remarks
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.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
var cfnUpdatePolicy = new CfnUpdatePolicy {
AutoScalingReplacingUpdate = new CfnAutoScalingReplacingUpdate {
WillReplace = false
},
AutoScalingRollingUpdate = new CfnAutoScalingRollingUpdate {
MaxBatchSize = 123,
MinInstancesInService = 123,
MinSuccessfulInstancesPercent = 123,
PauseTime = "pauseTime",
SuspendProcesses = new [] { "suspendProcesses" },
WaitOnResourceSignals = false
},
AutoScalingScheduledAction = new CfnAutoScalingScheduledAction {
IgnoreUnmodifiedGroupSizeProperties = false
},
CodeDeployLambdaAliasUpdate = new CfnCodeDeployLambdaAliasUpdate {
ApplicationName = "applicationName",
DeploymentGroupName = "deploymentGroupName",
// the properties below are optional
AfterAllowTrafficHook = "afterAllowTrafficHook",
BeforeAllowTrafficHook = "beforeAllowTrafficHook"
},
EnableVersionUpgrade = false,
UseOnlineResharding = false
};
Synopsis
Properties
AutoScalingReplacingUpdate | Specifies whether an Auto Scaling group and the instances it contains are replaced during an update. |
AutoScalingRollingUpdate | To specify how AWS CloudFormation handles rolling updates for an Auto Scaling group, use the AutoScalingRollingUpdate policy. |
AutoScalingScheduledAction | 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. |
CodeDeployLambdaAliasUpdate | To perform an AWS CodeDeploy deployment when the version changes on an AWS::Lambda::Alias resource, use the CodeDeployLambdaAliasUpdate update policy. |
EnableVersionUpgrade | 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. |
UseOnlineResharding | 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. |
Properties
AutoScalingReplacingUpdate
Specifies whether an Auto Scaling group and the instances it contains are replaced during an update.
virtual ICfnAutoScalingReplacingUpdate AutoScalingReplacingUpdate { get; }
Property Value
ICfnAutoScalingReplacingUpdate
Remarks
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.
AutoScalingRollingUpdate
To specify how AWS CloudFormation handles rolling updates for an Auto Scaling group, use the AutoScalingRollingUpdate policy.
virtual ICfnAutoScalingRollingUpdate AutoScalingRollingUpdate { get; }
Property Value
Remarks
Rolling updates enable you to specify whether AWS CloudFormation updates instances that are in an Auto Scaling group in batches or all at once.
AutoScalingScheduledAction
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.
virtual ICfnAutoScalingScheduledAction AutoScalingScheduledAction { get; }
Property Value
ICfnAutoScalingScheduledAction
CodeDeployLambdaAliasUpdate
To perform an AWS CodeDeploy deployment when the version changes on an AWS::Lambda::Alias resource, use the CodeDeployLambdaAliasUpdate update policy.
virtual ICfnCodeDeployLambdaAliasUpdate CodeDeployLambdaAliasUpdate { get; }
Property Value
ICfnCodeDeployLambdaAliasUpdate
EnableVersionUpgrade
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.
virtual Nullable<bool> EnableVersionUpgrade { get; }
Property Value
System.Nullable<System.Boolean>
UseOnlineResharding
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.
virtual Nullable<bool> UseOnlineResharding { get; }
Property Value
System.Nullable<System.Boolean>