Skip to content

Commit 86ce4d1

Browse files
author
awstools
committedFeb 29, 2024
feat(client-migrationhuborchestrator): Adds new CreateTemplate, UpdateTemplate and DeleteTemplate APIs.
1 parent c995dd7 commit 86ce4d1

17 files changed

+1264
-30
lines changed
 

‎clients/client-migrationhuborchestrator/README.md

+26-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
AWS SDK for JavaScript MigrationHubOrchestrator Client for Node.js, Browser and React Native.
88

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

@@ -207,6 +207,14 @@ see LICENSE for more information.
207207

208208
## Client Commands (Operations List)
209209

210+
<details>
211+
<summary>
212+
CreateTemplate
213+
</summary>
214+
215+
[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/)
216+
217+
</details>
210218
<details>
211219
<summary>
212220
CreateWorkflow
@@ -230,6 +238,14 @@ CreateWorkflowStepGroup
230238

231239
[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/)
232240

241+
</details>
242+
<details>
243+
<summary>
244+
DeleteTemplate
245+
</summary>
246+
247+
[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/)
248+
233249
</details>
234250
<details>
235251
<summary>
@@ -406,6 +422,14 @@ UntagResource
406422

407423
[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/)
408424

425+
</details>
426+
<details>
427+
<summary>
428+
UpdateTemplate
429+
</summary>
430+
431+
[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/)
432+
409433
</details>
410434
<details>
411435
<summary>

