Skip to content

Commit 8ac92bb

Browse files
Added support for CloudFormation Hooks with Cloud Control API. The GetResourceRequestStatus API response now includes an optional HooksProgressEvent and HooksRequestToken parameter for Hooks Invocation Progress as part of resource operation with Cloud Control.
1 parent 7183c42 commit 8ac92bb

16 files changed

+669
-30
lines changed

generator/ServiceModels/cloudcontrol/cloudcontrol-2021-09-30.api.json

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
"version":"2.0",
33
"metadata":{
44
"apiVersion":"2021-09-30",
5+
"auth":["aws.auth#sigv4"],
56
"endpointPrefix":"cloudcontrolapi",
67
"jsonVersion":"1.0",
78
"protocol":"json",
9+
"protocols":["json"],
810
"serviceAbbreviation":"CloudControlApi",
911
"serviceFullName":"AWS Cloud Control API",
1012
"serviceId":"CloudControl",
@@ -293,7 +295,7 @@
293295
},
294296
"ErrorMessage":{
295297
"type":"string",
296-
"max":1024,
298+
"max":2048,
297299
"min":1,
298300
"pattern":".+"
299301
},
@@ -334,7 +336,8 @@
334336
"GetResourceRequestStatusOutput":{
335337
"type":"structure",
336338
"members":{
337-
"ProgressEvent":{"shape":"ProgressEvent"}
339+
"ProgressEvent":{"shape":"ProgressEvent"},
340+
"HooksProgressEvent":{"shape":"HooksProgressEvent"}
338341
}
339342
},
340343
"HandlerErrorCode":{
@@ -343,6 +346,7 @@
343346
"NotUpdatable",
344347
"InvalidRequest",
345348
"AccessDenied",
349+
"UnauthorizedTaggingOperation",
346350
"InvalidCredentials",
347351
"AlreadyExists",
348352
"NotFound",
@@ -375,10 +379,51 @@
375379
},
376380
"HandlerNextToken":{
377381
"type":"string",
378-
"max":2048,
382+
"max":4096,
379383
"min":1,
380384
"pattern":".+"
381385
},
386+
"HookFailureMode":{
387+
"type":"string",
388+
"max":128,
389+
"min":1,
390+
"pattern":"[-A-Za-z_]+"
391+
},
392+
"HookInvocationPoint":{
393+
"type":"string",
394+
"max":128,
395+
"min":1,
396+
"pattern":"[-A-Za-z_]+"
397+
},
398+
"HookProgressEvent":{
399+
"type":"structure",
400+
"members":{
401+
"HookTypeName":{"shape":"TypeName"},
402+
"HookTypeVersionId":{"shape":"TypeVersionId"},
403+
"HookTypeArn":{"shape":"HookTypeArn"},
404+
"InvocationPoint":{"shape":"HookInvocationPoint"},
405+
"HookStatus":{"shape":"HookStatus"},
406+
"HookEventTime":{"shape":"Timestamp"},
407+
"HookStatusMessage":{"shape":"StatusMessage"},
408+
"FailureMode":{"shape":"HookFailureMode"}
409+
}
410+
},
411+
"HookStatus":{
412+
"type":"string",
413+
"max":128,
414+
"min":1,
415+
"pattern":"[-A-Za-z_]+"
416+
},
417+
"HookTypeArn":{
418+
"type":"string",
419+
"max":2048,
420+
"min":1,
421+
"pattern":"arn:aws.*:.+:.*:.*:.+"
422+
},
423+
"HooksProgressEvent":{
424+
"type":"list",
425+
"member":{"shape":"HookProgressEvent"}
426+
},
382427
"Identifier":{
383428
"type":"string",
384429
"max":1024,
@@ -497,7 +542,7 @@
497542
},
498543
"PatchDocument":{
499544
"type":"string",
500-
"max":65536,
545+
"max":262144,
501546
"min":1,
502547
"pattern":"[\\s\\S]*",
503548
"sensitive":true
@@ -515,6 +560,7 @@
515560
"TypeName":{"shape":"TypeName"},
516561
"Identifier":{"shape":"Identifier"},
517562
"RequestToken":{"shape":"RequestToken"},
563+
"HooksRequestToken":{"shape":"RequestToken"},
518564
"Operation":{"shape":"Operation"},
519565
"OperationStatus":{"shape":"OperationStatus"},
520566
"EventTime":{"shape":"Timestamp"},
@@ -526,7 +572,7 @@
526572
},
527573
"Properties":{
528574
"type":"string",
529-
"max":65536,
575+
"max":262144,
530576
"min":1,
531577
"pattern":"[\\s\\S]*",
532578
"sensitive":true
@@ -603,7 +649,7 @@
603649
},
604650
"StatusMessage":{
605651
"type":"string",
606-
"max":1024,
652+
"max":2048,
607653
"min":0,
608654
"pattern":"[\\s\\S]*"
609655
},

