diff --git a/clients/client-cloudcontrol/src/commands/CancelResourceRequestCommand.ts b/clients/client-cloudcontrol/src/commands/CancelResourceRequestCommand.ts index 354bcfef5007d..37aeeb6fea0d9 100644 --- a/clients/client-cloudcontrol/src/commands/CancelResourceRequestCommand.ts +++ b/clients/client-cloudcontrol/src/commands/CancelResourceRequestCommand.ts @@ -52,6 +52,7 @@ export interface CancelResourceRequestCommandOutput extends CancelResourceReques * // TypeName: "STRING_VALUE", * // Identifier: "STRING_VALUE", * // RequestToken: "STRING_VALUE", + * // HooksRequestToken: "STRING_VALUE", * // Operation: "STRING_VALUE", * // OperationStatus: "STRING_VALUE", * // EventTime: new Date("TIMESTAMP"), diff --git a/clients/client-cloudcontrol/src/commands/CreateResourceCommand.ts b/clients/client-cloudcontrol/src/commands/CreateResourceCommand.ts index 0093284b7d3c9..3fbdd956b62cb 100644 --- a/clients/client-cloudcontrol/src/commands/CreateResourceCommand.ts +++ b/clients/client-cloudcontrol/src/commands/CreateResourceCommand.ts @@ -58,6 +58,7 @@ export interface CreateResourceCommandOutput extends CreateResourceOutput, __Met * // TypeName: "STRING_VALUE", * // Identifier: "STRING_VALUE", * // RequestToken: "STRING_VALUE", + * // HooksRequestToken: "STRING_VALUE", * // Operation: "STRING_VALUE", * // OperationStatus: "STRING_VALUE", * // EventTime: new Date("TIMESTAMP"), diff --git a/clients/client-cloudcontrol/src/commands/DeleteResourceCommand.ts b/clients/client-cloudcontrol/src/commands/DeleteResourceCommand.ts index 95f6ae34f4e8a..9b46b9c3aa7f8 100644 --- a/clients/client-cloudcontrol/src/commands/DeleteResourceCommand.ts +++ b/clients/client-cloudcontrol/src/commands/DeleteResourceCommand.ts @@ -53,6 +53,7 @@ export interface DeleteResourceCommandOutput extends DeleteResourceOutput, __Met * // TypeName: "STRING_VALUE", * // Identifier: "STRING_VALUE", * // RequestToken: "STRING_VALUE", + * // HooksRequestToken: "STRING_VALUE", * // Operation: "STRING_VALUE", * // OperationStatus: "STRING_VALUE", * // EventTime: new Date("TIMESTAMP"), diff --git a/clients/client-cloudcontrol/src/commands/GetResourceRequestStatusCommand.ts b/clients/client-cloudcontrol/src/commands/GetResourceRequestStatusCommand.ts index 51e3759f2c8af..0bda15f94e95d 100644 --- a/clients/client-cloudcontrol/src/commands/GetResourceRequestStatusCommand.ts +++ b/clients/client-cloudcontrol/src/commands/GetResourceRequestStatusCommand.ts @@ -51,6 +51,7 @@ export interface GetResourceRequestStatusCommandOutput extends GetResourceReques * // TypeName: "STRING_VALUE", * // Identifier: "STRING_VALUE", * // RequestToken: "STRING_VALUE", + * // HooksRequestToken: "STRING_VALUE", * // Operation: "STRING_VALUE", * // OperationStatus: "STRING_VALUE", * // EventTime: new Date("TIMESTAMP"), @@ -59,6 +60,18 @@ export interface GetResourceRequestStatusCommandOutput extends GetResourceReques * // ErrorCode: "STRING_VALUE", * // RetryAfter: new Date("TIMESTAMP"), * // }, + * // HooksProgressEvent: [ // HooksProgressEvent + * // { // HookProgressEvent + * // HookTypeName: "STRING_VALUE", + * // HookTypeVersionId: "STRING_VALUE", + * // HookTypeArn: "STRING_VALUE", + * // InvocationPoint: "STRING_VALUE", + * // HookStatus: "STRING_VALUE", + * // HookEventTime: new Date("TIMESTAMP"), + * // HookStatusMessage: "STRING_VALUE", + * // FailureMode: "STRING_VALUE", + * // }, + * // ], * // }; * * ``` diff --git a/clients/client-cloudcontrol/src/commands/ListResourceRequestsCommand.ts b/clients/client-cloudcontrol/src/commands/ListResourceRequestsCommand.ts index 64bd74140c96b..0ae72be33e92b 100644 --- a/clients/client-cloudcontrol/src/commands/ListResourceRequestsCommand.ts +++ b/clients/client-cloudcontrol/src/commands/ListResourceRequestsCommand.ts @@ -64,6 +64,7 @@ export interface ListResourceRequestsCommandOutput extends ListResourceRequestsO * // TypeName: "STRING_VALUE", * // Identifier: "STRING_VALUE", * // RequestToken: "STRING_VALUE", + * // HooksRequestToken: "STRING_VALUE", * // Operation: "STRING_VALUE", * // OperationStatus: "STRING_VALUE", * // EventTime: new Date("TIMESTAMP"), diff --git a/clients/client-cloudcontrol/src/commands/UpdateResourceCommand.ts b/clients/client-cloudcontrol/src/commands/UpdateResourceCommand.ts index 7bbc5d5f2089a..d7ccef57f7231 100644 --- a/clients/client-cloudcontrol/src/commands/UpdateResourceCommand.ts +++ b/clients/client-cloudcontrol/src/commands/UpdateResourceCommand.ts @@ -66,6 +66,7 @@ export interface UpdateResourceCommandOutput extends UpdateResourceOutput, __Met * // TypeName: "STRING_VALUE", * // Identifier: "STRING_VALUE", * // RequestToken: "STRING_VALUE", + * // HooksRequestToken: "STRING_VALUE", * // Operation: "STRING_VALUE", * // OperationStatus: "STRING_VALUE", * // EventTime: new Date("TIMESTAMP"), diff --git a/clients/client-cloudcontrol/src/models/models_0.ts b/clients/client-cloudcontrol/src/models/models_0.ts index 358dde5807e9d..94b4a71e0ed3f 100644 --- a/clients/client-cloudcontrol/src/models/models_0.ts +++ b/clients/client-cloudcontrol/src/models/models_0.ts @@ -57,6 +57,7 @@ export const HandlerErrorCode = { SERVICE_LIMIT_EXCEEDED: "ServiceLimitExceeded", SERVICE_TIMEOUT: "ServiceTimeout", THROTTLING: "Throttling", + UNAUTHORIZED_TAGGING_OPERATION: "UnauthorizedTaggingOperation", } as const; /** @@ -128,6 +129,12 @@ export interface ProgressEvent { */ RequestToken?: string | undefined; + /** + *

