@ttoss/cloudformation 0.10.20 → 0.11.0
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/dist/index.d.cts +80 -49
- package/dist/index.d.ts +80 -49
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,76 +1,107 @@
|
|
|
1
|
+
type CloudFormationRef = {
|
|
2
|
+
Ref: string;
|
|
3
|
+
};
|
|
4
|
+
type CloudFormationGetAtt = {
|
|
5
|
+
'Fn::GetAtt': [string, string];
|
|
6
|
+
};
|
|
7
|
+
type CloudFormationJoin = {
|
|
8
|
+
'Fn::Join': [string, (string | CloudFormationRef)[]];
|
|
9
|
+
};
|
|
10
|
+
type CloudFormationSub = {
|
|
11
|
+
'Fn::Sub': string | [string, Record<string, any>];
|
|
12
|
+
};
|
|
13
|
+
type CloudFormationSelect = {
|
|
14
|
+
'Fn::Select': [number, string[]];
|
|
15
|
+
};
|
|
16
|
+
type CloudFormationSplit = {
|
|
17
|
+
'Fn::Split': [string, string];
|
|
18
|
+
};
|
|
19
|
+
type CloudFormationIntrinsic = CloudFormationRef | CloudFormationGetAtt | CloudFormationJoin | CloudFormationSub | CloudFormationSelect | CloudFormationSplit;
|
|
20
|
+
type CloudFormationValue<T = any> = T | CloudFormationIntrinsic;
|
|
1
21
|
type Parameter = {
|
|
2
22
|
AllowedValues?: string[];
|
|
3
|
-
Default?: string | number;
|
|
23
|
+
Default?: string | number | boolean;
|
|
4
24
|
Description?: string;
|
|
5
|
-
Type:
|
|
25
|
+
Type: 'String' | 'Number' | 'List<Number>' | 'CommaDelimitedList' | 'AWS::EC2::KeyPair::KeyName' | 'AWS::EC2::SecurityGroup::Id' | 'AWS::EC2::Subnet::Id' | 'AWS::EC2::VPC::Id' | 'List<AWS::EC2::VPC::Id>' | 'List<AWS::EC2::SecurityGroup::Id>' | 'List<AWS::EC2::Subnet::Id>';
|
|
6
26
|
NoEcho?: boolean;
|
|
27
|
+
MinLength?: number;
|
|
28
|
+
MaxLength?: number;
|
|
29
|
+
MinValue?: number;
|
|
30
|
+
MaxValue?: number;
|
|
31
|
+
AllowedPattern?: string;
|
|
32
|
+
ConstraintDescription?: string;
|
|
7
33
|
};
|
|
8
|
-
type Parameters =
|
|
9
|
-
|
|
34
|
+
type Parameters = Record<string, Parameter>;
|
|
35
|
+
type Condition = Record<string, any>;
|
|
36
|
+
type Conditions = Record<string, Condition>;
|
|
37
|
+
type PolicyStatement = {
|
|
38
|
+
Sid?: string;
|
|
39
|
+
Effect: 'Allow' | 'Deny';
|
|
40
|
+
Action: string | string[];
|
|
41
|
+
Resource?: CloudFormationValue<string | string[]>;
|
|
42
|
+
Principal?: CloudFormationValue<string | Record<string, string | string[]>>;
|
|
43
|
+
Condition?: Record<string, Record<string, CloudFormationValue<string | string[]>>>;
|
|
44
|
+
NotAction?: string | string[];
|
|
45
|
+
NotResource?: CloudFormationValue<string | string[]>;
|
|
46
|
+
NotPrincipal?: CloudFormationValue<string | Record<string, string | string[]>>;
|
|
10
47
|
};
|
|
11
|
-
type
|
|
48
|
+
type PolicyDocument = {
|
|
49
|
+
Version: '2012-10-17';
|
|
50
|
+
Id?: string;
|
|
51
|
+
Statement: PolicyStatement[];
|
|
52
|
+
};
|
|
53
|
+
type Policy = {
|
|
54
|
+
PolicyName: string;
|
|
55
|
+
PolicyDocument: PolicyDocument;
|
|
56
|
+
};
|
|
57
|
+
type BaseResource = {
|
|
12
58
|
Type: string;
|
|
13
|
-
DeletionPolicy?: 'Delete' | 'Retain';
|
|
59
|
+
DeletionPolicy?: 'Delete' | 'Retain' | 'Snapshot';
|
|
60
|
+
UpdateReplacePolicy?: 'Delete' | 'Retain' | 'Snapshot';
|
|
14
61
|
Description?: string;
|
|
15
|
-
DependsOn?: string
|
|
62
|
+
DependsOn?: string | string[];
|
|
16
63
|
Condition?: string;
|
|
17
|
-
|
|
64
|
+
Metadata?: Record<string, any>;
|
|
65
|
+
CreationPolicy?: Record<string, any>;
|
|
66
|
+
UpdatePolicy?: Record<string, any>;
|
|
18
67
|
};
|
|
19
|
-
type
|
|
20
|
-
|
|
21
|
-
PolicyDocument: {
|
|
22
|
-
Version: '2012-10-17';
|
|
23
|
-
Statement: {
|
|
24
|
-
Sid?: string;
|
|
25
|
-
Effect: 'Allow' | 'Deny';
|
|
26
|
-
Action: string | string[];
|
|
27
|
-
Resource: string | string[] | {
|
|
28
|
-
[key: string]: any;
|
|
29
|
-
} | {
|
|
30
|
-
[key: string]: any;
|
|
31
|
-
}[];
|
|
32
|
-
}[];
|
|
33
|
-
};
|
|
68
|
+
type Resource = BaseResource & {
|
|
69
|
+
Properties?: Record<string, any>;
|
|
34
70
|
};
|
|
35
|
-
type IAMRoleResource =
|
|
71
|
+
type IAMRoleResource = BaseResource & {
|
|
36
72
|
Type: 'AWS::IAM::Role';
|
|
37
73
|
Properties: {
|
|
38
|
-
AssumeRolePolicyDocument:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
Action: string;
|
|
43
|
-
Principal: any;
|
|
44
|
-
Condition?: {
|
|
45
|
-
[key: string]: any;
|
|
46
|
-
};
|
|
47
|
-
}[];
|
|
48
|
-
};
|
|
49
|
-
ManagedPolicyArns?: string[];
|
|
74
|
+
AssumeRolePolicyDocument: PolicyDocument;
|
|
75
|
+
Description?: string;
|
|
76
|
+
ManagedPolicyArns?: CloudFormationValue<string[]>;
|
|
77
|
+
MaxSessionDuration?: number;
|
|
50
78
|
Path?: string;
|
|
79
|
+
PermissionsBoundary?: CloudFormationValue<string>;
|
|
51
80
|
Policies?: Policy[];
|
|
81
|
+
RoleName?: CloudFormationValue<string>;
|
|
82
|
+
Tags?: Array<{
|
|
83
|
+
Key: string;
|
|
84
|
+
Value: CloudFormationValue<string>;
|
|
85
|
+
}>;
|
|
52
86
|
};
|
|
53
87
|
};
|
|
54
|
-
type Resources =
|
|
55
|
-
[key: string]: IAMRoleResource | Resource;
|
|
56
|
-
};
|
|
88
|
+
type Resources = Record<string, Resource>;
|
|
57
89
|
type Output = {
|
|
58
90
|
Description?: string;
|
|
59
|
-
Value:
|
|
91
|
+
Value: CloudFormationValue;
|
|
60
92
|
Export?: {
|
|
61
|
-
Name: string
|
|
93
|
+
Name: CloudFormationValue<string>;
|
|
62
94
|
};
|
|
95
|
+
Condition?: string;
|
|
63
96
|
};
|
|
64
|
-
type Outputs =
|
|
65
|
-
[key: string]: Output;
|
|
66
|
-
};
|
|
97
|
+
type Outputs = Record<string, Output>;
|
|
67
98
|
type CloudFormationTemplate = {
|
|
68
99
|
AWSTemplateFormatVersion: '2010-09-09';
|
|
69
|
-
Metadata?: any
|
|
100
|
+
Metadata?: Record<string, any>;
|
|
70
101
|
Description?: string;
|
|
71
|
-
Transform?: 'AWS::Serverless-2016-10-31';
|
|
72
|
-
Mappings?:
|
|
73
|
-
Conditions?:
|
|
102
|
+
Transform?: 'AWS::Serverless-2016-10-31' | string[];
|
|
103
|
+
Mappings?: Record<string, Record<string, Record<string, string | number>>>;
|
|
104
|
+
Conditions?: Conditions;
|
|
74
105
|
Parameters?: Parameters;
|
|
75
106
|
Resources: Resources;
|
|
76
107
|
Outputs?: Outputs;
|
|
@@ -81,4 +112,4 @@ declare const findAndReadCloudFormationTemplate: ({ templatePath: defaultTemplat
|
|
|
81
112
|
options?: unknown;
|
|
82
113
|
}) => Promise<CloudFormationTemplate>;
|
|
83
114
|
|
|
84
|
-
export { type CloudFormationTemplate, type IAMRoleResource, type Output, type Outputs, type Parameter, type Parameters, type Policy, type Resource, type Resources, findAndReadCloudFormationTemplate };
|
|
115
|
+
export { type BaseResource, type CloudFormationGetAtt, type CloudFormationIntrinsic, type CloudFormationJoin, type CloudFormationRef, type CloudFormationSelect, type CloudFormationSplit, type CloudFormationSub, type CloudFormationTemplate, type CloudFormationValue, type Condition, type Conditions, type IAMRoleResource, type Output, type Outputs, type Parameter, type Parameters, type Policy, type PolicyDocument, type PolicyStatement, type Resource, type Resources, findAndReadCloudFormationTemplate };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,76 +1,107 @@
|
|
|
1
|
+
type CloudFormationRef = {
|
|
2
|
+
Ref: string;
|
|
3
|
+
};
|
|
4
|
+
type CloudFormationGetAtt = {
|
|
5
|
+
'Fn::GetAtt': [string, string];
|
|
6
|
+
};
|
|
7
|
+
type CloudFormationJoin = {
|
|
8
|
+
'Fn::Join': [string, (string | CloudFormationRef)[]];
|
|
9
|
+
};
|
|
10
|
+
type CloudFormationSub = {
|
|
11
|
+
'Fn::Sub': string | [string, Record<string, any>];
|
|
12
|
+
};
|
|
13
|
+
type CloudFormationSelect = {
|
|
14
|
+
'Fn::Select': [number, string[]];
|
|
15
|
+
};
|
|
16
|
+
type CloudFormationSplit = {
|
|
17
|
+
'Fn::Split': [string, string];
|
|
18
|
+
};
|
|
19
|
+
type CloudFormationIntrinsic = CloudFormationRef | CloudFormationGetAtt | CloudFormationJoin | CloudFormationSub | CloudFormationSelect | CloudFormationSplit;
|
|
20
|
+
type CloudFormationValue<T = any> = T | CloudFormationIntrinsic;
|
|
1
21
|
type Parameter = {
|
|
2
22
|
AllowedValues?: string[];
|
|
3
|
-
Default?: string | number;
|
|
23
|
+
Default?: string | number | boolean;
|
|
4
24
|
Description?: string;
|
|
5
|
-
Type:
|
|
25
|
+
Type: 'String' | 'Number' | 'List<Number>' | 'CommaDelimitedList' | 'AWS::EC2::KeyPair::KeyName' | 'AWS::EC2::SecurityGroup::Id' | 'AWS::EC2::Subnet::Id' | 'AWS::EC2::VPC::Id' | 'List<AWS::EC2::VPC::Id>' | 'List<AWS::EC2::SecurityGroup::Id>' | 'List<AWS::EC2::Subnet::Id>';
|
|
6
26
|
NoEcho?: boolean;
|
|
27
|
+
MinLength?: number;
|
|
28
|
+
MaxLength?: number;
|
|
29
|
+
MinValue?: number;
|
|
30
|
+
MaxValue?: number;
|
|
31
|
+
AllowedPattern?: string;
|
|
32
|
+
ConstraintDescription?: string;
|
|
7
33
|
};
|
|
8
|
-
type Parameters =
|
|
9
|
-
|
|
34
|
+
type Parameters = Record<string, Parameter>;
|
|
35
|
+
type Condition = Record<string, any>;
|
|
36
|
+
type Conditions = Record<string, Condition>;
|
|
37
|
+
type PolicyStatement = {
|
|
38
|
+
Sid?: string;
|
|
39
|
+
Effect: 'Allow' | 'Deny';
|
|
40
|
+
Action: string | string[];
|
|
41
|
+
Resource?: CloudFormationValue<string | string[]>;
|
|
42
|
+
Principal?: CloudFormationValue<string | Record<string, string | string[]>>;
|
|
43
|
+
Condition?: Record<string, Record<string, CloudFormationValue<string | string[]>>>;
|
|
44
|
+
NotAction?: string | string[];
|
|
45
|
+
NotResource?: CloudFormationValue<string | string[]>;
|
|
46
|
+
NotPrincipal?: CloudFormationValue<string | Record<string, string | string[]>>;
|
|
10
47
|
};
|
|
11
|
-
type
|
|
48
|
+
type PolicyDocument = {
|
|
49
|
+
Version: '2012-10-17';
|
|
50
|
+
Id?: string;
|
|
51
|
+
Statement: PolicyStatement[];
|
|
52
|
+
};
|
|
53
|
+
type Policy = {
|
|
54
|
+
PolicyName: string;
|
|
55
|
+
PolicyDocument: PolicyDocument;
|
|
56
|
+
};
|
|
57
|
+
type BaseResource = {
|
|
12
58
|
Type: string;
|
|
13
|
-
DeletionPolicy?: 'Delete' | 'Retain';
|
|
59
|
+
DeletionPolicy?: 'Delete' | 'Retain' | 'Snapshot';
|
|
60
|
+
UpdateReplacePolicy?: 'Delete' | 'Retain' | 'Snapshot';
|
|
14
61
|
Description?: string;
|
|
15
|
-
DependsOn?: string
|
|
62
|
+
DependsOn?: string | string[];
|
|
16
63
|
Condition?: string;
|
|
17
|
-
|
|
64
|
+
Metadata?: Record<string, any>;
|
|
65
|
+
CreationPolicy?: Record<string, any>;
|
|
66
|
+
UpdatePolicy?: Record<string, any>;
|
|
18
67
|
};
|
|
19
|
-
type
|
|
20
|
-
|
|
21
|
-
PolicyDocument: {
|
|
22
|
-
Version: '2012-10-17';
|
|
23
|
-
Statement: {
|
|
24
|
-
Sid?: string;
|
|
25
|
-
Effect: 'Allow' | 'Deny';
|
|
26
|
-
Action: string | string[];
|
|
27
|
-
Resource: string | string[] | {
|
|
28
|
-
[key: string]: any;
|
|
29
|
-
} | {
|
|
30
|
-
[key: string]: any;
|
|
31
|
-
}[];
|
|
32
|
-
}[];
|
|
33
|
-
};
|
|
68
|
+
type Resource = BaseResource & {
|
|
69
|
+
Properties?: Record<string, any>;
|
|
34
70
|
};
|
|
35
|
-
type IAMRoleResource =
|
|
71
|
+
type IAMRoleResource = BaseResource & {
|
|
36
72
|
Type: 'AWS::IAM::Role';
|
|
37
73
|
Properties: {
|
|
38
|
-
AssumeRolePolicyDocument:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
Action: string;
|
|
43
|
-
Principal: any;
|
|
44
|
-
Condition?: {
|
|
45
|
-
[key: string]: any;
|
|
46
|
-
};
|
|
47
|
-
}[];
|
|
48
|
-
};
|
|
49
|
-
ManagedPolicyArns?: string[];
|
|
74
|
+
AssumeRolePolicyDocument: PolicyDocument;
|
|
75
|
+
Description?: string;
|
|
76
|
+
ManagedPolicyArns?: CloudFormationValue<string[]>;
|
|
77
|
+
MaxSessionDuration?: number;
|
|
50
78
|
Path?: string;
|
|
79
|
+
PermissionsBoundary?: CloudFormationValue<string>;
|
|
51
80
|
Policies?: Policy[];
|
|
81
|
+
RoleName?: CloudFormationValue<string>;
|
|
82
|
+
Tags?: Array<{
|
|
83
|
+
Key: string;
|
|
84
|
+
Value: CloudFormationValue<string>;
|
|
85
|
+
}>;
|
|
52
86
|
};
|
|
53
87
|
};
|
|
54
|
-
type Resources =
|
|
55
|
-
[key: string]: IAMRoleResource | Resource;
|
|
56
|
-
};
|
|
88
|
+
type Resources = Record<string, Resource>;
|
|
57
89
|
type Output = {
|
|
58
90
|
Description?: string;
|
|
59
|
-
Value:
|
|
91
|
+
Value: CloudFormationValue;
|
|
60
92
|
Export?: {
|
|
61
|
-
Name: string
|
|
93
|
+
Name: CloudFormationValue<string>;
|
|
62
94
|
};
|
|
95
|
+
Condition?: string;
|
|
63
96
|
};
|
|
64
|
-
type Outputs =
|
|
65
|
-
[key: string]: Output;
|
|
66
|
-
};
|
|
97
|
+
type Outputs = Record<string, Output>;
|
|
67
98
|
type CloudFormationTemplate = {
|
|
68
99
|
AWSTemplateFormatVersion: '2010-09-09';
|
|
69
|
-
Metadata?: any
|
|
100
|
+
Metadata?: Record<string, any>;
|
|
70
101
|
Description?: string;
|
|
71
|
-
Transform?: 'AWS::Serverless-2016-10-31';
|
|
72
|
-
Mappings?:
|
|
73
|
-
Conditions?:
|
|
102
|
+
Transform?: 'AWS::Serverless-2016-10-31' | string[];
|
|
103
|
+
Mappings?: Record<string, Record<string, Record<string, string | number>>>;
|
|
104
|
+
Conditions?: Conditions;
|
|
74
105
|
Parameters?: Parameters;
|
|
75
106
|
Resources: Resources;
|
|
76
107
|
Outputs?: Outputs;
|
|
@@ -81,4 +112,4 @@ declare const findAndReadCloudFormationTemplate: ({ templatePath: defaultTemplat
|
|
|
81
112
|
options?: unknown;
|
|
82
113
|
}) => Promise<CloudFormationTemplate>;
|
|
83
114
|
|
|
84
|
-
export { type CloudFormationTemplate, type IAMRoleResource, type Output, type Outputs, type Parameter, type Parameters, type Policy, type Resource, type Resources, findAndReadCloudFormationTemplate };
|
|
115
|
+
export { type BaseResource, type CloudFormationGetAtt, type CloudFormationIntrinsic, type CloudFormationJoin, type CloudFormationRef, type CloudFormationSelect, type CloudFormationSplit, type CloudFormationSub, type CloudFormationTemplate, type CloudFormationValue, type Condition, type Conditions, type IAMRoleResource, type Output, type Outputs, type Parameter, type Parameters, type Policy, type PolicyDocument, type PolicyStatement, type Resource, type Resources, findAndReadCloudFormationTemplate };
|