generator/ServiceModels/cloudcontrol/cloudcontrol-2021-09-30.docs.json

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,42 @@
144144
"ListResourcesOutput$NextToken": "<p>If the request doesn't return all of the remaining results, <code>NextToken</code> is set to a token. To retrieve the next set of results, call <code>ListResources</code> again and assign that token to the request object's <code>NextToken</code> parameter. If the request returns all results, <code>NextToken</code> is set to null.</p>"
145145
}
146146
},
147+
"HookFailureMode": {
148+
"base": null,
149+
"refs": {
150+
"HookProgressEvent$FailureMode": "<p>The failure mode of the invocation. The following are the potential statuses:</p> <ul> <li> <p> <code>FAIL</code>: This will fail the Hook invocation and the request associated with it.</p> </li> <li> <p> <code>WARN</code>: This will fail the Hook invocation, but not the request associated with it.</p> </li> </ul>"
151+
}
152+
},
153+
"HookInvocationPoint": {
154+
"base": null,
155+
"refs": {
156+
"HookProgressEvent$InvocationPoint": "<p>States whether the Hook is invoked before or after resource provisioning.</p>"
157+
}
158+
},
159+
"HookProgressEvent": {
160+
"base": "<p>Represents the current status of applicable Hooks for a resource operation request. It contains list of Hook invocation information for the resource specified in the request since the same target can invoke multiple Hooks. For more information, see <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-manage-requests.html\">Managing resource operation requests with Amazon Web Services Cloud Control API </a>.</p>",
161+
"refs": {
162+
"HooksProgressEvent$member": null
163+
}
164+
},
165+
"HookStatus": {
166+
"base": null,
167+
"refs": {
168+
"HookProgressEvent$HookStatus": "<p>The status of the Hook invocation. The following are potential statuses:</p> <ul> <li> <p> <code>HOOK_PENDING</code>: The Hook was added to the invocation plan, but not yet invoked.</p> </li> <li> <p> <code>HOOK_IN_PROGRESS</code>: The Hook was invoked, but hasn't completed.</p> </li> <li> <p> <code>HOOK_COMPLETE_SUCCEEDED</code>: The Hook invocation is complete with a successful result.</p> </li> <li> <p> <code>HOOK_COMPLETE_FAILED</code>: The Hook invocation is complete with a failed result.</p> </li> <li> <p> <code>HOOK_FAILED</code>: The Hook invocation didn't complete successfully.</p> </li> </ul>"
169+
}
170+
},
171+
"HookTypeArn": {
172+
"base": null,
173+
"refs": {
174+
"HookProgressEvent$HookTypeArn": "<p>The ARN of the Hook being invoked.</p>"
175+
}
176+
},
177+
"HooksProgressEvent": {
178+
"base": null,
179+
"refs": {
180+
"GetResourceRequestStatusOutput$HooksProgressEvent": "<p>Lists Hook invocations for the specified target in the request. This is a list since the same target can invoke multiple Hooks.</p>"
181+
}
182+
},
147183
"Identifier": {
148184
"base": null,
149185
"refs": {
@@ -240,7 +276,7 @@
240276
}
241277
},
242278
"PatchDocument": {
243-
"base": null,
279+
"base": "<p>Allow up to 256K length of Resource properties</p>",
244280
"refs": {
245281
"UpdateResourceInput$PatchDocument": "<p>A JavaScript Object Notation (JSON) document listing the patch operations that represent the updates to apply to the current resource properties. For details, see <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-update.html#resource-operations-update-patch\">Composing the patch document</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>"
246282
}
@@ -262,7 +298,7 @@
262298
}
263299
},
264300
"Properties": {
265-
"base": null,
301+
"base": "<p>Allow up to 256K length of Resource properties</p>",
266302
"refs": {
267303
"CreateResourceInput$DesiredState": "<p>Structured data format representing the desired state of the resource, consisting of that resource's properties and their desired values.</p> <note> <p>Cloud Control API currently supports JSON as a structured data format.</p> </note> <p>Specify the desired state as one of the following:</p> <ul> <li> <p>A JSON blob</p> </li> <li> <p>A local path containing the desired state in JSON data format</p> </li> </ul> <p>For more information, see <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-create.html#resource-operations-create-desiredstate\">Composing the desired state of the resource</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p> <p>For more information about the properties of a specific resource, refer to the related topic for the resource in the <a href=\"https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html\">Resource and property types reference</a> in the <i>CloudFormation Users Guide</i>.</p>",
268304
"ListResourcesInput$ResourceModel": "<p>The resource model to use to select the resources to return.</p>",
@@ -275,7 +311,8 @@
275311
"refs": {
276312
"CancelResourceRequestInput$RequestToken": "<p>The <code>RequestToken</code> of the <code>ProgressEvent</code> object returned by the resource operation request.</p>",
277313
"GetResourceRequestStatusInput$RequestToken": "<p>A unique token used to track the progress of the resource operation request.</p> <p>Request tokens are included in the <code>ProgressEvent</code> type returned by a resource operation request.</p>",
278-
"ProgressEvent$RequestToken": "<p>The unique token representing this resource operation request.</p> <p>Use the <code>RequestToken</code> with <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html\">GetResourceRequestStatus</a> to return the current status of a resource operation request.</p>"
314+
"ProgressEvent$RequestToken": "<p>The unique token representing this resource operation request.</p> <p>Use the <code>RequestToken</code> with <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html\">GetResourceRequestStatus</a> to return the current status of a resource operation request.</p>",
315+
"ProgressEvent$HooksRequestToken": "<p>The unique token representing the Hooks operation for the request.</p>"
279316
}
280317
},
281318
"RequestTokenNotFoundException": {
@@ -341,6 +378,7 @@
341378
"StatusMessage": {
342379
"base": null,
343380
"refs": {
381+
"HookProgressEvent$HookStatusMessage": "<p>The message explaining the current Hook status.</p>",
344382
"ProgressEvent$StatusMessage": "<p>Any message explaining the current status.</p>"
345383
}
346384
},
@@ -352,6 +390,7 @@
352390
"Timestamp": {
353391
"base": null,
354392
"refs": {
393+
"HookProgressEvent$HookEventTime": "<p>The time that the Hook invocation request initiated.</p>",
355394
"ProgressEvent$EventTime": "<p>When the resource operation request was initiated.</p>",
356395
"ProgressEvent$RetryAfter": "<p>When to next request the status of this resource operation request.</p>"
357396
}
@@ -363,6 +402,7 @@
363402
"DeleteResourceInput$TypeName": "<p>The name of the resource type.</p>",
364403
"GetResourceInput$TypeName": "<p>The name of the resource type.</p>",
365404
"GetResourceOutput$TypeName": "<p>The name of the resource type.</p>",
405+
"HookProgressEvent$HookTypeName": "<p>The type name of the Hook being invoked.</p>",
366406
"ListResourcesInput$TypeName": "<p>The name of the resource type.</p>",
367407
"ListResourcesOutput$TypeName": "<p>The name of the resource type.</p>",
368408
"ProgressEvent$TypeName": "<p>The name of the resource type used in the operation.</p>",
@@ -380,6 +420,7 @@
380420
"CreateResourceInput$TypeVersionId": "<p>For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.</p>",
381421
"DeleteResourceInput$TypeVersionId": "<p>For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.</p>",
382422
"GetResourceInput$TypeVersionId": "<p>For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.</p>",
423+
"HookProgressEvent$HookTypeVersionId": "<p>The type version of the Hook being invoked.</p>",
383424
"ListResourcesInput$TypeVersionId": "<p>For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.</p>",
384425
"UpdateResourceInput$TypeVersionId": "<p>For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.</p>"
385426
}

generator/ServiceModels/cloudcontrol/cloudcontrol-2021-09-30.normal.json

Lines changed: 84 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
"version":"2.0",
33
"metadata":{
44
"apiVersion":"2021-09-30",
5+
"auth":["aws.auth#sigv4"],
56
"endpointPrefix":"cloudcontrolapi",
67
"jsonVersion":"1.0",
78
"protocol":"json",
9+
"protocols":["json"],
810
"serviceAbbreviation":"CloudControlApi",
911
"serviceFullName":"AWS Cloud Control API",
1012
"serviceId":"CloudControl",
@@ -340,7 +342,7 @@
340342
},
341343
"ErrorMessage":{
342344
"type":"string",
343-
"max":1024,
345+
"max":2048,
344346
"min":1,
345347
"pattern":".+"
346348
},
@@ -403,6 +405,10 @@
403405
"ProgressEvent":{
404406
"shape":"ProgressEvent",
405407
"documentation":"<p>Represents the current status of the resource operation request.</p>"
408+
},
409+
"HooksProgressEvent":{
410+
"shape":"HooksProgressEvent",
411+
"documentation":"<p>Lists Hook invocations for the specified target in the request. This is a list since the same target can invoke multiple Hooks.</p>"
406412
}
407413
}
408414
},
@@ -412,6 +418,7 @@
412418
"NotUpdatable",
413419
"InvalidRequest",
414420
"AccessDenied",
421+
"UnauthorizedTaggingOperation",
415422
"InvalidCredentials",
416423
"AlreadyExists",
417424
"NotFound",
@@ -446,10 +453,76 @@
446453
},
447454
"HandlerNextToken":{
448455
"type":"string",
449-
"max":2048,
456+
"max":4096,
450457
"min":1,
451458
"pattern":".+"
452459
},
460+
"HookFailureMode":{
461+
"type":"string",
462+
"max":128,
463+
"min":1,
464+
"pattern":"[-A-Za-z_]+"
465+
},
466+
"HookInvocationPoint":{
467+
"type":"string",
468+
"max":128,
469+
"min":1,
470+
"pattern":"[-A-Za-z_]+"
471+
},
472+
"HookProgressEvent":{
473+
"type":"structure",
474+
"members":{
475+
"HookTypeName":{
476+
"shape":"TypeName",
477+
"documentation":"<p>The type name of the Hook being invoked.</p>"
478+
},
479+
"HookTypeVersionId":{
480+
"shape":"TypeVersionId",
481+
"documentation":"<p>The type version of the Hook being invoked.</p>"
482+
},
483+
"HookTypeArn":{
484+
"shape":"HookTypeArn",
485+
"documentation":"<p>The ARN of the Hook being invoked.</p>"
486+
},
487+
"InvocationPoint":{
488+
"shape":"HookInvocationPoint",
489+
"documentation":"<p>States whether the Hook is invoked before or after resource provisioning.</p>"
490+
},
491+
"HookStatus":{
492+
"shape":"HookStatus",
493+
"documentation":"<p>The status of the Hook invocation. The following are potential statuses:</p> <ul> <li> <p> <code>HOOK_PENDING</code>: The Hook was added to the invocation plan, but not yet invoked.</p> </li> <li> <p> <code>HOOK_IN_PROGRESS</code>: The Hook was invoked, but hasn't completed.</p> </li> <li> <p> <code>HOOK_COMPLETE_SUCCEEDED</code>: The Hook invocation is complete with a successful result.</p> </li> <li> <p> <code>HOOK_COMPLETE_FAILED</code>: The Hook invocation is complete with a failed result.</p> </li> <li> <p> <code>HOOK_FAILED</code>: The Hook invocation didn't complete successfully.</p> </li> </ul>"
494+
},
495+
"HookEventTime":{
496+
"shape":"Timestamp",
497+
"documentation":"<p>The time that the Hook invocation request initiated.</p>"
498+
},
499+
"HookStatusMessage":{
500+
"shape":"StatusMessage",
501+
"documentation":"<p>The message explaining the current Hook status.</p>"
502+
},
503+
"FailureMode":{
504+
"shape":"HookFailureMode",
505+
"documentation":"<p>The failure mode of the invocation. The following are the potential statuses:</p> <ul> <li> <p> <code>FAIL</code>: This will fail the Hook invocation and the request associated with it.</p> </li> <li> <p> <code>WARN</code>: This will fail the Hook invocation, but not the request associated with it.</p> </li> </ul>"
506+
}
507+
},
508+
"documentation":"<p>Represents the current status of applicable Hooks for a resource operation request. It contains list of Hook invocation information for the resource specified in the request since the same target can invoke multiple Hooks. For more information, see <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-manage-requests.html\">Managing resource operation requests with Amazon Web Services Cloud Control API </a>.</p>"
509+
},
510+
"HookStatus":{
511+
"type":"string",
512+
"max":128,
513+
"min":1,
514+
"pattern":"[-A-Za-z_]+"
515+
},
516+
"HookTypeArn":{
517+
"type":"string",
518+
"max":2048,
519+
"min":1,
520+
"pattern":"arn:aws.*:.+:.*:.*:.+"
521+
},
522+
"HooksProgressEvent":{
523+
"type":"list",
524+
"member":{"shape":"HookProgressEvent"}
525+
},
453526
"Identifier":{
454527
"type":"string",
455528
"max":1024,
@@ -615,7 +688,8 @@
615688
},
616689
"PatchDocument":{
617690
"type":"string",
618-
"max":65536,
691+
"documentation":"<p>Allow up to 256K length of Resource properties</p>",
692+
"max":262144,
619693
"min":1,
620694
"pattern":"[\\s\\S]*",
621695
"sensitive":true
@@ -643,6 +717,10 @@
643717
"shape":"RequestToken",
644718
"documentation":"<p>The unique token representing this resource operation request.</p> <p>Use the <code>RequestToken</code> with <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html\">GetResourceRequestStatus</a> to return the current status of a resource operation request.</p>"
645719
},
720+
"HooksRequestToken":{
721+
"shape":"RequestToken",
722+
"documentation":"<p>The unique token representing the Hooks operation for the request.</p>"
723+
},
646724
"Operation":{
647725
"shape":"Operation",
648726
"documentation":"<p>The resource operation type.</p>"
@@ -676,7 +754,8 @@
676754
},
677755
"Properties":{
678756
"type":"string",
679-
"max":65536,
757+
"documentation":"<p>Allow up to 256K length of Resource properties</p>",
758+
"max":262144,
680759
"min":1,
681760
"pattern":"[\\s\\S]*",
682761
"sensitive":true
@@ -772,7 +851,7 @@
772851
},
773852
"StatusMessage":{
774853
"type":"string",
775-
"max":1024,
854+
"max":2048,
776855
"min":0,
777856
"pattern":"[\\s\\S]*"
778857
},

0 commit comments

Comments
 (0)