The unique token representing the Hooks operation for the request.

+ * @public + */ + HooksRequestToken?: string | undefined; + /** *

The resource operation type.

* @public @@ -949,6 +956,95 @@ export interface GetResourceRequestStatusInput { RequestToken: string | undefined; } +/** + *

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 Managing resource operation requests with Amazon Web Services Cloud Control API + * .

+ * @public + */ +export interface HookProgressEvent { + /** + *

The type name of the Hook being invoked.

+ * @public + */ + HookTypeName?: string | undefined; + + /** + *

The type version of the Hook being invoked.

+ * @public + */ + HookTypeVersionId?: string | undefined; + + /** + *

The ARN of the Hook being invoked.

+ * @public + */ + HookTypeArn?: string | undefined; + + /** + *

States whether the Hook is invoked before or after resource provisioning.

+ * @public + */ + InvocationPoint?: string | undefined; + + /** + *

The status of the Hook invocation. The following are potential statuses:

+ * + * @public + */ + HookStatus?: string | undefined; + + /** + *

The time that the Hook invocation request initiated.

+ * @public + */ + HookEventTime?: Date | undefined; + + /** + *

The message explaining the current Hook status.

+ * @public + */ + HookStatusMessage?: string | undefined; + + /** + *

The failure mode of the invocation. The following are the potential statuses:

+ * + * @public + */ + FailureMode?: string | undefined; +} + /** * @public */ @@ -958,6 +1054,12 @@ export interface GetResourceRequestStatusOutput { * @public */ ProgressEvent?: ProgressEvent | undefined; + + /** + *

Lists Hook invocations for the specified target in the request. This is a list since the same target can invoke multiple Hooks.

+ * @public + */ + HooksProgressEvent?: HookProgressEvent[] | undefined; } /** diff --git a/clients/client-cloudcontrol/src/protocols/Aws_json1_0.ts b/clients/client-cloudcontrol/src/protocols/Aws_json1_0.ts index b304cc0e2eb85..5735b3a9f8dda 100644 --- a/clients/client-cloudcontrol/src/protocols/Aws_json1_0.ts +++ b/clients/client-cloudcontrol/src/protocols/Aws_json1_0.ts @@ -55,6 +55,7 @@ import { GetResourceRequestStatusOutput, HandlerFailureException, HandlerInternalFailureException, + HookProgressEvent, InvalidCredentialsException, InvalidRequestException, ListResourceRequestsInput, @@ -860,6 +861,7 @@ const de_DeleteResourceOutput = (output: any, context: __SerdeContext): DeleteRe */ const de_GetResourceRequestStatusOutput = (output: any, context: __SerdeContext): GetResourceRequestStatusOutput => { return take(output, { + HooksProgressEvent: (_: any) => de_HooksProgressEvent(_, context), ProgressEvent: (_: any) => de_ProgressEvent(_, context), }) as any; }; @@ -868,6 +870,34 @@ const de_GetResourceRequestStatusOutput = (output: any, context: __SerdeContext) // de_HandlerInternalFailureException omitted. +/** + * deserializeAws_json1_0HookProgressEvent + */ +const de_HookProgressEvent = (output: any, context: __SerdeContext): HookProgressEvent => { + return take(output, { + FailureMode: __expectString, + HookEventTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + HookStatus: __expectString, + HookStatusMessage: __expectString, + HookTypeArn: __expectString, + HookTypeName: __expectString, + HookTypeVersionId: __expectString, + InvocationPoint: __expectString, + }) as any; +}; + +/** + * deserializeAws_json1_0HooksProgressEvent + */ +const de_HooksProgressEvent = (output: any, context: __SerdeContext): HookProgressEvent[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_HookProgressEvent(entry, context); + }); + return retVal; +}; + // de_InvalidCredentialsException omitted. // de_InvalidRequestException omitted. @@ -899,6 +929,7 @@ const de_ProgressEvent = (output: any, context: __SerdeContext): ProgressEvent = return take(output, { ErrorCode: __expectString, EventTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + HooksRequestToken: __expectString, Identifier: __expectString, Operation: __expectString, OperationStatus: __expectString, diff --git a/codegen/sdk-codegen/aws-models/cloudcontrol.json b/codegen/sdk-codegen/aws-models/cloudcontrol.json index 93c03081140fd..426de7efd780c 100644 --- a/codegen/sdk-codegen/aws-models/cloudcontrol.json +++ b/codegen/sdk-codegen/aws-models/cloudcontrol.json @@ -1400,7 +1400,7 @@ "traits": { "smithy.api#length": { "min": 1, - "max": 1024 + "max": 2048 }, "smithy.api#pattern": "^.+$" } @@ -1607,6 +1607,12 @@ "traits": { "smithy.api#documentation": "

