@awboost/cfntypes 1.0.0-beta.40 → 1.0.0-beta.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{ResourceDefinition.d.ts → definitions.d.ts} +160 -6
- package/lib/policies.d.ts +460 -0
- package/lib/{DeletionPolicy.js → policies.js} +3 -3
- package/lib/{types.generated.d.ts → resources.generated.d.ts} +442 -443
- package/lib/{types.generated.js → resources.generated.js} +18 -6
- package/lib/{Template.d.ts → template.d.ts} +3 -7
- package/lib/{Fn.d.ts → util.d.ts} +78 -0
- package/lib/{Fn.js → util.js} +111 -23
- package/package.json +23 -35
- package/README.md +0 -39
- package/lib/AutoScalingReplacingUpdatePolicy.d.ts +0 -30
- package/lib/AutoScalingRollingUpdatePolicy.d.ts +0 -107
- package/lib/AutoScalingRollingUpdatePolicy.js +0 -20
- package/lib/AutoScalingScheduledActionPolicy.d.ts +0 -35
- package/lib/AutoScalingScheduledActionPolicy.js +0 -23
- package/lib/AwsParam.d.ts +0 -73
- package/lib/AwsParam.js +0 -89
- package/lib/CodeDeployLambdaAliasUpdatePolicy.d.ts +0 -26
- package/lib/CreationPolicy.d.ts +0 -71
- package/lib/CreationPolicy.js +0 -1
- package/lib/DeletionPolicy.d.ts +0 -84
- package/lib/OutputDefinition.d.ts +0 -38
- package/lib/OutputDefinition.js +0 -1
- package/lib/ParameterDefinition.d.ts +0 -78
- package/lib/ParameterDefinition.js +0 -1
- package/lib/ResourceDefinition.js +0 -1
- package/lib/RuleDefinition.d.ts +0 -43
- package/lib/RuleDefinition.js +0 -1
- package/lib/Template.js +0 -1
- package/lib/TemplateMap.d.ts +0 -6
- package/lib/TemplateMap.js +0 -1
- package/lib/UpdatePolicy.d.ts +0 -111
- package/lib/UpdatePolicy.js +0 -1
- package/lib/cjs/AutoScalingReplacingUpdatePolicy.js +0 -2
- package/lib/cjs/AutoScalingRollingUpdatePolicy.js +0 -21
- package/lib/cjs/AutoScalingScheduledActionPolicy.js +0 -24
- package/lib/cjs/AwsParam.js +0 -93
- package/lib/cjs/CodeDeployLambdaAliasUpdatePolicy.js +0 -2
- package/lib/cjs/CreationPolicy.js +0 -2
- package/lib/cjs/DeletionPolicy.js +0 -86
- package/lib/cjs/Fn.js +0 -414
- package/lib/cjs/OutputDefinition.js +0 -2
- package/lib/cjs/ParameterDefinition.js +0 -2
- package/lib/cjs/ResourceDefinition.js +0 -2
- package/lib/cjs/RuleDefinition.js +0 -2
- package/lib/cjs/Template.js +0 -2
- package/lib/cjs/TemplateMap.js +0 -2
- package/lib/cjs/UpdatePolicy.js +0 -2
- package/lib/cjs/index.js +0 -33
- package/lib/cjs/types.generated.js +0 -2276
- package/lib/index.d.ts +0 -16
- package/lib/index.js +0 -17
- /package/lib/{AutoScalingReplacingUpdatePolicy.js → definitions.js} +0 -0
- /package/lib/{CodeDeployLambdaAliasUpdatePolicy.js → template.js} +0 -0
@@ -1,9 +1,121 @@
|
|
1
|
-
import { CreationPolicy } from
|
2
|
-
import {
|
3
|
-
import { IntrinsicValue } from
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
import { CreationPolicy, DeletionPolicy, UpdatePolicy } from "./policies.js";
|
2
|
+
import { ResourceType, ResourceTypes } from "./resources.generated.js";
|
3
|
+
import { IntrinsicValue, TemplateMap } from "./util.js";
|
4
|
+
/**
|
5
|
+
* The name of the resource output to be exported for a cross-stack reference.
|
6
|
+
*
|
7
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.html | Outputs}
|
8
|
+
*/
|
9
|
+
export interface OutputExport {
|
10
|
+
Name: string;
|
11
|
+
}
|
12
|
+
/**
|
13
|
+
* The optional `Outputs` section declares output values that you can import
|
14
|
+
* into other stacks (to create cross-stack references), return in response (to
|
15
|
+
* describe stack calls), or view on the AWS CloudFormation console. For
|
16
|
+
* example, you can output the S3 bucket name for a stack to make the bucket
|
17
|
+
* easier to find.
|
18
|
+
*
|
19
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.html | Outputs}
|
20
|
+
*/
|
21
|
+
export interface OutputDefinition {
|
22
|
+
/**
|
23
|
+
* A String type that describes the output value. The value for the
|
24
|
+
* description declaration must be a literal string that's between `0` and
|
25
|
+
* `1024` bytes in length. You can't use a parameter or function to specify
|
26
|
+
* the description. The description can be a maximum of 4 K in length.
|
27
|
+
*/
|
28
|
+
Description?: string;
|
29
|
+
/**
|
30
|
+
* The name of the resource output to be exported for a cross-stack reference.
|
31
|
+
*/
|
32
|
+
Export?: OutputExport;
|
33
|
+
/**
|
34
|
+
* The value of the property returned by the aws `cloudformation
|
35
|
+
* describe-stacks` command. The value of an output can include literals,
|
36
|
+
* parameter references, pseudo-parameters, a mapping value, or intrinsic
|
37
|
+
* functions.
|
38
|
+
*/
|
39
|
+
Value: IntrinsicValue;
|
40
|
+
}
|
41
|
+
/**
|
42
|
+
* Parameters enable you to input custom values to your template each time you
|
43
|
+
* create or update a stack.
|
44
|
+
*
|
45
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html#parameters-section-structure-properties | Parameters}
|
46
|
+
*/
|
47
|
+
export interface ParameterDefinition {
|
48
|
+
/**
|
49
|
+
* A regular expression that represents the patterns to allow for String
|
50
|
+
* types. The pattern must match the entire parameter value provided.
|
51
|
+
*/
|
52
|
+
AllowedPattern?: string;
|
53
|
+
/**
|
54
|
+
* An array containing the list of values allowed for the parameter.
|
55
|
+
*/
|
56
|
+
AllowedValues?: string[];
|
57
|
+
/**
|
58
|
+
* A string that explains a constraint when the constraint is violated. For
|
59
|
+
* example, without a constraint description, a parameter that has an allowed
|
60
|
+
* pattern of `[A-Za-z0-9]+` displays the following error message when the
|
61
|
+
* user specifies an invalid value:
|
62
|
+
*
|
63
|
+
* > Malformed input-Parameter MyParameter must match pattern [A-Za-z0-9]+
|
64
|
+
*
|
65
|
+
* By adding a constraint description, such as must only contain letters
|
66
|
+
* (uppercase and lowercase) and numbers, you can display the following
|
67
|
+
* customized error message:
|
68
|
+
*
|
69
|
+
* > Malformed input-Parameter MyParameter must only contain uppercase and
|
70
|
+
* > lowercase letters and numbers
|
71
|
+
*/
|
72
|
+
ConstraintDescription?: string;
|
73
|
+
/**
|
74
|
+
* A value of the appropriate type for the template to use if no value is
|
75
|
+
* specified when a stack is created. If you define constraints for the
|
76
|
+
* parameter, you must specify a value that adheres to those constraints.
|
77
|
+
*/
|
78
|
+
Default?: string;
|
79
|
+
/**
|
80
|
+
* A string of up to 4000 characters that describes the parameter.
|
81
|
+
*/
|
82
|
+
Description?: string;
|
83
|
+
/**
|
84
|
+
* An integer value that determines the largest number of characters you want
|
85
|
+
* to allow for `String` types.
|
86
|
+
*/
|
87
|
+
MaxLength?: number;
|
88
|
+
/**
|
89
|
+
* A numeric value that determines the largest numeric value you want to allow
|
90
|
+
* for `Number` types.
|
91
|
+
*/
|
92
|
+
MaxValue?: number;
|
93
|
+
/**
|
94
|
+
* An integer value that determines the smallest number of characters you want
|
95
|
+
* to allow for `String` types.
|
96
|
+
*/
|
97
|
+
MinLength?: number;
|
98
|
+
/**
|
99
|
+
* A numeric value that determines the smallest numeric value you want to
|
100
|
+
* allow for `Number` types.
|
101
|
+
*/
|
102
|
+
MinValue?: number;
|
103
|
+
/**
|
104
|
+
* Whether to mask the parameter value to prevent it from being displayed in
|
105
|
+
* the console, command line tools, or API. If you set the NoEcho attribute to
|
106
|
+
* true, CloudFormation returns the parameter value masked as asterisks
|
107
|
+
* `(*****)` for any calls that describe the stack or stack events, except for
|
108
|
+
* information stored in the locations specified below.
|
109
|
+
*/
|
110
|
+
NoEcho?: boolean;
|
111
|
+
/**
|
112
|
+
* The data type for the parameter. See AWS documentation for
|
113
|
+
* more info.
|
114
|
+
*
|
115
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html#parameters-section-structure-properties | Parameters}
|
116
|
+
*/
|
117
|
+
Type: string;
|
118
|
+
}
|
7
119
|
/**
|
8
120
|
* Represents the additional options for a resource definition (other than
|
9
121
|
* `Type` and Properties.)
|
@@ -195,3 +307,45 @@ export type CustomResourceDefinition<P extends CustomResourcePropertiesBase = Cu
|
|
195
307
|
* Represents an AWS or custom resource definition.
|
196
308
|
*/
|
197
309
|
export type ResourceDefinition = AwsResourceDefinition | CustomResourceDefinition;
|
310
|
+
/**
|
311
|
+
* Definition for a rule assertion.
|
312
|
+
*
|
313
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/rules-section-structure.html#template-constraint-rules-syntax | Rules syntax}
|
314
|
+
*/
|
315
|
+
export interface RuleAssertion {
|
316
|
+
/**
|
317
|
+
* Rule-specific intrinsic function.
|
318
|
+
*
|
319
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/rules-section-structure.html#rules-specific-intrinsic-section-structure | Rule-specific intrinsic functions
|
320
|
+
}
|
321
|
+
*/
|
322
|
+
Assert: IntrinsicValue;
|
323
|
+
/**
|
324
|
+
* Information about this assert.
|
325
|
+
*/
|
326
|
+
AssertDescription?: string;
|
327
|
+
}
|
328
|
+
/**
|
329
|
+
* Each template rule consists of two properties:
|
330
|
+
*
|
331
|
+
* - Rule condition (optional) — determines when a rule takes effect.
|
332
|
+
* - Assertions (required) — describes what values users can specify for a
|
333
|
+
* particular parameter.
|
334
|
+
*
|
335
|
+
* A rule can include a `RuleCondition` property and must include an Assertions
|
336
|
+
* property. For each rule, you can define only one rule condition. You can
|
337
|
+
* define one or more asserts within the `Assertions` property. If you don't
|
338
|
+
* define a rule condition, the rule's assertions always take effect.
|
339
|
+
*
|
340
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/rules-section-structure.html#w2ab1c23c15c19b5 | Working with rules}
|
341
|
+
*/
|
342
|
+
export interface RuleDefinition {
|
343
|
+
/**
|
344
|
+
* Describes what values users can specify for a particular parameter.
|
345
|
+
*/
|
346
|
+
Assertions: RuleAssertion[];
|
347
|
+
/**
|
348
|
+
* Determines when a rule takes effect.
|
349
|
+
*/
|
350
|
+
RuleCondition?: IntrinsicValue;
|
351
|
+
}
|
@@ -0,0 +1,460 @@
|
|
1
|
+
/**
|
2
|
+
* To specify how AWS CloudFormation handles replacement updates for an Auto
|
3
|
+
* Scaling group, use the AutoScalingReplacingUpdate policy. This policy enables
|
4
|
+
* you to specify whether AWS CloudFormation replaces an Auto Scaling group with
|
5
|
+
* a new one or replaces only the instances in the Auto Scaling group.
|
6
|
+
*
|
7
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-replacingupdate | AutoScalingUpdateReplace policy}
|
8
|
+
*/
|
9
|
+
export interface AutoScalingReplacingUpdatePolicy {
|
10
|
+
/**
|
11
|
+
* Specifies whether an Auto Scaling group and the instances it contains are
|
12
|
+
* replaced during an update. During replacement, CloudFormation retains the
|
13
|
+
* old group until it finishes creating the new one. If the update fails,
|
14
|
+
* CloudFormation can roll back to the old Auto Scaling group and delete the
|
15
|
+
* new Auto Scaling group.
|
16
|
+
*
|
17
|
+
* While CloudFormation creates the new group, it doesn't detach or attach any
|
18
|
+
* instances. After successfully creating the new Auto Scaling group,
|
19
|
+
* CloudFormation deletes the old Auto Scaling group during the cleanup
|
20
|
+
* process.
|
21
|
+
*
|
22
|
+
* When you set the `WillReplace` parameter, remember to specify a matching
|
23
|
+
* `CreationPolicy`. If the minimum number of instances (specified by the
|
24
|
+
* `MinSuccessfulInstancesPercent` property) don't signal success within the
|
25
|
+
* `Timeout` period (specified in the `CreationPolicy` policy), the
|
26
|
+
* replacement update fails and AWS CloudFormation rolls back to the old Auto
|
27
|
+
* Scaling group.
|
28
|
+
*/
|
29
|
+
WillReplace?: boolean;
|
30
|
+
}
|
31
|
+
/**
|
32
|
+
* To specify how CloudFormation handles rolling updates for an Auto Scaling
|
33
|
+
* group, use the `AutoScalingRollingUpdate` policy. Rolling updates enable you
|
34
|
+
* to specify whether AWS CloudFormation updates instances that are in an Auto
|
35
|
+
* Scaling group in batches or all at once.
|
36
|
+
*
|
37
|
+
* Be aware that, during stack update rollback operations, CloudFormation uses
|
38
|
+
* the `UpdatePolicy` configuration specified in the template before the current
|
39
|
+
* stack update operation. For example, suppose you have updated the
|
40
|
+
* `MaxBatchSize` in your stack template's `UpdatePolicy` from 1 to 10. You then
|
41
|
+
* perform a stack update, and that update fails and CloudFormation initiates an
|
42
|
+
* update rollback operation. In such a case, CloudFormation will use 1 as the
|
43
|
+
* maximum batch size, rather than 10. For this reason, we recommend you make
|
44
|
+
* changes to the UpdatePolicy configuration in a stack update separate from and
|
45
|
+
* before any updates to the `AWS::AutoScaling::AutoScalingGroup` resource that
|
46
|
+
* are likely to initiate rolling updates.
|
47
|
+
*
|
48
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-rollingupdate | AutoScalingRollingUpdate policy}
|
49
|
+
*/
|
50
|
+
export interface AutoScalingRollingUpdatePolicy {
|
51
|
+
/**
|
52
|
+
* Specifies the maximum number of instances that CloudFormation updates.
|
53
|
+
*
|
54
|
+
* @default 1
|
55
|
+
*/
|
56
|
+
MaxBatchSize?: number;
|
57
|
+
/**
|
58
|
+
* Specifies the minimum number of instances that must be in service within
|
59
|
+
* the Auto Scaling group while CloudFormation updates old instances. This
|
60
|
+
* value must be less than the `MaxSize` of the Auto Scaling group.\
|
61
|
+
*
|
62
|
+
* @default 0
|
63
|
+
*/
|
64
|
+
MinInstancesInService?: number;
|
65
|
+
/**
|
66
|
+
* Specifies the percentage of instances in an Auto Scaling rolling update
|
67
|
+
* that must signal success for an update to succeed. You can specify a value
|
68
|
+
* from `0` to `100`. CloudFormation rounds to the nearest tenth of a percent.
|
69
|
+
* For example, if you update five instances with a minimum successful
|
70
|
+
* percentage of `50`, three instances must signal success.
|
71
|
+
*
|
72
|
+
* If an instance doesn't send a signal within the time specified in the
|
73
|
+
* `PauseTime` property, CloudFormation assumes that the instance wasn't
|
74
|
+
* updated.
|
75
|
+
*
|
76
|
+
* If you specify this property, you must also enable the
|
77
|
+
* `WaitOnResourceSignals` and `PauseTime` properties.
|
78
|
+
*
|
79
|
+
* The `MinSuccessfulInstancesPercent` parameter applies only to instances
|
80
|
+
* only for signaling purpose. To specify the number of instances in your
|
81
|
+
* autoscaling group, see the `MinSize`, `MaxSize`, and `DesiredCapacity`
|
82
|
+
* properties fo the `AWS::AutoScaling::AutoScalingGroup` resource.
|
83
|
+
*
|
84
|
+
* @default 100
|
85
|
+
*/
|
86
|
+
MinSuccessfulInstancesPercent?: number;
|
87
|
+
/**
|
88
|
+
* The amount of time that CloudFormation pauses after making a change to a
|
89
|
+
* batch of instances to give those instances time to start software
|
90
|
+
* applications. For example, you might need to specify `PauseTime` when
|
91
|
+
* scaling up the number of instances in an Auto Scaling group.
|
92
|
+
*
|
93
|
+
* If you enable the WaitOnResourceSignals property, `PauseTime` is the amount
|
94
|
+
* of time that CloudFormation should wait for the Auto Scaling group to
|
95
|
+
* receive the required number of valid signals from added or replaced
|
96
|
+
* instances. If the `PauseTime` is exceeded before the Auto Scaling group
|
97
|
+
* receives the required number of signals, the update fails. For best
|
98
|
+
* results, specify a time period that gives your applications sufficient time
|
99
|
+
* to get started. If the update needs to be rolled back, a short `PauseTime`
|
100
|
+
* can cause the rollback to fail.
|
101
|
+
*
|
102
|
+
* Specify `PauseTime` in the ISO8601 duration format (in the format
|
103
|
+
* `PT#H#M#S`, where each `#` is the number of hours, minutes, and seconds,
|
104
|
+
* respectively). The maximum `PauseTime` is one hour (`PT1H`).
|
105
|
+
*
|
106
|
+
* **Default:** `PT0S` (0 seconds). If the `WaitOnResourceSignals` property is
|
107
|
+
* set to true, the default is `PT5M`.
|
108
|
+
*/
|
109
|
+
PauseTime?: string;
|
110
|
+
/**
|
111
|
+
* Specifies the Auto Scaling processes to suspend during a stack update.
|
112
|
+
* Suspending processes prevents Auto Scaling from interfering with a stack
|
113
|
+
* update. For example, you can suspend alarming so that Amazon EC2 Auto
|
114
|
+
* Scaling doesn't execute scaling policies associated with an alarm. For
|
115
|
+
* valid values, see the `ScalingProcesses.member.N` parameter for the
|
116
|
+
* SuspendProcesses action in the Amazon EC2 Auto Scaling API Reference.
|
117
|
+
*/
|
118
|
+
SuspendProcesses?: string[];
|
119
|
+
/**
|
120
|
+
* Specifies whether the Auto Scaling group waits on signals from new
|
121
|
+
* instances during an update. Use this property to ensure that instances have
|
122
|
+
* completed installing and configuring applications before the Auto Scaling
|
123
|
+
* group update proceeds. AWS CloudFormation suspends the update of an Auto
|
124
|
+
* Scaling group after new EC2 instances are launched into the group. AWS
|
125
|
+
* CloudFormation must receive a signal from each new instance within the
|
126
|
+
* specified PauseTime before continuing the update. To signal the Auto
|
127
|
+
* Scaling group, use the `cfn-signal` helper script or SignalResource API.
|
128
|
+
*
|
129
|
+
* To have instances wait for an Elastic Load Balancing health check before
|
130
|
+
* they signal success, add a health-check verification by using the `cfn-init`
|
131
|
+
* helper script. For an example, see the `verify_instance_health` command in
|
132
|
+
* the Auto Scaling rolling updates sample template.
|
133
|
+
*
|
134
|
+
* @default false
|
135
|
+
*/
|
136
|
+
WaitOnResourceSignals?: boolean;
|
137
|
+
}
|
138
|
+
/**
|
139
|
+
* To specify how AWS CloudFormation handles updates for the `MinSize`,
|
140
|
+
* `MaxSize`, and `DesiredCapacity` properties when the
|
141
|
+
* `AWS::AutoScaling::AutoScalingGroup` resource has an associated scheduled
|
142
|
+
* action, use the `AutoScalingScheduledAction` policy.
|
143
|
+
*
|
144
|
+
* With scheduled actions, the group size properties of an Auto Scaling group
|
145
|
+
* can change at any time. When you update a stack with an Auto Scaling group
|
146
|
+
* and scheduled action, CloudFormation always sets the group size property
|
147
|
+
* values of your Auto Scaling group to the values that are defined in the
|
148
|
+
* `AWS::AutoScaling::AutoScalingGroup` resource of your template, even if a
|
149
|
+
* scheduled action is in effect.
|
150
|
+
*
|
151
|
+
* If you don't want CloudFormation to change any of the group size property
|
152
|
+
* values when you have a scheduled action in effect, use the
|
153
|
+
* `AutoScalingScheduledAction` update policy and set
|
154
|
+
* `IgnoreUnmodifiedGroupSizeProperties` to true to prevent CloudFormation from
|
155
|
+
* changing the `MinSize`, `MaxSize`, or `DesiredCapacity` properties unless you
|
156
|
+
* have modified these values in your template.
|
157
|
+
*
|
158
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-scheduledactions | AutoScalingScheduledAction policy}
|
159
|
+
*/
|
160
|
+
export interface AutoScalingScheduledActionPolicy {
|
161
|
+
/**
|
162
|
+
* If true, AWS CloudFormation ignores differences in group size properties
|
163
|
+
* between your current Auto Scaling group and the Auto Scaling group
|
164
|
+
* described in the `AWS::AutoScaling::AutoScalingGroup` resource of your
|
165
|
+
* template during a stack update. If you modify any of the group size
|
166
|
+
* property values in your template, AWS CloudFormation uses the modified
|
167
|
+
* values and updates your Auto Scaling group.
|
168
|
+
*
|
169
|
+
* @default false
|
170
|
+
*/
|
171
|
+
IgnoreUnmodifiedGroupSizeProperties?: boolean;
|
172
|
+
}
|
173
|
+
/**
|
174
|
+
* To perform an CodeDeploy deployment when the version changes on an
|
175
|
+
* `AWS::Lambda::Alias` resource, use the `CodeDeployLambdaAliasUpdate` update
|
176
|
+
* policy.
|
177
|
+
*
|
178
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-codedeploylambdaaliasupdate | CodeDeployLambdaAlias Update policy}
|
179
|
+
*/
|
180
|
+
export interface CodeDeployLambdaAliasUpdatePolicy {
|
181
|
+
/**
|
182
|
+
* The name of the Lambda function to run after traffic routing completes.
|
183
|
+
*/
|
184
|
+
AfterAllowTrafficHook?: string;
|
185
|
+
/**
|
186
|
+
* The name of the CodeDeploy application.
|
187
|
+
*/
|
188
|
+
ApplicationName: string;
|
189
|
+
/**
|
190
|
+
* The name of the Lambda function to run before traffic routing starts.
|
191
|
+
*/
|
192
|
+
BeforeAllowTrafficHook?: string;
|
193
|
+
/**
|
194
|
+
* The name of the CodeDeploy deployment group. This is where the
|
195
|
+
* traffic-shifting policy is set.
|
196
|
+
*/
|
197
|
+
DeploymentGroupName: string;
|
198
|
+
}
|
199
|
+
/**
|
200
|
+
* For an Auto Scaling group replacement update, specifies how many instances
|
201
|
+
* must signal success for the update to succeed.
|
202
|
+
*
|
203
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-creationpolicy.html | CreationPolicy attribute}
|
204
|
+
*/
|
205
|
+
export interface AutoScalingCreationPolicy {
|
206
|
+
/**
|
207
|
+
* Specifies the percentage of instances in an Auto Scaling replacement update
|
208
|
+
* that must signal success for the update to succeed. You can specify a value
|
209
|
+
* from `0` to `100`. CloudFormation rounds to the nearest tenth of a percent.
|
210
|
+
* For example, if you update five instances with a minimum successful
|
211
|
+
* percentage of `50`, three instances must signal success. If an instance
|
212
|
+
* doesn't send a signal within the time specified by the Timeout property,
|
213
|
+
* CloudFormation assumes that the instance wasn't created.
|
214
|
+
*/
|
215
|
+
MinSuccessfulInstancesPercent?: number;
|
216
|
+
}
|
217
|
+
/**
|
218
|
+
* When CloudFormation creates the associated resource, configures the number of
|
219
|
+
* required success signals and the length of time that CloudFormation waits for
|
220
|
+
* those signals.
|
221
|
+
*
|
222
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-creationpolicy.html | CreationPolicy attribute}
|
223
|
+
*/
|
224
|
+
export interface ResourceSignalPolicy {
|
225
|
+
/**
|
226
|
+
* The number of success signals CloudFormation must receive before it sets
|
227
|
+
* the resource status as `CREATE_COMPLETE`. If the resource receives a
|
228
|
+
* failure signal or doesn't receive the specified number of signals before
|
229
|
+
* the timeout period expires, the resource creation fails and CloudFormation
|
230
|
+
* rolls the stack back.
|
231
|
+
*/
|
232
|
+
Count?: number;
|
233
|
+
/**
|
234
|
+
* The length of time that CloudFormation waits for the number of signals that
|
235
|
+
* was specified in the Count property. The timeout period starts after
|
236
|
+
* CloudFormation starts creating the resource, and the timeout expires no
|
237
|
+
* sooner than the time you specify but can occur shortly thereafter. The
|
238
|
+
* maximum time that you can specify is 12 hours.
|
239
|
+
*
|
240
|
+
* The value must be in ISO8601 duration format, in the form: `"PT#H#M#S"`,
|
241
|
+
* where each # is the number of hours, minutes, and seconds, respectively.
|
242
|
+
* For best results, specify a period of time that gives your instances plenty
|
243
|
+
* of time to get up and running. A shorter timeout can cause a rollback.
|
244
|
+
*/
|
245
|
+
Timeout?: string;
|
246
|
+
}
|
247
|
+
/**
|
248
|
+
* Associate the `CreationPolicy` attribute with a resource to prevent its
|
249
|
+
* status from reaching create complete until AWS CloudFormation receives a
|
250
|
+
* specified number of success signals or the timeout period is exceeded. To
|
251
|
+
* signal a resource, you can use the `cfn-signal` helper script or
|
252
|
+
* SignalResource API. CloudFormation publishes valid signals to the stack
|
253
|
+
* events so that you track the number of signals sent.
|
254
|
+
*
|
255
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-creationpolicy.html | CreationPolicy attribute}
|
256
|
+
*/
|
257
|
+
export interface CreationPolicy {
|
258
|
+
/**
|
259
|
+
* For an Auto Scaling group replacement update, specifies how many instances
|
260
|
+
* must signal success for the update to succeed.
|
261
|
+
*/
|
262
|
+
AutoScalingCreationPolicy?: AutoScalingCreationPolicy;
|
263
|
+
/**
|
264
|
+
* When CloudFormation creates the associated resource, configures the number
|
265
|
+
* of required success signals and the length of time that CloudFormation
|
266
|
+
* waits for those signals.
|
267
|
+
*/
|
268
|
+
ResourceSignal?: ResourceSignalPolicy;
|
269
|
+
}
|
270
|
+
/**
|
271
|
+
* With the `DeletionPolicy` attribute you can preserve, and in some cases,
|
272
|
+
* backup a resource when its stack is deleted. You specify a `DeletionPolicy`
|
273
|
+
* attribute for each resource that you want to control. If a resource has no
|
274
|
+
* `DeletionPolicy` attribute, AWS CloudFormation deletes the resource by
|
275
|
+
* default, except for:
|
276
|
+
*
|
277
|
+
* - For `AWS::RDS::DBCluster resources`, the default policy is `Snapshot`.
|
278
|
+
* - For `AWS::RDS::DBInstance` resources that don't specify the
|
279
|
+
* `DBClusterIdentifier` property, the default policy is `Snapshot`.
|
280
|
+
* - For Amazon S3 buckets, you must delete all objects in the bucket for
|
281
|
+
* deletion to succeed.
|
282
|
+
*
|
283
|
+
* This capability also applies to stack update operations that lead to
|
284
|
+
* resources being deleted from stacks. For example, if you remove the resource
|
285
|
+
* from the stack template, and then update the stack with the template. This
|
286
|
+
* capability doesn't apply to resources whose physical instance is replaced
|
287
|
+
* during stack update operations. For example, if you edit a resource's
|
288
|
+
* properties such that CloudFormation replaces that resource during a stack
|
289
|
+
* update.
|
290
|
+
*
|
291
|
+
* To keep a resource when its stack is deleted, specify Retain for that
|
292
|
+
* resource. You can use retain for any resource. For example, you can retain a
|
293
|
+
* nested stack, Amazon S3 bucket, or EC2 instance so that you can continue to
|
294
|
+
* use or modify those resources after you delete their stacks.
|
295
|
+
*
|
296
|
+
* For resources that support snapshots, such as `AWS::EC2::Volume`, specify
|
297
|
+
* Snapshot to have CloudFormation create a snapshot before deleting the
|
298
|
+
* resource.
|
299
|
+
*
|
300
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html | DeletionPolicy attribute}
|
301
|
+
*/
|
302
|
+
export declare const DeletionPolicy: {
|
303
|
+
/**
|
304
|
+
* CloudFormation deletes the resource and all its content if applicable
|
305
|
+
* during stack deletion. You can add this deletion policy to any resource
|
306
|
+
* type. By default, if you don't specify a `DeletionPolicy`, CloudFormation
|
307
|
+
* deletes your resources. However, be aware of the following considerations:
|
308
|
+
*
|
309
|
+
* - For `AWS::RDS::DBCluster resources`, the default policy is `Snapshot`.
|
310
|
+
* - For `AWS::RDS::DBInstance` resources that don't specify the
|
311
|
+
* `DBClusterIdentifier` property, the default policy is `Snapshot`.
|
312
|
+
*
|
313
|
+
* For Amazon S3 buckets, you must delete all objects in the bucket for
|
314
|
+
* deletion to succeed.
|
315
|
+
*/
|
316
|
+
readonly Delete: "Delete";
|
317
|
+
/**
|
318
|
+
* CloudFormation keeps the resource without deleting the resource or its
|
319
|
+
* contents when its stack is deleted. You can add this deletion policy to any
|
320
|
+
* resource type. When CloudFormation completes the stack deletion, the stack
|
321
|
+
* will be in `Delete_Complete` state; however, resources that are retained
|
322
|
+
* continue to exist and continue to incur applicable charges until you delete
|
323
|
+
* those resources.
|
324
|
+
*
|
325
|
+
* For update operations, the following considerations apply:
|
326
|
+
*
|
327
|
+
* - If a resource is deleted, the `DeletionPolicy` retains the physical
|
328
|
+
* resource but ensures that it's deleted from CloudFormation's scope.
|
329
|
+
* - If a resource is updated such that a new physical resource is created to
|
330
|
+
* replace the old resource, then the old resource is completely deleted,
|
331
|
+
* including from CloudFormation's scope.
|
332
|
+
*/
|
333
|
+
readonly Retain: "Retain";
|
334
|
+
/**
|
335
|
+
* For resources that support snapshots, CloudFormation creates a snapshot for
|
336
|
+
* the resource before deleting it. When CloudFormation completes the stack
|
337
|
+
* deletion, the stack will be in the `Delete_Complete` state; however, the
|
338
|
+
* snapshots that are created with this policy continue to exist and continue
|
339
|
+
* to incur applicable charges until you delete those snapshots.
|
340
|
+
*
|
341
|
+
* Resources that support snapshots include:
|
342
|
+
*
|
343
|
+
* - `AWS::EC2::Volume`
|
344
|
+
* - `AWS::ElastiCache::CacheCluster`
|
345
|
+
* - `AWS::ElastiCache::ReplicationGroup`
|
346
|
+
* - `AWS::Neptune::DBCluster`
|
347
|
+
* - `AWS::RDS::DBCluster`
|
348
|
+
* - `AWS::RDS::DBInstance`
|
349
|
+
* - `AWS::Redshift::Cluster`
|
350
|
+
*/
|
351
|
+
readonly Snapshot: "Snapshot";
|
352
|
+
};
|
353
|
+
export type DeletionPolicy = (typeof DeletionPolicy)[keyof typeof DeletionPolicy];
|
354
|
+
/**
|
355
|
+
* Use the `UpdatePolicy` attribute to specify how AWS CloudFormation handles
|
356
|
+
* updates to the `AWS::AppStream::Fleet`,
|
357
|
+
* `AWS::AutoScaling::AutoScalingGroup`, ``AWS::ElastiCache::ReplicationGroup``,
|
358
|
+
* `AWS::OpenSearchService::Domain`, `AWS::Elasticsearch::Domain`, or
|
359
|
+
* `AWS::Lambda::Alias resources`.
|
360
|
+
*
|
361
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html | UpdatePolicy attribute}
|
362
|
+
*/
|
363
|
+
export interface UpdatePolicy {
|
364
|
+
/**
|
365
|
+
* To specify how AWS CloudFormation handles replacement updates for an Auto
|
366
|
+
* Scaling group, use the AutoScalingReplacingUpdate policy. This policy
|
367
|
+
* enables you to specify whether AWS CloudFormation replaces an Auto Scaling
|
368
|
+
* group with a new one or replaces only the instances in the Auto Scaling
|
369
|
+
* group.
|
370
|
+
*
|
371
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-replacingupdate | AutoScalingReplacing update policy}
|
372
|
+
*/
|
373
|
+
AutoScalingReplacing?: AutoScalingReplacingUpdatePolicy;
|
374
|
+
/**
|
375
|
+
* To specify how CloudFormation handles rolling updates for an Auto Scaling
|
376
|
+
* group, use the `AutoScalingRollingUpdate` policy. Rolling updates enable
|
377
|
+
* you to specify whether AWS CloudFormation updates instances that are in an
|
378
|
+
* Auto Scaling group in batches or all at once.
|
379
|
+
*
|
380
|
+
* Be aware that, during stack update rollback operations, CloudFormation uses
|
381
|
+
* the `UpdatePolicy` configuration specified in the template before the
|
382
|
+
* current stack update operation. For example, suppose you have updated the
|
383
|
+
* `MaxBatchSize` in your stack template's `UpdatePolicy` from 1 to 10. You
|
384
|
+
* then perform a stack update, and that update fails and CloudFormation
|
385
|
+
* initiates an update rollback operation. In such a case, CloudFormation will
|
386
|
+
* use 1 as the maximum batch size, rather than 10. For this reason, we
|
387
|
+
* recommend you make changes to the UpdatePolicy configuration in a stack
|
388
|
+
* update separate from and before any updates to the
|
389
|
+
* `AWS::AutoScaling::AutoScalingGroup` resource that are likely to initiate
|
390
|
+
* rolling updates.
|
391
|
+
*
|
392
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-rollingupdate | AutoScalingRollingUpdate policy}
|
393
|
+
*/
|
394
|
+
AutoScalingRollingUpdate?: AutoScalingRollingUpdatePolicy;
|
395
|
+
/**
|
396
|
+
* To specify how AWS CloudFormation handles updates for the `MinSize`,
|
397
|
+
* `MaxSize`, and `DesiredCapacity` properties when the
|
398
|
+
* `AWS::AutoScaling::AutoScalingGroup` resource has an associated scheduled
|
399
|
+
* action, use the `AutoScalingScheduledAction` policy.
|
400
|
+
*
|
401
|
+
* With scheduled actions, the group size properties of an Auto Scaling group
|
402
|
+
* can change at any time. When you update a stack with an Auto Scaling group
|
403
|
+
* and scheduled action, CloudFormation always sets the group size property
|
404
|
+
* values of your Auto Scaling group to the values that are defined in the
|
405
|
+
* `AWS::AutoScaling::AutoScalingGroup` resource of your template, even if a
|
406
|
+
* scheduled action is in effect.
|
407
|
+
*
|
408
|
+
* If you don't want CloudFormation to change any of the group size property
|
409
|
+
* values when you have a scheduled action in effect, use the
|
410
|
+
* `AutoScalingScheduledAction` update policy and set
|
411
|
+
* `IgnoreUnmodifiedGroupSizeProperties` to true to prevent CloudFormation
|
412
|
+
* from changing the `MinSize`, `MaxSize`, or `DesiredCapacity` properties
|
413
|
+
* unless you have modified these values in your template.
|
414
|
+
*
|
415
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-scheduledactions | AutoScalingScheduledAction policy}
|
416
|
+
*/
|
417
|
+
AutoScalingScheduledAction?: AutoScalingScheduledActionPolicy;
|
418
|
+
/**
|
419
|
+
* To perform an CodeDeploy deployment when the version changes on an
|
420
|
+
* `AWS::Lambda::Alias` resource, use the `CodeDeployLambdaAliasUpdate` update
|
421
|
+
* policy.
|
422
|
+
*
|
423
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-codedeploylambdaaliasupdate | CodeDeployLambdaAlias update policy}
|
424
|
+
*/
|
425
|
+
CodeDeployLambdaAliasUpdate?: CodeDeployLambdaAliasUpdatePolicy;
|
426
|
+
/**
|
427
|
+
* To upgrade an OpenSearch Service domain to a new version of OpenSearch or
|
428
|
+
* Elasticsearch rather than replacing the entire
|
429
|
+
* `AWS::OpenSearchService::Domain` or `AWS::Elasticsearch::Domain` resource, use
|
430
|
+
* the `EnableVersionUpgrade` update policy.
|
431
|
+
*
|
432
|
+
* If `EnableVersionUpgrade` is set to true, you can update the `EngineVersion`
|
433
|
+
* property of the `AWS::OpenSearchService::Domain` resource (or the
|
434
|
+
* `ElasticsearchVersion` property of the legacy `AWS::Elasticsearch::Domain`
|
435
|
+
* resource), and CloudFormation will update that property without
|
436
|
+
* interruption. When `EnableVersionUpgrade` is set to false, or not specified,
|
437
|
+
* updating the `EngineVersion` or `ElasticsearchVersion` property results in
|
438
|
+
* CloudFormation replacing the entire
|
439
|
+
* `AWS::OpenSearchService::Domain`/`AWS::Elasticsearch::Domain` resource.
|
440
|
+
*
|
441
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-upgradeopensearchdomain | EnableVersionUpgrade policy}
|
442
|
+
*/
|
443
|
+
EnableVersionUpgrade?: boolean;
|
444
|
+
/**
|
445
|
+
* To modify a replication group's shards by adding or removing shards, rather
|
446
|
+
* than replacing the entire `AWS::ElastiCache::ReplicationGroup` resource,
|
447
|
+
* use the `UseOnlineResharding` update policy.
|
448
|
+
*
|
449
|
+
* If `UseOnlineResharding` is set to true, you can update the `NumNodeGroups`
|
450
|
+
* and `NodeGroupConfiguration` properties of the
|
451
|
+
* `AWS::ElastiCache::ReplicationGroup` resource, and CloudFormation will
|
452
|
+
* update those properties without interruption. When `UseOnlineResharding` is
|
453
|
+
* set to false, or not specified, updating the `NumNodeGroups` and
|
454
|
+
* `NodeGroupConfiguration` properties results in CloudFormation replacing the
|
455
|
+
* entire `AWS::ElastiCache::ReplicationGroup` resource.
|
456
|
+
*
|
457
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-useonlineresharding | UseOnlineResharding policy}
|
458
|
+
*/
|
459
|
+
UseOnlineResharding?: boolean;
|
460
|
+
}
|
@@ -44,7 +44,7 @@ export const DeletionPolicy = {
|
|
44
44
|
* For Amazon S3 buckets, you must delete all objects in the bucket for
|
45
45
|
* deletion to succeed.
|
46
46
|
*/
|
47
|
-
Delete:
|
47
|
+
Delete: "Delete",
|
48
48
|
/**
|
49
49
|
* CloudFormation keeps the resource without deleting the resource or its
|
50
50
|
* contents when its stack is deleted. You can add this deletion policy to any
|
@@ -61,7 +61,7 @@ export const DeletionPolicy = {
|
|
61
61
|
* replace the old resource, then the old resource is completely deleted,
|
62
62
|
* including from CloudFormation's scope.
|
63
63
|
*/
|
64
|
-
Retain:
|
64
|
+
Retain: "Retain",
|
65
65
|
/**
|
66
66
|
* For resources that support snapshots, CloudFormation creates a snapshot for
|
67
67
|
* the resource before deleting it. When CloudFormation completes the stack
|
@@ -79,5 +79,5 @@ export const DeletionPolicy = {
|
|
79
79
|
* - `AWS::RDS::DBInstance`
|
80
80
|
* - `AWS::Redshift::Cluster`
|
81
81
|
*/
|
82
|
-
Snapshot:
|
82
|
+
Snapshot: "Snapshot",
|
83
83
|
};
|