diff --git a/clients/client-migrationhuborchestrator/README.md b/clients/client-migrationhuborchestrator/README.md index 603e8bcfcdbe0..c9812993820a8 100644 --- a/clients/client-migrationhuborchestrator/README.md +++ b/clients/client-migrationhuborchestrator/README.md @@ -7,8 +7,8 @@ AWS SDK for JavaScript MigrationHubOrchestrator Client for Node.js, Browser and React Native.

This API reference provides descriptions, syntax, and other details about each of the -actions and data types for AWS Migration Hub Orchestrator. he topic for each action shows the API -request parameters and the response. Alternatively, you can use one of the AWS SDKs to +actions and data types for AWS Migration Hub Orchestrator. The topic for each action shows the API +request parameters and responses. Alternatively, you can use one of the AWS SDKs to access an API that is tailored to the programming language or platform that you're using.

@@ -207,6 +207,14 @@ see LICENSE for more information. ## Client Commands (Operations List) +
+ +CreateTemplate + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/migrationhuborchestrator/command/CreateTemplateCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-migrationhuborchestrator/Interface/CreateTemplateCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-migrationhuborchestrator/Interface/CreateTemplateCommandOutput/) + +
CreateWorkflow @@ -230,6 +238,14 @@ CreateWorkflowStepGroup [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/migrationhuborchestrator/command/CreateWorkflowStepGroupCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-migrationhuborchestrator/Interface/CreateWorkflowStepGroupCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-migrationhuborchestrator/Interface/CreateWorkflowStepGroupCommandOutput/) +
+
+ +DeleteTemplate + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/migrationhuborchestrator/command/DeleteTemplateCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-migrationhuborchestrator/Interface/DeleteTemplateCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-migrationhuborchestrator/Interface/DeleteTemplateCommandOutput/) +
@@ -406,6 +422,14 @@ UntagResource [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/migrationhuborchestrator/command/UntagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-migrationhuborchestrator/Interface/UntagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-migrationhuborchestrator/Interface/UntagResourceCommandOutput/) +
+
+ +UpdateTemplate + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/migrationhuborchestrator/command/UpdateTemplateCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-migrationhuborchestrator/Interface/UpdateTemplateCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-migrationhuborchestrator/Interface/UpdateTemplateCommandOutput/) +
diff --git a/clients/client-migrationhuborchestrator/package.json b/clients/client-migrationhuborchestrator/package.json index 6efbcb7bd094a..31e180c17efa0 100644 --- a/clients/client-migrationhuborchestrator/package.json +++ b/clients/client-migrationhuborchestrator/package.json @@ -57,12 +57,14 @@ "@smithy/util-middleware": "^2.1.3", "@smithy/util-retry": "^2.1.3", "@smithy/util-utf8": "^2.1.1", - "tslib": "^2.5.0" + "tslib": "^2.5.0", + "uuid": "^8.3.2" }, "devDependencies": { "@smithy/service-client-documentation-generator": "^2.1.1", "@tsconfig/node14": "1.0.3", "@types/node": "^14.14.31", + "@types/uuid": "^9.0.4", "concurrently": "7.0.0", "downlevel-dts": "0.10.1", "rimraf": "3.0.2", diff --git a/clients/client-migrationhuborchestrator/src/MigrationHubOrchestrator.ts b/clients/client-migrationhuborchestrator/src/MigrationHubOrchestrator.ts index fef738166e4a1..36616f89a2abc 100644 --- a/clients/client-migrationhuborchestrator/src/MigrationHubOrchestrator.ts +++ b/clients/client-migrationhuborchestrator/src/MigrationHubOrchestrator.ts @@ -2,6 +2,11 @@ import { createAggregatedClient } from "@smithy/smithy-client"; import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types"; +import { + CreateTemplateCommand, + CreateTemplateCommandInput, + CreateTemplateCommandOutput, +} from "./commands/CreateTemplateCommand"; import { CreateWorkflowCommand, CreateWorkflowCommandInput, @@ -17,6 +22,11 @@ import { CreateWorkflowStepGroupCommandInput, CreateWorkflowStepGroupCommandOutput, } from "./commands/CreateWorkflowStepGroupCommand"; +import { + DeleteTemplateCommand, + DeleteTemplateCommandInput, + DeleteTemplateCommandOutput, +} from "./commands/DeleteTemplateCommand"; import { DeleteWorkflowCommand, DeleteWorkflowCommandInput, @@ -111,6 +121,11 @@ import { UntagResourceCommandInput, UntagResourceCommandOutput, } from "./commands/UntagResourceCommand"; +import { + UpdateTemplateCommand, + UpdateTemplateCommandInput, + UpdateTemplateCommandOutput, +} from "./commands/UpdateTemplateCommand"; import { UpdateWorkflowCommand, UpdateWorkflowCommandInput, @@ -129,9 +144,11 @@ import { import { MigrationHubOrchestratorClient, MigrationHubOrchestratorClientConfig } from "./MigrationHubOrchestratorClient"; const commands = { + CreateTemplateCommand, CreateWorkflowCommand, CreateWorkflowStepCommand, CreateWorkflowStepGroupCommand, + DeleteTemplateCommand, DeleteWorkflowCommand, DeleteWorkflowStepCommand, DeleteWorkflowStepGroupCommand, @@ -154,12 +171,27 @@ const commands = { StopWorkflowCommand, TagResourceCommand, UntagResourceCommand, + UpdateTemplateCommand, UpdateWorkflowCommand, UpdateWorkflowStepCommand, UpdateWorkflowStepGroupCommand, }; export interface MigrationHubOrchestrator { + /** + * @see {@link CreateTemplateCommand} + */ + createTemplate( + args: CreateTemplateCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createTemplate(args: CreateTemplateCommandInput, cb: (err: any, data?: CreateTemplateCommandOutput) => void): void; + createTemplate( + args: CreateTemplateCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateTemplateCommandOutput) => void + ): void; + /** * @see {@link CreateWorkflowCommand} */ @@ -208,6 +240,20 @@ export interface MigrationHubOrchestrator { cb: (err: any, data?: CreateWorkflowStepGroupCommandOutput) => void ): void; + /** + * @see {@link DeleteTemplateCommand} + */ + deleteTemplate( + args: DeleteTemplateCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteTemplate(args: DeleteTemplateCommandInput, cb: (err: any, data?: DeleteTemplateCommandOutput) => void): void; + deleteTemplate( + args: DeleteTemplateCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteTemplateCommandOutput) => void + ): void; + /** * @see {@link DeleteWorkflowCommand} */ @@ -519,6 +565,20 @@ export interface MigrationHubOrchestrator { cb: (err: any, data?: UntagResourceCommandOutput) => void ): void; + /** + * @see {@link UpdateTemplateCommand} + */ + updateTemplate( + args: UpdateTemplateCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateTemplate(args: UpdateTemplateCommandInput, cb: (err: any, data?: UpdateTemplateCommandOutput) => void): void; + updateTemplate( + args: UpdateTemplateCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateTemplateCommandOutput) => void + ): void; + /** * @see {@link UpdateWorkflowCommand} */ @@ -571,8 +631,8 @@ export interface MigrationHubOrchestrator { /** * @public *

This API reference provides descriptions, syntax, and other details about each of the - * actions and data types for AWS Migration Hub Orchestrator. he topic for each action shows the API - * request parameters and the response. Alternatively, you can use one of the AWS SDKs to + * actions and data types for AWS Migration Hub Orchestrator. The topic for each action shows the API + * request parameters and responses. Alternatively, you can use one of the AWS SDKs to * access an API that is tailored to the programming language or platform that you're * using.

*/ diff --git a/clients/client-migrationhuborchestrator/src/MigrationHubOrchestratorClient.ts b/clients/client-migrationhuborchestrator/src/MigrationHubOrchestratorClient.ts index 64fc26d8b8c8e..9d08e415a8b66 100644 --- a/clients/client-migrationhuborchestrator/src/MigrationHubOrchestratorClient.ts +++ b/clients/client-migrationhuborchestrator/src/MigrationHubOrchestratorClient.ts @@ -53,12 +53,14 @@ import { HttpAuthSchemeResolvedConfig, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider"; +import { CreateTemplateCommandInput, CreateTemplateCommandOutput } from "./commands/CreateTemplateCommand"; import { CreateWorkflowCommandInput, CreateWorkflowCommandOutput } from "./commands/CreateWorkflowCommand"; import { CreateWorkflowStepCommandInput, CreateWorkflowStepCommandOutput } from "./commands/CreateWorkflowStepCommand"; import { CreateWorkflowStepGroupCommandInput, CreateWorkflowStepGroupCommandOutput, } from "./commands/CreateWorkflowStepGroupCommand"; +import { DeleteTemplateCommandInput, DeleteTemplateCommandOutput } from "./commands/DeleteTemplateCommand"; import { DeleteWorkflowCommandInput, DeleteWorkflowCommandOutput } from "./commands/DeleteWorkflowCommand"; import { DeleteWorkflowStepCommandInput, DeleteWorkflowStepCommandOutput } from "./commands/DeleteWorkflowStepCommand"; import { @@ -99,6 +101,7 @@ import { StartWorkflowCommandInput, StartWorkflowCommandOutput } from "./command import { StopWorkflowCommandInput, StopWorkflowCommandOutput } from "./commands/StopWorkflowCommand"; import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; +import { UpdateTemplateCommandInput, UpdateTemplateCommandOutput } from "./commands/UpdateTemplateCommand"; import { UpdateWorkflowCommandInput, UpdateWorkflowCommandOutput } from "./commands/UpdateWorkflowCommand"; import { UpdateWorkflowStepCommandInput, UpdateWorkflowStepCommandOutput } from "./commands/UpdateWorkflowStepCommand"; import { @@ -120,9 +123,11 @@ export { __Client }; * @public */ export type ServiceInputTypes = + | CreateTemplateCommandInput | CreateWorkflowCommandInput | CreateWorkflowStepCommandInput | CreateWorkflowStepGroupCommandInput + | DeleteTemplateCommandInput | DeleteWorkflowCommandInput | DeleteWorkflowStepCommandInput | DeleteWorkflowStepGroupCommandInput @@ -145,6 +150,7 @@ export type ServiceInputTypes = | StopWorkflowCommandInput | TagResourceCommandInput | UntagResourceCommandInput + | UpdateTemplateCommandInput | UpdateWorkflowCommandInput | UpdateWorkflowStepCommandInput | UpdateWorkflowStepGroupCommandInput; @@ -153,9 +159,11 @@ export type ServiceInputTypes = * @public */ export type ServiceOutputTypes = + | CreateTemplateCommandOutput | CreateWorkflowCommandOutput | CreateWorkflowStepCommandOutput | CreateWorkflowStepGroupCommandOutput + | DeleteTemplateCommandOutput | DeleteWorkflowCommandOutput | DeleteWorkflowStepCommandOutput | DeleteWorkflowStepGroupCommandOutput @@ -178,6 +186,7 @@ export type ServiceOutputTypes = | StopWorkflowCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput + | UpdateTemplateCommandOutput | UpdateWorkflowCommandOutput | UpdateWorkflowStepCommandOutput | UpdateWorkflowStepGroupCommandOutput; @@ -357,8 +366,8 @@ export interface MigrationHubOrchestratorClientResolvedConfig /** * @public *

This API reference provides descriptions, syntax, and other details about each of the - * actions and data types for AWS Migration Hub Orchestrator. he topic for each action shows the API - * request parameters and the response. Alternatively, you can use one of the AWS SDKs to + * actions and data types for AWS Migration Hub Orchestrator. The topic for each action shows the API + * request parameters and responses. Alternatively, you can use one of the AWS SDKs to * access an API that is tailored to the programming language or platform that you're * using.

*/ diff --git a/clients/client-migrationhuborchestrator/src/commands/CreateTemplateCommand.ts b/clients/client-migrationhuborchestrator/src/commands/CreateTemplateCommand.ts new file mode 100644 index 0000000000000..63aa486f40dcc --- /dev/null +++ b/clients/client-migrationhuborchestrator/src/commands/CreateTemplateCommand.ts @@ -0,0 +1,113 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { + MigrationHubOrchestratorClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MigrationHubOrchestratorClient"; +import { CreateTemplateRequest, CreateTemplateResponse } from "../models/models_0"; +import { de_CreateTemplateCommand, se_CreateTemplateCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateTemplateCommand}. + */ +export interface CreateTemplateCommandInput extends CreateTemplateRequest {} +/** + * @public + * + * The output of {@link CreateTemplateCommand}. + */ +export interface CreateTemplateCommandOutput extends CreateTemplateResponse, __MetadataBearer {} + +/** + * @public + *

Creates a migration workflow template.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MigrationHubOrchestratorClient, CreateTemplateCommand } from "@aws-sdk/client-migrationhuborchestrator"; // ES Modules import + * // const { MigrationHubOrchestratorClient, CreateTemplateCommand } = require("@aws-sdk/client-migrationhuborchestrator"); // CommonJS import + * const client = new MigrationHubOrchestratorClient(config); + * const input = { // CreateTemplateRequest + * templateName: "STRING_VALUE", // required + * templateDescription: "STRING_VALUE", + * templateSource: { // TemplateSource Union: only one key present + * workflowId: "STRING_VALUE", + * }, + * clientToken: "STRING_VALUE", + * tags: { // TagMap + * "": "STRING_VALUE", + * }, + * }; + * const command = new CreateTemplateCommand(input); + * const response = await client.send(command); + * // { // CreateTemplateResponse + * // templateId: "STRING_VALUE", + * // templateArn: "STRING_VALUE", + * // tags: { // StringMap + * // "": "STRING_VALUE", + * // }, + * // }; + * + * ``` + * + * @param CreateTemplateCommandInput - {@link CreateTemplateCommandInput} + * @returns {@link CreateTemplateCommandOutput} + * @see {@link CreateTemplateCommandInput} for command's `input` shape. + * @see {@link CreateTemplateCommandOutput} for command's `response` shape. + * @see {@link MigrationHubOrchestratorClientResolvedConfig | config} for MigrationHubOrchestratorClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ConflictException} (client fault) + *

This exception is thrown when an attempt to update or delete + * a resource would cause an inconsistent state.

+ * + * @throws {@link InternalServerException} (server fault) + *

An internal error has occurred.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to request throttling.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by an AWS service.

+ * + * @throws {@link MigrationHubOrchestratorServiceException} + *

Base exception class for all service exceptions from MigrationHubOrchestrator service.

+ * + */ +export class CreateTemplateCommand extends $Command + .classBuilder< + CreateTemplateCommandInput, + CreateTemplateCommandOutput, + MigrationHubOrchestratorClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: MigrationHubOrchestratorClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSMigrationHubOrchestrator", "CreateTemplate", {}) + .n("MigrationHubOrchestratorClient", "CreateTemplateCommand") + .f(void 0, void 0) + .ser(se_CreateTemplateCommand) + .de(de_CreateTemplateCommand) + .build() {} diff --git a/clients/client-migrationhuborchestrator/src/commands/CreateWorkflowCommand.ts b/clients/client-migrationhuborchestrator/src/commands/CreateWorkflowCommand.ts index 93b77d4b2b237..cd5fa50610305 100644 --- a/clients/client-migrationhuborchestrator/src/commands/CreateWorkflowCommand.ts +++ b/clients/client-migrationhuborchestrator/src/commands/CreateWorkflowCommand.ts @@ -48,7 +48,7 @@ export interface CreateWorkflowCommandOutput extends CreateMigrationWorkflowResp * name: "STRING_VALUE", // required * description: "STRING_VALUE", * templateId: "STRING_VALUE", // required - * applicationConfigurationId: "STRING_VALUE", // required + * applicationConfigurationId: "STRING_VALUE", * inputParameters: { // StepInputParameters // required * "": { // StepInput Union: only one key present * integerValue: Number("int"), diff --git a/clients/client-migrationhuborchestrator/src/commands/CreateWorkflowStepCommand.ts b/clients/client-migrationhuborchestrator/src/commands/CreateWorkflowStepCommand.ts index e8cbccc394ca0..a654c703b5d3b 100644 --- a/clients/client-migrationhuborchestrator/src/commands/CreateWorkflowStepCommand.ts +++ b/clients/client-migrationhuborchestrator/src/commands/CreateWorkflowStepCommand.ts @@ -69,7 +69,7 @@ export interface CreateWorkflowStepCommandOutput extends CreateWorkflowStepRespo * value: { // WorkflowStepOutputUnion Union: only one key present * integerValue: Number("int"), * stringValue: "STRING_VALUE", - * listOfStringValue: [ + * listOfStringValue: [ // MaxStringList * "STRING_VALUE", * ], * }, diff --git a/clients/client-migrationhuborchestrator/src/commands/DeleteTemplateCommand.ts b/clients/client-migrationhuborchestrator/src/commands/DeleteTemplateCommand.ts new file mode 100644 index 0000000000000..63d1648a37468 --- /dev/null +++ b/clients/client-migrationhuborchestrator/src/commands/DeleteTemplateCommand.ts @@ -0,0 +1,98 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { + MigrationHubOrchestratorClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MigrationHubOrchestratorClient"; +import { DeleteTemplateRequest, DeleteTemplateResponse } from "../models/models_0"; +import { de_DeleteTemplateCommand, se_DeleteTemplateCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteTemplateCommand}. + */ +export interface DeleteTemplateCommandInput extends DeleteTemplateRequest {} +/** + * @public + * + * The output of {@link DeleteTemplateCommand}. + */ +export interface DeleteTemplateCommandOutput extends DeleteTemplateResponse, __MetadataBearer {} + +/** + * @public + *

Deletes a migration workflow template.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MigrationHubOrchestratorClient, DeleteTemplateCommand } from "@aws-sdk/client-migrationhuborchestrator"; // ES Modules import + * // const { MigrationHubOrchestratorClient, DeleteTemplateCommand } = require("@aws-sdk/client-migrationhuborchestrator"); // CommonJS import + * const client = new MigrationHubOrchestratorClient(config); + * const input = { // DeleteTemplateRequest + * id: "STRING_VALUE", // required + * }; + * const command = new DeleteTemplateCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteTemplateCommandInput - {@link DeleteTemplateCommandInput} + * @returns {@link DeleteTemplateCommandOutput} + * @see {@link DeleteTemplateCommandInput} for command's `input` shape. + * @see {@link DeleteTemplateCommandOutput} for command's `response` shape. + * @see {@link MigrationHubOrchestratorClientResolvedConfig | config} for MigrationHubOrchestratorClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link InternalServerException} (server fault) + *

An internal error has occurred.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource is not available.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to request throttling.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by an AWS service.

+ * + * @throws {@link MigrationHubOrchestratorServiceException} + *

Base exception class for all service exceptions from MigrationHubOrchestrator service.

+ * + */ +export class DeleteTemplateCommand extends $Command + .classBuilder< + DeleteTemplateCommandInput, + DeleteTemplateCommandOutput, + MigrationHubOrchestratorClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: MigrationHubOrchestratorClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSMigrationHubOrchestrator", "DeleteTemplate", {}) + .n("MigrationHubOrchestratorClient", "DeleteTemplateCommand") + .f(void 0, void 0) + .ser(se_DeleteTemplateCommand) + .de(de_DeleteTemplateCommand) + .build() {} diff --git a/clients/client-migrationhuborchestrator/src/commands/GetTemplateCommand.ts b/clients/client-migrationhuborchestrator/src/commands/GetTemplateCommand.ts index 2f3a0876cf272..59eb6f9e1516f 100644 --- a/clients/client-migrationhuborchestrator/src/commands/GetTemplateCommand.ts +++ b/clients/client-migrationhuborchestrator/src/commands/GetTemplateCommand.ts @@ -46,6 +46,7 @@ export interface GetTemplateCommandOutput extends GetMigrationWorkflowTemplateRe * const response = await client.send(command); * // { // GetMigrationWorkflowTemplateResponse * // id: "STRING_VALUE", + * // templateArn: "STRING_VALUE", * // name: "STRING_VALUE", * // description: "STRING_VALUE", * // inputs: [ // TemplateInputList @@ -61,8 +62,14 @@ export interface GetTemplateCommandOutput extends GetMigrationWorkflowTemplateRe * // url: "STRING_VALUE", * // }, * // ], - * // status: "STRING_VALUE", * // creationTime: new Date("TIMESTAMP"), + * // owner: "STRING_VALUE", + * // status: "STRING_VALUE", + * // statusMessage: "STRING_VALUE", + * // templateClass: "STRING_VALUE", + * // tags: { // StringMap + * // "": "STRING_VALUE", + * // }, * // }; * * ``` diff --git a/clients/client-migrationhuborchestrator/src/commands/GetWorkflowStepCommand.ts b/clients/client-migrationhuborchestrator/src/commands/GetWorkflowStepCommand.ts index 9cbd1b037e714..e4181f5ce1e42 100644 --- a/clients/client-migrationhuborchestrator/src/commands/GetWorkflowStepCommand.ts +++ b/clients/client-migrationhuborchestrator/src/commands/GetWorkflowStepCommand.ts @@ -78,7 +78,7 @@ export interface GetWorkflowStepCommandOutput extends GetWorkflowStepResponse, _ * // value: { // WorkflowStepOutputUnion Union: only one key present * // integerValue: Number("int"), * // stringValue: "STRING_VALUE", - * // listOfStringValue: [ + * // listOfStringValue: [ // MaxStringList * // "STRING_VALUE", * // ], * // }, diff --git a/clients/client-migrationhuborchestrator/src/commands/UpdateTemplateCommand.ts b/clients/client-migrationhuborchestrator/src/commands/UpdateTemplateCommand.ts new file mode 100644 index 0000000000000..a0d4e6c20ad55 --- /dev/null +++ b/clients/client-migrationhuborchestrator/src/commands/UpdateTemplateCommand.ts @@ -0,0 +1,107 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { + MigrationHubOrchestratorClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MigrationHubOrchestratorClient"; +import { UpdateTemplateRequest, UpdateTemplateResponse } from "../models/models_0"; +import { de_UpdateTemplateCommand, se_UpdateTemplateCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UpdateTemplateCommand}. + */ +export interface UpdateTemplateCommandInput extends UpdateTemplateRequest {} +/** + * @public + * + * The output of {@link UpdateTemplateCommand}. + */ +export interface UpdateTemplateCommandOutput extends UpdateTemplateResponse, __MetadataBearer {} + +/** + * @public + *

Updates a migration workflow template.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MigrationHubOrchestratorClient, UpdateTemplateCommand } from "@aws-sdk/client-migrationhuborchestrator"; // ES Modules import + * // const { MigrationHubOrchestratorClient, UpdateTemplateCommand } = require("@aws-sdk/client-migrationhuborchestrator"); // CommonJS import + * const client = new MigrationHubOrchestratorClient(config); + * const input = { // UpdateTemplateRequest + * id: "STRING_VALUE", // required + * templateName: "STRING_VALUE", + * templateDescription: "STRING_VALUE", + * clientToken: "STRING_VALUE", + * }; + * const command = new UpdateTemplateCommand(input); + * const response = await client.send(command); + * // { // UpdateTemplateResponse + * // templateId: "STRING_VALUE", + * // templateArn: "STRING_VALUE", + * // tags: { // StringMap + * // "": "STRING_VALUE", + * // }, + * // }; + * + * ``` + * + * @param UpdateTemplateCommandInput - {@link UpdateTemplateCommandInput} + * @returns {@link UpdateTemplateCommandOutput} + * @see {@link UpdateTemplateCommandInput} for command's `input` shape. + * @see {@link UpdateTemplateCommandOutput} for command's `response` shape. + * @see {@link MigrationHubOrchestratorClientResolvedConfig | config} for MigrationHubOrchestratorClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link InternalServerException} (server fault) + *

An internal error has occurred.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource is not available.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to request throttling.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by an AWS service.

+ * + * @throws {@link MigrationHubOrchestratorServiceException} + *

Base exception class for all service exceptions from MigrationHubOrchestrator service.

+ * + */ +export class UpdateTemplateCommand extends $Command + .classBuilder< + UpdateTemplateCommandInput, + UpdateTemplateCommandOutput, + MigrationHubOrchestratorClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: MigrationHubOrchestratorClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSMigrationHubOrchestrator", "UpdateTemplate", {}) + .n("MigrationHubOrchestratorClient", "UpdateTemplateCommand") + .f(void 0, void 0) + .ser(se_UpdateTemplateCommand) + .de(de_UpdateTemplateCommand) + .build() {} diff --git a/clients/client-migrationhuborchestrator/src/commands/UpdateWorkflowStepCommand.ts b/clients/client-migrationhuborchestrator/src/commands/UpdateWorkflowStepCommand.ts index 366c352cdda19..88fd6d347796b 100644 --- a/clients/client-migrationhuborchestrator/src/commands/UpdateWorkflowStepCommand.ts +++ b/clients/client-migrationhuborchestrator/src/commands/UpdateWorkflowStepCommand.ts @@ -70,7 +70,7 @@ export interface UpdateWorkflowStepCommandOutput extends UpdateWorkflowStepRespo * value: { // WorkflowStepOutputUnion Union: only one key present * integerValue: Number("int"), * stringValue: "STRING_VALUE", - * listOfStringValue: [ + * listOfStringValue: [ // MaxStringList * "STRING_VALUE", * ], * }, diff --git a/clients/client-migrationhuborchestrator/src/commands/index.ts b/clients/client-migrationhuborchestrator/src/commands/index.ts index 1511ec49b5504..be9e7ce8e00b9 100644 --- a/clients/client-migrationhuborchestrator/src/commands/index.ts +++ b/clients/client-migrationhuborchestrator/src/commands/index.ts @@ -1,7 +1,9 @@ // smithy-typescript generated code +export * from "./CreateTemplateCommand"; export * from "./CreateWorkflowCommand"; export * from "./CreateWorkflowStepCommand"; export * from "./CreateWorkflowStepGroupCommand"; +export * from "./DeleteTemplateCommand"; export * from "./DeleteWorkflowCommand"; export * from "./DeleteWorkflowStepCommand"; export * from "./DeleteWorkflowStepGroupCommand"; @@ -24,6 +26,7 @@ export * from "./StartWorkflowCommand"; export * from "./StopWorkflowCommand"; export * from "./TagResourceCommand"; export * from "./UntagResourceCommand"; +export * from "./UpdateTemplateCommand"; export * from "./UpdateWorkflowCommand"; export * from "./UpdateWorkflowStepCommand"; export * from "./UpdateWorkflowStepGroupCommand"; diff --git a/clients/client-migrationhuborchestrator/src/index.ts b/clients/client-migrationhuborchestrator/src/index.ts index 1a1c1eba045ff..1f4aecb680a2e 100644 --- a/clients/client-migrationhuborchestrator/src/index.ts +++ b/clients/client-migrationhuborchestrator/src/index.ts @@ -2,8 +2,8 @@ /* eslint-disable */ /** *

This API reference provides descriptions, syntax, and other details about each of the - * actions and data types for AWS Migration Hub Orchestrator. he topic for each action shows the API - * request parameters and the response. Alternatively, you can use one of the AWS SDKs to + * actions and data types for AWS Migration Hub Orchestrator. The topic for each action shows the API + * request parameters and responses. Alternatively, you can use one of the AWS SDKs to * access an API that is tailored to the programming language or platform that you're * using.

* diff --git a/clients/client-migrationhuborchestrator/src/models/models_0.ts b/clients/client-migrationhuborchestrator/src/models/models_0.ts index 58db1512a193f..edd8d5ce09a2d 100644 --- a/clients/client-migrationhuborchestrator/src/models/models_0.ts +++ b/clients/client-migrationhuborchestrator/src/models/models_0.ts @@ -205,7 +205,7 @@ export interface CreateMigrationWorkflowRequest { * @public *

The configuration ID of the application configured in Application Discovery Service.

*/ - applicationConfigurationId: string | undefined; + applicationConfigurationId?: string; /** * @public @@ -880,6 +880,145 @@ export interface UpdateMigrationWorkflowResponse { tags?: Record; } +/** + * @public + *

This exception is thrown when an attempt to update or delete + * a resource would cause an inconsistent state.

+ */ +export class ConflictException extends __BaseException { + readonly name: "ConflictException" = "ConflictException"; + readonly $fault: "client" = "client"; + $retryable = {}; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ConflictException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ConflictException.prototype); + } +} + +/** + * @public + *

The migration workflow template used as the source for the new template.

+ */ +export type TemplateSource = TemplateSource.WorkflowIdMember | TemplateSource.$UnknownMember; + +/** + * @public + */ +export namespace TemplateSource { + /** + * @public + *

The ID of the workflow from the source migration workflow template.

+ */ + export interface WorkflowIdMember { + workflowId: string; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + workflowId?: never; + $unknown: [string, any]; + } + + export interface Visitor { + workflowId: (value: string) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: TemplateSource, visitor: Visitor): T => { + if (value.workflowId !== undefined) return visitor.workflowId(value.workflowId); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + */ +export interface CreateTemplateRequest { + /** + * @public + *

The name of the migration workflow template.

+ */ + templateName: string | undefined; + + /** + * @public + *

A description of the migration workflow template.

+ */ + templateDescription?: string; + + /** + * @public + *

The source of the migration workflow template.

+ */ + templateSource: TemplateSource | undefined; + + /** + * @public + *

A unique, case-sensitive identifier that you provide to ensure the idempotency of the + * request. For more information, see Idempotency in the Smithy documentation.

+ */ + clientToken?: string; + + /** + * @public + *

The tags to add to the migration workflow template.

+ */ + tags?: Record; +} + +/** + * @public + */ +export interface CreateTemplateResponse { + /** + * @public + *

The ID of the migration workflow template.

+ */ + templateId?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of the migration workflow template. The format for an + * Migration Hub Orchestrator template ARN is + * arn:aws:migrationhub-orchestrator:region:account:template/template-abcd1234. + * For more information about ARNs, see Amazon Resource Names (ARNs) + * in the AWS General Reference.

+ */ + templateArn?: string; + + /** + * @public + *

The tags added to the migration workflow template.

+ */ + tags?: Record; +} + +/** + * @public + */ +export interface DeleteTemplateRequest { + /** + * @public + *

The ID of the request to delete a migration workflow template.

+ */ + id: string | undefined; +} + +/** + * @public + */ +export interface DeleteTemplateResponse {} + /** * @public */ @@ -937,6 +1076,10 @@ export interface TemplateInput { */ export const TemplateStatus = { CREATED: "CREATED", + CREATING: "CREATING", + CREATION_FAILED: "CREATION_FAILED", + PENDING_CREATION: "PENDING_CREATION", + READY: "READY", } as const; /** @@ -954,6 +1097,16 @@ export interface GetMigrationWorkflowTemplateResponse { */ id?: string; + /** + * @public + *

>The Amazon Resource Name (ARN) of the migration workflow template. The format for an + * Migration Hub Orchestrator template ARN is + * arn:aws:migrationhub-orchestrator:region:account:template/template-abcd1234. + * For more information about ARNs, see Amazon Resource Names (ARNs) + * in the AWS General Reference.

+ */ + templateArn?: string; + /** * @public *

The name of the template.

@@ -978,6 +1131,18 @@ export interface GetMigrationWorkflowTemplateResponse { */ tools?: Tool[]; + /** + * @public + *

The time at which the template was last created.

+ */ + creationTime?: Date; + + /** + * @public + *

The owner of the migration workflow template.

+ */ + owner?: string; + /** * @public *

The status of the template.

@@ -986,9 +1151,42 @@ export interface GetMigrationWorkflowTemplateResponse { /** * @public - *

The time at which the template was last created.

+ *

The status message of retrieving migration workflow templates.

*/ - creationTime?: Date; + statusMessage?: string; + + /** + * @public + *

The class of the migration workflow template. The available template classes + * are:

+ *
    + *
  • + *

    A2C

    + *
  • + *
  • + *

    MGN

    + *
  • + *
  • + *

    SAP_MULTI

    + *
  • + *
  • + *

    SQL_EC2

    + *
  • + *
  • + *

    SQL_RDS

    + *
  • + *
  • + *

    VMIE

    + *
  • + *
+ */ + templateClass?: string; + + /** + * @public + *

The tags added to the migration workflow template.

+ */ + tags?: Record; } /** @@ -1061,6 +1259,63 @@ export interface ListMigrationWorkflowTemplatesResponse { templateSummary: TemplateSummary[] | undefined; } +/** + * @public + */ +export interface UpdateTemplateRequest { + /** + * @public + *

The ID of the request to update a migration workflow template.

+ */ + id: string | undefined; + + /** + * @public + *

The name of the migration workflow template to update.

+ */ + templateName?: string; + + /** + * @public + *

The description of the migration workflow template to update.

+ */ + templateDescription?: string; + + /** + * @public + *

A unique, case-sensitive identifier that you provide to ensure the + * idempotency of the request.

+ */ + clientToken?: string; +} + +/** + * @public + */ +export interface UpdateTemplateResponse { + /** + * @public + *

The ID of the migration workflow template being updated.

+ */ + templateId?: string; + + /** + * @public + *

The ARN of the migration workflow template being updated. The format for an Migration Hub Orchestrator + * template ARN is + * arn:aws:migrationhub-orchestrator:region:account:template/template-abcd1234. + * For more information about ARNs, see Amazon Resource Names (ARNs) + * in the AWS General Reference.

+ */ + templateArn?: string; + + /** + * @public + *

The tags added to the migration workflow template.

+ */ + tags?: Record; +} + /** * @public */ @@ -1997,7 +2252,7 @@ export interface GetWorkflowStepRequest { /** * @public - *

desThe ID of the step group.

+ *

The ID of the step group.

*/ stepGroupId: string | undefined; @@ -2019,6 +2274,7 @@ export const StepStatus = { IN_PROGRESS: "IN_PROGRESS", PAUSED: "PAUSED", READY: "READY", + SKIPPED: "SKIPPED", USER_ATTENTION_REQUIRED: "USER_ATTENTION_REQUIRED", } as const; diff --git a/clients/client-migrationhuborchestrator/src/protocols/Aws_restJson1.ts b/clients/client-migrationhuborchestrator/src/protocols/Aws_restJson1.ts index a4fbbaea8f2ec..21708d34e4640 100644 --- a/clients/client-migrationhuborchestrator/src/protocols/Aws_restJson1.ts +++ b/clients/client-migrationhuborchestrator/src/protocols/Aws_restJson1.ts @@ -22,13 +22,16 @@ import { ResponseMetadata as __ResponseMetadata, SerdeContext as __SerdeContext, } from "@smithy/types"; +import { v4 as generateIdempotencyToken } from "uuid"; +import { CreateTemplateCommandInput, CreateTemplateCommandOutput } from "../commands/CreateTemplateCommand"; import { CreateWorkflowCommandInput, CreateWorkflowCommandOutput } from "../commands/CreateWorkflowCommand"; import { CreateWorkflowStepCommandInput, CreateWorkflowStepCommandOutput } from "../commands/CreateWorkflowStepCommand"; import { CreateWorkflowStepGroupCommandInput, CreateWorkflowStepGroupCommandOutput, } from "../commands/CreateWorkflowStepGroupCommand"; +import { DeleteTemplateCommandInput, DeleteTemplateCommandOutput } from "../commands/DeleteTemplateCommand"; import { DeleteWorkflowCommandInput, DeleteWorkflowCommandOutput } from "../commands/DeleteWorkflowCommand"; import { DeleteWorkflowStepCommandInput, DeleteWorkflowStepCommandOutput } from "../commands/DeleteWorkflowStepCommand"; import { @@ -69,6 +72,7 @@ import { StartWorkflowCommandInput, StartWorkflowCommandOutput } from "../comman import { StopWorkflowCommandInput, StopWorkflowCommandOutput } from "../commands/StopWorkflowCommand"; import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; +import { UpdateTemplateCommandInput, UpdateTemplateCommandOutput } from "../commands/UpdateTemplateCommand"; import { UpdateWorkflowCommandInput, UpdateWorkflowCommandOutput } from "../commands/UpdateWorkflowCommand"; import { UpdateWorkflowStepCommandInput, UpdateWorkflowStepCommandOutput } from "../commands/UpdateWorkflowStepCommand"; import { @@ -78,12 +82,14 @@ import { import { MigrationHubOrchestratorServiceException as __BaseException } from "../models/MigrationHubOrchestratorServiceException"; import { AccessDeniedException, + ConflictException, InternalServerException, MigrationWorkflowSummary, PlatformCommand, PlatformScriptKey, ResourceNotFoundException, StepInput, + TemplateSource, ThrottlingException, ValidationException, WorkflowStepAutomationConfiguration, @@ -91,6 +97,32 @@ import { WorkflowStepOutputUnion, } from "../models/models_0"; +/** + * serializeAws_restJson1CreateTemplateCommand + */ +export const se_CreateTemplateCommand = async ( + input: CreateTemplateCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/template"); + let body: any; + body = JSON.stringify( + take(input, { + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + tags: (_) => _json(_), + templateDescription: [], + templateName: [], + templateSource: (_) => _json(_), + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1CreateWorkflowCommand */ @@ -176,6 +208,22 @@ export const se_CreateWorkflowStepGroupCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1DeleteTemplateCommand + */ +export const se_DeleteTemplateCommand = async ( + input: DeleteTemplateCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/template/{id}"); + b.p("id", () => input.id!, "{id}", false); + let body: any; + b.m("DELETE").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1DeleteWorkflowCommand */ @@ -596,6 +644,31 @@ export const se_UntagResourceCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1UpdateTemplateCommand + */ +export const se_UpdateTemplateCommand = async ( + input: UpdateTemplateCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/template/{id}"); + b.p("id", () => input.id!, "{id}", false); + let body: any; + body = JSON.stringify( + take(input, { + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + templateDescription: [], + templateName: [], + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1UpdateWorkflowCommand */ @@ -684,6 +757,29 @@ export const se_UpdateWorkflowStepGroupCommand = async ( return b.build(); }; +/** + * deserializeAws_restJson1CreateTemplateCommand + */ +export const de_CreateTemplateCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + tags: _json, + templateArn: __expectString, + templateId: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserializeAws_restJson1CreateWorkflowCommand */ @@ -767,6 +863,23 @@ export const de_CreateWorkflowStepGroupCommand = async ( return contents; }; +/** + * deserializeAws_restJson1DeleteTemplateCommand + */ +export const de_DeleteTemplateCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + /** * deserializeAws_restJson1DeleteWorkflowCommand */ @@ -844,7 +957,12 @@ export const de_GetTemplateCommand = async ( id: __expectString, inputs: _json, name: __expectString, + owner: __expectString, status: __expectString, + statusMessage: __expectString, + tags: _json, + templateArn: __expectString, + templateClass: __expectString, tools: _json, }); Object.assign(contents, doc); @@ -1308,6 +1426,29 @@ export const de_UntagResourceCommand = async ( return contents; }; +/** + * deserializeAws_restJson1UpdateTemplateCommand + */ +export const de_UpdateTemplateCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + tags: _json, + templateArn: __expectString, + templateId: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserializeAws_restJson1UpdateWorkflowCommand */ @@ -1405,6 +1546,9 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): case "AccessDeniedException": case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.migrationhuborchestrator#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); case "InternalServerException": case "com.amazonaws.migrationhuborchestrator#InternalServerException": throw await de_InternalServerExceptionRes(parsedOutput, context); @@ -1448,6 +1592,23 @@ const de_AccessDeniedExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; +/** + * deserializeAws_restJson1ConflictExceptionRes + */ +const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new ConflictException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + /** * deserializeAws_restJson1InternalServerExceptionRes */ @@ -1522,6 +1683,8 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; +// se_MaxStringList omitted. + // se_PlatformCommand omitted. // se_PlatformScriptKey omitted. @@ -1536,6 +1699,8 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont // se_TagMap omitted. +// se_TemplateSource omitted. + // se_WorkflowStepAutomationConfiguration omitted. // se_WorkflowStepOutput omitted. @@ -1544,6 +1709,8 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont // se_WorkflowStepOutputUnion omitted. +// de_MaxStringList omitted. + /** * deserializeAws_restJson1MigrationWorkflowSummary */ diff --git a/codegen/sdk-codegen/aws-models/migrationhuborchestrator.json b/codegen/sdk-codegen/aws-models/migrationhuborchestrator.json index e76b7535ef869..07db3cde029a1 100644 --- a/codegen/sdk-codegen/aws-models/migrationhuborchestrator.json +++ b/codegen/sdk-codegen/aws-models/migrationhuborchestrator.json @@ -76,7 +76,7 @@ "date" ] }, - "smithy.api#documentation": "

This API reference provides descriptions, syntax, and other details about each of the\n actions and data types for AWS Migration Hub Orchestrator. he topic for each action shows the API\n request parameters and the response. Alternatively, you can use one of the AWS SDKs to\n access an API that is tailored to the programming language or platform that you're\n using.

", + "smithy.api#documentation": "

This API reference provides descriptions, syntax, and other details about each of the\n actions and data types for AWS Migration Hub Orchestrator. The topic for each action shows the API\n request parameters and responses. Alternatively, you can use one of the AWS SDKs to\n access an API that is tailored to the programming language or platform that you're\n using.

", "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -776,6 +776,33 @@ "smithy.api#pattern": "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$" } }, + "com.amazonaws.migrationhuborchestrator#ClientToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^[-a-zA-Z0-9]*$" + } + }, + "com.amazonaws.migrationhuborchestrator#ConflictException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

This exception is thrown when an attempt to update or delete\n a resource would cause an inconsistent state.

", + "smithy.api#error": "client", + "smithy.api#httpError": 409, + "smithy.api#retryable": {} + } + }, "com.amazonaws.migrationhuborchestrator#CreateMigrationWorkflowRequest": { "type": "structure", "members": { @@ -819,11 +846,10 @@ "traits": { "smithy.api#documentation": "

The configuration ID of the application configured in Application Discovery Service.

", "smithy.api#length": { - "min": 1, + "min": 0, "max": 100 }, - "smithy.api#pattern": "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$", - "smithy.api#required": {} + "smithy.api#pattern": "^[-a-zA-Z0-9_.+]*$" } }, "inputParameters": { @@ -918,6 +944,117 @@ } } }, + "com.amazonaws.migrationhuborchestrator#CreateTemplate": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhuborchestrator#CreateTemplateRequest" + }, + "output": { + "target": "com.amazonaws.migrationhuborchestrator#CreateTemplateResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhuborchestrator#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhuborchestrator#ConflictException" + }, + { + "target": "com.amazonaws.migrationhuborchestrator#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhuborchestrator#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhuborchestrator#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a migration workflow template.

", + "smithy.api#http": { + "method": "POST", + "uri": "/template", + "code": 200 + } + } + }, + "com.amazonaws.migrationhuborchestrator#CreateTemplateRequest": { + "type": "structure", + "members": { + "templateName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the migration workflow template.

", + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^[ a-zA-Z0-9]*$", + "smithy.api#required": {} + } + }, + "templateDescription": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

A description of the migration workflow template.

", + "smithy.api#length": { + "min": 0, + "max": 250 + }, + "smithy.api#pattern": "^.*$" + } + }, + "templateSource": { + "target": "com.amazonaws.migrationhuborchestrator#TemplateSource", + "traits": { + "smithy.api#documentation": "

The source of the migration workflow template.

", + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.migrationhuborchestrator#ClientToken", + "traits": { + "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. For more information, see Idempotency in the Smithy documentation.

", + "smithy.api#idempotencyToken": {} + } + }, + "tags": { + "target": "com.amazonaws.migrationhuborchestrator#TagMap", + "traits": { + "smithy.api#documentation": "

The tags to add to the migration workflow template.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.migrationhuborchestrator#CreateTemplateResponse": { + "type": "structure", + "members": { + "templateId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The ID of the migration workflow template.

" + } + }, + "templateArn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the migration workflow template. The format for an\n Migration Hub Orchestrator template ARN is\n arn:aws:migrationhub-orchestrator:region:account:template/template-abcd1234.\n For more information about ARNs, see Amazon Resource Names (ARNs)\n in the AWS General Reference.

" + } + }, + "tags": { + "target": "com.amazonaws.migrationhuborchestrator#StringMap", + "traits": { + "smithy.api#documentation": "

The tags added to the migration workflow template.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.migrationhuborchestrator#CreateWorkflow": { "type": "operation", "input": { @@ -1258,6 +1395,64 @@ } } }, + "com.amazonaws.migrationhuborchestrator#DeleteTemplate": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhuborchestrator#DeleteTemplateRequest" + }, + "output": { + "target": "com.amazonaws.migrationhuborchestrator#DeleteTemplateResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhuborchestrator#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhuborchestrator#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhuborchestrator#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhuborchestrator#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes a migration workflow template.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/template/{id}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.migrationhuborchestrator#DeleteTemplateRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.migrationhuborchestrator#TemplateId", + "traits": { + "smithy.api#documentation": "

The ID of the request to delete a migration workflow template.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.migrationhuborchestrator#DeleteTemplateResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.migrationhuborchestrator#DeleteWorkflow": { "type": "operation", "input": { @@ -1581,6 +1776,12 @@ "smithy.api#documentation": "

The ID of the template.

" } }, + "templateArn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

>The Amazon Resource Name (ARN) of the migration workflow template. The format for an\n Migration Hub Orchestrator template ARN is\n arn:aws:migrationhub-orchestrator:region:account:template/template-abcd1234.\n For more information about ARNs, see Amazon Resource Names (ARNs)\n in the AWS General Reference.

" + } + }, "name": { "target": "smithy.api#String", "traits": { @@ -1605,16 +1806,40 @@ "smithy.api#documentation": "

List of AWS services utilized in a migration workflow.

" } }, + "creationTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The time at which the template was last created.

" + } + }, + "owner": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The owner of the migration workflow template.

" + } + }, "status": { "target": "com.amazonaws.migrationhuborchestrator#TemplateStatus", "traits": { "smithy.api#documentation": "

The status of the template.

" } }, - "creationTime": { - "target": "smithy.api#Timestamp", + "statusMessage": { + "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "

The time at which the template was last created.

" + "smithy.api#documentation": "

The status message of retrieving migration workflow templates.

" + } + }, + "templateClass": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The class of the migration workflow template. The available template classes\n are:

\n
    \n
  • \n

    A2C

    \n
  • \n
  • \n

    MGN

    \n
  • \n
  • \n

    SAP_MULTI

    \n
  • \n
  • \n

    SQL_EC2

    \n
  • \n
  • \n

    SQL_RDS

    \n
  • \n
  • \n

    VMIE

    \n
  • \n
" + } + }, + "tags": { + "target": "com.amazonaws.migrationhuborchestrator#StringMap", + "traits": { + "smithy.api#documentation": "

The tags added to the migration workflow template.

" } } } @@ -2121,7 +2346,7 @@ "stepGroupId": { "target": "com.amazonaws.migrationhuborchestrator#StepGroupId", "traits": { - "smithy.api#documentation": "

desThe ID of the step group.

", + "smithy.api#documentation": "

The ID of the step group.

", "smithy.api#httpQuery": "stepGroupId", "smithy.api#required": {} } @@ -2972,6 +3197,21 @@ } } }, + "com.amazonaws.migrationhuborchestrator#MaxStringList": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhuborchestrator#MaxStringValue" + } + }, + "com.amazonaws.migrationhuborchestrator#MaxStringValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2048 + } + } + }, "com.amazonaws.migrationhuborchestrator#MigrationWorkflow": { "type": "resource", "identifiers": { @@ -3177,9 +3417,18 @@ "target": "com.amazonaws.migrationhuborchestrator#TemplateId" } }, + "create": { + "target": "com.amazonaws.migrationhuborchestrator#CreateTemplate" + }, "read": { "target": "com.amazonaws.migrationhuborchestrator#GetTemplate" }, + "update": { + "target": "com.amazonaws.migrationhuborchestrator#UpdateTemplate" + }, + "delete": { + "target": "com.amazonaws.migrationhuborchestrator#DeleteTemplate" + }, "list": { "target": "com.amazonaws.migrationhuborchestrator#ListTemplates" } @@ -3348,7 +3597,7 @@ "com.amazonaws.migrationhuborchestrator#ResourceArn": { "type": "string", "traits": { - "smithy.api#pattern": "^arn:aws:migrationhub-orchestrator:[a-z0-9-]+:[0-9]+:workflow/[.]*$" + "smithy.api#pattern": "^arn:aws:migrationhub-orchestrator:[a-z0-9-]+:[0-9]+:(template|workflow)/[.]*$" } }, "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException": { @@ -3818,6 +4067,10 @@ "value": "AWAITING_DEPENDENCIES", "name": "AWAITING_DEPENDENCIES" }, + { + "value": "SKIPPED", + "name": "SKIPPED" + }, { "value": "READY", "name": "READY" @@ -3938,7 +4191,7 @@ "traits": { "smithy.api#length": { "min": 0, - "max": 100 + "max": 500 } } }, @@ -4149,6 +4402,20 @@ "smithy.api#pattern": "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$" } }, + "com.amazonaws.migrationhuborchestrator#TemplateSource": { + "type": "union", + "members": { + "workflowId": { + "target": "com.amazonaws.migrationhuborchestrator#MigrationWorkflowId", + "traits": { + "smithy.api#documentation": "

The ID of the workflow from the source migration workflow template.

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

The migration workflow template used as the source for the new template.

" + } + }, "com.amazonaws.migrationhuborchestrator#TemplateStatus": { "type": "string", "traits": { @@ -4156,6 +4423,22 @@ { "value": "CREATED", "name": "CREATED" + }, + { + "value": "READY", + "name": "READY" + }, + { + "value": "PENDING_CREATION", + "name": "PENDING_CREATION" + }, + { + "value": "CREATING", + "name": "CREATING" + }, + { + "value": "CREATION_FAILED", + "name": "CREATION_FAILED" } ] } @@ -4559,6 +4842,111 @@ } } }, + "com.amazonaws.migrationhuborchestrator#UpdateTemplate": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhuborchestrator#UpdateTemplateRequest" + }, + "output": { + "target": "com.amazonaws.migrationhuborchestrator#UpdateTemplateResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhuborchestrator#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhuborchestrator#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhuborchestrator#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhuborchestrator#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates a migration workflow template.

", + "smithy.api#http": { + "method": "POST", + "uri": "/template/{id}", + "code": 200 + } + } + }, + "com.amazonaws.migrationhuborchestrator#UpdateTemplateRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.migrationhuborchestrator#TemplateId", + "traits": { + "smithy.api#documentation": "

The ID of the request to update a migration workflow template.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "templateName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the migration workflow template to update.

", + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^[ a-zA-Z0-9]*$" + } + }, + "templateDescription": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The description of the migration workflow template to update.

", + "smithy.api#length": { + "min": 0, + "max": 250 + }, + "smithy.api#pattern": "^.*$" + } + }, + "clientToken": { + "target": "com.amazonaws.migrationhuborchestrator#ClientToken", + "traits": { + "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the\n idempotency of the request.

", + "smithy.api#idempotencyToken": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.migrationhuborchestrator#UpdateTemplateResponse": { + "type": "structure", + "members": { + "templateId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The ID of the migration workflow template being updated.

" + } + }, + "templateArn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The ARN of the migration workflow template being updated. The format for an Migration Hub Orchestrator\n template ARN is\n arn:aws:migrationhub-orchestrator:region:account:template/template-abcd1234.\n For more information about ARNs, see Amazon Resource Names (ARNs)\n in the AWS General Reference.

" + } + }, + "tags": { + "target": "com.amazonaws.migrationhuborchestrator#StringMap", + "traits": { + "smithy.api#documentation": "

The tags added to the migration workflow template.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.migrationhuborchestrator#UpdateWorkflow": { "type": "operation", "input": { @@ -5081,13 +5469,13 @@ } }, "stringValue": { - "target": "com.amazonaws.migrationhuborchestrator#StringValue", + "target": "com.amazonaws.migrationhuborchestrator#MaxStringValue", "traits": { "smithy.api#documentation": "

The string value.

" } }, "listOfStringValue": { - "target": "com.amazonaws.migrationhuborchestrator#StringList", + "target": "com.amazonaws.migrationhuborchestrator#MaxStringList", "traits": { "smithy.api#documentation": "

The list of string value.

" }