@awboost/cfntypes 1.0.0-beta.4 → 1.0.0-beta.40
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/AutoScalingReplacingUpdatePolicy.d.ts +30 -0
- package/lib/AutoScalingReplacingUpdatePolicy.js +1 -0
- package/lib/AutoScalingRollingUpdatePolicy.d.ts +107 -0
- package/lib/AutoScalingRollingUpdatePolicy.js +20 -0
- package/lib/AutoScalingScheduledActionPolicy.d.ts +35 -0
- package/lib/AutoScalingScheduledActionPolicy.js +23 -0
- package/lib/AwsParam.d.ts +73 -0
- package/lib/AwsParam.js +89 -0
- package/lib/CodeDeployLambdaAliasUpdatePolicy.d.ts +26 -0
- package/lib/CodeDeployLambdaAliasUpdatePolicy.js +1 -0
- package/lib/CreationPolicy.d.ts +71 -0
- package/lib/CreationPolicy.js +1 -0
- package/lib/DeletionPolicy.d.ts +84 -0
- package/lib/DeletionPolicy.js +83 -0
- package/lib/Fn.d.ts +356 -0
- package/lib/Fn.js +410 -0
- package/lib/OutputDefinition.d.ts +38 -0
- package/lib/OutputDefinition.js +1 -0
- package/lib/ParameterDefinition.d.ts +78 -0
- package/lib/ParameterDefinition.js +1 -0
- package/lib/ResourceDefinition.d.ts +197 -0
- package/lib/ResourceDefinition.js +1 -0
- package/lib/RuleDefinition.d.ts +43 -0
- package/lib/RuleDefinition.js +1 -0
- package/lib/Template.d.ts +117 -0
- package/lib/Template.js +1 -0
- package/lib/TemplateMap.d.ts +6 -0
- package/lib/TemplateMap.js +1 -0
- package/lib/UpdatePolicy.d.ts +111 -0
- package/lib/UpdatePolicy.js +1 -0
- package/lib/cjs/AutoScalingReplacingUpdatePolicy.js +2 -0
- package/lib/cjs/AutoScalingRollingUpdatePolicy.js +21 -0
- package/lib/cjs/AutoScalingScheduledActionPolicy.js +24 -0
- package/lib/cjs/AwsParam.js +93 -0
- package/lib/cjs/CodeDeployLambdaAliasUpdatePolicy.js +2 -0
- package/lib/cjs/CreationPolicy.js +2 -0
- package/lib/cjs/DeletionPolicy.js +86 -0
- package/lib/cjs/Fn.js +414 -0
- package/lib/cjs/OutputDefinition.js +2 -0
- package/lib/cjs/ParameterDefinition.js +2 -0
- package/lib/cjs/ResourceDefinition.js +2 -0
- package/lib/cjs/RuleDefinition.js +2 -0
- package/lib/cjs/Template.js +2 -0
- package/lib/cjs/TemplateMap.js +2 -0
- package/lib/cjs/UpdatePolicy.js +2 -0
- package/lib/cjs/index.js +33 -0
- package/lib/cjs/types.generated.js +2276 -0
- package/lib/index.d.ts +16 -61748
- package/lib/index.js +17 -2055
- package/lib/types.generated.d.ts +90061 -0
- package/lib/types.generated.js +2273 -0
- package/package.json +12 -8
- package/lib/index-cjs.js +0 -2058
@@ -0,0 +1,30 @@
|
|
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
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,107 @@
|
|
1
|
+
/**
|
2
|
+
* To specify how CloudFormation handles rolling updates for an Auto Scaling
|
3
|
+
* group, use the `AutoScalingRollingUpdate` policy. Rolling updates enable you
|
4
|
+
* to specify whether AWS CloudFormation updates instances that are in an Auto
|
5
|
+
* Scaling group in batches or all at once.
|
6
|
+
*
|
7
|
+
* Be aware that, during stack update rollback operations, CloudFormation uses
|
8
|
+
* the `UpdatePolicy` configuration specified in the template before the current
|
9
|
+
* stack update operation. For example, suppose you have updated the
|
10
|
+
* `MaxBatchSize` in your stack template's `UpdatePolicy` from 1 to 10. You then
|
11
|
+
* perform a stack update, and that update fails and CloudFormation initiates an
|
12
|
+
* update rollback operation. In such a case, CloudFormation will use 1 as the
|
13
|
+
* maximum batch size, rather than 10. For this reason, we recommend you make
|
14
|
+
* changes to the UpdatePolicy configuration in a stack update separate from and
|
15
|
+
* before any updates to the `AWS::AutoScaling::AutoScalingGroup` resource that
|
16
|
+
* are likely to initiate rolling updates.
|
17
|
+
*
|
18
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-rollingupdate | AutoScalingRollingUpdate policy}
|
19
|
+
*/
|
20
|
+
export interface AutoScalingRollingUpdatePolicy {
|
21
|
+
/**
|
22
|
+
* Specifies the maximum number of instances that CloudFormation updates.
|
23
|
+
*
|
24
|
+
* @default 1
|
25
|
+
*/
|
26
|
+
MaxBatchSize?: number;
|
27
|
+
/**
|
28
|
+
* Specifies the minimum number of instances that must be in service within
|
29
|
+
* the Auto Scaling group while CloudFormation updates old instances. This
|
30
|
+
* value must be less than the `MaxSize` of the Auto Scaling group.\
|
31
|
+
*
|
32
|
+
* @default 0
|
33
|
+
*/
|
34
|
+
MinInstancesInService?: number;
|
35
|
+
/**
|
36
|
+
* Specifies the percentage of instances in an Auto Scaling rolling update
|
37
|
+
* that must signal success for an update to succeed. You can specify a value
|
38
|
+
* from `0` to `100`. CloudFormation rounds to the nearest tenth of a percent.
|
39
|
+
* For example, if you update five instances with a minimum successful
|
40
|
+
* percentage of `50`, three instances must signal success.
|
41
|
+
*
|
42
|
+
* If an instance doesn't send a signal within the time specified in the
|
43
|
+
* `PauseTime` property, CloudFormation assumes that the instance wasn't
|
44
|
+
* updated.
|
45
|
+
*
|
46
|
+
* If you specify this property, you must also enable the
|
47
|
+
* `WaitOnResourceSignals` and `PauseTime` properties.
|
48
|
+
*
|
49
|
+
* The `MinSuccessfulInstancesPercent` parameter applies only to instances
|
50
|
+
* only for signaling purpose. To specify the number of instances in your
|
51
|
+
* autoscaling group, see the `MinSize`, `MaxSize`, and `DesiredCapacity`
|
52
|
+
* properties fo the `AWS::AutoScaling::AutoScalingGroup` resource.
|
53
|
+
*
|
54
|
+
* @default 100
|
55
|
+
*/
|
56
|
+
MinSuccessfulInstancesPercent?: number;
|
57
|
+
/**
|
58
|
+
* The amount of time that CloudFormation pauses after making a change to a
|
59
|
+
* batch of instances to give those instances time to start software
|
60
|
+
* applications. For example, you might need to specify `PauseTime` when
|
61
|
+
* scaling up the number of instances in an Auto Scaling group.
|
62
|
+
*
|
63
|
+
* If you enable the WaitOnResourceSignals property, `PauseTime` is the amount
|
64
|
+
* of time that CloudFormation should wait for the Auto Scaling group to
|
65
|
+
* receive the required number of valid signals from added or replaced
|
66
|
+
* instances. If the `PauseTime` is exceeded before the Auto Scaling group
|
67
|
+
* receives the required number of signals, the update fails. For best
|
68
|
+
* results, specify a time period that gives your applications sufficient time
|
69
|
+
* to get started. If the update needs to be rolled back, a short `PauseTime`
|
70
|
+
* can cause the rollback to fail.
|
71
|
+
*
|
72
|
+
* Specify `PauseTime` in the ISO8601 duration format (in the format
|
73
|
+
* `PT#H#M#S`, where each `#` is the number of hours, minutes, and seconds,
|
74
|
+
* respectively). The maximum `PauseTime` is one hour (`PT1H`).
|
75
|
+
*
|
76
|
+
* **Default:** `PT0S` (0 seconds). If the `WaitOnResourceSignals` property is
|
77
|
+
* set to true, the default is `PT5M`.
|
78
|
+
*/
|
79
|
+
PauseTime?: string;
|
80
|
+
/**
|
81
|
+
* Specifies the Auto Scaling processes to suspend during a stack update.
|
82
|
+
* Suspending processes prevents Auto Scaling from interfering with a stack
|
83
|
+
* update. For example, you can suspend alarming so that Amazon EC2 Auto
|
84
|
+
* Scaling doesn't execute scaling policies associated with an alarm. For
|
85
|
+
* valid values, see the `ScalingProcesses.member.N` parameter for the
|
86
|
+
* SuspendProcesses action in the Amazon EC2 Auto Scaling API Reference.
|
87
|
+
*/
|
88
|
+
SuspendProcesses?: string[];
|
89
|
+
/**
|
90
|
+
* Specifies whether the Auto Scaling group waits on signals from new
|
91
|
+
* instances during an update. Use this property to ensure that instances have
|
92
|
+
* completed installing and configuring applications before the Auto Scaling
|
93
|
+
* group update proceeds. AWS CloudFormation suspends the update of an Auto
|
94
|
+
* Scaling group after new EC2 instances are launched into the group. AWS
|
95
|
+
* CloudFormation must receive a signal from each new instance within the
|
96
|
+
* specified PauseTime before continuing the update. To signal the Auto
|
97
|
+
* Scaling group, use the `cfn-signal` helper script or SignalResource API.
|
98
|
+
*
|
99
|
+
* To have instances wait for an Elastic Load Balancing health check before
|
100
|
+
* they signal success, add a health-check verification by using the `cfn-init`
|
101
|
+
* helper script. For an example, see the `verify_instance_health` command in
|
102
|
+
* the Auto Scaling rolling updates sample template.
|
103
|
+
*
|
104
|
+
* @default false
|
105
|
+
*/
|
106
|
+
WaitOnResourceSignals?: boolean;
|
107
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/**
|
2
|
+
* To specify how CloudFormation handles rolling updates for an Auto Scaling
|
3
|
+
* group, use the `AutoScalingRollingUpdate` policy. Rolling updates enable you
|
4
|
+
* to specify whether AWS CloudFormation updates instances that are in an Auto
|
5
|
+
* Scaling group in batches or all at once.
|
6
|
+
*
|
7
|
+
* Be aware that, during stack update rollback operations, CloudFormation uses
|
8
|
+
* the `UpdatePolicy` configuration specified in the template before the current
|
9
|
+
* stack update operation. For example, suppose you have updated the
|
10
|
+
* `MaxBatchSize` in your stack template's `UpdatePolicy` from 1 to 10. You then
|
11
|
+
* perform a stack update, and that update fails and CloudFormation initiates an
|
12
|
+
* update rollback operation. In such a case, CloudFormation will use 1 as the
|
13
|
+
* maximum batch size, rather than 10. For this reason, we recommend you make
|
14
|
+
* changes to the UpdatePolicy configuration in a stack update separate from and
|
15
|
+
* before any updates to the `AWS::AutoScaling::AutoScalingGroup` resource that
|
16
|
+
* are likely to initiate rolling updates.
|
17
|
+
*
|
18
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-rollingupdate | AutoScalingRollingUpdate policy}
|
19
|
+
*/
|
20
|
+
export {};
|
@@ -0,0 +1,35 @@
|
|
1
|
+
/**
|
2
|
+
* To specify how AWS CloudFormation handles updates for the `MinSize`,
|
3
|
+
* `MaxSize`, and `DesiredCapacity` properties when the
|
4
|
+
* `AWS::AutoScaling::AutoScalingGroup` resource has an associated scheduled
|
5
|
+
* action, use the `AutoScalingScheduledAction` policy.
|
6
|
+
*
|
7
|
+
* With scheduled actions, the group size properties of an Auto Scaling group
|
8
|
+
* can change at any time. When you update a stack with an Auto Scaling group
|
9
|
+
* and scheduled action, CloudFormation always sets the group size property
|
10
|
+
* values of your Auto Scaling group to the values that are defined in the
|
11
|
+
* `AWS::AutoScaling::AutoScalingGroup` resource of your template, even if a
|
12
|
+
* scheduled action is in effect.
|
13
|
+
*
|
14
|
+
* If you don't want CloudFormation to change any of the group size property
|
15
|
+
* values when you have a scheduled action in effect, use the
|
16
|
+
* `AutoScalingScheduledAction` update policy and set
|
17
|
+
* `IgnoreUnmodifiedGroupSizeProperties` to true to prevent CloudFormation from
|
18
|
+
* changing the `MinSize`, `MaxSize`, or `DesiredCapacity` properties unless you
|
19
|
+
* have modified these values in your template.
|
20
|
+
*
|
21
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-scheduledactions | AutoScalingScheduledAction policy}
|
22
|
+
*/
|
23
|
+
export interface AutoScalingScheduledActionPolicy {
|
24
|
+
/**
|
25
|
+
* If true, AWS CloudFormation ignores differences in group size properties
|
26
|
+
* between your current Auto Scaling group and the Auto Scaling group
|
27
|
+
* described in the `AWS::AutoScaling::AutoScalingGroup` resource of your
|
28
|
+
* template during a stack update. If you modify any of the group size
|
29
|
+
* property values in your template, AWS CloudFormation uses the modified
|
30
|
+
* values and updates your Auto Scaling group.
|
31
|
+
*
|
32
|
+
* @default false
|
33
|
+
*/
|
34
|
+
IgnoreUnmodifiedGroupSizeProperties?: boolean;
|
35
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
/**
|
2
|
+
* To specify how AWS CloudFormation handles updates for the `MinSize`,
|
3
|
+
* `MaxSize`, and `DesiredCapacity` properties when the
|
4
|
+
* `AWS::AutoScaling::AutoScalingGroup` resource has an associated scheduled
|
5
|
+
* action, use the `AutoScalingScheduledAction` policy.
|
6
|
+
*
|
7
|
+
* With scheduled actions, the group size properties of an Auto Scaling group
|
8
|
+
* can change at any time. When you update a stack with an Auto Scaling group
|
9
|
+
* and scheduled action, CloudFormation always sets the group size property
|
10
|
+
* values of your Auto Scaling group to the values that are defined in the
|
11
|
+
* `AWS::AutoScaling::AutoScalingGroup` resource of your template, even if a
|
12
|
+
* scheduled action is in effect.
|
13
|
+
*
|
14
|
+
* If you don't want CloudFormation to change any of the group size property
|
15
|
+
* values when you have a scheduled action in effect, use the
|
16
|
+
* `AutoScalingScheduledAction` update policy and set
|
17
|
+
* `IgnoreUnmodifiedGroupSizeProperties` to true to prevent CloudFormation from
|
18
|
+
* changing the `MinSize`, `MaxSize`, or `DesiredCapacity` properties unless you
|
19
|
+
* have modified these values in your template.
|
20
|
+
*
|
21
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-scheduledactions | AutoScalingScheduledAction policy}
|
22
|
+
*/
|
23
|
+
export {};
|
@@ -0,0 +1,73 @@
|
|
1
|
+
import { IntrinsicValue } from './Fn.js';
|
2
|
+
/**
|
3
|
+
* Pseudo parameters are parameters that are predefined by AWS CloudFormation.
|
4
|
+
* You don't declare them in your template. Use them the same way as you would a
|
5
|
+
* parameter, as the argument for the Ref function.
|
6
|
+
*
|
7
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html | Psuedo Parameter Reference}
|
8
|
+
*/
|
9
|
+
export declare class AwsParam {
|
10
|
+
/**
|
11
|
+
* Returns the AWS account ID of the account in which the stack is being
|
12
|
+
* created, such as `123456789012`.
|
13
|
+
*
|
14
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-accountid | AWS::AccountId}
|
15
|
+
*/
|
16
|
+
static get AccountId(): IntrinsicValue;
|
17
|
+
/**
|
18
|
+
* Returns the list of notification Amazon Resource Names (ARNs) for the
|
19
|
+
* current stack.
|
20
|
+
*
|
21
|
+
* To get a single ARN from the list, use {@link Fn.Split}.
|
22
|
+
*
|
23
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-notificationarns | AWS::NotificationARNs}
|
24
|
+
*/
|
25
|
+
static get NotificationARNs(): IntrinsicValue;
|
26
|
+
/**
|
27
|
+
* Removes the corresponding resource property when specified as a return
|
28
|
+
* value in the `Fn::If` intrinsic function.
|
29
|
+
*
|
30
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-novalue | AWS::NoValue}
|
31
|
+
*/
|
32
|
+
static get NoValue(): IntrinsicValue;
|
33
|
+
/**
|
34
|
+
* Returns the partition that the resource is in. For standard AWS Regions,
|
35
|
+
* the partition is `aws`. For resources in other partitions, the partition is
|
36
|
+
* `aws-partitionname`. For example, the partition for resources in the China
|
37
|
+
* (Beijing and Ningxia) Region is `aws-cn` and the partition for resources in
|
38
|
+
* the AWS GovCloud (US-West) region is `aws-us-gov`.
|
39
|
+
*
|
40
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-partition | AWS::Partition}
|
41
|
+
*/
|
42
|
+
static get Partition(): IntrinsicValue;
|
43
|
+
/**
|
44
|
+
* Returns a string representing the Region in which the encompassing resource
|
45
|
+
* is being created, such as `us-west-2`.
|
46
|
+
*
|
47
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-region | AWS::Region}
|
48
|
+
*/
|
49
|
+
static get Region(): IntrinsicValue;
|
50
|
+
/**
|
51
|
+
* Returns the ID of the stack as specified with the aws cloudformation
|
52
|
+
* create-stack command, such as
|
53
|
+
* `arn:aws:cloudformation:us-west-2:123456789012:stack/teststack/51af3dc0-da77-11e4-872e-1234567db123`.
|
54
|
+
*
|
55
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-stackid | AWS::StackId}
|
56
|
+
*/
|
57
|
+
static get StackId(): IntrinsicValue;
|
58
|
+
/**
|
59
|
+
* Returns the name of the stack as specified with the aws cloudformation
|
60
|
+
* `create-stack` command, such as `teststack`.
|
61
|
+
*
|
62
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-stackname | AWS::StackName}
|
63
|
+
*/
|
64
|
+
static get StackName(): IntrinsicValue;
|
65
|
+
/**
|
66
|
+
* Returns the suffix for a domain. The suffix is typically `amazonaws.com`,
|
67
|
+
* but might differ by Region. For example, the suffix for the China (Beijing)
|
68
|
+
* Region is `amazonaws.com.cn`.
|
69
|
+
*
|
70
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-urlsuffix | AWS::URLSuffix}
|
71
|
+
*/
|
72
|
+
static get URLSuffix(): IntrinsicValue;
|
73
|
+
}
|
package/lib/AwsParam.js
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
import { Fn } from './Fn.js';
|
2
|
+
/**
|
3
|
+
* Pseudo parameters are parameters that are predefined by AWS CloudFormation.
|
4
|
+
* You don't declare them in your template. Use them the same way as you would a
|
5
|
+
* parameter, as the argument for the Ref function.
|
6
|
+
*
|
7
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html | Psuedo Parameter Reference}
|
8
|
+
*/
|
9
|
+
export class AwsParam {
|
10
|
+
/**
|
11
|
+
* Returns the AWS account ID of the account in which the stack is being
|
12
|
+
* created, such as `123456789012`.
|
13
|
+
*
|
14
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-accountid | AWS::AccountId}
|
15
|
+
*/
|
16
|
+
static get AccountId() {
|
17
|
+
return Fn.Ref('AWS::AccountId');
|
18
|
+
}
|
19
|
+
/**
|
20
|
+
* Returns the list of notification Amazon Resource Names (ARNs) for the
|
21
|
+
* current stack.
|
22
|
+
*
|
23
|
+
* To get a single ARN from the list, use {@link Fn.Split}.
|
24
|
+
*
|
25
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-notificationarns | AWS::NotificationARNs}
|
26
|
+
*/
|
27
|
+
static get NotificationARNs() {
|
28
|
+
return Fn.Ref('AWS::NotificationARNs');
|
29
|
+
}
|
30
|
+
/**
|
31
|
+
* Removes the corresponding resource property when specified as a return
|
32
|
+
* value in the `Fn::If` intrinsic function.
|
33
|
+
*
|
34
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-novalue | AWS::NoValue}
|
35
|
+
*/
|
36
|
+
static get NoValue() {
|
37
|
+
return Fn.Ref('AWS::NoValue');
|
38
|
+
}
|
39
|
+
/**
|
40
|
+
* Returns the partition that the resource is in. For standard AWS Regions,
|
41
|
+
* the partition is `aws`. For resources in other partitions, the partition is
|
42
|
+
* `aws-partitionname`. For example, the partition for resources in the China
|
43
|
+
* (Beijing and Ningxia) Region is `aws-cn` and the partition for resources in
|
44
|
+
* the AWS GovCloud (US-West) region is `aws-us-gov`.
|
45
|
+
*
|
46
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-partition | AWS::Partition}
|
47
|
+
*/
|
48
|
+
static get Partition() {
|
49
|
+
return Fn.Ref('AWS::Partition');
|
50
|
+
}
|
51
|
+
/**
|
52
|
+
* Returns a string representing the Region in which the encompassing resource
|
53
|
+
* is being created, such as `us-west-2`.
|
54
|
+
*
|
55
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-region | AWS::Region}
|
56
|
+
*/
|
57
|
+
static get Region() {
|
58
|
+
return Fn.Ref('AWS::Region');
|
59
|
+
}
|
60
|
+
/**
|
61
|
+
* Returns the ID of the stack as specified with the aws cloudformation
|
62
|
+
* create-stack command, such as
|
63
|
+
* `arn:aws:cloudformation:us-west-2:123456789012:stack/teststack/51af3dc0-da77-11e4-872e-1234567db123`.
|
64
|
+
*
|
65
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-stackid | AWS::StackId}
|
66
|
+
*/
|
67
|
+
static get StackId() {
|
68
|
+
return Fn.Ref('AWS::StackId');
|
69
|
+
}
|
70
|
+
/**
|
71
|
+
* Returns the name of the stack as specified with the aws cloudformation
|
72
|
+
* `create-stack` command, such as `teststack`.
|
73
|
+
*
|
74
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-stackname | AWS::StackName}
|
75
|
+
*/
|
76
|
+
static get StackName() {
|
77
|
+
return Fn.Ref('AWS::StackName');
|
78
|
+
}
|
79
|
+
/**
|
80
|
+
* Returns the suffix for a domain. The suffix is typically `amazonaws.com`,
|
81
|
+
* but might differ by Region. For example, the suffix for the China (Beijing)
|
82
|
+
* Region is `amazonaws.com.cn`.
|
83
|
+
*
|
84
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-urlsuffix | AWS::URLSuffix}
|
85
|
+
*/
|
86
|
+
static get URLSuffix() {
|
87
|
+
return Fn.Ref('AWS::URLSuffix');
|
88
|
+
}
|
89
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
/**
|
2
|
+
* To perform an CodeDeploy deployment when the version changes on an
|
3
|
+
* `AWS::Lambda::Alias` resource, use the `CodeDeployLambdaAliasUpdate` update
|
4
|
+
* policy.
|
5
|
+
*
|
6
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-codedeploylambdaaliasupdate | CodeDeployLambdaAlias Update policy}
|
7
|
+
*/
|
8
|
+
export interface CodeDeployLambdaAliasUpdatePolicy {
|
9
|
+
/**
|
10
|
+
* The name of the Lambda function to run after traffic routing completes.
|
11
|
+
*/
|
12
|
+
AfterAllowTrafficHook?: string;
|
13
|
+
/**
|
14
|
+
* The name of the CodeDeploy application.
|
15
|
+
*/
|
16
|
+
ApplicationName: string;
|
17
|
+
/**
|
18
|
+
* The name of the Lambda function to run before traffic routing starts.
|
19
|
+
*/
|
20
|
+
BeforeAllowTrafficHook?: string;
|
21
|
+
/**
|
22
|
+
* The name of the CodeDeploy deployment group. This is where the
|
23
|
+
* traffic-shifting policy is set.
|
24
|
+
*/
|
25
|
+
DeploymentGroupName: string;
|
26
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,71 @@
|
|
1
|
+
/**
|
2
|
+
* For an Auto Scaling group replacement update, specifies how many instances
|
3
|
+
* must signal success for the update to succeed.
|
4
|
+
*
|
5
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-creationpolicy.html | CreationPolicy attribute}
|
6
|
+
*/
|
7
|
+
export interface AutoScalingCreationPolicy {
|
8
|
+
/**
|
9
|
+
* Specifies the percentage of instances in an Auto Scaling replacement update
|
10
|
+
* that must signal success for the update to succeed. You can specify a value
|
11
|
+
* from `0` to `100`. CloudFormation rounds to the nearest tenth of a percent.
|
12
|
+
* For example, if you update five instances with a minimum successful
|
13
|
+
* percentage of `50`, three instances must signal success. If an instance
|
14
|
+
* doesn't send a signal within the time specified by the Timeout property,
|
15
|
+
* CloudFormation assumes that the instance wasn't created.
|
16
|
+
*/
|
17
|
+
MinSuccessfulInstancesPercent?: number;
|
18
|
+
}
|
19
|
+
/**
|
20
|
+
* When CloudFormation creates the associated resource, configures the number of
|
21
|
+
* required success signals and the length of time that CloudFormation waits for
|
22
|
+
* those signals.
|
23
|
+
*
|
24
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-creationpolicy.html | CreationPolicy attribute}
|
25
|
+
*/
|
26
|
+
export interface ResourceSignalPolicy {
|
27
|
+
/**
|
28
|
+
* The number of success signals CloudFormation must receive before it sets
|
29
|
+
* the resource status as `CREATE_COMPLETE`. If the resource receives a
|
30
|
+
* failure signal or doesn't receive the specified number of signals before
|
31
|
+
* the timeout period expires, the resource creation fails and CloudFormation
|
32
|
+
* rolls the stack back.
|
33
|
+
*/
|
34
|
+
Count?: number;
|
35
|
+
/**
|
36
|
+
* The length of time that CloudFormation waits for the number of signals that
|
37
|
+
* was specified in the Count property. The timeout period starts after
|
38
|
+
* CloudFormation starts creating the resource, and the timeout expires no
|
39
|
+
* sooner than the time you specify but can occur shortly thereafter. The
|
40
|
+
* maximum time that you can specify is 12 hours.
|
41
|
+
*
|
42
|
+
* The value must be in ISO8601 duration format, in the form: `"PT#H#M#S"`,
|
43
|
+
* where each # is the number of hours, minutes, and seconds, respectively.
|
44
|
+
* For best results, specify a period of time that gives your instances plenty
|
45
|
+
* of time to get up and running. A shorter timeout can cause a rollback.
|
46
|
+
*/
|
47
|
+
Timeout?: string;
|
48
|
+
}
|
49
|
+
/**
|
50
|
+
* Associate the `CreationPolicy` attribute with a resource to prevent its
|
51
|
+
* status from reaching create complete until AWS CloudFormation receives a
|
52
|
+
* specified number of success signals or the timeout period is exceeded. To
|
53
|
+
* signal a resource, you can use the `cfn-signal` helper script or
|
54
|
+
* SignalResource API. CloudFormation publishes valid signals to the stack
|
55
|
+
* events so that you track the number of signals sent.
|
56
|
+
*
|
57
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-creationpolicy.html | CreationPolicy attribute}
|
58
|
+
*/
|
59
|
+
export interface CreationPolicy {
|
60
|
+
/**
|
61
|
+
* For an Auto Scaling group replacement update, specifies how many instances
|
62
|
+
* must signal success for the update to succeed.
|
63
|
+
*/
|
64
|
+
AutoScalingCreationPolicy?: AutoScalingCreationPolicy;
|
65
|
+
/**
|
66
|
+
* When CloudFormation creates the associated resource, configures the number
|
67
|
+
* of required success signals and the length of time that CloudFormation
|
68
|
+
* waits for those signals.
|
69
|
+
*/
|
70
|
+
ResourceSignal?: ResourceSignalPolicy;
|
71
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,84 @@
|
|
1
|
+
/**
|
2
|
+
* With the `DeletionPolicy` attribute you can preserve, and in some cases,
|
3
|
+
* backup a resource when its stack is deleted. You specify a `DeletionPolicy`
|
4
|
+
* attribute for each resource that you want to control. If a resource has no
|
5
|
+
* `DeletionPolicy` attribute, AWS CloudFormation deletes the resource by
|
6
|
+
* default, except for:
|
7
|
+
*
|
8
|
+
* - For `AWS::RDS::DBCluster resources`, the default policy is `Snapshot`.
|
9
|
+
* - For `AWS::RDS::DBInstance` resources that don't specify the
|
10
|
+
* `DBClusterIdentifier` property, the default policy is `Snapshot`.
|
11
|
+
* - For Amazon S3 buckets, you must delete all objects in the bucket for
|
12
|
+
* deletion to succeed.
|
13
|
+
*
|
14
|
+
* This capability also applies to stack update operations that lead to
|
15
|
+
* resources being deleted from stacks. For example, if you remove the resource
|
16
|
+
* from the stack template, and then update the stack with the template. This
|
17
|
+
* capability doesn't apply to resources whose physical instance is replaced
|
18
|
+
* during stack update operations. For example, if you edit a resource's
|
19
|
+
* properties such that CloudFormation replaces that resource during a stack
|
20
|
+
* update.
|
21
|
+
*
|
22
|
+
* To keep a resource when its stack is deleted, specify Retain for that
|
23
|
+
* resource. You can use retain for any resource. For example, you can retain a
|
24
|
+
* nested stack, Amazon S3 bucket, or EC2 instance so that you can continue to
|
25
|
+
* use or modify those resources after you delete their stacks.
|
26
|
+
*
|
27
|
+
* For resources that support snapshots, such as `AWS::EC2::Volume`, specify
|
28
|
+
* Snapshot to have CloudFormation create a snapshot before deleting the
|
29
|
+
* resource.
|
30
|
+
*
|
31
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html | DeletionPolicy attribute}
|
32
|
+
*/
|
33
|
+
export declare const DeletionPolicy: {
|
34
|
+
/**
|
35
|
+
* CloudFormation deletes the resource and all its content if applicable
|
36
|
+
* during stack deletion. You can add this deletion policy to any resource
|
37
|
+
* type. By default, if you don't specify a `DeletionPolicy`, CloudFormation
|
38
|
+
* deletes your resources. However, be aware of the following considerations:
|
39
|
+
*
|
40
|
+
* - For `AWS::RDS::DBCluster resources`, the default policy is `Snapshot`.
|
41
|
+
* - For `AWS::RDS::DBInstance` resources that don't specify the
|
42
|
+
* `DBClusterIdentifier` property, the default policy is `Snapshot`.
|
43
|
+
*
|
44
|
+
* For Amazon S3 buckets, you must delete all objects in the bucket for
|
45
|
+
* deletion to succeed.
|
46
|
+
*/
|
47
|
+
readonly Delete: "Delete";
|
48
|
+
/**
|
49
|
+
* CloudFormation keeps the resource without deleting the resource or its
|
50
|
+
* contents when its stack is deleted. You can add this deletion policy to any
|
51
|
+
* resource type. When CloudFormation completes the stack deletion, the stack
|
52
|
+
* will be in `Delete_Complete` state; however, resources that are retained
|
53
|
+
* continue to exist and continue to incur applicable charges until you delete
|
54
|
+
* those resources.
|
55
|
+
*
|
56
|
+
* For update operations, the following considerations apply:
|
57
|
+
*
|
58
|
+
* - If a resource is deleted, the `DeletionPolicy` retains the physical
|
59
|
+
* resource but ensures that it's deleted from CloudFormation's scope.
|
60
|
+
* - If a resource is updated such that a new physical resource is created to
|
61
|
+
* replace the old resource, then the old resource is completely deleted,
|
62
|
+
* including from CloudFormation's scope.
|
63
|
+
*/
|
64
|
+
readonly Retain: "Retain";
|
65
|
+
/**
|
66
|
+
* For resources that support snapshots, CloudFormation creates a snapshot for
|
67
|
+
* the resource before deleting it. When CloudFormation completes the stack
|
68
|
+
* deletion, the stack will be in the `Delete_Complete` state; however, the
|
69
|
+
* snapshots that are created with this policy continue to exist and continue
|
70
|
+
* to incur applicable charges until you delete those snapshots.
|
71
|
+
*
|
72
|
+
* Resources that support snapshots include:
|
73
|
+
*
|
74
|
+
* - `AWS::EC2::Volume`
|
75
|
+
* - `AWS::ElastiCache::CacheCluster`
|
76
|
+
* - `AWS::ElastiCache::ReplicationGroup`
|
77
|
+
* - `AWS::Neptune::DBCluster`
|
78
|
+
* - `AWS::RDS::DBCluster`
|
79
|
+
* - `AWS::RDS::DBInstance`
|
80
|
+
* - `AWS::Redshift::Cluster`
|
81
|
+
*/
|
82
|
+
readonly Snapshot: "Snapshot";
|
83
|
+
};
|
84
|
+
export type DeletionPolicy = typeof DeletionPolicy[keyof typeof DeletionPolicy];
|
@@ -0,0 +1,83 @@
|
|
1
|
+
/**
|
2
|
+
* With the `DeletionPolicy` attribute you can preserve, and in some cases,
|
3
|
+
* backup a resource when its stack is deleted. You specify a `DeletionPolicy`
|
4
|
+
* attribute for each resource that you want to control. If a resource has no
|
5
|
+
* `DeletionPolicy` attribute, AWS CloudFormation deletes the resource by
|
6
|
+
* default, except for:
|
7
|
+
*
|
8
|
+
* - For `AWS::RDS::DBCluster resources`, the default policy is `Snapshot`.
|
9
|
+
* - For `AWS::RDS::DBInstance` resources that don't specify the
|
10
|
+
* `DBClusterIdentifier` property, the default policy is `Snapshot`.
|
11
|
+
* - For Amazon S3 buckets, you must delete all objects in the bucket for
|
12
|
+
* deletion to succeed.
|
13
|
+
*
|
14
|
+
* This capability also applies to stack update operations that lead to
|
15
|
+
* resources being deleted from stacks. For example, if you remove the resource
|
16
|
+
* from the stack template, and then update the stack with the template. This
|
17
|
+
* capability doesn't apply to resources whose physical instance is replaced
|
18
|
+
* during stack update operations. For example, if you edit a resource's
|
19
|
+
* properties such that CloudFormation replaces that resource during a stack
|
20
|
+
* update.
|
21
|
+
*
|
22
|
+
* To keep a resource when its stack is deleted, specify Retain for that
|
23
|
+
* resource. You can use retain for any resource. For example, you can retain a
|
24
|
+
* nested stack, Amazon S3 bucket, or EC2 instance so that you can continue to
|
25
|
+
* use or modify those resources after you delete their stacks.
|
26
|
+
*
|
27
|
+
* For resources that support snapshots, such as `AWS::EC2::Volume`, specify
|
28
|
+
* Snapshot to have CloudFormation create a snapshot before deleting the
|
29
|
+
* resource.
|
30
|
+
*
|
31
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html | DeletionPolicy attribute}
|
32
|
+
*/
|
33
|
+
export const DeletionPolicy = {
|
34
|
+
/**
|
35
|
+
* CloudFormation deletes the resource and all its content if applicable
|
36
|
+
* during stack deletion. You can add this deletion policy to any resource
|
37
|
+
* type. By default, if you don't specify a `DeletionPolicy`, CloudFormation
|
38
|
+
* deletes your resources. However, be aware of the following considerations:
|
39
|
+
*
|
40
|
+
* - For `AWS::RDS::DBCluster resources`, the default policy is `Snapshot`.
|
41
|
+
* - For `AWS::RDS::DBInstance` resources that don't specify the
|
42
|
+
* `DBClusterIdentifier` property, the default policy is `Snapshot`.
|
43
|
+
*
|
44
|
+
* For Amazon S3 buckets, you must delete all objects in the bucket for
|
45
|
+
* deletion to succeed.
|
46
|
+
*/
|
47
|
+
Delete: 'Delete',
|
48
|
+
/**
|
49
|
+
* CloudFormation keeps the resource without deleting the resource or its
|
50
|
+
* contents when its stack is deleted. You can add this deletion policy to any
|
51
|
+
* resource type. When CloudFormation completes the stack deletion, the stack
|
52
|
+
* will be in `Delete_Complete` state; however, resources that are retained
|
53
|
+
* continue to exist and continue to incur applicable charges until you delete
|
54
|
+
* those resources.
|
55
|
+
*
|
56
|
+
* For update operations, the following considerations apply:
|
57
|
+
*
|
58
|
+
* - If a resource is deleted, the `DeletionPolicy` retains the physical
|
59
|
+
* resource but ensures that it's deleted from CloudFormation's scope.
|
60
|
+
* - If a resource is updated such that a new physical resource is created to
|
61
|
+
* replace the old resource, then the old resource is completely deleted,
|
62
|
+
* including from CloudFormation's scope.
|
63
|
+
*/
|
64
|
+
Retain: 'Retain',
|
65
|
+
/**
|
66
|
+
* For resources that support snapshots, CloudFormation creates a snapshot for
|
67
|
+
* the resource before deleting it. When CloudFormation completes the stack
|
68
|
+
* deletion, the stack will be in the `Delete_Complete` state; however, the
|
69
|
+
* snapshots that are created with this policy continue to exist and continue
|
70
|
+
* to incur applicable charges until you delete those snapshots.
|
71
|
+
*
|
72
|
+
* Resources that support snapshots include:
|
73
|
+
*
|
74
|
+
* - `AWS::EC2::Volume`
|
75
|
+
* - `AWS::ElastiCache::CacheCluster`
|
76
|
+
* - `AWS::ElastiCache::ReplicationGroup`
|
77
|
+
* - `AWS::Neptune::DBCluster`
|
78
|
+
* - `AWS::RDS::DBCluster`
|
79
|
+
* - `AWS::RDS::DBInstance`
|
80
|
+
* - `AWS::Redshift::Cluster`
|
81
|
+
*/
|
82
|
+
Snapshot: 'Snapshot',
|
83
|
+
};
|