-
Notifications
You must be signed in to change notification settings - Fork 17
/
awscdk_CfnUpdatePolicy.go
72 lines (69 loc) · 4.03 KB
/
awscdk_CfnUpdatePolicy.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// An experiment to bundle the entire CDK into a single module
package awscdk
// 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.
//
// Example:
// // The code below shows an example of how to instantiate this type.
// // The values are placeholders you should change.
// import monocdk "github.com/aws/aws-cdk-go/awscdk"
//
// cfnUpdatePolicy := &cfnUpdatePolicy{
// autoScalingReplacingUpdate: &cfnAutoScalingReplacingUpdate{
// willReplace: jsii.Boolean(false),
// },
// autoScalingRollingUpdate: &cfnAutoScalingRollingUpdate{
// maxBatchSize: jsii.Number(123),
// minInstancesInService: jsii.Number(123),
// minSuccessfulInstancesPercent: jsii.Number(123),
// pauseTime: jsii.String("pauseTime"),
// suspendProcesses: []*string{
// jsii.String("suspendProcesses"),
// },
// waitOnResourceSignals: jsii.Boolean(false),
// },
// autoScalingScheduledAction: &cfnAutoScalingScheduledAction{
// ignoreUnmodifiedGroupSizeProperties: jsii.Boolean(false),
// },
// codeDeployLambdaAliasUpdate: &cfnCodeDeployLambdaAliasUpdate{
// applicationName: jsii.String("applicationName"),
// deploymentGroupName: jsii.String("deploymentGroupName"),
//
// // the properties below are optional
// afterAllowTrafficHook: jsii.String("afterAllowTrafficHook"),
// beforeAllowTrafficHook: jsii.String("beforeAllowTrafficHook"),
// },
// enableVersionUpgrade: jsii.Boolean(false),
// useOnlineResharding: jsii.Boolean(false),
// }
//
// Experimental.
type CfnUpdatePolicy struct {
// 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.
// Experimental.
AutoScalingReplacingUpdate *CfnAutoScalingReplacingUpdate `field:"optional" json:"autoScalingReplacingUpdate" yaml:"autoScalingReplacingUpdate"`
// 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.
// Experimental.
AutoScalingRollingUpdate *CfnAutoScalingRollingUpdate `field:"optional" json:"autoScalingRollingUpdate" yaml:"autoScalingRollingUpdate"`
// 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.
// Experimental.
AutoScalingScheduledAction *CfnAutoScalingScheduledAction `field:"optional" json:"autoScalingScheduledAction" yaml:"autoScalingScheduledAction"`
// To perform an AWS CodeDeploy deployment when the version changes on an AWS::Lambda::Alias resource, use the CodeDeployLambdaAliasUpdate update policy.
// Experimental.
CodeDeployLambdaAliasUpdate *CfnCodeDeployLambdaAliasUpdate `field:"optional" json:"codeDeployLambdaAliasUpdate" yaml:"codeDeployLambdaAliasUpdate"`
// 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.
// Experimental.
EnableVersionUpgrade *bool `field:"optional" json:"enableVersionUpgrade" yaml:"enableVersionUpgrade"`
// 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.
// Experimental.
UseOnlineResharding *bool `field:"optional" json:"useOnlineResharding" yaml:"useOnlineResharding"`
}