@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.
Files changed (53) hide show
  1. package/lib/AutoScalingReplacingUpdatePolicy.d.ts +30 -0
  2. package/lib/AutoScalingReplacingUpdatePolicy.js +1 -0
  3. package/lib/AutoScalingRollingUpdatePolicy.d.ts +107 -0
  4. package/lib/AutoScalingRollingUpdatePolicy.js +20 -0
  5. package/lib/AutoScalingScheduledActionPolicy.d.ts +35 -0
  6. package/lib/AutoScalingScheduledActionPolicy.js +23 -0
  7. package/lib/AwsParam.d.ts +73 -0
  8. package/lib/AwsParam.js +89 -0
  9. package/lib/CodeDeployLambdaAliasUpdatePolicy.d.ts +26 -0
  10. package/lib/CodeDeployLambdaAliasUpdatePolicy.js +1 -0
  11. package/lib/CreationPolicy.d.ts +71 -0
  12. package/lib/CreationPolicy.js +1 -0
  13. package/lib/DeletionPolicy.d.ts +84 -0
  14. package/lib/DeletionPolicy.js +83 -0
  15. package/lib/Fn.d.ts +356 -0
  16. package/lib/Fn.js +410 -0
  17. package/lib/OutputDefinition.d.ts +38 -0
  18. package/lib/OutputDefinition.js +1 -0
  19. package/lib/ParameterDefinition.d.ts +78 -0
  20. package/lib/ParameterDefinition.js +1 -0
  21. package/lib/ResourceDefinition.d.ts +197 -0
  22. package/lib/ResourceDefinition.js +1 -0
  23. package/lib/RuleDefinition.d.ts +43 -0
  24. package/lib/RuleDefinition.js +1 -0
  25. package/lib/Template.d.ts +117 -0
  26. package/lib/Template.js +1 -0
  27. package/lib/TemplateMap.d.ts +6 -0
  28. package/lib/TemplateMap.js +1 -0
  29. package/lib/UpdatePolicy.d.ts +111 -0
  30. package/lib/UpdatePolicy.js +1 -0
  31. package/lib/cjs/AutoScalingReplacingUpdatePolicy.js +2 -0
  32. package/lib/cjs/AutoScalingRollingUpdatePolicy.js +21 -0
  33. package/lib/cjs/AutoScalingScheduledActionPolicy.js +24 -0
  34. package/lib/cjs/AwsParam.js +93 -0
  35. package/lib/cjs/CodeDeployLambdaAliasUpdatePolicy.js +2 -0
  36. package/lib/cjs/CreationPolicy.js +2 -0
  37. package/lib/cjs/DeletionPolicy.js +86 -0
  38. package/lib/cjs/Fn.js +414 -0
  39. package/lib/cjs/OutputDefinition.js +2 -0
  40. package/lib/cjs/ParameterDefinition.js +2 -0
  41. package/lib/cjs/ResourceDefinition.js +2 -0
  42. package/lib/cjs/RuleDefinition.js +2 -0
  43. package/lib/cjs/Template.js +2 -0
  44. package/lib/cjs/TemplateMap.js +2 -0
  45. package/lib/cjs/UpdatePolicy.js +2 -0
  46. package/lib/cjs/index.js +33 -0
  47. package/lib/cjs/types.generated.js +2276 -0
  48. package/lib/index.d.ts +16 -61748
  49. package/lib/index.js +17 -2055
  50. package/lib/types.generated.d.ts +90061 -0
  51. package/lib/types.generated.js +2273 -0
  52. package/package.json +12 -8
  53. package/lib/index-cjs.js +0 -2058
