@@ -10,20 +10,90 @@ const CloudFormationCustomResourceBaseSchema = z.object({
1010 ResourceProperties : z . record ( z . any ( ) ) ,
1111} ) ;
1212
13+ /**
14+ * Zod schema for CloudFormation Custom Resource event with RequestType = 'Create'
15+ *
16+ * @example
17+ * ```json
18+ * {
19+ * "RequestType": "Create",
20+ * "ServiceToken": "arn:aws:lambda:us-east-1:xxx:function:xxxx-CrbuiltinfunctionidProvi-2vKAalSppmKe",
21+ * "ResponseURL": "https://cloudformation-custom-resource-response-useast1.s3.amazonaws.com/7F%7Cb1f50fdfc25f3b",
22+ * "StackId": "arn:aws:cloudformation:us-east-1:xxxx:stack/xxxx/271845b0-f2e8-11ed-90ac-0eeb25b8ae21",
23+ * "RequestId": "xxxxx-d2a0-4dfb-ab1f-xxxxxx",
24+ * "LogicalResourceId": "xxxxxxxxx",
25+ * "ResourceType": "Custom::MyType",
26+ * "ResourceProperties": {
27+ * "ServiceToken": "arn:aws:lambda:us-east-1:xxxxx:function:xxxxx",
28+ * "MyProps": "ss"
29+ * }
30+ * }
31+ * ```
32+ * @see {@link types.CloudFormationCustomResourceCreateEvent | CloudFormationCustomResourceCreateEvent }
33+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref-requesttypes-create.html }
34+ */
1335const CloudFormationCustomResourceCreateSchema =
1436 CloudFormationCustomResourceBaseSchema . merge (
1537 z . object ( {
1638 RequestType : z . literal ( 'Create' ) ,
1739 } )
1840 ) ;
1941
42+ /**
43+ * Zod schema for CloudFormation Custom Resource event with RequestType = 'Delete'
44+ *
45+ * @example
46+ * ```json
47+ * {
48+ * "RequestType": "Delete",
49+ * "ServiceToken": "arn:aws:lambda:us-east-1:xxx:function:xxxx-CrbuiltinfunctionidProvi-2vKAalSppmKe",
50+ * "ResponseURL": "https://cloudformation-custom-resource-response-useast1.s3.amazonaws.com/7F%7Cb1f50fdfc25f3b",
51+ * "StackId": "arn:aws:cloudformation:us-east-1:xxxx:stack/xxxx/271845b0-f2e8-11ed-90ac-0eeb25b8ae21",
52+ * "RequestId": "xxxxx-d2a0-4dfb-ab1f-xxxxxx",
53+ * "LogicalResourceId": "xxxxxxxxx",
54+ * "ResourceType": "Custom::MyType",
55+ * "ResourceProperties": {
56+ * "ServiceToken": "arn:aws:lambda:us-east-1:xxxxx:function:xxxxx",
57+ * "MyProps": "ss"
58+ * }
59+ * }
60+ * ```
61+ * @see {@link types.CloudFormationCustomResourceDeleteEvent | CloudFormationCustomResourceDeleteEvent }
62+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref-requesttypes-delete.html }
63+ */
2064const CloudFormationCustomResourceDeleteSchema =
2165 CloudFormationCustomResourceBaseSchema . merge (
2266 z . object ( {
2367 RequestType : z . literal ( 'Delete' ) ,
2468 } )
2569 ) ;
2670
71+ /**
72+ * Zod schema for CloudFormation Custom Resource event with RequestType = 'Update'
73+ *
74+ * @example
75+ * ```json
76+ * {
77+ * "RequestType": "Update",
78+ * "ServiceToken": "arn:aws:lambda:us-east-1:xxx:function:xxxx-CrbuiltinfunctionidProvi-2vKAalSppmKe",
79+ * "ResponseURL": "https://cloudformation-custom-resource-response-useast1.s3.amazonaws.com/7F%7Cb1f50fdfc25f3b",
80+ * "StackId": "arn:aws:cloudformation:us-east-1:xxxx:stack/xxxx/271845b0-f2e8-11ed-90ac-0eeb25b8ae21",
81+ * "RequestId": "xxxxx-d2a0-4dfb-ab1f-xxxxxx",
82+ * "LogicalResourceId": "xxxxxxxxx",
83+ * "ResourceType": "Custom::MyType",
84+ * "ResourceProperties": {
85+ * "ServiceToken": "arn:aws:lambda:us-east-1:xxxxx:function:xxxxx",
86+ * "MyProps": "new"
87+ * },
88+ * "OldResourceProperties": {
89+ * "ServiceToken": "arn:aws:lambda:us-east-1:xxxxx:function:xxxxx-xxxx-xxx",
90+ * "MyProps": "old"
91+ * }
92+ * }
93+ * ```
94+ * @see {@link types.CloudFormationCustomResourceUpdateEvent | CloudFormationCustomResourceUpdateEvent }
95+ * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref-requesttypes-update.html }
96+ */
2797const CloudFormationCustomResourceUpdateSchema =
2898 CloudFormationCustomResourceBaseSchema . merge (
2999 z . object ( {
0 commit comments