Skip to content

Commit 86ce4d1

Browse files
author
awstools
committed
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"),

0 commit comments

Comments
 (0)