package/lib/Fn.d.ts ADDED
@@ -0,0 +1,356 @@
1
+ /**
2
+ * IntrinsicValue represents the output of an intrinsic function.
3
+ */
4
+ export type IntrinsicValue = any;
5
+ /**
6
+ * You can use intrinsic functions, such as `Fn::If`, `Fn::Equals`, and
7
+ * `Fn::Not`, to conditionally create stack resources. These conditions are
8
+ * evaluated based on input parameters that you declare when you create or
9
+ * update a stack. After you define all your conditions, you can associate them
10
+ * with resources or resource properties in the Resources and Outputs sections
11
+ * of a template.
12
+ *
13
+ * You define all conditions in the Conditions section of a template except for
14
+ * `Fn::If conditions`. You can use the `Fn::If` condition in the metadata
15
+ * attribute, update policy attribute, and property values in the Resources
16
+ * section and Outputs sections of a template.
17
+ *
18
+ * You might use conditions when you want to reuse a template that can create
19
+ * resources in different contexts, such as a test environment versus a
20
+ * production environment. In your template, you can add an EnvironmentType
21
+ * input parameter, which accepts either prod or test as inputs. For the
22
+ * production environment, you might include Amazon EC2 instances with certain
23
+ * capabilities; however, for the test environment, you want to use less
24
+ * capabilities to save costs. With conditions, you can define which resources
25
+ * are created and how they're configured for each environment type.
26
+ */
27
+ export declare class Fn {
28
+ fn: string;
29
+ args: IntrinsicValue;
30
+ /**
31
+ * Constructs a string value using {@link Fn.Join} from a tagged template
32
+ * literal.
33
+ */
34
+ static fmt(literals: TemplateStringsArray, ...values: unknown[]): IntrinsicValue;
35
+ /**
36
+ * Returns true if all the specified conditions evaluate to true, or returns
37
+ * false if any one of the conditions evaluates to false. `Fn::And` acts as an
38
+ * AND operator. The minimum number of conditions that you can include is 2,
39
+ * and the maximum is 10.
40
+ *
41
+ * @param conditions A condition that evaluates to true or false.
42
+ *
43
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-conditions.html#intrinsic-function-reference-conditions-and | Fn::And}
44
+ */
45
+ static And(...conditions: IntrinsicValue[]): IntrinsicValue;
46
+ /**
47
+ * The intrinsic function `Fn::Base64` returns the Base64 representation of
48
+ * the input string. This function is typically used to pass encoded data to
49
+ * Amazon EC2 instances by way of the UserData property.
50
+ *
51
+ * @param valueToEncode The string value you want to convert to Base64.
52
+ * @returns The original string, in Base64 representation.
53
+ *
54
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-base64.html | Fn::Base64}
55
+ */
56
+ static Base64(valueToEncode: string): IntrinsicValue;
57
+ /**
58
+ * The intrinsic function `Fn::Cidr` returns an array of CIDR address blocks.
59
+ * The number of CIDR blocks returned is dependent on the count parameter.
60
+ *
61
+ * @param ipBlock The user-specified CIDR address block to be split into
62
+ * smaller CIDR blocks.
63
+ * @param count The number of CIDRs to generate. Valid range is between 1 and
64
+ * 256.
65
+ * @param cidrBits The number of subnet bits for the CIDR. For example,
66
+ * specifying a value "8" for this parameter will create a CIDR with a mask of
67
+ * "/24".
68
+ * @returns An array of CIDR address blocks.
69
+ *
70
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-cidr.html | Fn::Cidr}
71
+ */
72
+ static Cidr(ipBlock: string, count: number, cidrBits: number): IntrinsicValue;
73
+ /**
74
+ * Returns `true` if a specified string matches at least one value in a list
75
+ * of strings.
76
+ *
77
+ * @param listOfStrings A list of strings, such as `"A", "B", "C"`.
78
+ * @param string A string, such as `"A"`, that you want to compare against a
79
+ * list of strings.
80
+ *
81
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-rules.html#fn-contains | Fn::Contains}
82
+ */
83
+ static Contains(listOfStrings: string[], string: string): IntrinsicValue;
84
+ /**
85
+ * Returns `true` if a specified string matches all values in a list.
86
+ *
87
+ * @param listOfStrings A list of strings, such as `"A", "B", "C"`.
88
+ * @param string A string, such as `"A"`, that you want to compare against a
89
+ * list of strings.
90
+ *
91
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-rules.html#fn-eachmemberequals | Fn::EachMemberEquals}
92
+ */
93
+ static EachMemberEquals(listOfStrings: string[], string: string): IntrinsicValue;
94
+ /**
95
+ * Returns `true` if a specified string matches all values in a list.
96
+ *
97
+ * @param stringsToCheck A list of strings, such as `"A", "B", "C"`.
98
+ * CloudFormation checks whether each member in the stringsToC`heck parameter
99
+ * is in the `stringsToMap` parameter.
100
+ * @param stringsToMatch A list of strings, such as `"A", "B", "C"`. Each
101
+ * member in the `stringsToMatch` parameter is compared against the members of
102
+ * the `stringsToCheck` parameter.
103
+ *
104
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-rules.html#fn-eachmemberin | Fn::EachMemberIn}
105
+ */
106
+ static EachMemberIn(stringsToCheck: string[], stringsToMatch: string[]): IntrinsicValue;
107
+ /**
108
+ * Compares if two values are equal. Returns true if the two values are equal
109
+ * or false if they aren't.
110
+ *
111
+ * @param value1 A value of any type that you want to compare.
112
+ * @param value2 A value of any type that you want to compare.
113
+ *
114
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-conditions.html#intrinsic-function-reference-conditions-equals | Fn::Equals}
115
+ */
116
+ static Equals(value1: IntrinsicValue, value2: IntrinsicValue): IntrinsicValue;
117
+ /**
118
+ * The intrinsic function `Fn::FindInMap` returns the value corresponding to
119
+ * keys in a two-level map that is declared in the Mappings section.
120
+ *
121
+ * @param mapName The logical name of a mapping declared in the Mappings
122
+ * section that contains the keys and values.
123
+ * @param topLevelKey The top-level key name. Its value is a list of key-value pairs.
124
+ * @param secondLevelKey The second-level key name, which is set to one of the keys from the list assigned to TopLevelKey.
125
+ * @returns The value that is assigned to SecondLevelKey.
126
+ *
127
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-findinmap.html | Fn::FindInMap}
128
+ */
129
+ static FindInMap(mapName: string, topLevelKey: string, secondLevelKey: string): IntrinsicValue;
130
+ /**
131
+ * The `Fn::GetAtt` intrinsic function returns the value of an attribute from
132
+ * a resource in the template. For more information about GetAtt return values
133
+ * for a particular resource, refer to the documentation for that resource in
134
+ * the Resource and Property Reference.
135
+ *
136
+ * @param logicalNameOfResource The logical name (also called logical ID) of
137
+ * the resource that contains the attribute that you want.
138
+ * @param attributeName The name of the resource-specific attribute whose
139
+ * value you want. See the resource's reference page for details about the
140
+ * attributes available for that resource type.
141
+ * @returns The attribute value.
142
+ *
143
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html | Fn::GetAtt}
144
+ */
145
+ static GetAtt(logicalNameOfResource: string, attributeName: string): IntrinsicValue;
146
+ /**
147
+ * The intrinsic function `Fn::GetAZs` returns an array that lists
148
+ * Availability Zones for a specified region. Because customers have access to
149
+ * different Availability Zones, the intrinsic function `Fn::GetAZs` enables
150
+ * template authors to write templates that adapt to the calling user's
151
+ * access. That way you don't have to hard-code a full list of Availability
152
+ * Zones for a specified region.
153
+ *
154
+ * @param region The name of the region for which you want to get the
155
+ * Availability Zones. You can use the AWS::Region pseudo parameter to
156
+ * specify the region in which the stack is created. Specifying an empty
157
+ * string is equivalent to specifying AWS::Region.
158
+ * @returns The list of Availability Zones for the region.
159
+ *
160
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getavailabilityzones.html | Fn::GetAZs}
161
+ */
162
+ static GetAZs(region: string): IntrinsicValue;
163
+ /**
164
+ * Returns one value if the specified condition evaluates to true and another
165
+ * value if the specified condition evaluates to false. Currently, AWS
166
+ * CloudFormation supports the Fn::If intrinsic function in the metadata
167
+ * attribute, update policy attribute, and property values in the Resources
168
+ * section and Outputs sections of a template. You can use the `AWS::NoValue`
169
+ * pseudo parameter as a return value to remove the corresponding property.
170
+ *
171
+ * @param conditionName A reference to a condition in the Conditions section.
172
+ * Use the condition's name to reference it.
173
+ * @param valueIfTrue A value to be returned if the specified condition
174
+ * evaluates to true.
175
+ * @param valueIfFalse A value to be returned if the specified condition
176
+ * evaluates to false.
177
+ *
178
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-conditions.html#intrinsic-function-reference-conditions-if | Fn::If}
179
+ */
180
+ static IfThen(conditionName: string, valueIfTrue: IntrinsicValue, valueIfFalse: IntrinsicValue): IntrinsicValue;
181
+ /**
182
+ * The intrinsic function `Fn::ImportValue` returns the value of an output
183
+ * exported by another stack. You typically use this function to create
184
+ * cross-stack references. In the following example template snippets, Stack A
185
+ * exports VPC security group values and Stack B imports them.
186
+ *
187
+ * @param sharedValueToImport The stack output value that you want to import.
188
+ * @returns The stack output value.
189
+ *
190
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-importvalue.html | Fn::ImportValue}
191
+ */
192
+ static ImportValue(sharedValueToImport: string): IntrinsicValue;
193
+ /**
194
+ * The intrinsic function `Fn::Join` appends a set of values into a single
195
+ * value, separated by the specified delimiter. If a delimiter is the empty
196
+ * string, the set of values are concatenated with no delimiter.
197
+ *
198
+ * @param delimiter The value you want to occur between fragments. The
199
+ * delimiter will occur between fragments only. It will not terminate the
200
+ * final value.
201
+ * @param listOfValues The list of values you want combined.
202
+ * @returns The combined string.
203
+ *
204
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-join.html | Fn::Join}
205
+ */
206
+ static Join(delimiter: string, listOfValues: IntrinsicValue[]): IntrinsicValue;
207
+ /**
208
+ * Returns true for a condition that evaluates to false or returns false for a
209
+ * condition that evaluates to true. `Fn::Not` acts as a NOT operator.
210
+ *
211
+ * @param condition A condition such as `Fn::Equals` that evaluates to true or
212
+ * false.
213
+ *
214
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-conditions.html#intrinsic-function-reference-conditions-not | Fn::Not}
215
+ */
216
+ static Not(condition: string): IntrinsicValue;
217
+ /**
218
+ * Returns true if any one of the specified conditions evaluate to true, or
219
+ * returns false if all of the conditions evaluates to false. `Fn::Or` acts as
220
+ * an OR operator. The minimum number of conditions that you can include is 2,
221
+ * and the maximum is 10.
222
+ *
223
+ * @param conditions A condition that evaluates to true or false.
224
+ *
225
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-conditions.html#intrinsic-function-reference-conditions-or | Fn::Or}
226
+ */
227
+ static Or(...conditions: IntrinsicValue[]): IntrinsicValue;
228
+ /**
229
+ * The intrinsic function Ref returns the value of the specified parameter or
230
+ * resource.
231
+ *
232
+ * - When you specify a parameter's logical name, it returns the value of the
233
+ * parameter.
234
+ *
235
+ * - When you specify a resource's logical name, it returns a value that you
236
+ * can typically use to refer to that resource, such as a physical ID.
237
+ *
238
+ * When you are declaring a resource in a template and you need to specify
239
+ * another template resource by name, you can use the Ref to refer to that
240
+ * other resource. In general, Ref returns the name of the resource. For
241
+ * example, a reference to an AWS::AutoScaling::AutoScalingGroup returns the
242
+ * name of that Auto Scaling group resource.
243
+ *
244
+ * @param logicalName The logical name of the resource or parameter you want
245
+ * to dereference.
246
+ *
247
+ * @returns The physical ID of the resource or the value of the parameter.
248
+ *
249
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html | Ref}
250
+ */
251
+ static Ref(logicalName: string): IntrinsicValue;
252
+ /**
253
+ * Returns all values for a specified parameter type.
254
+ *
255
+ * @param parameterType An AWS-specific parameter type, such as
256
+ * `AWS::EC2::SecurityGroup::Id` or `AWS::EC2::VPC::Id`. For more information,
257
+ * see Parameters in the AWS CloudFormation User Guide.
258
+ *
259
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-rules.html#fn-refall | Fn::RefAll}
260
+ */
261
+ static RefAll(parameterType: string): IntrinsicValue;
262
+ /**
263
+ * The intrinsic function `Fn::Select` returns a single object from a list of
264
+ * objects by index.
265
+ *
266
+ * @param index The index of the object to retrieve. This must be a value from
267
+ * zero to N-1, where N represents the number of elements in the array.
268
+ * @param listOfObjects The list of objects to select from. This list must not
269
+ * be null, nor can it have null entries.
270
+ * @returns The selected object.
271
+ *
272
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-select.html | Fn::Select}
273
+ */
274
+ static Select(index: number, listOfObjects: IntrinsicValue[]): IntrinsicValue;
275
+ /**
276
+ * To split a string into a list of string values so that you can select an
277
+ * element from the resulting string list, use the `Fn::Split` intrinsic
278
+ * function. Specify the location of splits with a delimiter, such as , (a
279
+ * comma). After you split a string, use the `Fn::Select` function to pick a
280
+ * specific element.
281
+ *
282
+ * @param delimiter A string value that determines where the source string is
283
+ * divided.
284
+ * @param sourceString The string value that you want to split.
285
+ * @returns A list of string values.
286
+ *
287
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-split.html | Fn::Split}
288
+ */
289
+ static Split(delimiter: string, sourceString: string): IntrinsicValue;
290
+ /**
291
+ * The intrinsic function `Fn::Sub` substitutes variables in an input string
292
+ * with values that you specify. In your templates, you can use this function
293
+ * to construct commands or outputs that include values that aren't available
294
+ * until you create or update a stack.
295
+ *
296
+ * @param text A string with variables that AWS CloudFormation substitutes
297
+ * with their associated values at runtime. Write variables as `${MyVarName}`.
298
+ * Variables can be template parameter names, resource logical IDs,
299
+ * resource attributes, or a variable in a key-value map. If you specify only
300
+ * template parameter names, resource logical IDs, and resource attributes,
301
+ * don't specify a key-value map.
302
+ *
303
+ * If you specify template parameter names or resource logical IDs, such as
304
+ * `${InstanceTypeParameter}` AWS CloudFormation returns the same values as if
305
+ * you used the Ref intrinsic function. If you specify resource attributes,
306
+ * such as `${MyInstance.PublicIp}` AWS CloudFormation returns the same values
307
+ * as if you used the `Fn::GetAtt` intrinsic function.
308
+ *
309
+ * To write a dollar sign and curly braces (`${}`) literally, add an
310
+ * exclamation point (!) after the open curly brace, such as `${!Literal}`.
311
+ * AWS CloudFormation resolves this text as `${Literal}`.
312
+ *
313
+ * @param values A map of values that AWS CloudFormation substitutes for the
314
+ * associated variable names at runtime.
315
+ *
316
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-sub.html | Fn::Sub}
317
+ */
318
+ static Sub(text: string, values: Record<string, IntrinsicValue>): IntrinsicValue;
319
+ /**
320
+ * Returns an attribute value or list of values for a specific parameter and
321
+ * attribute.
322
+ *
323
+ * @param attribute The name of an attribute from which you want to retrieve a
324
+ * value.
325
+ * @param parameterLogicalId The name of a parameter for which you want to
326
+ * retrieve attribute values. The parameter must be declared in the
327
+ * `Parameters` section of the template.
328
+ *
329
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-rules.html#fn-valueof | Fn::ValueOf}
330
+ */
331
+ static ValueOf(attribute: string, parameterLogicalId: string): IntrinsicValue;
332
+ /**
333
+ * Returns a list of all attribute values for a given parameter type and
334
+ * attribute.
335
+ *
336
+ * @param parameterType An AWS-specific parameter type, such as
337
+ * `AWS::EC2::SecurityGroup::Id` or `AWS::EC2::VPC::Id`. For more information,
338
+ * see Parameters in the AWS CloudFormation User Guide.
339
+ * @param attribute The name of an attribute from which you want to retrieve a
340
+ * value.
341
+ *
342
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-rules.html#fn-valueofall | Fn::ValueOfAll}
343
+ */
344
+ static ValueOfAll(parameterType: string, attribute: string): IntrinsicValue;
345
+ /**
346
+ * Create an arbitrary intrinsic function value.
347
+ *
348
+ * @param fn The name of the intrinsic function.
349
+ * @param args The arguments for the intrinsic function.
350
+ */
351
+ constructor(fn: string, args: IntrinsicValue);
352
+ /**
353
+ * Get the JSON representation for this instance.
354
+ */
355
+ toJSON(): IntrinsicValue;
356
+ }