@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,4 +1,4 @@
|
|
1
|
-
export const ResourceSpecificationVersion = "
|
1
|
+
export const ResourceSpecificationVersion = "140.0.0";
|
2
2
|
export const ResourceType = {
|
3
3
|
ACMPCACertificate: "AWS::ACMPCA::Certificate",
|
4
4
|
ACMPCACertificateAuthority: "AWS::ACMPCA::CertificateAuthority",
|
@@ -244,6 +244,8 @@ export const ResourceType = {
|
|
244
244
|
ConnectTrafficDistributionGroup: "AWS::Connect::TrafficDistributionGroup",
|
245
245
|
ConnectUser: "AWS::Connect::User",
|
246
246
|
ConnectUserHierarchyGroup: "AWS::Connect::UserHierarchyGroup",
|
247
|
+
ConnectView: "AWS::Connect::View",
|
248
|
+
ConnectViewVersion: "AWS::Connect::ViewVersion",
|
247
249
|
ConnectCampaignsCampaign: "AWS::ConnectCampaigns::Campaign",
|
248
250
|
ControlTowerEnabledControl: "AWS::ControlTower::EnabledControl",
|
249
251
|
CustomerProfilesCalculatedAttributeDefinition: "AWS::CustomerProfiles::CalculatedAttributeDefinition",
|
@@ -286,7 +288,6 @@ export const ResourceType = {
|
|
286
288
|
DetectiveGraph: "AWS::Detective::Graph",
|
287
289
|
DetectiveMemberInvitation: "AWS::Detective::MemberInvitation",
|
288
290
|
DetectiveOrganizationAdmin: "AWS::Detective::OrganizationAdmin",
|
289
|
-
DevBatchJobDefinition: "AWS::DevBatch::JobDefinition",
|
290
291
|
DevOpsGuruLogAnomalyDetectionIntegration: "AWS::DevOpsGuru::LogAnomalyDetectionIntegration",
|
291
292
|
DevOpsGuruNotificationChannel: "AWS::DevOpsGuru::NotificationChannel",
|
292
293
|
DevOpsGuruResourceCollection: "AWS::DevOpsGuru::ResourceCollection",
|
@@ -748,6 +749,11 @@ export const ResourceType = {
|
|
748
749
|
MediaPackageOriginEndpoint: "AWS::MediaPackage::OriginEndpoint",
|
749
750
|
MediaPackagePackagingConfiguration: "AWS::MediaPackage::PackagingConfiguration",
|
750
751
|
MediaPackagePackagingGroup: "AWS::MediaPackage::PackagingGroup",
|
752
|
+
MediaPackageV2Channel: "AWS::MediaPackageV2::Channel",
|
753
|
+
MediaPackageV2ChannelGroup: "AWS::MediaPackageV2::ChannelGroup",
|
754
|
+
MediaPackageV2ChannelPolicy: "AWS::MediaPackageV2::ChannelPolicy",
|
755
|
+
MediaPackageV2OriginEndpoint: "AWS::MediaPackageV2::OriginEndpoint",
|
756
|
+
MediaPackageV2OriginEndpointPolicy: "AWS::MediaPackageV2::OriginEndpointPolicy",
|
751
757
|
MediaStoreContainer: "AWS::MediaStore::Container",
|
752
758
|
MediaTailorChannel: "AWS::MediaTailor::Channel",
|
753
759
|
MediaTailorChannelPolicy: "AWS::MediaTailor::ChannelPolicy",
|
@@ -1372,7 +1378,7 @@ export const AttributeNames = {
|
|
1372
1378
|
"AWS::Connect::PhoneNumber": ["Address", "PhoneNumberArn"],
|
1373
1379
|
"AWS::Connect::Prompt": ["PromptArn"],
|
1374
1380
|
"AWS::Connect::Queue": ["Type", "QueueArn"],
|
1375
|
-
"AWS::Connect::QuickConnect": ["QuickConnectArn"],
|
1381
|
+
"AWS::Connect::QuickConnect": ["QuickConnectArn", "QuickConnectType"],
|
1376
1382
|
"AWS::Connect::RoutingProfile": ["RoutingProfileArn"],
|
1377
1383
|
"AWS::Connect::Rule": ["RuleArn"],
|
1378
1384
|
"AWS::Connect::SecurityKey": ["AssociationId"],
|
@@ -1380,6 +1386,8 @@ export const AttributeNames = {
|
|
1380
1386
|
"AWS::Connect::TrafficDistributionGroup": ["Status", "IsDefault", "TrafficDistributionGroupArn"],
|
1381
1387
|
"AWS::Connect::User": ["UserArn"],
|
1382
1388
|
"AWS::Connect::UserHierarchyGroup": ["UserHierarchyGroupArn"],
|
1389
|
+
"AWS::Connect::View": ["ViewArn", "ViewContentSha256", "ViewId"],
|
1390
|
+
"AWS::Connect::ViewVersion": ["ViewVersionArn", "Version"],
|
1383
1391
|
"AWS::ConnectCampaigns::Campaign": ["Arn"],
|
1384
1392
|
"AWS::ControlTower::EnabledControl": [],
|
1385
1393
|
"AWS::CustomerProfiles::CalculatedAttributeDefinition": ["LastUpdatedAt", "CreatedAt"],
|
@@ -1422,7 +1430,6 @@ export const AttributeNames = {
|
|
1422
1430
|
"AWS::Detective::Graph": ["Arn"],
|
1423
1431
|
"AWS::Detective::MemberInvitation": [],
|
1424
1432
|
"AWS::Detective::OrganizationAdmin": ["GraphArn"],
|
1425
|
-
"AWS::DevBatch::JobDefinition": [],
|
1426
1433
|
"AWS::DevOpsGuru::LogAnomalyDetectionIntegration": ["AccountId"],
|
1427
1434
|
"AWS::DevOpsGuru::NotificationChannel": ["Id"],
|
1428
1435
|
"AWS::DevOpsGuru::ResourceCollection": ["ResourceCollectionType"],
|
@@ -1504,7 +1511,7 @@ export const AttributeNames = {
|
|
1504
1511
|
"AWS::EC2::TransitGatewayMulticastGroupSource": ["GroupMember", "ResourceId", "MemberType", "SourceType", "ResourceType", "SubnetId", "GroupSource", "TransitGatewayAttachmentId"],
|
1505
1512
|
"AWS::EC2::TransitGatewayPeeringAttachment": ["Status", "State", "CreationTime", "Status.Message", "Status.Code", "TransitGatewayAttachmentId"],
|
1506
1513
|
"AWS::EC2::TransitGatewayRoute": [],
|
1507
|
-
"AWS::EC2::TransitGatewayRouteTable": [],
|
1514
|
+
"AWS::EC2::TransitGatewayRouteTable": ["TransitGatewayRouteTableId"],
|
1508
1515
|
"AWS::EC2::TransitGatewayRouteTableAssociation": [],
|
1509
1516
|
"AWS::EC2::TransitGatewayRouteTablePropagation": [],
|
1510
1517
|
"AWS::EC2::TransitGatewayVpcAttachment": ["Id"],
|
@@ -1666,7 +1673,7 @@ export const AttributeNames = {
|
|
1666
1673
|
"AWS::GroundStation::Config": ["Type", "Id", "Arn"],
|
1667
1674
|
"AWS::GroundStation::DataflowEndpointGroup": ["Id", "Arn"],
|
1668
1675
|
"AWS::GroundStation::MissionProfile": ["Region", "Id", "Arn"],
|
1669
|
-
"AWS::GuardDuty::Detector": [],
|
1676
|
+
"AWS::GuardDuty::Detector": ["Id"],
|
1670
1677
|
"AWS::GuardDuty::Filter": [],
|
1671
1678
|
"AWS::GuardDuty::IPSet": [],
|
1672
1679
|
"AWS::GuardDuty::Master": [],
|
@@ -1884,6 +1891,11 @@ export const AttributeNames = {
|
|
1884
1891
|
"AWS::MediaPackage::OriginEndpoint": ["Arn", "Url"],
|
1885
1892
|
"AWS::MediaPackage::PackagingConfiguration": ["Arn"],
|
1886
1893
|
"AWS::MediaPackage::PackagingGroup": ["DomainName", "Arn"],
|
1894
|
+
"AWS::MediaPackageV2::Channel": ["ModifiedAt", "IngestEndpoints", "CreatedAt", "Arn"],
|
1895
|
+
"AWS::MediaPackageV2::ChannelGroup": ["ModifiedAt", "CreatedAt", "Arn", "EgressDomain"],
|
1896
|
+
"AWS::MediaPackageV2::ChannelPolicy": [],
|
1897
|
+
"AWS::MediaPackageV2::OriginEndpoint": ["ModifiedAt", "CreatedAt", "Arn"],
|
1898
|
+
"AWS::MediaPackageV2::OriginEndpointPolicy": [],
|
1887
1899
|
"AWS::MediaStore::Container": ["Endpoint"],
|
1888
1900
|
"AWS::MediaTailor::Channel": ["Arn"],
|
1889
1901
|
"AWS::MediaTailor::ChannelPolicy": [],
|
@@ -1,9 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import { ParameterDefinition } from './ParameterDefinition.js';
|
4
|
-
import { ResourceDefinition } from './ResourceDefinition.js';
|
5
|
-
import { RuleDefinition } from './RuleDefinition.js';
|
6
|
-
import { TemplateMap } from './TemplateMap.js';
|
1
|
+
import { OutputDefinition, ParameterDefinition, ResourceDefinition, RuleDefinition } from "./definitions.js";
|
2
|
+
import { IntrinsicValue, TemplateMap } from "./util.js";
|
7
3
|
/**
|
8
4
|
* The interface for a CloudFormation template.
|
9
5
|
*
|
@@ -22,7 +18,7 @@ export interface Template {
|
|
22
18
|
*
|
23
19
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/format-version-structure.html | Format version}
|
24
20
|
*/
|
25
|
-
AWSTemplateFormatVersion?:
|
21
|
+
AWSTemplateFormatVersion?: "2010-09-09";
|
26
22
|
/**
|
27
23
|
* The optional Conditions section contains statements that define the
|
28
24
|
* circumstances under which entities are created or configured. For example,
|
@@ -1,3 +1,9 @@
|
|
1
|
+
/**
|
2
|
+
* A key-value map.
|
3
|
+
*/
|
4
|
+
export interface TemplateMap<T> {
|
5
|
+
[key: string]: T;
|
6
|
+
}
|
1
7
|
/**
|
2
8
|
* IntrinsicValue represents the output of an intrinsic function.
|
3
9
|
*/
|
@@ -354,3 +360,75 @@ export declare class Fn {
|
|
354
360
|
*/
|
355
361
|
toJSON(): IntrinsicValue;
|
356
362
|
}
|
363
|
+
/**
|
364
|
+
* Pseudo parameters are parameters that are predefined by AWS CloudFormation.
|
365
|
+
* You don't declare them in your template. Use them the same way as you would a
|
366
|
+
* parameter, as the argument for the Ref function.
|
367
|
+
*
|
368
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html | Psuedo Parameter Reference}
|
369
|
+
*/
|
370
|
+
export declare class AwsParam {
|
371
|
+
/**
|
372
|
+
* Returns the AWS account ID of the account in which the stack is being
|
373
|
+
* created, such as `123456789012`.
|
374
|
+
*
|
375
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-accountid | AWS::AccountId}
|
376
|
+
*/
|
377
|
+
static get AccountId(): IntrinsicValue;
|
378
|
+
/**
|
379
|
+
* Returns the list of notification Amazon Resource Names (ARNs) for the
|
380
|
+
* current stack.
|
381
|
+
*
|
382
|
+
* To get a single ARN from the list, use {@link Fn.Split}.
|
383
|
+
*
|
384
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-notificationarns | AWS::NotificationARNs}
|
385
|
+
*/
|
386
|
+
static get NotificationARNs(): IntrinsicValue;
|
387
|
+
/**
|
388
|
+
* Removes the corresponding resource property when specified as a return
|
389
|
+
* value in the `Fn::If` intrinsic function.
|
390
|
+
*
|
391
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-novalue | AWS::NoValue}
|
392
|
+
*/
|
393
|
+
static get NoValue(): IntrinsicValue;
|
394
|
+
/**
|
395
|
+
* Returns the partition that the resource is in. For standard AWS Regions,
|
396
|
+
* the partition is `aws`. For resources in other partitions, the partition is
|
397
|
+
* `aws-partitionname`. For example, the partition for resources in the China
|
398
|
+
* (Beijing and Ningxia) Region is `aws-cn` and the partition for resources in
|
399
|
+
* the AWS GovCloud (US-West) region is `aws-us-gov`.
|
400
|
+
*
|
401
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-partition | AWS::Partition}
|
402
|
+
*/
|
403
|
+
static get Partition(): IntrinsicValue;
|
404
|
+
/**
|
405
|
+
* Returns a string representing the Region in which the encompassing resource
|
406
|
+
* is being created, such as `us-west-2`.
|
407
|
+
*
|
408
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-region | AWS::Region}
|
409
|
+
*/
|
410
|
+
static get Region(): IntrinsicValue;
|
411
|
+
/**
|
412
|
+
* Returns the ID of the stack as specified with the aws cloudformation
|
413
|
+
* create-stack command, such as
|
414
|
+
* `arn:aws:cloudformation:us-west-2:123456789012:stack/teststack/51af3dc0-da77-11e4-872e-1234567db123`.
|
415
|
+
*
|
416
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-stackid | AWS::StackId}
|
417
|
+
*/
|
418
|
+
static get StackId(): IntrinsicValue;
|
419
|
+
/**
|
420
|
+
* Returns the name of the stack as specified with the aws cloudformation
|
421
|
+
* `create-stack` command, such as `teststack`.
|
422
|
+
*
|
423
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-stackname | AWS::StackName}
|
424
|
+
*/
|
425
|
+
static get StackName(): IntrinsicValue;
|
426
|
+
/**
|
427
|
+
* Returns the suffix for a domain. The suffix is typically `amazonaws.com`,
|
428
|
+
* but might differ by Region. For example, the suffix for the China (Beijing)
|
429
|
+
* Region is `amazonaws.com.cn`.
|
430
|
+
*
|
431
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-urlsuffix | AWS::URLSuffix}
|
432
|
+
*/
|
433
|
+
static get URLSuffix(): IntrinsicValue;
|
434
|
+
}
|
package/lib/{Fn.js → util.js}
RENAMED
@@ -35,7 +35,7 @@ export class Fn {
|
|
35
35
|
parts.push(values[i]);
|
36
36
|
}
|
37
37
|
}
|
38
|
-
return Fn.Join(
|
38
|
+
return Fn.Join("", parts);
|
39
39
|
}
|
40
40
|
/**
|
41
41
|
* Returns true if all the specified conditions evaluate to true, or returns
|
@@ -48,7 +48,7 @@ export class Fn {
|
|
48
48
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-conditions.html#intrinsic-function-reference-conditions-and | Fn::And}
|
49
49
|
*/
|
50
50
|
static And(...conditions) {
|
51
|
-
return new this(
|
51
|
+
return new this("Fn::And", conditions);
|
52
52
|
}
|
53
53
|
/**
|
54
54
|
* The intrinsic function `Fn::Base64` returns the Base64 representation of
|
@@ -61,7 +61,7 @@ export class Fn {
|
|
61
61
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-base64.html | Fn::Base64}
|
62
62
|
*/
|
63
63
|
static Base64(valueToEncode) {
|
64
|
-
return new this(
|
64
|
+
return new this("Fn::Base64", valueToEncode);
|
65
65
|
}
|
66
66
|
/**
|
67
67
|
* The intrinsic function `Fn::Cidr` returns an array of CIDR address blocks.
|
@@ -79,7 +79,7 @@ export class Fn {
|
|
79
79
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-cidr.html | Fn::Cidr}
|
80
80
|
*/
|
81
81
|
static Cidr(ipBlock, count, cidrBits) {
|
82
|
-
return new this(
|
82
|
+
return new this("Fn::Cidr", [ipBlock, count, cidrBits]);
|
83
83
|
}
|
84
84
|
/**
|
85
85
|
* Returns `true` if a specified string matches at least one value in a list
|
@@ -92,7 +92,7 @@ export class Fn {
|
|
92
92
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-rules.html#fn-contains | Fn::Contains}
|
93
93
|
*/
|
94
94
|
static Contains(listOfStrings, string) {
|
95
|
-
return new this(
|
95
|
+
return new this("Fn::Contains", [listOfStrings, string]);
|
96
96
|
}
|
97
97
|
/**
|
98
98
|
* Returns `true` if a specified string matches all values in a list.
|
@@ -104,7 +104,7 @@ export class Fn {
|
|
104
104
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-rules.html#fn-eachmemberequals | Fn::EachMemberEquals}
|
105
105
|
*/
|
106
106
|
static EachMemberEquals(listOfStrings, string) {
|
107
|
-
return new this(
|
107
|
+
return new this("Fn::EachMemberEquals", [listOfStrings, string]);
|
108
108
|
}
|
109
109
|
/**
|
110
110
|
* Returns `true` if a specified string matches all values in a list.
|
@@ -119,7 +119,7 @@ export class Fn {
|
|
119
119
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-rules.html#fn-eachmemberin | Fn::EachMemberIn}
|
120
120
|
*/
|
121
121
|
static EachMemberIn(stringsToCheck, stringsToMatch) {
|
122
|
-
return new this(
|
122
|
+
return new this("Fn::EachMemberIn", [stringsToCheck, stringsToMatch]);
|
123
123
|
}
|
124
124
|
/**
|
125
125
|
* Compares if two values are equal. Returns true if the two values are equal
|
@@ -131,7 +131,7 @@ export class Fn {
|
|
131
131
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-conditions.html#intrinsic-function-reference-conditions-equals | Fn::Equals}
|
132
132
|
*/
|
133
133
|
static Equals(value1, value2) {
|
134
|
-
return new this(
|
134
|
+
return new this("Fn::Equals", [value1, value2]);
|
135
135
|
}
|
136
136
|
/**
|
137
137
|
* The intrinsic function `Fn::FindInMap` returns the value corresponding to
|
@@ -146,7 +146,7 @@ export class Fn {
|
|
146
146
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-findinmap.html | Fn::FindInMap}
|
147
147
|
*/
|
148
148
|
static FindInMap(mapName, topLevelKey, secondLevelKey) {
|
149
|
-
return new this(
|
149
|
+
return new this("Fn::FindInMap", [mapName, topLevelKey, secondLevelKey]);
|
150
150
|
}
|
151
151
|
/**
|
152
152
|
* The `Fn::GetAtt` intrinsic function returns the value of an attribute from
|
@@ -164,7 +164,7 @@ export class Fn {
|
|
164
164
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html | Fn::GetAtt}
|
165
165
|
*/
|
166
166
|
static GetAtt(logicalNameOfResource, attributeName) {
|
167
|
-
return new this(
|
167
|
+
return new this("Fn::GetAtt", [logicalNameOfResource, attributeName]);
|
168
168
|
}
|
169
169
|
/**
|
170
170
|
* The intrinsic function `Fn::GetAZs` returns an array that lists
|
@@ -183,7 +183,7 @@ export class Fn {
|
|
183
183
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getavailabilityzones.html | Fn::GetAZs}
|
184
184
|
*/
|
185
185
|
static GetAZs(region) {
|
186
|
-
return new this(
|
186
|
+
return new this("Fn::GetAZs", region);
|
187
187
|
}
|
188
188
|
/**
|
189
189
|
* Returns one value if the specified condition evaluates to true and another
|
@@ -203,7 +203,7 @@ export class Fn {
|
|
203
203
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-conditions.html#intrinsic-function-reference-conditions-if | Fn::If}
|
204
204
|
*/
|
205
205
|
static IfThen(conditionName, valueIfTrue, valueIfFalse) {
|
206
|
-
return new this(
|
206
|
+
return new this("Fn::If", [conditionName, valueIfTrue, valueIfFalse]);
|
207
207
|
}
|
208
208
|
/**
|
209
209
|
* The intrinsic function `Fn::ImportValue` returns the value of an output
|
@@ -217,7 +217,7 @@ export class Fn {
|
|
217
217
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-importvalue.html | Fn::ImportValue}
|
218
218
|
*/
|
219
219
|
static ImportValue(sharedValueToImport) {
|
220
|
-
return new this(
|
220
|
+
return new this("Fn::ImportValue", sharedValueToImport);
|
221
221
|
}
|
222
222
|
/**
|
223
223
|
* The intrinsic function `Fn::Join` appends a set of values into a single
|
@@ -233,7 +233,7 @@ export class Fn {
|
|
233
233
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-join.html | Fn::Join}
|
234
234
|
*/
|
235
235
|
static Join(delimiter, listOfValues) {
|
236
|
-
return new this(
|
236
|
+
return new this("Fn::Join", [delimiter, listOfValues]);
|
237
237
|
}
|
238
238
|
/**
|
239
239
|
* Returns true for a condition that evaluates to false or returns false for a
|
@@ -245,7 +245,7 @@ export class Fn {
|
|
245
245
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-conditions.html#intrinsic-function-reference-conditions-not | Fn::Not}
|
246
246
|
*/
|
247
247
|
static Not(condition) {
|
248
|
-
return new this(
|
248
|
+
return new this("Fn::Not", [condition]);
|
249
249
|
}
|
250
250
|
/**
|
251
251
|
* Returns true if any one of the specified conditions evaluate to true, or
|
@@ -258,7 +258,7 @@ export class Fn {
|
|
258
258
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-conditions.html#intrinsic-function-reference-conditions-or | Fn::Or}
|
259
259
|
*/
|
260
260
|
static Or(...conditions) {
|
261
|
-
return new this(
|
261
|
+
return new this("Fn::Or", conditions);
|
262
262
|
}
|
263
263
|
/**
|
264
264
|
* The intrinsic function Ref returns the value of the specified parameter or
|
@@ -284,7 +284,7 @@ export class Fn {
|
|
284
284
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html | Ref}
|
285
285
|
*/
|
286
286
|
static Ref(logicalName) {
|
287
|
-
return new this(
|
287
|
+
return new this("Ref", logicalName);
|
288
288
|
}
|
289
289
|
/**
|
290
290
|
* Returns all values for a specified parameter type.
|
@@ -296,7 +296,7 @@ export class Fn {
|
|
296
296
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-rules.html#fn-refall | Fn::RefAll}
|
297
297
|
*/
|
298
298
|
static RefAll(parameterType) {
|
299
|
-
return new this(
|
299
|
+
return new this("Fn::RefAll", parameterType);
|
300
300
|
}
|
301
301
|
/**
|
302
302
|
* The intrinsic function `Fn::Select` returns a single object from a list of
|
@@ -311,7 +311,7 @@ export class Fn {
|
|
311
311
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-select.html | Fn::Select}
|
312
312
|
*/
|
313
313
|
static Select(index, listOfObjects) {
|
314
|
-
return new this(
|
314
|
+
return new this("Fn::Select", [index, listOfObjects]);
|
315
315
|
}
|
316
316
|
/**
|
317
317
|
* To split a string into a list of string values so that you can select an
|
@@ -328,7 +328,7 @@ export class Fn {
|
|
328
328
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-split.html | Fn::Split}
|
329
329
|
*/
|
330
330
|
static Split(delimiter, sourceString) {
|
331
|
-
return new this(
|
331
|
+
return new this("Fn::Split", [delimiter, sourceString]);
|
332
332
|
}
|
333
333
|
/**
|
334
334
|
* The intrinsic function `Fn::Sub` substitutes variables in an input string
|
@@ -359,7 +359,7 @@ export class Fn {
|
|
359
359
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-sub.html | Fn::Sub}
|
360
360
|
*/
|
361
361
|
static Sub(text, values) {
|
362
|
-
return new this(
|
362
|
+
return new this("Fn::Sub", [text, values]);
|
363
363
|
}
|
364
364
|
/**
|
365
365
|
* Returns an attribute value or list of values for a specific parameter and
|
@@ -374,7 +374,7 @@ export class Fn {
|
|
374
374
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-rules.html#fn-valueof | Fn::ValueOf}
|
375
375
|
*/
|
376
376
|
static ValueOf(attribute, parameterLogicalId) {
|
377
|
-
return new this(
|
377
|
+
return new this("Fn::ValueOf", [attribute, parameterLogicalId]);
|
378
378
|
}
|
379
379
|
/**
|
380
380
|
* Returns a list of all attribute values for a given parameter type and
|
@@ -389,7 +389,7 @@ export class Fn {
|
|
389
389
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-rules.html#fn-valueofall | Fn::ValueOfAll}
|
390
390
|
*/
|
391
391
|
static ValueOfAll(parameterType, attribute) {
|
392
|
-
return new this(
|
392
|
+
return new this("Fn::ValueOfAll", [parameterType, attribute]);
|
393
393
|
}
|
394
394
|
/**
|
395
395
|
* Create an arbitrary intrinsic function value.
|
@@ -408,3 +408,91 @@ export class Fn {
|
|
408
408
|
return { [this.fn]: this.args };
|
409
409
|
}
|
410
410
|
}
|
411
|
+
/**
|
412
|
+
* Pseudo parameters are parameters that are predefined by AWS CloudFormation.
|
413
|
+
* You don't declare them in your template. Use them the same way as you would a
|
414
|
+
* parameter, as the argument for the Ref function.
|
415
|
+
*
|
416
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html | Psuedo Parameter Reference}
|
417
|
+
*/
|
418
|
+
export class AwsParam {
|
419
|
+
/**
|
420
|
+
* Returns the AWS account ID of the account in which the stack is being
|
421
|
+
* created, such as `123456789012`.
|
422
|
+
*
|
423
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-accountid | AWS::AccountId}
|
424
|
+
*/
|
425
|
+
static get AccountId() {
|
426
|
+
return Fn.Ref("AWS::AccountId");
|
427
|
+
}
|
428
|
+
/**
|
429
|
+
* Returns the list of notification Amazon Resource Names (ARNs) for the
|
430
|
+
* current stack.
|
431
|
+
*
|
432
|
+
* To get a single ARN from the list, use {@link Fn.Split}.
|
433
|
+
*
|
434
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-notificationarns | AWS::NotificationARNs}
|
435
|
+
*/
|
436
|
+
static get NotificationARNs() {
|
437
|
+
return Fn.Ref("AWS::NotificationARNs");
|
438
|
+
}
|
439
|
+
/**
|
440
|
+
* Removes the corresponding resource property when specified as a return
|
441
|
+
* value in the `Fn::If` intrinsic function.
|
442
|
+
*
|
443
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-novalue | AWS::NoValue}
|
444
|
+
*/
|
445
|
+
static get NoValue() {
|
446
|
+
return Fn.Ref("AWS::NoValue");
|
447
|
+
}
|
448
|
+
/**
|
449
|
+
* Returns the partition that the resource is in. For standard AWS Regions,
|
450
|
+
* the partition is `aws`. For resources in other partitions, the partition is
|
451
|
+
* `aws-partitionname`. For example, the partition for resources in the China
|
452
|
+
* (Beijing and Ningxia) Region is `aws-cn` and the partition for resources in
|
453
|
+
* the AWS GovCloud (US-West) region is `aws-us-gov`.
|
454
|
+
*
|
455
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-partition | AWS::Partition}
|
456
|
+
*/
|
457
|
+
static get Partition() {
|
458
|
+
return Fn.Ref("AWS::Partition");
|
459
|
+
}
|
460
|
+
/**
|
461
|
+
* Returns a string representing the Region in which the encompassing resource
|
462
|
+
* is being created, such as `us-west-2`.
|
463
|
+
*
|
464
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-region | AWS::Region}
|
465
|
+
*/
|
466
|
+
static get Region() {
|
467
|
+
return Fn.Ref("AWS::Region");
|
468
|
+
}
|
469
|
+
/**
|
470
|
+
* Returns the ID of the stack as specified with the aws cloudformation
|
471
|
+
* create-stack command, such as
|
472
|
+
* `arn:aws:cloudformation:us-west-2:123456789012:stack/teststack/51af3dc0-da77-11e4-872e-1234567db123`.
|
473
|
+
*
|
474
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-stackid | AWS::StackId}
|
475
|
+
*/
|
476
|
+
static get StackId() {
|
477
|
+
return Fn.Ref("AWS::StackId");
|
478
|
+
}
|
479
|
+
/**
|
480
|
+
* Returns the name of the stack as specified with the aws cloudformation
|
481
|
+
* `create-stack` command, such as `teststack`.
|
482
|
+
*
|
483
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-stackname | AWS::StackName}
|
484
|
+
*/
|
485
|
+
static get StackName() {
|
486
|
+
return Fn.Ref("AWS::StackName");
|
487
|
+
}
|
488
|
+
/**
|
489
|
+
* Returns the suffix for a domain. The suffix is typically `amazonaws.com`,
|
490
|
+
* but might differ by Region. For example, the suffix for the China (Beijing)
|
491
|
+
* Region is `amazonaws.com.cn`.
|
492
|
+
*
|
493
|
+
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-urlsuffix | AWS::URLSuffix}
|
494
|
+
*/
|
495
|
+
static get URLSuffix() {
|
496
|
+
return Fn.Ref("AWS::URLSuffix");
|
497
|
+
}
|
498
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@awboost/cfntypes",
|
3
|
-
"version": "1.0.0-beta.
|
3
|
+
"version": "1.0.0-beta.47",
|
4
4
|
"private": false,
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -16,11 +16,27 @@
|
|
16
16
|
},
|
17
17
|
"homepage": "https://github.com/awboost/cfntypes#readme",
|
18
18
|
"license": "MIT",
|
19
|
-
"main": "./lib/cjs/index.js",
|
20
|
-
"module": "./lib/index.js",
|
21
|
-
"types": "lib/index.d.ts",
|
22
19
|
"exports": {
|
23
|
-
"
|
20
|
+
"./definitions": {
|
21
|
+
"types": "./lib/definitions.d.ts",
|
22
|
+
"default": "./lib/definitions.js"
|
23
|
+
},
|
24
|
+
"./policies": {
|
25
|
+
"types": "./lib/policies.d.ts",
|
26
|
+
"default": "./lib/policies.js"
|
27
|
+
},
|
28
|
+
"./resources": {
|
29
|
+
"types": "./lib/resources.generated.d.ts",
|
30
|
+
"default": "./lib/resources.generated.js"
|
31
|
+
},
|
32
|
+
"./template": {
|
33
|
+
"types": "./lib/templattemplatee.d.ts",
|
34
|
+
"default": "./lib/definitions.js"
|
35
|
+
},
|
36
|
+
"./util": {
|
37
|
+
"types": "./lib/util.d.ts",
|
38
|
+
"default": "./lib/util.js"
|
39
|
+
}
|
24
40
|
},
|
25
41
|
"files": [
|
26
42
|
"lib/**/*.js",
|
@@ -29,35 +45,7 @@
|
|
29
45
|
"!lib/**/*.test.*"
|
30
46
|
],
|
31
47
|
"scripts": {
|
32
|
-
"
|
33
|
-
"check": "tsc",
|
34
|
-
"clean": "rm -rf lib/ src/*.generated.ts",
|
35
|
-
"compile": "npm run index && npm run compile:esm && npm run compile:cjs",
|
36
|
-
"compile:cjs": "tsc -p tsconfig.cjs.json",
|
37
|
-
"compile:esm": "tsc -p tsconfig.lib.json",
|
38
|
-
"generate": "node --loader=ts-node/esm generate/index.ts src/types.generated.ts",
|
39
|
-
"index": "node makeIndex.js src/",
|
40
|
-
"lint": "eslint generate/ src/ --ext=ts",
|
41
|
-
"postversion": "git push --follow-tags",
|
42
|
-
"watch": "tsc -w"
|
48
|
+
"lint": "eslint src/ --ext=ts"
|
43
49
|
},
|
44
|
-
"
|
45
|
-
"@awboost/cfnspec": "^0.3.6",
|
46
|
-
"@swc/core": "^1.3.35",
|
47
|
-
"@types/debug": "^4.1.5",
|
48
|
-
"@types/node": "^16.11.7",
|
49
|
-
"@types/semver": "^7.2.0",
|
50
|
-
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
51
|
-
"@typescript-eslint/parser": "^5.54.0",
|
52
|
-
"debug": "^4.1.1",
|
53
|
-
"eslint": "^8.15.0",
|
54
|
-
"eslint-config-prettier": "^8.5.0",
|
55
|
-
"eslint-plugin-import": "^2.26.0",
|
56
|
-
"eslint-plugin-prettier": "^4.0.0",
|
57
|
-
"prettier": "2.6.2",
|
58
|
-
"semver": "^7.3.2",
|
59
|
-
"ts-node": "^10.9.1",
|
60
|
-
"typescript": "^4.9.5"
|
61
|
-
},
|
62
|
-
"awsResourceSpecificationVersion": "138.0.0"
|
50
|
+
"awsResourceSpecificationVersion": "140.0.0"
|
63
51
|
}
|
package/README.md
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
# @awboost/cfntypes
|
2
|
-
|
3
|
-
Typescript types for AWS CloudFormation types.
|
4
|
-
|
5
|
-
## Specification Version
|
6
|
-
|
7
|
-
The specification version is available via the `ResourceSpecificationVersion` export and via `awsResourceSpecificationVersion` in `package.json`.
|
8
|
-
|
9
|
-
```typescript
|
10
|
-
import { ResourceSpecificationVersion } from '@awboost/cfntypes';
|
11
|
-
|
12
|
-
console.log(`using version ${ResourceSpecificationVersion}`);
|
13
|
-
```
|
14
|
-
|
15
|
-
## Resource Types
|
16
|
-
|
17
|
-
The resource types are all defined individually as interfaces with predictable names, and also as properties of the `ResourceTypes` interface keyed by the CloudFormation resource type.
|
18
|
-
|
19
|
-
```typescript
|
20
|
-
import { ResourceTypes, ResourceType } from '@awboost/cfntypes';
|
21
|
-
|
22
|
-
type ApiGatewayProps = ResourceTypes[ResourceType.ApiGatewayRestApi];
|
23
|
-
// also exported as ApiGatewayRestApi
|
24
|
-
```
|
25
|
-
|
26
|
-
## Attribute Types
|
27
|
-
|
28
|
-
The attribute types are all defined individually as interfaces with predictable names, and also as properties of the `AttributeTypes` interface keyed by the CloudFormation resource type. Note that not all resource types have attributes.
|
29
|
-
|
30
|
-
```typescript
|
31
|
-
import { AttributeTypes, AttributeTypeFor } from '@awboost/cfntypes';
|
32
|
-
|
33
|
-
type ApiGatewayAttribs = AttributeTypes[ResourceType.ApiGatewayRestApi];
|
34
|
-
// also exported as ApiGatewayRestApiAttributes
|
35
|
-
|
36
|
-
// the AttributeTypeFor helper returns `never` for resources
|
37
|
-
// with no attributes defined
|
38
|
-
type NeverAttribs = AttributeTypeFor<ResourceType.ApiGatewayAccount>;
|
39
|
-
```
|
@@ -1,30 +0,0 @@
|
|
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
|
-
}
|