Show / Hide Table of Contents

Class CfnUpdatePolicy

Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource.

Inheritance
object
CfnUpdatePolicy
Implements
ICfnUpdatePolicy
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnUpdatePolicy : ICfnUpdatePolicy
Syntax (vb)
Public Class CfnUpdatePolicy Implements 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,
                     MinActiveInstancesPercent = 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

Constructors

CfnUpdatePolicy()

Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource.

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.

Constructors

CfnUpdatePolicy()

Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource.

public CfnUpdatePolicy()
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,
                     MinActiveInstancesPercent = 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
             };

Properties

AutoScalingReplacingUpdate

Specifies whether an Auto Scaling group and the instances it contains are replaced during an update.

public ICfnAutoScalingReplacingUpdate? AutoScalingReplacingUpdate { get; set; }
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.

public ICfnAutoScalingRollingUpdate? AutoScalingRollingUpdate { get; set; }
Property Value

ICfnAutoScalingRollingUpdate

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.

public ICfnAutoScalingScheduledAction? AutoScalingScheduledAction { get; set; }
Property Value

ICfnAutoScalingScheduledAction

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

CodeDeployLambdaAliasUpdate

To perform an AWS CodeDeploy deployment when the version changes on an AWS::Lambda::Alias resource, use the CodeDeployLambdaAliasUpdate update policy.

public ICfnCodeDeployLambdaAliasUpdate? CodeDeployLambdaAliasUpdate { get; set; }
Property Value

ICfnCodeDeployLambdaAliasUpdate

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

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.

public bool? EnableVersionUpgrade { get; set; }
Property Value

bool?

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

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.

public bool? UseOnlineResharding { get; set; }
Property Value

bool?

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

Implements

ICfnUpdatePolicy
Back to top Generated by DocFX