@awboost/cfntypes 0.44.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.
package/README.md ADDED
@@ -0,0 +1,39 @@
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
+ ```