‎clients/client-migrationhuborchestrator/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@
5757
"@smithy/util-middleware": "^2.1.3",
5858
"@smithy/util-retry": "^2.1.3",
5959
"@smithy/util-utf8": "^2.1.1",
60-
"tslib": "^2.5.0"
60+
"tslib": "^2.5.0",
61+
"uuid": "^8.3.2"
6162
},
6263
"devDependencies": {
6364
"@smithy/service-client-documentation-generator": "^2.1.1",
6465
"@tsconfig/node14": "1.0.3",
6566
"@types/node": "^14.14.31",
67+
"@types/uuid": "^9.0.4",
6668
"concurrently": "7.0.0",
6769
"downlevel-dts": "0.10.1",
6870
"rimraf": "3.0.2",

‎clients/client-migrationhuborchestrator/src/MigrationHubOrchestrator.ts

+62-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
import { createAggregatedClient } from "@smithy/smithy-client";
33
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
44

5+
import {
6+
CreateTemplateCommand,
7+
CreateTemplateCommandInput,
8+
CreateTemplateCommandOutput,
9+
} from "./commands/CreateTemplateCommand";
510
import {
611
CreateWorkflowCommand,
712
CreateWorkflowCommandInput,
@@ -17,6 +22,11 @@ import {
1722
CreateWorkflowStepGroupCommandInput,
1823
CreateWorkflowStepGroupCommandOutput,
1924
} from "./commands/CreateWorkflowStepGroupCommand";
25+
import {
26+
DeleteTemplateCommand,
27+
DeleteTemplateCommandInput,
28+
DeleteTemplateCommandOutput,
29+
} from "./commands/DeleteTemplateCommand";
2030
import {
2131
DeleteWorkflowCommand,
2232
DeleteWorkflowCommandInput,
@@ -111,6 +121,11 @@ import {
111121
UntagResourceCommandInput,
112122
UntagResourceCommandOutput,
113123
} from "./commands/UntagResourceCommand";
124+
import {
125+
UpdateTemplateCommand,
126+
UpdateTemplateCommandInput,
127+
UpdateTemplateCommandOutput,
128+
} from "./commands/UpdateTemplateCommand";
114129
import {
115130
UpdateWorkflowCommand,
116131
UpdateWorkflowCommandInput,
@@ -129,9 +144,11 @@ import {
129144
import { MigrationHubOrchestratorClient, MigrationHubOrchestratorClientConfig } from "./MigrationHubOrchestratorClient";
130145

131146
const commands = {
147+
CreateTemplateCommand,
132148
CreateWorkflowCommand,
133149
CreateWorkflowStepCommand,
134150
CreateWorkflowStepGroupCommand,
151+
DeleteTemplateCommand,
135152
DeleteWorkflowCommand,
136153
DeleteWorkflowStepCommand,
137154
DeleteWorkflowStepGroupCommand,
@@ -154,12 +171,27 @@ const commands = {
154171
StopWorkflowCommand,
155172
TagResourceCommand,
156173
UntagResourceCommand,
174+
UpdateTemplateCommand,
157175
UpdateWorkflowCommand,
158176
UpdateWorkflowStepCommand,
159177
UpdateWorkflowStepGroupCommand,
160178
};
161179

162180
export interface MigrationHubOrchestrator {
181+
/**
182+
* @see {@link CreateTemplateCommand}
183+
*/
184+
createTemplate(
185+
args: CreateTemplateCommandInput,
186+
options?: __HttpHandlerOptions
187+
): Promise<CreateTemplateCommandOutput>;
188+
createTemplate(args: CreateTemplateCommandInput, cb: (err: any, data?: CreateTemplateCommandOutput) => void): void;
189+
createTemplate(
190+
args: CreateTemplateCommandInput,
191+
options: __HttpHandlerOptions,
192+
cb: (err: any, data?: CreateTemplateCommandOutput) => void
193+
): void;
194+
163195
/**
164196
* @see {@link CreateWorkflowCommand}
165197
*/
@@ -208,6 +240,20 @@ export interface MigrationHubOrchestrator {
208240
cb: (err: any, data?: CreateWorkflowStepGroupCommandOutput) => void
209241
): void;
210242

243+
/**
244+
* @see {@link DeleteTemplateCommand}
245+
*/
246+
deleteTemplate(
247+
args: DeleteTemplateCommandInput,
248+
options?: __HttpHandlerOptions
249+
): Promise<DeleteTemplateCommandOutput>;
250+
deleteTemplate(args: DeleteTemplateCommandInput, cb: (err: any, data?: DeleteTemplateCommandOutput) => void): void;
251+
deleteTemplate(
252+
args: DeleteTemplateCommandInput,
253+
options: __HttpHandlerOptions,
254+
cb: (err: any, data?: DeleteTemplateCommandOutput) => void
255+
): void;
256+
211257
/**
212258
* @see {@link DeleteWorkflowCommand}
213259
*/
@@ -519,6 +565,20 @@ export interface MigrationHubOrchestrator {
519565
cb: (err: any, data?: UntagResourceCommandOutput) => void
520566
): void;
521567

568+
/**
569+
* @see {@link UpdateTemplateCommand}
570+
*/
571+
updateTemplate(
572+
args: UpdateTemplateCommandInput,
573+
options?: __HttpHandlerOptions
574+
): Promise<UpdateTemplateCommandOutput>;
575+
updateTemplate(args: UpdateTemplateCommandInput, cb: (err: any, data?: UpdateTemplateCommandOutput) => void): void;
576+
updateTemplate(
577+
args: UpdateTemplateCommandInput,
578+
options: __HttpHandlerOptions,
579+
cb: (err: any, data?: UpdateTemplateCommandOutput) => void
580+
): void;
581+
522582
/**
523583
* @see {@link UpdateWorkflowCommand}
524584
*/
@@ -571,8 +631,8 @@ export interface MigrationHubOrchestrator {
571631
/**
572632
* @public
573633
* <p>This API reference provides descriptions, syntax, and other details about each of the
574-
* actions and data types for AWS Migration Hub Orchestrator. he topic for each action shows the API
575-
* request parameters and the response. Alternatively, you can use one of the AWS SDKs to
634+
* actions and data types for AWS Migration Hub Orchestrator. The topic for each action shows the API
635+
* request parameters and responses. Alternatively, you can use one of the AWS SDKs to
576636
* access an API that is tailored to the programming language or platform that you're
577637
* using.</p>
578638
*/

‎clients/client-migrationhuborchestrator/src/MigrationHubOrchestratorClient.ts

+11-2
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,14 @@ import {
5353
HttpAuthSchemeResolvedConfig,
5454
resolveHttpAuthSchemeConfig,
5555
} from "./auth/httpAuthSchemeProvider";
56+
import { CreateTemplateCommandInput, CreateTemplateCommandOutput } from "./commands/CreateTemplateCommand";
5657
import { CreateWorkflowCommandInput, CreateWorkflowCommandOutput } from "./commands/CreateWorkflowCommand";
5758
import { CreateWorkflowStepCommandInput, CreateWorkflowStepCommandOutput } from "./commands/CreateWorkflowStepCommand";
5859
import {
5960
CreateWorkflowStepGroupCommandInput,
6061
CreateWorkflowStepGroupCommandOutput,
6162
} from "./commands/CreateWorkflowStepGroupCommand";
63+
import { DeleteTemplateCommandInput, DeleteTemplateCommandOutput } from "./commands/DeleteTemplateCommand";
6264
import { DeleteWorkflowCommandInput, DeleteWorkflowCommandOutput } from "./commands/DeleteWorkflowCommand";
6365
import { DeleteWorkflowStepCommandInput, DeleteWorkflowStepCommandOutput } from "./commands/DeleteWorkflowStepCommand";
6466
import {
@@ -99,6 +101,7 @@ import { StartWorkflowCommandInput, StartWorkflowCommandOutput } from "./command
99101
import { StopWorkflowCommandInput, StopWorkflowCommandOutput } from "./commands/StopWorkflowCommand";
100102
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
101103
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
104+
import { UpdateTemplateCommandInput, UpdateTemplateCommandOutput } from "./commands/UpdateTemplateCommand";
102105
import { UpdateWorkflowCommandInput, UpdateWorkflowCommandOutput } from "./commands/UpdateWorkflowCommand";
103106
import { UpdateWorkflowStepCommandInput, UpdateWorkflowStepCommandOutput } from "./commands/UpdateWorkflowStepCommand";
104107
import {
@@ -120,9 +123,11 @@ export { __Client };
120123
* @public
121124
*/
122125
export type ServiceInputTypes =
126+
| CreateTemplateCommandInput
123127
| CreateWorkflowCommandInput
124128
| CreateWorkflowStepCommandInput
125129
| CreateWorkflowStepGroupCommandInput
130+
| DeleteTemplateCommandInput
126131
| DeleteWorkflowCommandInput
127132
| DeleteWorkflowStepCommandInput
128133
| DeleteWorkflowStepGroupCommandInput
@@ -145,6 +150,7 @@ export type ServiceInputTypes =
145150
| StopWorkflowCommandInput
146151
| TagResourceCommandInput
147152
| UntagResourceCommandInput
153+
| UpdateTemplateCommandInput
148154
| UpdateWorkflowCommandInput
149155
| UpdateWorkflowStepCommandInput
150156
| UpdateWorkflowStepGroupCommandInput;
@@ -153,9 +159,11 @@ export type ServiceInputTypes =
153159
* @public
154160
*/
155161
export type ServiceOutputTypes =
162+
| CreateTemplateCommandOutput
156163
| CreateWorkflowCommandOutput
157164
| CreateWorkflowStepCommandOutput
158165
| CreateWorkflowStepGroupCommandOutput
166+
| DeleteTemplateCommandOutput
159167
| DeleteWorkflowCommandOutput
160168
| DeleteWorkflowStepCommandOutput
161169
| DeleteWorkflowStepGroupCommandOutput
@@ -178,6 +186,7 @@ export type ServiceOutputTypes =
178186
| StopWorkflowCommandOutput
179187
| TagResourceCommandOutput
180188
| UntagResourceCommandOutput
189+
| UpdateTemplateCommandOutput
181190
| UpdateWorkflowCommandOutput
182191
| UpdateWorkflowStepCommandOutput
183192
| UpdateWorkflowStepGroupCommandOutput;
@@ -357,8 +366,8 @@ export interface MigrationHubOrchestratorClientResolvedConfig
357366
/**
358367
* @public
359368
* <p>This API reference provides descriptions, syntax, and other details about each of the
360-
* actions and data types for AWS Migration Hub Orchestrator. he topic for each action shows the API
361-
* request parameters and the response. Alternatively, you can use one of the AWS SDKs to
369+
* actions and data types for AWS Migration Hub Orchestrator. The topic for each action shows the API
370+
* request parameters and responses. Alternatively, you can use one of the AWS SDKs to
362371
* access an API that is tailored to the programming language or platform that you're
363372
* using.</p>
364373
*/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { commonParams } from "../endpoint/EndpointParameters";
8+
import {
9+
MigrationHubOrchestratorClientResolvedConfig,
10+
ServiceInputTypes,
11+
ServiceOutputTypes,
12+
} from "../MigrationHubOrchestratorClient";
13+
import { CreateTemplateRequest, CreateTemplateResponse } from "../models/models_0";
14+
import { de_CreateTemplateCommand, se_CreateTemplateCommand } from "../protocols/Aws_restJson1";
15+
16+
/**
17+
* @public
18+
*/
19+
export { __MetadataBearer, $Command };
20+
/**
21+
* @public
22+
*
23+
* The input for {@link CreateTemplateCommand}.
24+
*/
25+
export interface CreateTemplateCommandInput extends CreateTemplateRequest {}
26+
/**
27+
* @public
28+
*
29+
* The output of {@link CreateTemplateCommand}.
30+
*/
31+
export interface CreateTemplateCommandOutput extends CreateTemplateResponse, __MetadataBearer {}
32+
33+
/**
34+
* @public
35+
* <p>Creates a migration workflow template.</p>
36+
* @example
37+
* Use a bare-bones client and the command you need to make an API call.
38+
* ```javascript
39+
* import { MigrationHubOrchestratorClient, CreateTemplateCommand } from "@aws-sdk/client-migrationhuborchestrator"; // ES Modules import
40+
* // const { MigrationHubOrchestratorClient, CreateTemplateCommand } = require("@aws-sdk/client-migrationhuborchestrator"); // CommonJS import
41+
* const client = new MigrationHubOrchestratorClient(config);
42+
* const input = { // CreateTemplateRequest
43+
* templateName: "STRING_VALUE", // required
44+
* templateDescription: "STRING_VALUE",
45+
* templateSource: { // TemplateSource Union: only one key present
46+
* workflowId: "STRING_VALUE",
47+
* },
48+
* clientToken: "STRING_VALUE",
49+
* tags: { // TagMap
50+
* "<keys>": "STRING_VALUE",
51+
* },
52+
* };
53+
* const command = new CreateTemplateCommand(input);
54+
* const response = await client.send(command);
55+
* // { // CreateTemplateResponse
56+
* // templateId: "STRING_VALUE",
57+
* // templateArn: "STRING_VALUE",
58+
* // tags: { // StringMap
59+
* // "<keys>": "STRING_VALUE",
60+
* // },
61+
* // };
62+
*
63+
* ```
64+
*
65+
* @param CreateTemplateCommandInput - {@link CreateTemplateCommandInput}
66+
* @returns {@link CreateTemplateCommandOutput}
67+
* @see {@link CreateTemplateCommandInput} for command's `input` shape.
68+
* @see {@link CreateTemplateCommandOutput} for command's `response` shape.
69+
* @see {@link MigrationHubOrchestratorClientResolvedConfig | config} for MigrationHubOrchestratorClient's `config` shape.
70+
*
71+
* @throws {@link AccessDeniedException} (client fault)
72+
* <p>You do not have sufficient access to perform this action.</p>
73+
*
74+
* @throws {@link ConflictException} (client fault)
75+
* <p>This exception is thrown when an attempt to update or delete
76+
* a resource would cause an inconsistent state.</p>
77+
*
78+
* @throws {@link InternalServerException} (server fault)
79+
* <p>An internal error has occurred.</p>
80+
*
81+
* @throws {@link ThrottlingException} (client fault)
82+
* <p>The request was denied due to request throttling.</p>
83+
*
84+
* @throws {@link ValidationException} (client fault)
85+
* <p>The input fails to satisfy the constraints specified by an AWS service.</p>
86+
*
87+
* @throws {@link MigrationHubOrchestratorServiceException}
88+
* <p>Base exception class for all service exceptions from MigrationHubOrchestrator service.</p>
89+
*
90+
*/
91+
export class CreateTemplateCommand extends $Command
92+
.classBuilder<
93+
CreateTemplateCommandInput,
94+
CreateTemplateCommandOutput,
95+
MigrationHubOrchestratorClientResolvedConfig,
96+
ServiceInputTypes,
97+
ServiceOutputTypes
98+
>()
99+
.ep({
100+
...commonParams,
101+
})
102+
.m(function (this: any, Command: any, cs: any, config: MigrationHubOrchestratorClientResolvedConfig, o: any) {
103+
return [
104+
getSerdePlugin(config, this.serialize, this.deserialize),
105+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
106+
];
107+
})
108+
.s("AWSMigrationHubOrchestrator", "CreateTemplate", {})
109+
.n("MigrationHubOrchestratorClient", "CreateTemplateCommand")
110+
.f(void 0, void 0)
111+
.ser(se_CreateTemplateCommand)
112+
.de(de_CreateTemplateCommand)
113+
.build() {}

‎clients/client-migrationhuborchestrator/src/commands/CreateWorkflowCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export interface CreateWorkflowCommandOutput extends CreateMigrationWorkflowResp
4848
* name: "STRING_VALUE", // required
4949
* description: "STRING_VALUE",
5050
* templateId: "STRING_VALUE", // required
51-
* applicationConfigurationId: "STRING_VALUE", // required
51+
* applicationConfigurationId: "STRING_VALUE",
5252
* inputParameters: { // StepInputParameters // required
5353
* "<keys>": { // StepInput Union: only one key present
5454
* integerValue: Number("int"),

‎clients/client-migrationhuborchestrator/src/commands/CreateWorkflowStepCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export interface CreateWorkflowStepCommandOutput extends CreateWorkflowStepRespo
6969
* value: { // WorkflowStepOutputUnion Union: only one key present
7070
* integerValue: Number("int"),
7171
* stringValue: "STRING_VALUE",
72-
* listOfStringValue: [
72+
* listOfStringValue: [ // MaxStringList
7373
* "STRING_VALUE",
7474
* ],
7575
* },
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { commonParams } from "../endpoint/EndpointParameters";
8+
import {
9+
MigrationHubOrchestratorClientResolvedConfig,
10+
ServiceInputTypes,
11+
ServiceOutputTypes,
12+
} from "../MigrationHubOrchestratorClient";
13+
import { DeleteTemplateRequest, DeleteTemplateResponse } from "../models/models_0";
14+
import { de_DeleteTemplateCommand, se_DeleteTemplateCommand } from "../protocols/Aws_restJson1";
15+
16+
/**
17+
* @public
18+
*/
19+
export { __MetadataBearer, $Command };
20+
/**
21+
* @public
22+
*
23+
* The input for {@link DeleteTemplateCommand}.
24+
*/
25+
export interface DeleteTemplateCommandInput extends DeleteTemplateRequest {}
26+
/**
27+
* @public
28+
*
29+
* The output of {@link DeleteTemplateCommand}.
30+
*/
31+
export interface DeleteTemplateCommandOutput extends DeleteTemplateResponse, __MetadataBearer {}
32+
33+
/**
34+
* @public
35+
* <p>Deletes a migration workflow template.</p>
36+
* @example
37+
* Use a bare-bones client and the command you need to make an API call.
38+
* ```javascript
39+
* import { MigrationHubOrchestratorClient, DeleteTemplateCommand } from "@aws-sdk/client-migrationhuborchestrator"; // ES Modules import
40+
* // const { MigrationHubOrchestratorClient, DeleteTemplateCommand } = require("@aws-sdk/client-migrationhuborchestrator"); // CommonJS import
41+
* const client = new MigrationHubOrchestratorClient(config);
42+
* const input = { // DeleteTemplateRequest
43+
* id: "STRING_VALUE", // required
44+
* };
45+
* const command = new DeleteTemplateCommand(input);
46+
* const response = await client.send(command);
47+
* // {};
48+
*
49+
* ```
50+
*
51+
* @param DeleteTemplateCommandInput - {@link DeleteTemplateCommandInput}
52+
* @returns {@link DeleteTemplateCommandOutput}
53+
* @see {@link DeleteTemplateCommandInput} for command's `input` shape.
54+
* @see {@link DeleteTemplateCommandOutput} for command's `response` shape.
55+
* @see {@link MigrationHubOrchestratorClientResolvedConfig | config} for MigrationHubOrchestratorClient's `config` shape.
56+
*
57+
* @throws {@link AccessDeniedException} (client fault)
58+
* <p>You do not have sufficient access to perform this action.</p>
59+
*
60+
* @throws {@link InternalServerException} (server fault)
61+
* <p>An internal error has occurred.</p>
62+
*
63+
* @throws {@link ResourceNotFoundException} (client fault)
64+
* <p>The resource is not available.</p>
65+
*
66+
* @throws {@link ThrottlingException} (client fault)
67+
* <p>The request was denied due to request throttling.</p>
68+
*
69+
* @throws {@link ValidationException} (client fault)
70+
* <p>The input fails to satisfy the constraints specified by an AWS service.</p>
71+
*
72+
* @throws {@link MigrationHubOrchestratorServiceException}
73+
* <p>Base exception class for all service exceptions from MigrationHubOrchestrator service.</p>
74+
*
75+
*/
76+
export class DeleteTemplateCommand extends $Command
77+
.classBuilder<
78+
DeleteTemplateCommandInput,
79+
DeleteTemplateCommandOutput,
80+
MigrationHubOrchestratorClientResolvedConfig,
81+
ServiceInputTypes,
82+
ServiceOutputTypes
83+
>()
84+
.ep({
85+
...commonParams,
86+
})
87+
.m(function (this: any, Command: any, cs: any, config: MigrationHubOrchestratorClientResolvedConfig, o: any) {
88+
return [
89+
getSerdePlugin(config, this.serialize, this.deserialize),
90+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
91+
];
92+
})
93+
.s("AWSMigrationHubOrchestrator", "DeleteTemplate", {})
94+
.n("MigrationHubOrchestratorClient", "DeleteTemplateCommand")
95+
.f(void 0, void 0)
96+
.ser(se_DeleteTemplateCommand)
97+
.de(de_DeleteTemplateCommand)
98+
.build() {}

‎clients/client-migrationhuborchestrator/src/commands/GetTemplateCommand.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export interface GetTemplateCommandOutput extends GetMigrationWorkflowTemplateRe
4646
* const response = await client.send(command);
4747
* // { // GetMigrationWorkflowTemplateResponse
4848
* // id: "STRING_VALUE",
49+
* // templateArn: "STRING_VALUE",
4950
* // name: "STRING_VALUE",
5051
* // description: "STRING_VALUE",
5152
* // inputs: [ // TemplateInputList
@@ -61,8 +62,14 @@ export interface GetTemplateCommandOutput extends GetMigrationWorkflowTemplateRe
6162
* // url: "STRING_VALUE",
6263
* // },
6364
* // ],
64-
* // status: "STRING_VALUE",
6565
* // creationTime: new Date("TIMESTAMP"),
66+
* // owner: "STRING_VALUE",
67+
* // status: "STRING_VALUE",
68+
* // statusMessage: "STRING_VALUE",
69+
* // templateClass: "STRING_VALUE",
70+
* // tags: { // StringMap
71+
* // "<keys>": "STRING_VALUE",
72+
* // },
6673
* // };
6774
*
6875
* ```

‎clients/client-migrationhuborchestrator/src/commands/GetWorkflowStepCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export interface GetWorkflowStepCommandOutput extends GetWorkflowStepResponse, _
7878
* // value: { // WorkflowStepOutputUnion Union: only one key present
7979
* // integerValue: Number("int"),
8080
* // stringValue: "STRING_VALUE",
81-
* // listOfStringValue: [
81+
* // listOfStringValue: [ // MaxStringList
8282
* // "STRING_VALUE",
8383
* // ],
8484
* // },
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { commonParams } from "../endpoint/EndpointParameters";
8+
import {
9+
MigrationHubOrchestratorClientResolvedConfig,
10+
ServiceInputTypes,
11+
ServiceOutputTypes,
12+
} from "../MigrationHubOrchestratorClient";
13+
import { UpdateTemplateRequest, UpdateTemplateResponse } from "../models/models_0";
14+
import { de_UpdateTemplateCommand, se_UpdateTemplateCommand } from "../protocols/Aws_restJson1";
15+
16+
/**
17+
* @public
18+
*/
19+
export { __MetadataBearer, $Command };
20+
/**
21+
* @public
22+
*
23+
* The input for {@link UpdateTemplateCommand}.
24+
*/
25+
export interface UpdateTemplateCommandInput extends UpdateTemplateRequest {}
26+
/**
27+
* @public
28+
*
29+
* The output of {@link UpdateTemplateCommand}.
30+
*/
31+
export interface UpdateTemplateCommandOutput extends UpdateTemplateResponse, __MetadataBearer {}
32+
33+
/**
34+
* @public
35+
* <p>Updates a migration workflow template.</p>
36+
* @example
37+
* Use a bare-bones client and the command you need to make an API call.
38+
* ```javascript
39+
* import { MigrationHubOrchestratorClient, UpdateTemplateCommand } from "@aws-sdk/client-migrationhuborchestrator"; // ES Modules import
40+
* // const { MigrationHubOrchestratorClient, UpdateTemplateCommand } = require("@aws-sdk/client-migrationhuborchestrator"); // CommonJS import
41+
* const client = new MigrationHubOrchestratorClient(config);
42+
* const input = { // UpdateTemplateRequest
43+
* id: "STRING_VALUE", // required
44+
* templateName: "STRING_VALUE",
45+
* templateDescription: "STRING_VALUE",
46+
* clientToken: "STRING_VALUE",
47+
* };
48+
* const command = new UpdateTemplateCommand(input);
49+
* const response = await client.send(command);
50+
* // { // UpdateTemplateResponse
51+
* // templateId: "STRING_VALUE",
52+
* // templateArn: "STRING_VALUE",
53+
* // tags: { // StringMap
54+
* // "<keys>": "STRING_VALUE",
55+
* // },
56+
* // };
57+
*
58+
* ```
59+
*
60+
* @param UpdateTemplateCommandInput - {@link UpdateTemplateCommandInput}
61+
* @returns {@link UpdateTemplateCommandOutput}
62+
* @see {@link UpdateTemplateCommandInput} for command's `input` shape.
63+
* @see {@link UpdateTemplateCommandOutput} for command's `response` shape.
64+
* @see {@link MigrationHubOrchestratorClientResolvedConfig | config} for MigrationHubOrchestratorClient's `config` shape.
65+
*
66+
* @throws {@link AccessDeniedException} (client fault)
67+
* <p>You do not have sufficient access to perform this action.</p>
68+
*
69+
* @throws {@link InternalServerException} (server fault)
70+
* <p>An internal error has occurred.</p>
71+
*
72+
* @throws {@link ResourceNotFoundException} (client fault)
73+
* <p>The resource is not available.</p>
74+
*
75+
* @throws {@link ThrottlingException} (client fault)
76+
* <p>The request was denied due to request throttling.</p>
77+
*
78+
* @throws {@link ValidationException} (client fault)
79+
* <p>The input fails to satisfy the constraints specified by an AWS service.</p>
80+
*
81+
* @throws {@link MigrationHubOrchestratorServiceException}
82+
* <p>Base exception class for all service exceptions from MigrationHubOrchestrator service.</p>
83+
*
84+
*/
85+
export class UpdateTemplateCommand extends $Command
86+
.classBuilder<
87+
UpdateTemplateCommandInput,
88+
UpdateTemplateCommandOutput,
89+
MigrationHubOrchestratorClientResolvedConfig,
90+
ServiceInputTypes,
91+
ServiceOutputTypes
92+
>()
93+
.ep({
94+
...commonParams,
95+
})
96+
.m(function (this: any, Command: any, cs: any, config: MigrationHubOrchestratorClientResolvedConfig, o: any) {
97+
return [
98+
getSerdePlugin(config, this.serialize, this.deserialize),
99+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
100+
];
101+
})
102+
.s("AWSMigrationHubOrchestrator", "UpdateTemplate", {})
103+
.n("MigrationHubOrchestratorClient", "UpdateTemplateCommand")
104+
.f(void 0, void 0)
105+
.ser(se_UpdateTemplateCommand)
106+
.de(de_UpdateTemplateCommand)
107+
.build() {}

‎clients/client-migrationhuborchestrator/src/commands/UpdateWorkflowStepCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export interface UpdateWorkflowStepCommandOutput extends UpdateWorkflowStepRespo
7070
* value: { // WorkflowStepOutputUnion Union: only one key present
7171
* integerValue: Number("int"),
7272
* stringValue: "STRING_VALUE",
73-
* listOfStringValue: [
73+
* listOfStringValue: [ // MaxStringList
7474
* "STRING_VALUE",
7575
* ],
7676
* },

‎clients/client-migrationhuborchestrator/src/commands/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// smithy-typescript generated code
2+
export * from "./CreateTemplateCommand";
23
export * from "./CreateWorkflowCommand";
34
export * from "./CreateWorkflowStepCommand";
45
export * from "./CreateWorkflowStepGroupCommand";
6+
export * from "./DeleteTemplateCommand";
57
export * from "./DeleteWorkflowCommand";
68
export * from "./DeleteWorkflowStepCommand";
79
export * from "./DeleteWorkflowStepGroupCommand";
@@ -24,6 +26,7 @@ export * from "./StartWorkflowCommand";
2426
export * from "./StopWorkflowCommand";
2527
export * from "./TagResourceCommand";
2628
export * from "./UntagResourceCommand";
29+
export * from "./UpdateTemplateCommand";
2730
export * from "./UpdateWorkflowCommand";
2831
export * from "./UpdateWorkflowStepCommand";
2932
export * from "./UpdateWorkflowStepGroupCommand";

‎clients/client-migrationhuborchestrator/src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
/* eslint-disable */
33
/**
44
* <p>This API reference provides descriptions, syntax, and other details about each of the
5-
* actions and data types for AWS Migration Hub Orchestrator. he topic for each action shows the API
6-
* request parameters and the response. Alternatively, you can use one of the AWS SDKs to
5+
* actions and data types for AWS Migration Hub Orchestrator. The topic for each action shows the API
6+
* request parameters and responses. Alternatively, you can use one of the AWS SDKs to
77
* access an API that is tailored to the programming language or platform that you're
88
* using.</p>
99
*

‎clients/client-migrationhuborchestrator/src/models/models_0.ts

+260-4
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ export interface CreateMigrationWorkflowRequest {
205205
* @public
206206
* <p>The configuration ID of the application configured in Application Discovery Service.</p>
207207
*/
208-
applicationConfigurationId: string | undefined;
208+
applicationConfigurationId?: string;
209209

210210
/**
211211
* @public
@@ -880,6 +880,145 @@ export interface UpdateMigrationWorkflowResponse {
880880
tags?: Record<string, string>;
881881
}
882882

883+
/**
884+
* @public
885+
* <p>This exception is thrown when an attempt to update or delete
886+
* a resource would cause an inconsistent state.</p>
887+
*/
888+
export class ConflictException extends __BaseException {
889+
readonly name: "ConflictException" = "ConflictException";
890+
readonly $fault: "client" = "client";
891+
$retryable = {};
892+
/**
893+
* @internal
894+
*/
895+
constructor(opts: __ExceptionOptionType<ConflictException, __BaseException>) {
896+
super({
897+
name: "ConflictException",
898+
$fault: "client",
899+
...opts,
900+
});
901+
Object.setPrototypeOf(this, ConflictException.prototype);
902+
}
903+
}
904+
905+
/**
906+
* @public
907+
* <p>The migration workflow template used as the source for the new template.</p>
908+
*/
909+
export type TemplateSource = TemplateSource.WorkflowIdMember | TemplateSource.$UnknownMember;
910+
911+
/**
912+
* @public
913+
*/
914+
export namespace TemplateSource {
915+
/**
916+
* @public
917+
* <p>The ID of the workflow from the source migration workflow template.</p>
918+
*/
919+
export interface WorkflowIdMember {
920+
workflowId: string;
921+
$unknown?: never;
922+
}
923+
924+
/**
925+
* @public
926+
*/
927+
export interface $UnknownMember {
928+
workflowId?: never;
929+
$unknown: [string, any];
930+
}
931+
932+
export interface Visitor<T> {
933+
workflowId: (value: string) => T;
934+
_: (name: string, value: any) => T;
935+
}
936+
937+
export const visit = <T>(value: TemplateSource, visitor: Visitor<T>): T => {
938+
if (value.workflowId !== undefined) return visitor.workflowId(value.workflowId);
939+
return visitor._(value.$unknown[0], value.$unknown[1]);
940+
};
941+
}
942+
943+
/**
944+
* @public
945+
*/
946+
export interface CreateTemplateRequest {
947+
/**
948+
* @public
949+
* <p>The name of the migration workflow template.</p>
950+
*/
951+
templateName: string | undefined;
952+
953+
/**
954+
* @public
955+
* <p>A description of the migration workflow template.</p>
956+
*/
957+
templateDescription?: string;
958+
959+
/**
960+
* @public
961+
* <p>The source of the migration workflow template.</p>
962+
*/
963+
templateSource: TemplateSource | undefined;
964+
965+
/**
966+
* @public
967+
* <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the
968+
* request. For more information, see <a href="https://smithy.io/2.0/spec/behavior-traits.html#idempotencytoken-trait">Idempotency</a> in the Smithy documentation.</p>
969+
*/
970+
clientToken?: string;
971+
972+
/**
973+
* @public
974+
* <p>The tags to add to the migration workflow template.</p>
975+
*/
976+
tags?: Record<string, string>;
977+
}
978+
979+
/**
980+
* @public
981+
*/
982+
export interface CreateTemplateResponse {
983+
/**
984+
* @public
985+
* <p>The ID of the migration workflow template.</p>
986+
*/
987+
templateId?: string;
988+
989+
/**
990+
* @public
991+
* <p>The Amazon Resource Name (ARN) of the migration workflow template. The format for an
992+
* Migration Hub Orchestrator template ARN is
993+
* <code>arn:aws:migrationhub-orchestrator:region:account:template/template-abcd1234</code>.
994+
* For more information about ARNs, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Names (ARNs)</a>
995+
* in the <i>AWS General Reference</i>.</p>
996+
*/
997+
templateArn?: string;
998+
999+
/**
1000+
* @public
1001+
* <p>The tags added to the migration workflow template.</p>
1002+
*/
1003+
tags?: Record<string, string>;
1004+
}
1005+
1006+
/**
1007+
* @public
1008+
*/
1009+
export interface DeleteTemplateRequest {
1010+
/**
1011+
* @public
1012+
* <p>The ID of the request to delete a migration workflow template.</p>
1013+
*/
1014+
id: string | undefined;
1015+
}
1016+
1017+
/**
1018+
* @public
1019+
*/
1020+
export interface DeleteTemplateResponse {}
1021+
8831022
/**
8841023
* @public
8851024
*/
@@ -937,6 +1076,10 @@ export interface TemplateInput {
9371076
*/
9381077
export const TemplateStatus = {
9391078
CREATED: "CREATED",
1079+
CREATING: "CREATING",
1080+
CREATION_FAILED: "CREATION_FAILED",
1081+
PENDING_CREATION: "PENDING_CREATION",
1082+
READY: "READY",
9401083
} as const;
9411084

9421085
/**
@@ -954,6 +1097,16 @@ export interface GetMigrationWorkflowTemplateResponse {
9541097
*/
9551098
id?: string;
9561099

1100+
/**
1101+
* @public
1102+
* <p>&gt;The Amazon Resource Name (ARN) of the migration workflow template. The format for an
1103+
* Migration Hub Orchestrator template ARN is
1104+
* <code>arn:aws:migrationhub-orchestrator:region:account:template/template-abcd1234</code>.
1105+
* For more information about ARNs, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Names (ARNs)</a>
1106+
* in the <i>AWS General Reference</i>.</p>
1107+
*/
1108+
templateArn?: string;
1109+
9571110
/**
9581111
* @public
9591112
* <p>The name of the template.</p>
@@ -978,6 +1131,18 @@ export interface GetMigrationWorkflowTemplateResponse {
9781131
*/
9791132
tools?: Tool[];
9801133

1134+
/**
1135+
* @public
1136+
* <p>The time at which the template was last created.</p>
1137+
*/
1138+
creationTime?: Date;
1139+
1140+
/**
1141+
* @public
1142+
* <p>The owner of the migration workflow template.</p>
1143+
*/
1144+
owner?: string;
1145+
9811146
/**
9821147
* @public
9831148
* <p>The status of the template.</p>
@@ -986,9 +1151,42 @@ export interface GetMigrationWorkflowTemplateResponse {
9861151

9871152
/**
9881153
* @public
989-
* <p>The time at which the template was last created.</p>
1154+
* <p>The status message of retrieving migration workflow templates.</p>
9901155
*/
991-
creationTime?: Date;
1156+
statusMessage?: string;
1157+
1158+
/**
1159+
* @public
1160+
* <p>The class of the migration workflow template. The available template classes
1161+
* are:</p>
1162+
* <ul>
1163+
* <li>
1164+
* <p>A2C</p>
1165+
* </li>
1166+
* <li>
1167+
* <p>MGN</p>
1168+
* </li>
1169+
* <li>
1170+
* <p>SAP_MULTI</p>
1171+
* </li>
1172+
* <li>
1173+
* <p>SQL_EC2</p>
1174+
* </li>
1175+
* <li>
1176+
* <p>SQL_RDS</p>
1177+
* </li>
1178+
* <li>
1179+
* <p>VMIE</p>
1180+
* </li>
1181+
* </ul>
1182+
*/
1183+
templateClass?: string;
1184+
1185+
/**
1186+
* @public
1187+
* <p>The tags added to the migration workflow template.</p>
1188+
*/
1189+
tags?: Record<string, string>;
9921190
}
9931191

9941192
/**
@@ -1061,6 +1259,63 @@ export interface ListMigrationWorkflowTemplatesResponse {
10611259
templateSummary: TemplateSummary[] | undefined;
10621260
}
10631261

1262+
/**
1263+
* @public
1264+
*/
1265+
export interface UpdateTemplateRequest {
1266+
/**
1267+
* @public
1268+
* <p>The ID of the request to update a migration workflow template.</p>
1269+
*/
1270+
id: string | undefined;
1271+
1272+
/**
1273+
* @public
1274+
* <p>The name of the migration workflow template to update.</p>
1275+
*/
1276+
templateName?: string;
1277+
1278+
/**
1279+
* @public
1280+
* <p>The description of the migration workflow template to update.</p>
1281+
*/
1282+
templateDescription?: string;
1283+
1284+
/**
1285+
* @public
1286+
* <p>A unique, case-sensitive identifier that you provide to ensure the
1287+
* idempotency of the request.</p>
1288+
*/
1289+
clientToken?: string;
1290+
}
1291+
1292+
/**
1293+
* @public
1294+
*/
1295+
export interface UpdateTemplateResponse {
1296+
/**
1297+
* @public
1298+
* <p>The ID of the migration workflow template being updated.</p>
1299+
*/
1300+
templateId?: string;
1301+
1302+
/**
1303+
* @public
1304+
* <p>The ARN of the migration workflow template being updated. The format for an Migration Hub Orchestrator
1305+
* template ARN is
1306+
* <code>arn:aws:migrationhub-orchestrator:region:account:template/template-abcd1234</code>.
1307+
* For more information about ARNs, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Names (ARNs)</a>
1308+
* in the <i>AWS General Reference</i>.</p>
1309+
*/
1310+
templateArn?: string;
1311+
1312+
/**
1313+
* @public
1314+
* <p>The tags added to the migration workflow template.</p>
1315+
*/
1316+
tags?: Record<string, string>;
1317+
}
1318+
10641319
/**
10651320
* @public
10661321
*/
@@ -1997,7 +2252,7 @@ export interface GetWorkflowStepRequest {
19972252

19982253
/**
19992254
* @public
2000-
* <p>desThe ID of the step group.</p>
2255+
* <p>The ID of the step group.</p>
20012256
*/
20022257
stepGroupId: string | undefined;
20032258

@@ -2019,6 +2274,7 @@ export const StepStatus = {
20192274
IN_PROGRESS: "IN_PROGRESS",
20202275
PAUSED: "PAUSED",
20212276
READY: "READY",
2277+
SKIPPED: "SKIPPED",
20222278
USER_ATTENTION_REQUIRED: "USER_ATTENTION_REQUIRED",
20232279
} as const;
20242280

‎clients/client-migrationhuborchestrator/src/protocols/Aws_restJson1.ts

+167
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,16 @@ import {
2222
ResponseMetadata as __ResponseMetadata,
2323
SerdeContext as __SerdeContext,
2424
} from "@smithy/types";
25+
import { v4 as generateIdempotencyToken } from "uuid";
2526

27+
import { CreateTemplateCommandInput, CreateTemplateCommandOutput } from "../commands/CreateTemplateCommand";
2628
import { CreateWorkflowCommandInput, CreateWorkflowCommandOutput } from "../commands/CreateWorkflowCommand";
2729
import { CreateWorkflowStepCommandInput, CreateWorkflowStepCommandOutput } from "../commands/CreateWorkflowStepCommand";
2830
import {
2931
CreateWorkflowStepGroupCommandInput,
3032
CreateWorkflowStepGroupCommandOutput,
3133
} from "../commands/CreateWorkflowStepGroupCommand";
34+
import { DeleteTemplateCommandInput, DeleteTemplateCommandOutput } from "../commands/DeleteTemplateCommand";
3235
import { DeleteWorkflowCommandInput, DeleteWorkflowCommandOutput } from "../commands/DeleteWorkflowCommand";
3336
import { DeleteWorkflowStepCommandInput, DeleteWorkflowStepCommandOutput } from "../commands/DeleteWorkflowStepCommand";
3437
import {
@@ -69,6 +72,7 @@ import { StartWorkflowCommandInput, StartWorkflowCommandOutput } from "../comman
6972
import { StopWorkflowCommandInput, StopWorkflowCommandOutput } from "../commands/StopWorkflowCommand";
7073
import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
7174
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
75+
import { UpdateTemplateCommandInput, UpdateTemplateCommandOutput } from "../commands/UpdateTemplateCommand";
7276
import { UpdateWorkflowCommandInput, UpdateWorkflowCommandOutput } from "../commands/UpdateWorkflowCommand";
7377
import { UpdateWorkflowStepCommandInput, UpdateWorkflowStepCommandOutput } from "../commands/UpdateWorkflowStepCommand";
7478
import {
@@ -78,19 +82,47 @@ import {
7882
import { MigrationHubOrchestratorServiceException as __BaseException } from "../models/MigrationHubOrchestratorServiceException";
7983
import {
8084
AccessDeniedException,
85+
ConflictException,
8186
InternalServerException,
8287
MigrationWorkflowSummary,
8388
PlatformCommand,
8489
PlatformScriptKey,
8590
ResourceNotFoundException,
8691
StepInput,
92+
TemplateSource,
8793
ThrottlingException,
8894
ValidationException,
8995
WorkflowStepAutomationConfiguration,
9096
WorkflowStepOutput,
9197
WorkflowStepOutputUnion,
9298
} from "../models/models_0";
9399

100+
/**
101+
* serializeAws_restJson1CreateTemplateCommand
102+
*/
103+
export const se_CreateTemplateCommand = async (
104+
input: CreateTemplateCommandInput,
105+
context: __SerdeContext
106+
): Promise<__HttpRequest> => {
107+
const b = rb(input, context);
108+
const headers: any = {
109+
"content-type": "application/json",
110+
};
111+
b.bp("/template");
112+
let body: any;
113+
body = JSON.stringify(
114+
take(input, {
115+
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
116+
tags: (_) => _json(_),
117+
templateDescription: [],
118+
templateName: [],
119+
templateSource: (_) => _json(_),
120+
})
121+
);
122+
b.m("POST").h(headers).b(body);
123+
return b.build();
124+
};
125+
94126
/**
95127
* serializeAws_restJson1CreateWorkflowCommand
96128
*/
@@ -176,6 +208,22 @@ export const se_CreateWorkflowStepGroupCommand = async (
176208
return b.build();
177209
};
178210

211+
/**
212+
* serializeAws_restJson1DeleteTemplateCommand
213+
*/
214+
export const se_DeleteTemplateCommand = async (
215+
input: DeleteTemplateCommandInput,
216+
context: __SerdeContext
217+
): Promise<__HttpRequest> => {
218+
const b = rb(input, context);
219+
const headers: any = {};
220+
b.bp("/template/{id}");
221+
b.p("id", () => input.id!, "{id}", false);
222+
let body: any;
223+
b.m("DELETE").h(headers).b(body);
224+
return b.build();
225+
};
226+
179227
/**
180228
* serializeAws_restJson1DeleteWorkflowCommand
181229
*/
@@ -596,6 +644,31 @@ export const se_UntagResourceCommand = async (
596644
return b.build();
597645
};
598646

647+
/**
648+
* serializeAws_restJson1UpdateTemplateCommand
649+
*/
650+
export const se_UpdateTemplateCommand = async (
651+
input: UpdateTemplateCommandInput,
652+
context: __SerdeContext
653+
): Promise<__HttpRequest> => {
654+
const b = rb(input, context);
655+
const headers: any = {
656+
"content-type": "application/json",
657+
};
658+
b.bp("/template/{id}");
659+
b.p("id", () => input.id!, "{id}", false);
660+
let body: any;
661+
body = JSON.stringify(
662+
take(input, {
663+
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
664+
templateDescription: [],
665+
templateName: [],
666+
})
667+
);
668+
b.m("POST").h(headers).b(body);
669+
return b.build();
670+
};
671+
599672
/**
600673
* serializeAws_restJson1UpdateWorkflowCommand
601674
*/
@@ -684,6 +757,29 @@ export const se_UpdateWorkflowStepGroupCommand = async (
684757
return b.build();
685758
};
686759

760+
/**
761+
* deserializeAws_restJson1CreateTemplateCommand
762+
*/
763+
export const de_CreateTemplateCommand = async (
764+
output: __HttpResponse,
765+
context: __SerdeContext
766+
): Promise<CreateTemplateCommandOutput> => {
767+
if (output.statusCode !== 200 && output.statusCode >= 300) {
768+
return de_CommandError(output, context);
769+
}
770+
const contents: any = map({
771+
$metadata: deserializeMetadata(output),
772+
});
773+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
774+
const doc = take(data, {
775+
tags: _json,
776+
templateArn: __expectString,
777+
templateId: __expectString,
778+
});
779+
Object.assign(contents, doc);
780+
return contents;
781+
};
782+
687783
/**
688784
* deserializeAws_restJson1CreateWorkflowCommand
689785
*/
@@ -767,6 +863,23 @@ export const de_CreateWorkflowStepGroupCommand = async (
767863
return contents;
768864
};
769865

866+
/**
867+
* deserializeAws_restJson1DeleteTemplateCommand
868+
*/
869+
export const de_DeleteTemplateCommand = async (
870+
output: __HttpResponse,
871+
context: __SerdeContext
872+
): Promise<DeleteTemplateCommandOutput> => {
873+
if (output.statusCode !== 200 && output.statusCode >= 300) {
874+
return de_CommandError(output, context);
875+
}
876+
const contents: any = map({
877+
$metadata: deserializeMetadata(output),
878+
});
879+
await collectBody(output.body, context);
880+
return contents;
881+
};
882+
770883
/**
771884
* deserializeAws_restJson1DeleteWorkflowCommand
772885
*/
@@ -844,7 +957,12 @@ export const de_GetTemplateCommand = async (
844957
id: __expectString,
845958
inputs: _json,
846959
name: __expectString,
960+
owner: __expectString,
847961
status: __expectString,
962+
statusMessage: __expectString,
963+
tags: _json,
964+
templateArn: __expectString,
965+
templateClass: __expectString,
848966
tools: _json,
849967
});
850968
Object.assign(contents, doc);
@@ -1308,6 +1426,29 @@ export const de_UntagResourceCommand = async (
13081426
return contents;
13091427
};
13101428

1429+
/**
1430+
* deserializeAws_restJson1UpdateTemplateCommand
1431+
*/
1432+
export const de_UpdateTemplateCommand = async (
1433+
output: __HttpResponse,
1434+
context: __SerdeContext
1435+
): Promise<UpdateTemplateCommandOutput> => {
1436+
if (output.statusCode !== 200 && output.statusCode >= 300) {
1437+
return de_CommandError(output, context);
1438+
}
1439+
const contents: any = map({
1440+
$metadata: deserializeMetadata(output),
1441+
});
1442+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1443+
const doc = take(data, {
1444+
tags: _json,
1445+
templateArn: __expectString,
1446+
templateId: __expectString,
1447+
});
1448+
Object.assign(contents, doc);
1449+
return contents;
1450+
};
1451+
13111452
/**
13121453
* deserializeAws_restJson1UpdateWorkflowCommand
13131454
*/
@@ -1405,6 +1546,9 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext):
14051546
case "AccessDeniedException":
14061547
case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
14071548
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1549+
case "ConflictException":
1550+
case "com.amazonaws.migrationhuborchestrator#ConflictException":
1551+
throw await de_ConflictExceptionRes(parsedOutput, context);
14081552
case "InternalServerException":
14091553
case "com.amazonaws.migrationhuborchestrator#InternalServerException":
14101554
throw await de_InternalServerExceptionRes(parsedOutput, context);
@@ -1448,6 +1592,23 @@ const de_AccessDeniedExceptionRes = async (
14481592
return __decorateServiceException(exception, parsedOutput.body);
14491593
};
14501594

1595+
/**
1596+
* deserializeAws_restJson1ConflictExceptionRes
1597+
*/
1598+
const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise<ConflictException> => {
1599+
const contents: any = map({});
1600+
const data: any = parsedOutput.body;
1601+
const doc = take(data, {
1602+
message: __expectString,
1603+
});
1604+
Object.assign(contents, doc);
1605+
const exception = new ConflictException({
1606+
$metadata: deserializeMetadata(parsedOutput),
1607+
...contents,
1608+
});
1609+
return __decorateServiceException(exception, parsedOutput.body);
1610+
};
1611+
14511612
/**
14521613
* deserializeAws_restJson1InternalServerExceptionRes
14531614
*/
@@ -1522,6 +1683,8 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont
15221683
return __decorateServiceException(exception, parsedOutput.body);
15231684
};
15241685

1686+
// se_MaxStringList omitted.
1687+
15251688
// se_PlatformCommand omitted.
15261689

15271690
// se_PlatformScriptKey omitted.
@@ -1536,6 +1699,8 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont
15361699

15371700
// se_TagMap omitted.
15381701

1702+
// se_TemplateSource omitted.
1703+
15391704
// se_WorkflowStepAutomationConfiguration omitted.
15401705

15411706
// se_WorkflowStepOutput omitted.
@@ -1544,6 +1709,8 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont
15441709

15451710
// se_WorkflowStepOutputUnion omitted.
15461711

1712+
// de_MaxStringList omitted.
1713+
15471714
/**
15481715
* deserializeAws_restJson1MigrationWorkflowSummary
15491716
*/

‎codegen/sdk-codegen/aws-models/migrationhuborchestrator.json

+400-12
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.