Represents the current status of the resource operation request.

" } + }, + "HooksProgressEvent": { + "target": "com.amazonaws.cloudcontrol#HooksProgressEvent", + "traits": { + "smithy.api#documentation": "

Lists Hook invocations for the specified target in the request. This is a list since the same target can invoke multiple Hooks.

" + } } } }, @@ -1626,6 +1632,10 @@ "value": "AccessDenied", "name": "ACCESS_DENIED" }, + { + "value": "UnauthorizedTaggingOperation", + "name": "UNAUTHORIZED_TAGGING_OPERATION" + }, { "value": "InvalidCredentials", "name": "INVALID_CREDENTIALS" @@ -1716,11 +1726,113 @@ "traits": { "smithy.api#length": { "min": 1, - "max": 2048 + "max": 4096 }, "smithy.api#pattern": "^.+$" } }, + "com.amazonaws.cloudcontrol#HookFailureMode": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^[-A-Za-z_]+$" + } + }, + "com.amazonaws.cloudcontrol#HookInvocationPoint": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^[-A-Za-z_]+$" + } + }, + "com.amazonaws.cloudcontrol#HookProgressEvent": { + "type": "structure", + "members": { + "HookTypeName": { + "target": "com.amazonaws.cloudcontrol#TypeName", + "traits": { + "smithy.api#documentation": "

