@propulsionworks/cloudformation 0.0.1

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.
@@ -0,0 +1,5 @@
1
+ export * from "./main/intrinsics.ts";
2
+ export * from "./main/json.ts";
3
+ export * from "./main/parameters.ts";
4
+ export * from "./main/policy.ts";
5
+ export * from "./main/template.ts";
@@ -0,0 +1,522 @@
1
+ import type { JsonPrimitive } from "./json.ts";
2
+ /**
3
+ * Branding symbol for {@link IntrinsicValue}.
4
+ */
5
+ export declare const IntrinsicValueType: unique symbol;
6
+ /**
7
+ * Pseudo parameters are parameters that are predefined by AWS CloudFormation.
8
+ * You don't declare them in your template. Use them the same way as you would a
9
+ * parameter, as the argument for the Ref function.
10
+ */
11
+ export declare const PseudoParameters: readonly ["AWS::AccountId", "AWS::NotificationARNs", "AWS::NoValue", "AWS::Partition", "AWS::Region", "AWS::StackId", "AWS::StackName", "AWS::URLSuffix"];
12
+ /**
13
+ * Pseudo parameters are parameters that are predefined by AWS CloudFormation.
14
+ * You don't declare them in your template. Use them the same way as you would a
15
+ * parameter, as the argument for the Ref function.
16
+ */
17
+ export type PseudoParameter = (typeof PseudoParameters)[number];
18
+ /**
19
+ * Type brand for intrinsic functions returning the given type.
20
+ */
21
+ export type IntrinsicValue<T> = {
22
+ [IntrinsicValueType]: T;
23
+ };
24
+ type LogicFunction<ValueFn, LogicFn = never> = FnAnd<ValueFn, LogicFn> | FnEquals<ValueFn> | FnNot<ValueFn, LogicFn> | FnOr<ValueFn, LogicFn> | LogicFn;
25
+ /**
26
+ * Value functions which can be used within Condition definitions.
27
+ */
28
+ export type ConditionValueFunction = FnFindInMap | Ref;
29
+ /**
30
+ * Value functions which can be used with If functions.
31
+ */
32
+ export type IfValueFunction<Value> = (Value extends string ? FnBase64 | FnJoin | FnSub : never) | (Value extends string[] ? FnGetAZs : never) | FnFindInMap<Value> | FnGetAtt<Value> | FnIf<Value> | FnSelect<Value> | Ref<Value>;
33
+ /**
34
+ * You can use intrinsic functions, such as Fn::If, Fn::Equals, and Fn::Not, to
35
+ * conditionally create stack resources. These conditions are evaluated based on
36
+ * input parameters that you declare when you create or update a stack. After
37
+ * you define all your conditions, you can associate them with resources or
38
+ * resource properties in the Resources and Outputs sections of a template.
39
+ */
40
+ export type ConditionFunction = LogicFunction<ConditionValueFunction>;
41
+ /**
42
+ * An intrinsic function which returns the given value.
43
+ */
44
+ export type ValueFn<Value = unknown> = (Value extends string ? FnBase64 | FnJoin | FnSub : never) | (Value extends readonly string[] ? FnCidr | FnGetAZs | FnSplit : never) | (Value extends readonly (infer Element)[] ? ValueFn<Element>[] : never) | FnFindInMap<Value> | FnGetAtt<Value> | FnIf<Value> | FnImportValue<Value> | FnSelect<Value> | Ref<Value>;
45
+ /**
46
+ * Convert a value to accept intrinsic functions.
47
+ */
48
+ export type WithIntrinsics<Value> = Value extends object ? {
49
+ [K in keyof Value]: Value[K] | WithIntrinsics<Value[K]>;
50
+ } : Value | ValueFn<Value>;
51
+ /**
52
+ * Condition functions for use in Rule conditions or assertions.
53
+ */
54
+ export type RuleConditionFunction = FnContains | FnEachMemberEquals | FnEachMemberIn;
55
+ /**
56
+ * String value functions which can be used with rules.
57
+ */
58
+ export type RuleValueFunction<Value = string | string[]> = (Value extends string[] ? FnRefAll | FnValueOfAll : never) | FnValueOf<Value> | Ref<Value>;
59
+ /**
60
+ * In the condition or assertions of a rule, you can use intrinsic functions,
61
+ * such as `Fn::Equals`, `Fn::Not`, and `Fn::RefAll`. The condition property
62
+ * determines if AWS CloudFormation applies the assertions. If the condition
63
+ * evaluates to true, CloudFormation evaluates the assertions to verify whether
64
+ * a parameter value is valid when a provisioned product is created or updated.
65
+ * If a parameter value isn't valid, CloudFormation doesn't create or update the
66
+ * stack. If the condition evaluates to false, CloudFormation doesn't check the
67
+ * parameter value and proceeds with the stack operation.
68
+ */
69
+ export type RuleFunction = LogicFunction<RuleValueFunction, RuleConditionFunction>;
70
+ /**
71
+ * Returns true if all the specified conditions evaluate to true, or returns
72
+ * false if any one of the conditions evaluates to false. `Fn::And` acts as an
73
+ * AND operator. The minimum number of conditions that you can include is 2,
74
+ * and the maximum is 10.
75
+ *
76
+ * @param conditions A condition that evaluates to true or false.
77
+ *
78
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-conditions.html#intrinsic-function-reference-conditions-and}
79
+ */
80
+ export type FnAnd<ValueFn = ConditionValueFunction, LogicFn = never> = {
81
+ "Fn::And": LogicFunction<ValueFn, LogicFn>[];
82
+ };
83
+ /**
84
+ * The intrinsic function `Fn::Base64` returns the Base64 representation of
85
+ * the input string. This function is typically used to pass encoded data to
86
+ * Amazon EC2 instances by way of the UserData property.
87
+ *
88
+ * @param valueToEncode The string value you want to convert to Base64.
89
+ * @returns The original string, in Base64 representation.
90
+ *
91
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-base64.html}
92
+ */
93
+ export type FnBase64 = {
94
+ [IntrinsicValueType]?: string;
95
+ "Fn::Base64": string | ValueFn<string>;
96
+ };
97
+ /**
98
+ * The intrinsic function `Fn::Cidr` returns an array of CIDR address blocks.
99
+ * The number of CIDR blocks returned is dependent on the count parameter.
100
+ *
101
+ * @param ipBlock The user-specified CIDR address block to be split into
102
+ * smaller CIDR blocks.
103
+ * @param count The number of CIDRs to generate. Valid range is between 1 and
104
+ * 256.
105
+ * @param cidrBits The number of subnet bits for the CIDR. For example,
106
+ * specifying a value "8" for this parameter will create a CIDR with a mask of
107
+ * "/24".
108
+ * @returns An array of CIDR address blocks.
109
+ *
110
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-cidr.html}
111
+ */
112
+ export type FnCidr = {
113
+ [IntrinsicValueType]?: string[];
114
+ "Fn::Cidr": [
115
+ ipBlock: string | FnSelect<string> | Ref<string>,
116
+ count: number | FnSelect<number> | Ref<number>,
117
+ cidrBits: number | FnSelect<number> | Ref<number>
118
+ ];
119
+ };
120
+ /**
121
+ * The intrinsic function Condition returns the evaluated result of the
122
+ * specified condition.
123
+ *
124
+ * When you are declaring a condition in a template and you need to use another
125
+ * condition in the evaluation, you can use Condition to refer to that other
126
+ * condition. This is used when declaring a condition in the Conditions section
127
+ * of the template.
128
+ *
129
+ * @param name The name of the condition you want to reference.
130
+ *
131
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-condition.html}
132
+ */
133
+ export type FnCondition = {
134
+ Condition: string;
135
+ };
136
+ /**
137
+ * Returns `true` if a specified string matches at least one value in a list
138
+ * of strings.
139
+ *
140
+ * @param listOfStrings A list of strings, such as `"A", "B", "C"`.
141
+ * @param string A string, such as `"A"`, that you want to compare against a
142
+ * list of strings.
143
+ *
144
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-rules.html#fn-contains}
145
+ */
146
+ export type FnContains = {
147
+ "Fn::Contains": [
148
+ listOfStrings: string[] | RuleValueFunction<string[]>,
149
+ string: string | RuleValueFunction<string>
150
+ ];
151
+ };
152
+ /**
153
+ * Returns `true` if a specified string matches all values in a list.
154
+ *
155
+ * @param listOfStrings A list of strings, such as `"A", "B", "C"`.
156
+ * @param string A string, such as `"A"`, that you want to compare against a
157
+ * list of strings.
158
+ *
159
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-rules.html#fn-eachmemberequals}
160
+ */
161
+ export type FnEachMemberEquals = {
162
+ "Fn::EachMemberEquals": [
163
+ listOfStrings: string[] | RuleValueFunction<string[]>,
164
+ string: string | RuleValueFunction<string>
165
+ ];
166
+ };
167
+ /**
168
+ * Returns `true` if a specified string matches all values in a list.
169
+ *
170
+ * @param stringsToCheck A list of strings, such as `"A", "B", "C"`.
171
+ * CloudFormation checks whether each member in the stringsToC`heck parameter
172
+ * is in the `stringsToMap` parameter.
173
+ * @param stringsToMatch A list of strings, such as `"A", "B", "C"`. Each
174
+ * member in the `stringsToMatch` parameter is compared against the members of
175
+ * the `stringsToCheck` parameter.
176
+ *
177
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-rules.html#fn-eachmemberin}
178
+ */
179
+ export type FnEachMemberIn = {
180
+ "Fn::EachMemberIn": [
181
+ stringsToCheck: string[] | RuleValueFunction<string[]>,
182
+ stringsToMatch: string[] | RuleValueFunction<string[]>
183
+ ];
184
+ };
185
+ /**
186
+ * Compares if two values are equal. Returns true if the two values are equal
187
+ * or false if they aren't.
188
+ *
189
+ * @param value1 A value of any primitive type that you want to compare.
190
+ * @param value2 A value of any primitive type that you want to compare.
191
+ *
192
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-conditions.html#intrinsic-function-reference-conditions-equals}
193
+ */
194
+ export type FnEquals<ValueFn = ConditionValueFunction> = {
195
+ "Fn::Equals": [
196
+ value1: JsonPrimitive | ValueFn,
197
+ value2: JsonPrimitive | ValueFn
198
+ ];
199
+ };
200
+ /**
201
+ * The intrinsic function `Fn::FindInMap` returns the value corresponding to
202
+ * keys in a two-level map that is declared in the Mappings section.
203
+ *
204
+ * @param mapName The logical name of a mapping declared in the Mappings
205
+ * section that contains the keys and values.
206
+ * @param topLevelKey The top-level key name. Its value is a list of key-value pairs.
207
+ * @param secondLevelKey The second-level key name, which is set to one of the keys from the list assigned to TopLevelKey.
208
+ * @returns The value that is assigned to SecondLevelKey.
209
+ *
210
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-findinmap.html}
211
+ */
212
+ export type FnFindInMap<Value = unknown> = {
213
+ [IntrinsicValueType]?: Value;
214
+ "Fn::FindInMap": [
215
+ mapName: string | FnFindInMap<string> | Ref<string>,
216
+ topLevelKey: string | FnFindInMap<string> | Ref<string>,
217
+ secondLevelKey: string | FnFindInMap<string> | Ref<string>
218
+ ];
219
+ };
220
+ /**
221
+ * The `Fn::GetAtt` intrinsic function returns the value of an attribute from
222
+ * a resource in the template. For more information about GetAtt return values
223
+ * for a particular resource, refer to the documentation for that resource in
224
+ * the Resource and Property Reference.
225
+ *
226
+ * @param logicalNameOfResource The logical name (also called logical ID) of
227
+ * the resource that contains the attribute that you want.
228
+ * @param attributeName The name of the resource-specific attribute whose
229
+ * value you want. See the resource's reference page for details about the
230
+ * attributes available for that resource type.
231
+ * @returns The attribute value.
232
+ *
233
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html}
234
+ */
235
+ export type FnGetAtt<Value> = {
236
+ [IntrinsicValueType]?: Value;
237
+ "Fn::GetAtt": [
238
+ logicalResourceName: string,
239
+ attributeName: string | Ref<string>
240
+ ];
241
+ };
242
+ /**
243
+ * The intrinsic function `Fn::GetAZs` returns an array that lists
244
+ * Availability Zones for a specified region. Because customers have access to
245
+ * different Availability Zones, the intrinsic function `Fn::GetAZs` enables
246
+ * template authors to write templates that adapt to the calling user's
247
+ * access. That way you don't have to hard-code a full list of Availability
248
+ * Zones for a specified region.
249
+ *
250
+ * @param region The name of the region for which you want to get the
251
+ * Availability Zones. You can use the AWS::Region pseudo parameter to
252
+ * specify the region in which the stack is created. Specifying an empty
253
+ * string is equivalent to specifying AWS::Region.
254
+ * @returns The list of Availability Zones for the region.
255
+ *
256
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getavailabilityzones.html}
257
+ */
258
+ export type FnGetAZs = {
259
+ [IntrinsicValueType]?: string[];
260
+ "Fn::GetAZs": string | Ref<string>;
261
+ };
262
+ /**
263
+ * Returns one value if the specified condition evaluates to true and another
264
+ * value if the specified condition evaluates to false. Currently, AWS
265
+ * CloudFormation supports the Fn::If intrinsic function in the metadata
266
+ * attribute, update policy attribute, and property values in the Resources
267
+ * section and Outputs sections of a template. You can use the `AWS::NoValue`
268
+ * pseudo parameter as a return value to remove the corresponding property.
269
+ *
270
+ * @param conditionName A reference to a condition in the Conditions section.
271
+ * Use the condition's name to reference it.
272
+ * @param valueIfTrue A value to be returned if the specified condition
273
+ * evaluates to true.
274
+ * @param valueIfFalse A value to be returned if the specified condition
275
+ * evaluates to false.
276
+ *
277
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-conditions.html#intrinsic-function-reference-conditions-if}
278
+ */
279
+ export type FnIf<Value> = {
280
+ [IntrinsicValueType]?: Value;
281
+ "Fn::If": [
282
+ conditionName: string,
283
+ valueIfTrue: Value | IfValueFunction<Value>,
284
+ valueIfFalse: Value | IfValueFunction<Value>
285
+ ];
286
+ };
287
+ /**
288
+ * The intrinsic function `Fn::ImportValue` returns the value of an output
289
+ * exported by another stack. You typically use this function to create
290
+ * cross-stack references. In the following example template snippets, Stack A
291
+ * exports VPC security group values and Stack B imports them.
292
+ *
293
+ * @param sharedValueToImport The stack output value that you want to import.
294
+ * @returns The stack output value.
295
+ *
296
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-importvalue.html}
297
+ */
298
+ export type FnImportValue<Value> = {
299
+ [IntrinsicValueType]?: Value;
300
+ "Fn::ImportValue": string | FnBase64 | FnJoin | FnSub | FnFindInMap<string> | FnIf<string> | FnSelect<string> | Ref<string>;
301
+ };
302
+ /**
303
+ * The intrinsic function `Fn::Join` appends a set of values into a single
304
+ * value, separated by the specified delimiter. If a delimiter is the empty
305
+ * string, the set of values are concatenated with no delimiter.
306
+ *
307
+ * @param delimiter The value you want to occur between fragments. The
308
+ * delimiter will occur between fragments only. It will not terminate the
309
+ * final value.
310
+ * @param listOfValues The list of values you want combined.
311
+ * @returns The combined string.
312
+ *
313
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-join.html}
314
+ */
315
+ export type FnJoin = {
316
+ [IntrinsicValueType]?: string;
317
+ "Fn::Join": [delimiter: string, listOfValues: FnJoinListValue];
318
+ };
319
+ /**
320
+ * Allowed functions in each element of the `listOfValues` parameter in
321
+ * {@link FnJoin}.
322
+ */
323
+ export type FnJoinListItemValue = string | FnBase64 | FnFindInMap<string> | FnGetAtt<string> | FnIf<string> | FnImportValue<string> | FnSelect<string> | Ref<string>;
324
+ /**
325
+ * Allowed functions in the `listOfValues` parameter in {@link FnJoin}.
326
+ */
327
+ export type FnJoinListValue = FnGetAZs | FnFindInMap<string[]> | FnGetAtt<string[]> | FnIf<string[]> | FnImportValue<string[]> | FnSelect<string[]> | FnSplit | Ref<string[]> | FnJoinListItemValue[];
328
+ /**
329
+ * Returns true for a condition that evaluates to false or returns false for a
330
+ * condition that evaluates to true. `Fn::Not` acts as a NOT operator.
331
+ *
332
+ * @param condition A condition such as `Fn::Equals` that evaluates to true or
333
+ * false.
334
+ *
335
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-conditions.html#intrinsic-function-reference-conditions-not}
336
+ */
337
+ export type FnNot<ValueFn = ConditionValueFunction, LogicFn = never> = {
338
+ "Fn::Not": [condition: LogicFunction<ValueFn, LogicFn>];
339
+ };
340
+ /**
341
+ * Returns true if any one of the specified conditions evaluate to true, or
342
+ * returns false if all of the conditions evaluates to false. `Fn::Or` acts as
343
+ * an OR operator. The minimum number of conditions that you can include is 2,
344
+ * and the maximum is 10.
345
+ *
346
+ * @param conditions A condition that evaluates to true or false.
347
+ *
348
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-conditions.html#intrinsic-function-reference-conditions-or}
349
+ */
350
+ export type FnOr<ValueFn = ConditionValueFunction, LogicFn = never> = {
351
+ "Fn::Or": LogicFunction<ValueFn, LogicFn>[];
352
+ };
353
+ /**
354
+ * The intrinsic function Ref returns the value of the specified parameter or
355
+ * resource.
356
+ *
357
+ * - When you specify a parameter's logical name, it returns the value of the
358
+ * parameter.
359
+ *
360
+ * - When you specify a resource's logical name, it returns a value that you
361
+ * can typically use to refer to that resource, such as a physical ID.
362
+ *
363
+ * When you are declaring a resource in a template and you need to specify
364
+ * another template resource by name, you can use the Ref to refer to that
365
+ * other resource. In general, Ref returns the name of the resource. For
366
+ * example, a reference to an AWS::AutoScaling::AutoScalingGroup returns the
367
+ * name of that Auto Scaling group resource.
368
+ *
369
+ * @param logicalName The logical name of the resource or parameter you want
370
+ * to dereference.
371
+ *
372
+ * @returns The physical ID of the resource or the value of the parameter.
373
+ *
374
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html}
375
+ */
376
+ export type Ref<Value = unknown> = {
377
+ [IntrinsicValueType]?: Value;
378
+ Ref: string;
379
+ };
380
+ /**
381
+ * Returns all values for a specified parameter type.
382
+ *
383
+ * @param parameterType An AWS-specific parameter type, such as
384
+ * `AWS::EC2::SecurityGroup::Id` or `AWS::EC2::VPC::Id`. For more information,
385
+ * see Parameters in the AWS CloudFormation User Guide.
386
+ *
387
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-rules.html#fn-refall}
388
+ */
389
+ export type FnRefAll = {
390
+ [IntrinsicValueType]?: string[];
391
+ "Fn::RefAll": string | RuleValueFunction<string>;
392
+ };
393
+ /**
394
+ * The intrinsic function `Fn::Select` returns a single object from a list of
395
+ * objects by index.
396
+ *
397
+ * @param index The index of the object to retrieve. This must be a value from
398
+ * zero to N-1, where N represents the number of elements in the array.
399
+ * @param listOfObjects The list of objects to select from. This list must not
400
+ * be null, nor can it have null entries.
401
+ * @returns The selected object.
402
+ *
403
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-select.html}
404
+ */
405
+ export type FnSelect<Value> = {
406
+ [IntrinsicValueType]?: Value;
407
+ "Fn::Select": [
408
+ index: number | Ref<number> | FnFindInMap<number>,
409
+ listOfObjects: Value[] | (Value extends string[] ? FnGetAZs | FnSplit : never) | FnFindInMap<Value[]> | FnGetAtt<Value[]> | Ref<Value[]>
410
+ ];
411
+ };
412
+ /**
413
+ * To split a string into a list of string values so that you can select an
414
+ * element from the resulting string list, use the `Fn::Split` intrinsic
415
+ * function. Specify the location of splits with a delimiter, such as , (a
416
+ * comma). After you split a string, use the `Fn::Select` function to pick a
417
+ * specific element.
418
+ *
419
+ * @param delimiter A string value that determines where the source string is
420
+ * divided.
421
+ * @param sourceString The string value that you want to split.
422
+ * @returns A list of string values.
423
+ *
424
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-split.html}
425
+ */
426
+ export type FnSplit = {
427
+ [IntrinsicValueType]?: string[];
428
+ "Fn::Split": [delimiter: string, sourceString: string | ValueFn<string>];
429
+ };
430
+ /**
431
+ * The intrinsic function `Fn::Sub` substitutes variables in an input string
432
+ * with values that you specify. In your templates, you can use this function
433
+ * to construct commands or outputs that include values that aren't available
434
+ * until you create or update a stack.
435
+ *
436
+ * @param text A string with variables that AWS CloudFormation substitutes
437
+ * with their associated values at runtime. Write variables as `${MyVarName}`.
438
+ * Variables can be template parameter names, resource logical IDs,
439
+ * resource attributes, or a variable in a key-value map. If you specify only
440
+ * template parameter names, resource logical IDs, and resource attributes,
441
+ * don't specify a key-value map.
442
+ *
443
+ * If you specify template parameter names or resource logical IDs, such as
444
+ * `${InstanceTypeParameter}` AWS CloudFormation returns the same values as if
445
+ * you used the Ref intrinsic function. If you specify resource attributes,
446
+ * such as `${MyInstance.PublicIp}` AWS CloudFormation returns the same values
447
+ * as if you used the `Fn::GetAtt` intrinsic function.
448
+ *
449
+ * To write a dollar sign and curly braces (`${}`) literally, add an
450
+ * exclamation point (!) after the open curly brace, such as `${!Literal}`.
451
+ * AWS CloudFormation resolves this text as `${Literal}`.
452
+ *
453
+ * @param values A map of values that AWS CloudFormation substitutes for the
454
+ * associated variable names at runtime.
455
+ *
456
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-sub.html}
457
+ */
458
+ export type FnSub = {
459
+ [IntrinsicValueType]?: string;
460
+ "Fn::Sub": [text: string, values: Record<string, string | ValueFn<string>>];
461
+ };
462
+ /**
463
+ * Map of parameter type to attribute name to output type.
464
+ */
465
+ export type FnValueOfTypeMap = {
466
+ "AWS::EC2::VPC::Id": {
467
+ DefaultNetworkAcl: string;
468
+ DefaultSecurityGroup: string;
469
+ } & Record<`Tags.${string}`, string>;
470
+ "AWS::EC2::Subnet::Id": {
471
+ AvailabilityZone: string;
472
+ VpcId: string;
473
+ } & Record<`Tags.${string}`, string>;
474
+ "AWS::EC2::SecurityGroup::Id": Record<`Tags.${string}`, string>;
475
+ };
476
+ /**
477
+ * Supported attributes for {@link FnValueOf} and {@link FnValueOfAll}.
478
+ */
479
+ export type FnValueOfAttribute = {
480
+ [K in keyof FnValueOfTypeMap]: keyof FnValueOfTypeMap[K];
481
+ }[keyof FnValueOfTypeMap];
482
+ /**
483
+ * Supported parameter types for {@link FnValueOf} and {@link FnValueOfAll}.
484
+ */
485
+ export type FnValueOfType = keyof FnValueOfTypeMap;
486
+ /**
487
+ * Returns an attribute value or list of values for a specific parameter and
488
+ * attribute.
489
+ *
490
+ * @param parameterLogicalId The name of a parameter for which you want to
491
+ * retrieve attribute values. The parameter must be declared in the
492
+ * `Parameters` section of the template.
493
+ * @param attribute The name of an attribute from which you want to retrieve a
494
+ * value.
495
+ *
496
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-rules.html#fn-valueof}
497
+ */
498
+ export type FnValueOf<Value = string> = {
499
+ [IntrinsicValueType]?: Value;
500
+ "Fn::ValueOf": [parameterLogicalId: string, attribute: FnValueOfAttribute];
501
+ };
502
+ /**
503
+ * Returns a list of all attribute values for a given parameter type and
504
+ * attribute.
505
+ *
506
+ * @param parameterType An AWS-specific parameter type, such as
507
+ * `AWS::EC2::SecurityGroup::Id` or `AWS::EC2::VPC::Id`. For more information,
508
+ * see Parameters in the AWS CloudFormation User Guide.
509
+ * @param attribute The name of an attribute from which you want to retrieve a
510
+ * value.
511
+ *
512
+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-rules.html#fn-valueofall}
513
+ */
514
+ export type FnValueOfAll = {
515
+ [IntrinsicValueType]?: string[];
516
+ "Fn::ValueOfAll": [
517
+ parameterType: FnValueOfType,
518
+ attribute: FnValueOfAttribute
519
+ ];
520
+ };
521
+ export {};
522
+ //# sourceMappingURL=intrinsics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intrinsics.d.ts","sourceRoot":"","sources":["../../../exports/main/intrinsics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,kBAAkB,eAE9B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,2JASnB,CAAC;AAEX;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI;IAC9B,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;CACzB,CAAC;AAEF,KAAK,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,KAAK,IACvC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,GACvB,QAAQ,CAAC,OAAO,CAAC,GACjB,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,GACvB,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,GACtB,OAAO,CAAC;AAEZ;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,WAAW,GAAG,GAAG,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,KAAK,IAC7B,CAAC,KAAK,SAAS,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC,G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AAgB,EAAE,MAAM,CAAC;QACzB,KAAK,EAAE,MAAM,CAAC;KACf,GAAG,MAAM,CAAC,QAAQ,MAAM,EAAE,EAAE,MAAM,CAAC,CAAC;IACrC,6BAA6B,EAAE,MAAM,CAAC,QAAQ,MAAM,EAAE,EAAE,MAAM,CAAC,CAAC;CACjE,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;KAC9B,CAAC,IAAI,MAAM,gBAAgB,GAAG,MAAM,gBAAgB,CAAC,CAAC,CAAC;CACzD,CAAC,MAAM,gBAAgB,CAAC,CAAC;AAE1B;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,gBAAgB,CAAC;AAEnD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,SAAS,CAAC,KAAK,GAAG,MAAM,IAAI;IACtC,CAAC,kBAAkB,CAAC,CAAC,EAAE,KAAK,CAAC;IAC7B,aAAa,EAAE,CAAC,kBAAkB,EAAE,MAAM,EAAE,SAAS,EAAE,kBAAkB,CAAC,CAAC;CAC5E,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,CAAC,kBAAkB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,gBAAgB,EAAE;QAChB,aAAa,EAAE,aAAa;QAC5B,SAAS,EAAE,kBAAkB;KAC9B,CAAC;CACH,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Branding symbol for {@link IntrinsicValue}.
3
+ */
4
+ export const IntrinsicValueType = Symbol.for("@propulsionworks/cloudformation/IntrinsicValueType");
5
+ /**
6
+ * Pseudo parameters are parameters that are predefined by AWS CloudFormation.
7
+ * You don't declare them in your template. Use them the same way as you would a
8
+ * parameter, as the argument for the Ref function.
9
+ */
10
+ export const PseudoParameters = [
11
+ "AWS::AccountId",
12
+ "AWS::NotificationARNs",
13
+ "AWS::NoValue",
14
+ "AWS::Partition",
15
+ "AWS::Region",
16
+ "AWS::StackId",
17
+ "AWS::StackName",
18
+ "AWS::URLSuffix",
19
+ ];
20
+ //# sourceMappingURL=intrinsics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intrinsics.js","sourceRoot":"","sources":["../../../exports/main/intrinsics.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAC1C,oDAAoD,CACrD,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,gBAAgB;IAChB,uBAAuB;IACvB,cAAc;IACd,gBAAgB;IAChB,aAAa;IACb,cAAc;IACd,gBAAgB;IAChB,gBAAgB;CACR,CAAC"}
@@ -0,0 +1,5 @@
1
+ export type JsonPrimitive = boolean | number | string | null;
2
+ export type JsonValue = JsonPrimitive | JsonValue[] | {
3
+ [key: string]: JsonValue;
4
+ };
5
+ //# sourceMappingURL=json.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../exports/main/json.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAE7D,MAAM,MAAM,SAAS,GACjB,aAAa,GACb,SAAS,EAAE,GACX;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json.js","sourceRoot":"","sources":["../../../exports/main/json.ts"],"names":[],"mappings":""}