The type name of the Hook being invoked.

" + } + }, + "HookTypeVersionId": { + "target": "com.amazonaws.cloudcontrol#TypeVersionId", + "traits": { + "smithy.api#documentation": "

The type version of the Hook being invoked.

" + } + }, + "HookTypeArn": { + "target": "com.amazonaws.cloudcontrol#HookTypeArn", + "traits": { + "smithy.api#documentation": "

The ARN of the Hook being invoked.

" + } + }, + "InvocationPoint": { + "target": "com.amazonaws.cloudcontrol#HookInvocationPoint", + "traits": { + "smithy.api#documentation": "

States whether the Hook is invoked before or after resource provisioning.

" + } + }, + "HookStatus": { + "target": "com.amazonaws.cloudcontrol#HookStatus", + "traits": { + "smithy.api#documentation": "

The status of the Hook invocation. The following are potential statuses:

\n " + } + }, + "HookEventTime": { + "target": "com.amazonaws.cloudcontrol#Timestamp", + "traits": { + "smithy.api#documentation": "

The time that the Hook invocation request initiated.

" + } + }, + "HookStatusMessage": { + "target": "com.amazonaws.cloudcontrol#StatusMessage", + "traits": { + "smithy.api#documentation": "

The message explaining the current Hook status.

" + } + }, + "FailureMode": { + "target": "com.amazonaws.cloudcontrol#HookFailureMode", + "traits": { + "smithy.api#documentation": "

The failure mode of the invocation. The following are the potential statuses:

\n " + } + } + }, + "traits": { + "smithy.api#documentation": "

Represents the current status of applicable Hooks for a resource operation request. It contains list of \n Hook invocation information for the resource specified in the request since the same target can invoke multiple Hooks. \n For more information, see Managing resource operation requests with Amazon Web Services Cloud Control API\n .

" + } + }, + "com.amazonaws.cloudcontrol#HookStatus": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^[-A-Za-z_]+$" + } + }, + "com.amazonaws.cloudcontrol#HookTypeArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^arn:aws.*:.+:.*:.*:.+$" + } + }, + "com.amazonaws.cloudcontrol#HooksProgressEvent": { + "type": "list", + "member": { + "target": "com.amazonaws.cloudcontrol#HookProgressEvent" + } + }, "com.amazonaws.cloudcontrol#Identifier": { "type": "string", "traits": { @@ -2100,9 +2212,10 @@ "com.amazonaws.cloudcontrol#PatchDocument": { "type": "string", "traits": { + "smithy.api#documentation": "Allow up to 256K length of Resource properties", "smithy.api#length": { "min": 1, - "max": 65536 + "max": 262144 }, "smithy.api#pattern": "^[\\s\\S]*$", "smithy.api#sensitive": {} @@ -2146,6 +2259,12 @@ "smithy.api#documentation": "

The unique token representing this resource operation request.

\n

Use the RequestToken with GetResourceRequestStatus to return the current status of a resource operation\n request.

" } }, + "HooksRequestToken": { + "target": "com.amazonaws.cloudcontrol#RequestToken", + "traits": { + "smithy.api#documentation": "

The unique token representing the Hooks operation for the request.

" + } + }, "Operation": { "target": "com.amazonaws.cloudcontrol#Operation", "traits": { @@ -2196,9 +2315,10 @@ "com.amazonaws.cloudcontrol#Properties": { "type": "string", "traits": { + "smithy.api#documentation": "Allow up to 256K length of Resource properties", "smithy.api#length": { "min": 1, - "max": 65536 + "max": 262144 }, "smithy.api#pattern": "^[\\s\\S]*$", "smithy.api#sensitive": {} @@ -2366,7 +2486,7 @@ "traits": { "smithy.api#length": { "min": 0, - "max": 1024 + "max": 2048 }, "smithy.api#pattern": "^[\\s\\S]*$" }