@aws-sdk/client-migration-hub 3.490.0 → 3.496.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist-cjs/MigrationHub.js +1 -45
  2. package/dist-cjs/MigrationHubClient.js +1 -43
  3. package/dist-cjs/commands/AssociateCreatedArtifactCommand.js +1 -28
  4. package/dist-cjs/commands/AssociateDiscoveredResourceCommand.js +1 -28
  5. package/dist-cjs/commands/CreateProgressUpdateStreamCommand.js +1 -28
  6. package/dist-cjs/commands/DeleteProgressUpdateStreamCommand.js +1 -28
  7. package/dist-cjs/commands/DescribeApplicationStateCommand.js +1 -28
  8. package/dist-cjs/commands/DescribeMigrationTaskCommand.js +1 -28
  9. package/dist-cjs/commands/DisassociateCreatedArtifactCommand.js +1 -28
  10. package/dist-cjs/commands/DisassociateDiscoveredResourceCommand.js +1 -28
  11. package/dist-cjs/commands/ImportMigrationTaskCommand.js +1 -28
  12. package/dist-cjs/commands/ListApplicationStatesCommand.js +1 -28
  13. package/dist-cjs/commands/ListCreatedArtifactsCommand.js +1 -28
  14. package/dist-cjs/commands/ListDiscoveredResourcesCommand.js +1 -28
  15. package/dist-cjs/commands/ListMigrationTasksCommand.js +1 -28
  16. package/dist-cjs/commands/ListProgressUpdateStreamsCommand.js +1 -28
  17. package/dist-cjs/commands/NotifyApplicationStateCommand.js +1 -28
  18. package/dist-cjs/commands/NotifyMigrationTaskStateCommand.js +1 -28
  19. package/dist-cjs/commands/PutResourceAttributesCommand.js +1 -28
  20. package/dist-cjs/commands/index.js +1 -20
  21. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  22. package/dist-cjs/extensionConfiguration.js +1 -2
  23. package/dist-cjs/index.js +2018 -11
  24. package/dist-cjs/models/MigrationHubServiceException.js +1 -12
  25. package/dist-cjs/models/index.js +1 -4
  26. package/dist-cjs/models/models_0.js +1 -168
  27. package/dist-cjs/pagination/Interfaces.js +1 -2
  28. package/dist-cjs/pagination/ListApplicationStatesPaginator.js +1 -7
  29. package/dist-cjs/pagination/ListCreatedArtifactsPaginator.js +1 -7
  30. package/dist-cjs/pagination/ListDiscoveredResourcesPaginator.js +1 -7
  31. package/dist-cjs/pagination/ListMigrationTasksPaginator.js +1 -7
  32. package/dist-cjs/pagination/ListProgressUpdateStreamsPaginator.js +1 -7
  33. package/dist-cjs/pagination/index.js +1 -9
  34. package/dist-cjs/protocols/Aws_json1_1.js +1 -1301
  35. package/dist-cjs/runtimeExtensions.js +1 -22
  36. package/package.json +40 -40
@@ -1,1301 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_PutResourceAttributesCommand = exports.de_NotifyMigrationTaskStateCommand = exports.de_NotifyApplicationStateCommand = exports.de_ListProgressUpdateStreamsCommand = exports.de_ListMigrationTasksCommand = exports.de_ListDiscoveredResourcesCommand = exports.de_ListCreatedArtifactsCommand = exports.de_ListApplicationStatesCommand = exports.de_ImportMigrationTaskCommand = exports.de_DisassociateDiscoveredResourceCommand = exports.de_DisassociateCreatedArtifactCommand = exports.de_DescribeMigrationTaskCommand = exports.de_DescribeApplicationStateCommand = exports.de_DeleteProgressUpdateStreamCommand = exports.de_CreateProgressUpdateStreamCommand = exports.de_AssociateDiscoveredResourceCommand = exports.de_AssociateCreatedArtifactCommand = exports.se_PutResourceAttributesCommand = exports.se_NotifyMigrationTaskStateCommand = exports.se_NotifyApplicationStateCommand = exports.se_ListProgressUpdateStreamsCommand = exports.se_ListMigrationTasksCommand = exports.se_ListDiscoveredResourcesCommand = exports.se_ListCreatedArtifactsCommand = exports.se_ListApplicationStatesCommand = exports.se_ImportMigrationTaskCommand = exports.se_DisassociateDiscoveredResourceCommand = exports.se_DisassociateCreatedArtifactCommand = exports.se_DescribeMigrationTaskCommand = exports.se_DescribeApplicationStateCommand = exports.se_DeleteProgressUpdateStreamCommand = exports.se_CreateProgressUpdateStreamCommand = exports.se_AssociateDiscoveredResourceCommand = exports.se_AssociateCreatedArtifactCommand = void 0;
4
- const protocol_http_1 = require("@smithy/protocol-http");
5
- const smithy_client_1 = require("@smithy/smithy-client");
6
- const MigrationHubServiceException_1 = require("../models/MigrationHubServiceException");
7
- const models_0_1 = require("../models/models_0");
8
- const se_AssociateCreatedArtifactCommand = async (input, context) => {
9
- const headers = sharedHeaders("AssociateCreatedArtifact");
10
- let body;
11
- body = JSON.stringify((0, smithy_client_1._json)(input));
12
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
- };
14
- exports.se_AssociateCreatedArtifactCommand = se_AssociateCreatedArtifactCommand;
15
- const se_AssociateDiscoveredResourceCommand = async (input, context) => {
16
- const headers = sharedHeaders("AssociateDiscoveredResource");
17
- let body;
18
- body = JSON.stringify((0, smithy_client_1._json)(input));
19
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
20
- };
21
- exports.se_AssociateDiscoveredResourceCommand = se_AssociateDiscoveredResourceCommand;
22
- const se_CreateProgressUpdateStreamCommand = async (input, context) => {
23
- const headers = sharedHeaders("CreateProgressUpdateStream");
24
- let body;
25
- body = JSON.stringify((0, smithy_client_1._json)(input));
26
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
27
- };
28
- exports.se_CreateProgressUpdateStreamCommand = se_CreateProgressUpdateStreamCommand;
29
- const se_DeleteProgressUpdateStreamCommand = async (input, context) => {
30
- const headers = sharedHeaders("DeleteProgressUpdateStream");
31
- let body;
32
- body = JSON.stringify((0, smithy_client_1._json)(input));
33
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
34
- };
35
- exports.se_DeleteProgressUpdateStreamCommand = se_DeleteProgressUpdateStreamCommand;
36
- const se_DescribeApplicationStateCommand = async (input, context) => {
37
- const headers = sharedHeaders("DescribeApplicationState");
38
- let body;
39
- body = JSON.stringify((0, smithy_client_1._json)(input));
40
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
- };
42
- exports.se_DescribeApplicationStateCommand = se_DescribeApplicationStateCommand;
43
- const se_DescribeMigrationTaskCommand = async (input, context) => {
44
- const headers = sharedHeaders("DescribeMigrationTask");
45
- let body;
46
- body = JSON.stringify((0, smithy_client_1._json)(input));
47
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
48
- };
49
- exports.se_DescribeMigrationTaskCommand = se_DescribeMigrationTaskCommand;
50
- const se_DisassociateCreatedArtifactCommand = async (input, context) => {
51
- const headers = sharedHeaders("DisassociateCreatedArtifact");
52
- let body;
53
- body = JSON.stringify((0, smithy_client_1._json)(input));
54
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
55
- };
56
- exports.se_DisassociateCreatedArtifactCommand = se_DisassociateCreatedArtifactCommand;
57
- const se_DisassociateDiscoveredResourceCommand = async (input, context) => {
58
- const headers = sharedHeaders("DisassociateDiscoveredResource");
59
- let body;
60
- body = JSON.stringify((0, smithy_client_1._json)(input));
61
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
62
- };
63
- exports.se_DisassociateDiscoveredResourceCommand = se_DisassociateDiscoveredResourceCommand;
64
- const se_ImportMigrationTaskCommand = async (input, context) => {
65
- const headers = sharedHeaders("ImportMigrationTask");
66
- let body;
67
- body = JSON.stringify((0, smithy_client_1._json)(input));
68
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
69
- };
70
- exports.se_ImportMigrationTaskCommand = se_ImportMigrationTaskCommand;
71
- const se_ListApplicationStatesCommand = async (input, context) => {
72
- const headers = sharedHeaders("ListApplicationStates");
73
- let body;
74
- body = JSON.stringify((0, smithy_client_1._json)(input));
75
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
- };
77
- exports.se_ListApplicationStatesCommand = se_ListApplicationStatesCommand;
78
- const se_ListCreatedArtifactsCommand = async (input, context) => {
79
- const headers = sharedHeaders("ListCreatedArtifacts");
80
- let body;
81
- body = JSON.stringify((0, smithy_client_1._json)(input));
82
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
83
- };
84
- exports.se_ListCreatedArtifactsCommand = se_ListCreatedArtifactsCommand;
85
- const se_ListDiscoveredResourcesCommand = async (input, context) => {
86
- const headers = sharedHeaders("ListDiscoveredResources");
87
- let body;
88
- body = JSON.stringify((0, smithy_client_1._json)(input));
89
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
90
- };
91
- exports.se_ListDiscoveredResourcesCommand = se_ListDiscoveredResourcesCommand;
92
- const se_ListMigrationTasksCommand = async (input, context) => {
93
- const headers = sharedHeaders("ListMigrationTasks");
94
- let body;
95
- body = JSON.stringify((0, smithy_client_1._json)(input));
96
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
97
- };
98
- exports.se_ListMigrationTasksCommand = se_ListMigrationTasksCommand;
99
- const se_ListProgressUpdateStreamsCommand = async (input, context) => {
100
- const headers = sharedHeaders("ListProgressUpdateStreams");
101
- let body;
102
- body = JSON.stringify((0, smithy_client_1._json)(input));
103
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
104
- };
105
- exports.se_ListProgressUpdateStreamsCommand = se_ListProgressUpdateStreamsCommand;
106
- const se_NotifyApplicationStateCommand = async (input, context) => {
107
- const headers = sharedHeaders("NotifyApplicationState");
108
- let body;
109
- body = JSON.stringify(se_NotifyApplicationStateRequest(input, context));
110
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
111
- };
112
- exports.se_NotifyApplicationStateCommand = se_NotifyApplicationStateCommand;
113
- const se_NotifyMigrationTaskStateCommand = async (input, context) => {
114
- const headers = sharedHeaders("NotifyMigrationTaskState");
115
- let body;
116
- body = JSON.stringify(se_NotifyMigrationTaskStateRequest(input, context));
117
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
118
- };
119
- exports.se_NotifyMigrationTaskStateCommand = se_NotifyMigrationTaskStateCommand;
120
- const se_PutResourceAttributesCommand = async (input, context) => {
121
- const headers = sharedHeaders("PutResourceAttributes");
122
- let body;
123
- body = JSON.stringify((0, smithy_client_1._json)(input));
124
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
125
- };
126
- exports.se_PutResourceAttributesCommand = se_PutResourceAttributesCommand;
127
- const de_AssociateCreatedArtifactCommand = async (output, context) => {
128
- if (output.statusCode >= 300) {
129
- return de_AssociateCreatedArtifactCommandError(output, context);
130
- }
131
- const data = await parseBody(output.body, context);
132
- let contents = {};
133
- contents = (0, smithy_client_1._json)(data);
134
- const response = {
135
- $metadata: deserializeMetadata(output),
136
- ...contents,
137
- };
138
- return response;
139
- };
140
- exports.de_AssociateCreatedArtifactCommand = de_AssociateCreatedArtifactCommand;
141
- const de_AssociateCreatedArtifactCommandError = async (output, context) => {
142
- const parsedOutput = {
143
- ...output,
144
- body: await parseErrorBody(output.body, context),
145
- };
146
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
147
- switch (errorCode) {
148
- case "AccessDeniedException":
149
- case "com.amazonaws.migrationhub#AccessDeniedException":
150
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
151
- case "DryRunOperation":
152
- case "com.amazonaws.migrationhub#DryRunOperation":
153
- throw await de_DryRunOperationRes(parsedOutput, context);
154
- case "HomeRegionNotSetException":
155
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
156
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
157
- case "InternalServerError":
158
- case "com.amazonaws.migrationhub#InternalServerError":
159
- throw await de_InternalServerErrorRes(parsedOutput, context);
160
- case "InvalidInputException":
161
- case "com.amazonaws.migrationhub#InvalidInputException":
162
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
163
- case "ResourceNotFoundException":
164
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
165
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
166
- case "ServiceUnavailableException":
167
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
168
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
169
- case "ThrottlingException":
170
- case "com.amazonaws.migrationhub#ThrottlingException":
171
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
172
- case "UnauthorizedOperation":
173
- case "com.amazonaws.migrationhub#UnauthorizedOperation":
174
- throw await de_UnauthorizedOperationRes(parsedOutput, context);
175
- default:
176
- const parsedBody = parsedOutput.body;
177
- return throwDefaultError({
178
- output,
179
- parsedBody,
180
- errorCode,
181
- });
182
- }
183
- };
184
- const de_AssociateDiscoveredResourceCommand = async (output, context) => {
185
- if (output.statusCode >= 300) {
186
- return de_AssociateDiscoveredResourceCommandError(output, context);
187
- }
188
- const data = await parseBody(output.body, context);
189
- let contents = {};
190
- contents = (0, smithy_client_1._json)(data);
191
- const response = {
192
- $metadata: deserializeMetadata(output),
193
- ...contents,
194
- };
195
- return response;
196
- };
197
- exports.de_AssociateDiscoveredResourceCommand = de_AssociateDiscoveredResourceCommand;
198
- const de_AssociateDiscoveredResourceCommandError = async (output, context) => {
199
- const parsedOutput = {
200
- ...output,
201
- body: await parseErrorBody(output.body, context),
202
- };
203
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
204
- switch (errorCode) {
205
- case "AccessDeniedException":
206
- case "com.amazonaws.migrationhub#AccessDeniedException":
207
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
208
- case "DryRunOperation":
209
- case "com.amazonaws.migrationhub#DryRunOperation":
210
- throw await de_DryRunOperationRes(parsedOutput, context);
211
- case "HomeRegionNotSetException":
212
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
213
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
214
- case "InternalServerError":
215
- case "com.amazonaws.migrationhub#InternalServerError":
216
- throw await de_InternalServerErrorRes(parsedOutput, context);
217
- case "InvalidInputException":
218
- case "com.amazonaws.migrationhub#InvalidInputException":
219
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
220
- case "PolicyErrorException":
221
- case "com.amazonaws.migrationhub#PolicyErrorException":
222
- throw await de_PolicyErrorExceptionRes(parsedOutput, context);
223
- case "ResourceNotFoundException":
224
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
225
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
226
- case "ServiceUnavailableException":
227
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
228
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
229
- case "ThrottlingException":
230
- case "com.amazonaws.migrationhub#ThrottlingException":
231
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
232
- case "UnauthorizedOperation":
233
- case "com.amazonaws.migrationhub#UnauthorizedOperation":
234
- throw await de_UnauthorizedOperationRes(parsedOutput, context);
235
- default:
236
- const parsedBody = parsedOutput.body;
237
- return throwDefaultError({
238
- output,
239
- parsedBody,
240
- errorCode,
241
- });
242
- }
243
- };
244
- const de_CreateProgressUpdateStreamCommand = async (output, context) => {
245
- if (output.statusCode >= 300) {
246
- return de_CreateProgressUpdateStreamCommandError(output, context);
247
- }
248
- const data = await parseBody(output.body, context);
249
- let contents = {};
250
- contents = (0, smithy_client_1._json)(data);
251
- const response = {
252
- $metadata: deserializeMetadata(output),
253
- ...contents,
254
- };
255
- return response;
256
- };
257
- exports.de_CreateProgressUpdateStreamCommand = de_CreateProgressUpdateStreamCommand;
258
- const de_CreateProgressUpdateStreamCommandError = async (output, context) => {
259
- const parsedOutput = {
260
- ...output,
261
- body: await parseErrorBody(output.body, context),
262
- };
263
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
264
- switch (errorCode) {
265
- case "AccessDeniedException":
266
- case "com.amazonaws.migrationhub#AccessDeniedException":
267
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
268
- case "DryRunOperation":
269
- case "com.amazonaws.migrationhub#DryRunOperation":
270
- throw await de_DryRunOperationRes(parsedOutput, context);
271
- case "HomeRegionNotSetException":
272
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
273
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
274
- case "InternalServerError":
275
- case "com.amazonaws.migrationhub#InternalServerError":
276
- throw await de_InternalServerErrorRes(parsedOutput, context);
277
- case "InvalidInputException":
278
- case "com.amazonaws.migrationhub#InvalidInputException":
279
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
280
- case "ServiceUnavailableException":
281
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
282
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
283
- case "ThrottlingException":
284
- case "com.amazonaws.migrationhub#ThrottlingException":
285
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
286
- case "UnauthorizedOperation":
287
- case "com.amazonaws.migrationhub#UnauthorizedOperation":
288
- throw await de_UnauthorizedOperationRes(parsedOutput, context);
289
- default:
290
- const parsedBody = parsedOutput.body;
291
- return throwDefaultError({
292
- output,
293
- parsedBody,
294
- errorCode,
295
- });
296
- }
297
- };
298
- const de_DeleteProgressUpdateStreamCommand = async (output, context) => {
299
- if (output.statusCode >= 300) {
300
- return de_DeleteProgressUpdateStreamCommandError(output, context);
301
- }
302
- const data = await parseBody(output.body, context);
303
- let contents = {};
304
- contents = (0, smithy_client_1._json)(data);
305
- const response = {
306
- $metadata: deserializeMetadata(output),
307
- ...contents,
308
- };
309
- return response;
310
- };
311
- exports.de_DeleteProgressUpdateStreamCommand = de_DeleteProgressUpdateStreamCommand;
312
- const de_DeleteProgressUpdateStreamCommandError = async (output, context) => {
313
- const parsedOutput = {
314
- ...output,
315
- body: await parseErrorBody(output.body, context),
316
- };
317
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
318
- switch (errorCode) {
319
- case "AccessDeniedException":
320
- case "com.amazonaws.migrationhub#AccessDeniedException":
321
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
322
- case "DryRunOperation":
323
- case "com.amazonaws.migrationhub#DryRunOperation":
324
- throw await de_DryRunOperationRes(parsedOutput, context);
325
- case "HomeRegionNotSetException":
326
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
327
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
328
- case "InternalServerError":
329
- case "com.amazonaws.migrationhub#InternalServerError":
330
- throw await de_InternalServerErrorRes(parsedOutput, context);
331
- case "InvalidInputException":
332
- case "com.amazonaws.migrationhub#InvalidInputException":
333
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
334
- case "ResourceNotFoundException":
335
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
336
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
337
- case "ServiceUnavailableException":
338
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
339
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
340
- case "ThrottlingException":
341
- case "com.amazonaws.migrationhub#ThrottlingException":
342
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
343
- case "UnauthorizedOperation":
344
- case "com.amazonaws.migrationhub#UnauthorizedOperation":
345
- throw await de_UnauthorizedOperationRes(parsedOutput, context);
346
- default:
347
- const parsedBody = parsedOutput.body;
348
- return throwDefaultError({
349
- output,
350
- parsedBody,
351
- errorCode,
352
- });
353
- }
354
- };
355
- const de_DescribeApplicationStateCommand = async (output, context) => {
356
- if (output.statusCode >= 300) {
357
- return de_DescribeApplicationStateCommandError(output, context);
358
- }
359
- const data = await parseBody(output.body, context);
360
- let contents = {};
361
- contents = de_DescribeApplicationStateResult(data, context);
362
- const response = {
363
- $metadata: deserializeMetadata(output),
364
- ...contents,
365
- };
366
- return response;
367
- };
368
- exports.de_DescribeApplicationStateCommand = de_DescribeApplicationStateCommand;
369
- const de_DescribeApplicationStateCommandError = async (output, context) => {
370
- const parsedOutput = {
371
- ...output,
372
- body: await parseErrorBody(output.body, context),
373
- };
374
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
375
- switch (errorCode) {
376
- case "AccessDeniedException":
377
- case "com.amazonaws.migrationhub#AccessDeniedException":
378
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
379
- case "HomeRegionNotSetException":
380
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
381
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
382
- case "InternalServerError":
383
- case "com.amazonaws.migrationhub#InternalServerError":
384
- throw await de_InternalServerErrorRes(parsedOutput, context);
385
- case "InvalidInputException":
386
- case "com.amazonaws.migrationhub#InvalidInputException":
387
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
388
- case "PolicyErrorException":
389
- case "com.amazonaws.migrationhub#PolicyErrorException":
390
- throw await de_PolicyErrorExceptionRes(parsedOutput, context);
391
- case "ResourceNotFoundException":
392
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
393
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
394
- case "ServiceUnavailableException":
395
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
396
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
397
- case "ThrottlingException":
398
- case "com.amazonaws.migrationhub#ThrottlingException":
399
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
400
- default:
401
- const parsedBody = parsedOutput.body;
402
- return throwDefaultError({
403
- output,
404
- parsedBody,
405
- errorCode,
406
- });
407
- }
408
- };
409
- const de_DescribeMigrationTaskCommand = async (output, context) => {
410
- if (output.statusCode >= 300) {
411
- return de_DescribeMigrationTaskCommandError(output, context);
412
- }
413
- const data = await parseBody(output.body, context);
414
- let contents = {};
415
- contents = de_DescribeMigrationTaskResult(data, context);
416
- const response = {
417
- $metadata: deserializeMetadata(output),
418
- ...contents,
419
- };
420
- return response;
421
- };
422
- exports.de_DescribeMigrationTaskCommand = de_DescribeMigrationTaskCommand;
423
- const de_DescribeMigrationTaskCommandError = async (output, context) => {
424
- const parsedOutput = {
425
- ...output,
426
- body: await parseErrorBody(output.body, context),
427
- };
428
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
429
- switch (errorCode) {
430
- case "AccessDeniedException":
431
- case "com.amazonaws.migrationhub#AccessDeniedException":
432
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
433
- case "HomeRegionNotSetException":
434
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
435
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
436
- case "InternalServerError":
437
- case "com.amazonaws.migrationhub#InternalServerError":
438
- throw await de_InternalServerErrorRes(parsedOutput, context);
439
- case "InvalidInputException":
440
- case "com.amazonaws.migrationhub#InvalidInputException":
441
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
442
- case "ResourceNotFoundException":
443
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
444
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
445
- case "ServiceUnavailableException":
446
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
447
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
448
- case "ThrottlingException":
449
- case "com.amazonaws.migrationhub#ThrottlingException":
450
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
451
- default:
452
- const parsedBody = parsedOutput.body;
453
- return throwDefaultError({
454
- output,
455
- parsedBody,
456
- errorCode,
457
- });
458
- }
459
- };
460
- const de_DisassociateCreatedArtifactCommand = async (output, context) => {
461
- if (output.statusCode >= 300) {
462
- return de_DisassociateCreatedArtifactCommandError(output, context);
463
- }
464
- const data = await parseBody(output.body, context);
465
- let contents = {};
466
- contents = (0, smithy_client_1._json)(data);
467
- const response = {
468
- $metadata: deserializeMetadata(output),
469
- ...contents,
470
- };
471
- return response;
472
- };
473
- exports.de_DisassociateCreatedArtifactCommand = de_DisassociateCreatedArtifactCommand;
474
- const de_DisassociateCreatedArtifactCommandError = async (output, context) => {
475
- const parsedOutput = {
476
- ...output,
477
- body: await parseErrorBody(output.body, context),
478
- };
479
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
480
- switch (errorCode) {
481
- case "AccessDeniedException":
482
- case "com.amazonaws.migrationhub#AccessDeniedException":
483
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
484
- case "DryRunOperation":
485
- case "com.amazonaws.migrationhub#DryRunOperation":
486
- throw await de_DryRunOperationRes(parsedOutput, context);
487
- case "HomeRegionNotSetException":
488
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
489
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
490
- case "InternalServerError":
491
- case "com.amazonaws.migrationhub#InternalServerError":
492
- throw await de_InternalServerErrorRes(parsedOutput, context);
493
- case "InvalidInputException":
494
- case "com.amazonaws.migrationhub#InvalidInputException":
495
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
496
- case "ResourceNotFoundException":
497
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
498
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
499
- case "ServiceUnavailableException":
500
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
501
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
502
- case "ThrottlingException":
503
- case "com.amazonaws.migrationhub#ThrottlingException":
504
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
505
- case "UnauthorizedOperation":
506
- case "com.amazonaws.migrationhub#UnauthorizedOperation":
507
- throw await de_UnauthorizedOperationRes(parsedOutput, context);
508
- default:
509
- const parsedBody = parsedOutput.body;
510
- return throwDefaultError({
511
- output,
512
- parsedBody,
513
- errorCode,
514
- });
515
- }
516
- };
517
- const de_DisassociateDiscoveredResourceCommand = async (output, context) => {
518
- if (output.statusCode >= 300) {
519
- return de_DisassociateDiscoveredResourceCommandError(output, context);
520
- }
521
- const data = await parseBody(output.body, context);
522
- let contents = {};
523
- contents = (0, smithy_client_1._json)(data);
524
- const response = {
525
- $metadata: deserializeMetadata(output),
526
- ...contents,
527
- };
528
- return response;
529
- };
530
- exports.de_DisassociateDiscoveredResourceCommand = de_DisassociateDiscoveredResourceCommand;
531
- const de_DisassociateDiscoveredResourceCommandError = async (output, context) => {
532
- const parsedOutput = {
533
- ...output,
534
- body: await parseErrorBody(output.body, context),
535
- };
536
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
537
- switch (errorCode) {
538
- case "AccessDeniedException":
539
- case "com.amazonaws.migrationhub#AccessDeniedException":
540
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
541
- case "DryRunOperation":
542
- case "com.amazonaws.migrationhub#DryRunOperation":
543
- throw await de_DryRunOperationRes(parsedOutput, context);
544
- case "HomeRegionNotSetException":
545
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
546
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
547
- case "InternalServerError":
548
- case "com.amazonaws.migrationhub#InternalServerError":
549
- throw await de_InternalServerErrorRes(parsedOutput, context);
550
- case "InvalidInputException":
551
- case "com.amazonaws.migrationhub#InvalidInputException":
552
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
553
- case "ResourceNotFoundException":
554
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
555
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
556
- case "ServiceUnavailableException":
557
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
558
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
559
- case "ThrottlingException":
560
- case "com.amazonaws.migrationhub#ThrottlingException":
561
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
562
- case "UnauthorizedOperation":
563
- case "com.amazonaws.migrationhub#UnauthorizedOperation":
564
- throw await de_UnauthorizedOperationRes(parsedOutput, context);
565
- default:
566
- const parsedBody = parsedOutput.body;
567
- return throwDefaultError({
568
- output,
569
- parsedBody,
570
- errorCode,
571
- });
572
- }
573
- };
574
- const de_ImportMigrationTaskCommand = async (output, context) => {
575
- if (output.statusCode >= 300) {
576
- return de_ImportMigrationTaskCommandError(output, context);
577
- }
578
- const data = await parseBody(output.body, context);
579
- let contents = {};
580
- contents = (0, smithy_client_1._json)(data);
581
- const response = {
582
- $metadata: deserializeMetadata(output),
583
- ...contents,
584
- };
585
- return response;
586
- };
587
- exports.de_ImportMigrationTaskCommand = de_ImportMigrationTaskCommand;
588
- const de_ImportMigrationTaskCommandError = async (output, context) => {
589
- const parsedOutput = {
590
- ...output,
591
- body: await parseErrorBody(output.body, context),
592
- };
593
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
594
- switch (errorCode) {
595
- case "AccessDeniedException":
596
- case "com.amazonaws.migrationhub#AccessDeniedException":
597
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
598
- case "DryRunOperation":
599
- case "com.amazonaws.migrationhub#DryRunOperation":
600
- throw await de_DryRunOperationRes(parsedOutput, context);
601
- case "HomeRegionNotSetException":
602
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
603
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
604
- case "InternalServerError":
605
- case "com.amazonaws.migrationhub#InternalServerError":
606
- throw await de_InternalServerErrorRes(parsedOutput, context);
607
- case "InvalidInputException":
608
- case "com.amazonaws.migrationhub#InvalidInputException":
609
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
610
- case "ResourceNotFoundException":
611
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
612
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
613
- case "ServiceUnavailableException":
614
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
615
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
616
- case "ThrottlingException":
617
- case "com.amazonaws.migrationhub#ThrottlingException":
618
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
619
- case "UnauthorizedOperation":
620
- case "com.amazonaws.migrationhub#UnauthorizedOperation":
621
- throw await de_UnauthorizedOperationRes(parsedOutput, context);
622
- default:
623
- const parsedBody = parsedOutput.body;
624
- return throwDefaultError({
625
- output,
626
- parsedBody,
627
- errorCode,
628
- });
629
- }
630
- };
631
- const de_ListApplicationStatesCommand = async (output, context) => {
632
- if (output.statusCode >= 300) {
633
- return de_ListApplicationStatesCommandError(output, context);
634
- }
635
- const data = await parseBody(output.body, context);
636
- let contents = {};
637
- contents = de_ListApplicationStatesResult(data, context);
638
- const response = {
639
- $metadata: deserializeMetadata(output),
640
- ...contents,
641
- };
642
- return response;
643
- };
644
- exports.de_ListApplicationStatesCommand = de_ListApplicationStatesCommand;
645
- const de_ListApplicationStatesCommandError = async (output, context) => {
646
- const parsedOutput = {
647
- ...output,
648
- body: await parseErrorBody(output.body, context),
649
- };
650
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
651
- switch (errorCode) {
652
- case "AccessDeniedException":
653
- case "com.amazonaws.migrationhub#AccessDeniedException":
654
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
655
- case "HomeRegionNotSetException":
656
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
657
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
658
- case "InternalServerError":
659
- case "com.amazonaws.migrationhub#InternalServerError":
660
- throw await de_InternalServerErrorRes(parsedOutput, context);
661
- case "InvalidInputException":
662
- case "com.amazonaws.migrationhub#InvalidInputException":
663
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
664
- case "ServiceUnavailableException":
665
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
666
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
667
- case "ThrottlingException":
668
- case "com.amazonaws.migrationhub#ThrottlingException":
669
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
670
- default:
671
- const parsedBody = parsedOutput.body;
672
- return throwDefaultError({
673
- output,
674
- parsedBody,
675
- errorCode,
676
- });
677
- }
678
- };
679
- const de_ListCreatedArtifactsCommand = async (output, context) => {
680
- if (output.statusCode >= 300) {
681
- return de_ListCreatedArtifactsCommandError(output, context);
682
- }
683
- const data = await parseBody(output.body, context);
684
- let contents = {};
685
- contents = (0, smithy_client_1._json)(data);
686
- const response = {
687
- $metadata: deserializeMetadata(output),
688
- ...contents,
689
- };
690
- return response;
691
- };
692
- exports.de_ListCreatedArtifactsCommand = de_ListCreatedArtifactsCommand;
693
- const de_ListCreatedArtifactsCommandError = async (output, context) => {
694
- const parsedOutput = {
695
- ...output,
696
- body: await parseErrorBody(output.body, context),
697
- };
698
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
699
- switch (errorCode) {
700
- case "AccessDeniedException":
701
- case "com.amazonaws.migrationhub#AccessDeniedException":
702
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
703
- case "HomeRegionNotSetException":
704
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
705
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
706
- case "InternalServerError":
707
- case "com.amazonaws.migrationhub#InternalServerError":
708
- throw await de_InternalServerErrorRes(parsedOutput, context);
709
- case "InvalidInputException":
710
- case "com.amazonaws.migrationhub#InvalidInputException":
711
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
712
- case "ResourceNotFoundException":
713
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
714
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
715
- case "ServiceUnavailableException":
716
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
717
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
718
- case "ThrottlingException":
719
- case "com.amazonaws.migrationhub#ThrottlingException":
720
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
721
- default:
722
- const parsedBody = parsedOutput.body;
723
- return throwDefaultError({
724
- output,
725
- parsedBody,
726
- errorCode,
727
- });
728
- }
729
- };
730
- const de_ListDiscoveredResourcesCommand = async (output, context) => {
731
- if (output.statusCode >= 300) {
732
- return de_ListDiscoveredResourcesCommandError(output, context);
733
- }
734
- const data = await parseBody(output.body, context);
735
- let contents = {};
736
- contents = (0, smithy_client_1._json)(data);
737
- const response = {
738
- $metadata: deserializeMetadata(output),
739
- ...contents,
740
- };
741
- return response;
742
- };
743
- exports.de_ListDiscoveredResourcesCommand = de_ListDiscoveredResourcesCommand;
744
- const de_ListDiscoveredResourcesCommandError = async (output, context) => {
745
- const parsedOutput = {
746
- ...output,
747
- body: await parseErrorBody(output.body, context),
748
- };
749
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
750
- switch (errorCode) {
751
- case "AccessDeniedException":
752
- case "com.amazonaws.migrationhub#AccessDeniedException":
753
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
754
- case "HomeRegionNotSetException":
755
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
756
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
757
- case "InternalServerError":
758
- case "com.amazonaws.migrationhub#InternalServerError":
759
- throw await de_InternalServerErrorRes(parsedOutput, context);
760
- case "InvalidInputException":
761
- case "com.amazonaws.migrationhub#InvalidInputException":
762
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
763
- case "ResourceNotFoundException":
764
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
765
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
766
- case "ServiceUnavailableException":
767
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
768
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
769
- case "ThrottlingException":
770
- case "com.amazonaws.migrationhub#ThrottlingException":
771
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
772
- default:
773
- const parsedBody = parsedOutput.body;
774
- return throwDefaultError({
775
- output,
776
- parsedBody,
777
- errorCode,
778
- });
779
- }
780
- };
781
- const de_ListMigrationTasksCommand = async (output, context) => {
782
- if (output.statusCode >= 300) {
783
- return de_ListMigrationTasksCommandError(output, context);
784
- }
785
- const data = await parseBody(output.body, context);
786
- let contents = {};
787
- contents = de_ListMigrationTasksResult(data, context);
788
- const response = {
789
- $metadata: deserializeMetadata(output),
790
- ...contents,
791
- };
792
- return response;
793
- };
794
- exports.de_ListMigrationTasksCommand = de_ListMigrationTasksCommand;
795
- const de_ListMigrationTasksCommandError = async (output, context) => {
796
- const parsedOutput = {
797
- ...output,
798
- body: await parseErrorBody(output.body, context),
799
- };
800
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
801
- switch (errorCode) {
802
- case "AccessDeniedException":
803
- case "com.amazonaws.migrationhub#AccessDeniedException":
804
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
805
- case "HomeRegionNotSetException":
806
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
807
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
808
- case "InternalServerError":
809
- case "com.amazonaws.migrationhub#InternalServerError":
810
- throw await de_InternalServerErrorRes(parsedOutput, context);
811
- case "InvalidInputException":
812
- case "com.amazonaws.migrationhub#InvalidInputException":
813
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
814
- case "PolicyErrorException":
815
- case "com.amazonaws.migrationhub#PolicyErrorException":
816
- throw await de_PolicyErrorExceptionRes(parsedOutput, context);
817
- case "ResourceNotFoundException":
818
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
819
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
820
- case "ServiceUnavailableException":
821
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
822
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
823
- case "ThrottlingException":
824
- case "com.amazonaws.migrationhub#ThrottlingException":
825
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
826
- default:
827
- const parsedBody = parsedOutput.body;
828
- return throwDefaultError({
829
- output,
830
- parsedBody,
831
- errorCode,
832
- });
833
- }
834
- };
835
- const de_ListProgressUpdateStreamsCommand = async (output, context) => {
836
- if (output.statusCode >= 300) {
837
- return de_ListProgressUpdateStreamsCommandError(output, context);
838
- }
839
- const data = await parseBody(output.body, context);
840
- let contents = {};
841
- contents = (0, smithy_client_1._json)(data);
842
- const response = {
843
- $metadata: deserializeMetadata(output),
844
- ...contents,
845
- };
846
- return response;
847
- };
848
- exports.de_ListProgressUpdateStreamsCommand = de_ListProgressUpdateStreamsCommand;
849
- const de_ListProgressUpdateStreamsCommandError = async (output, context) => {
850
- const parsedOutput = {
851
- ...output,
852
- body: await parseErrorBody(output.body, context),
853
- };
854
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
855
- switch (errorCode) {
856
- case "AccessDeniedException":
857
- case "com.amazonaws.migrationhub#AccessDeniedException":
858
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
859
- case "HomeRegionNotSetException":
860
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
861
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
862
- case "InternalServerError":
863
- case "com.amazonaws.migrationhub#InternalServerError":
864
- throw await de_InternalServerErrorRes(parsedOutput, context);
865
- case "InvalidInputException":
866
- case "com.amazonaws.migrationhub#InvalidInputException":
867
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
868
- case "ServiceUnavailableException":
869
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
870
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
871
- case "ThrottlingException":
872
- case "com.amazonaws.migrationhub#ThrottlingException":
873
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
874
- default:
875
- const parsedBody = parsedOutput.body;
876
- return throwDefaultError({
877
- output,
878
- parsedBody,
879
- errorCode,
880
- });
881
- }
882
- };
883
- const de_NotifyApplicationStateCommand = async (output, context) => {
884
- if (output.statusCode >= 300) {
885
- return de_NotifyApplicationStateCommandError(output, context);
886
- }
887
- const data = await parseBody(output.body, context);
888
- let contents = {};
889
- contents = (0, smithy_client_1._json)(data);
890
- const response = {
891
- $metadata: deserializeMetadata(output),
892
- ...contents,
893
- };
894
- return response;
895
- };
896
- exports.de_NotifyApplicationStateCommand = de_NotifyApplicationStateCommand;
897
- const de_NotifyApplicationStateCommandError = async (output, context) => {
898
- const parsedOutput = {
899
- ...output,
900
- body: await parseErrorBody(output.body, context),
901
- };
902
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
903
- switch (errorCode) {
904
- case "AccessDeniedException":
905
- case "com.amazonaws.migrationhub#AccessDeniedException":
906
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
907
- case "DryRunOperation":
908
- case "com.amazonaws.migrationhub#DryRunOperation":
909
- throw await de_DryRunOperationRes(parsedOutput, context);
910
- case "HomeRegionNotSetException":
911
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
912
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
913
- case "InternalServerError":
914
- case "com.amazonaws.migrationhub#InternalServerError":
915
- throw await de_InternalServerErrorRes(parsedOutput, context);
916
- case "InvalidInputException":
917
- case "com.amazonaws.migrationhub#InvalidInputException":
918
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
919
- case "PolicyErrorException":
920
- case "com.amazonaws.migrationhub#PolicyErrorException":
921
- throw await de_PolicyErrorExceptionRes(parsedOutput, context);
922
- case "ResourceNotFoundException":
923
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
924
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
925
- case "ServiceUnavailableException":
926
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
927
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
928
- case "ThrottlingException":
929
- case "com.amazonaws.migrationhub#ThrottlingException":
930
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
931
- case "UnauthorizedOperation":
932
- case "com.amazonaws.migrationhub#UnauthorizedOperation":
933
- throw await de_UnauthorizedOperationRes(parsedOutput, context);
934
- default:
935
- const parsedBody = parsedOutput.body;
936
- return throwDefaultError({
937
- output,
938
- parsedBody,
939
- errorCode,
940
- });
941
- }
942
- };
943
- const de_NotifyMigrationTaskStateCommand = async (output, context) => {
944
- if (output.statusCode >= 300) {
945
- return de_NotifyMigrationTaskStateCommandError(output, context);
946
- }
947
- const data = await parseBody(output.body, context);
948
- let contents = {};
949
- contents = (0, smithy_client_1._json)(data);
950
- const response = {
951
- $metadata: deserializeMetadata(output),
952
- ...contents,
953
- };
954
- return response;
955
- };
956
- exports.de_NotifyMigrationTaskStateCommand = de_NotifyMigrationTaskStateCommand;
957
- const de_NotifyMigrationTaskStateCommandError = async (output, context) => {
958
- const parsedOutput = {
959
- ...output,
960
- body: await parseErrorBody(output.body, context),
961
- };
962
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
963
- switch (errorCode) {
964
- case "AccessDeniedException":
965
- case "com.amazonaws.migrationhub#AccessDeniedException":
966
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
967
- case "DryRunOperation":
968
- case "com.amazonaws.migrationhub#DryRunOperation":
969
- throw await de_DryRunOperationRes(parsedOutput, context);
970
- case "HomeRegionNotSetException":
971
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
972
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
973
- case "InternalServerError":
974
- case "com.amazonaws.migrationhub#InternalServerError":
975
- throw await de_InternalServerErrorRes(parsedOutput, context);
976
- case "InvalidInputException":
977
- case "com.amazonaws.migrationhub#InvalidInputException":
978
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
979
- case "ResourceNotFoundException":
980
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
981
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
982
- case "ServiceUnavailableException":
983
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
984
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
985
- case "ThrottlingException":
986
- case "com.amazonaws.migrationhub#ThrottlingException":
987
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
988
- case "UnauthorizedOperation":
989
- case "com.amazonaws.migrationhub#UnauthorizedOperation":
990
- throw await de_UnauthorizedOperationRes(parsedOutput, context);
991
- default:
992
- const parsedBody = parsedOutput.body;
993
- return throwDefaultError({
994
- output,
995
- parsedBody,
996
- errorCode,
997
- });
998
- }
999
- };
1000
- const de_PutResourceAttributesCommand = async (output, context) => {
1001
- if (output.statusCode >= 300) {
1002
- return de_PutResourceAttributesCommandError(output, context);
1003
- }
1004
- const data = await parseBody(output.body, context);
1005
- let contents = {};
1006
- contents = (0, smithy_client_1._json)(data);
1007
- const response = {
1008
- $metadata: deserializeMetadata(output),
1009
- ...contents,
1010
- };
1011
- return response;
1012
- };
1013
- exports.de_PutResourceAttributesCommand = de_PutResourceAttributesCommand;
1014
- const de_PutResourceAttributesCommandError = async (output, context) => {
1015
- const parsedOutput = {
1016
- ...output,
1017
- body: await parseErrorBody(output.body, context),
1018
- };
1019
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1020
- switch (errorCode) {
1021
- case "AccessDeniedException":
1022
- case "com.amazonaws.migrationhub#AccessDeniedException":
1023
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1024
- case "DryRunOperation":
1025
- case "com.amazonaws.migrationhub#DryRunOperation":
1026
- throw await de_DryRunOperationRes(parsedOutput, context);
1027
- case "HomeRegionNotSetException":
1028
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
1029
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
1030
- case "InternalServerError":
1031
- case "com.amazonaws.migrationhub#InternalServerError":
1032
- throw await de_InternalServerErrorRes(parsedOutput, context);
1033
- case "InvalidInputException":
1034
- case "com.amazonaws.migrationhub#InvalidInputException":
1035
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1036
- case "ResourceNotFoundException":
1037
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
1038
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1039
- case "ServiceUnavailableException":
1040
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
1041
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1042
- case "ThrottlingException":
1043
- case "com.amazonaws.migrationhub#ThrottlingException":
1044
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1045
- case "UnauthorizedOperation":
1046
- case "com.amazonaws.migrationhub#UnauthorizedOperation":
1047
- throw await de_UnauthorizedOperationRes(parsedOutput, context);
1048
- default:
1049
- const parsedBody = parsedOutput.body;
1050
- return throwDefaultError({
1051
- output,
1052
- parsedBody,
1053
- errorCode,
1054
- });
1055
- }
1056
- };
1057
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1058
- const body = parsedOutput.body;
1059
- const deserialized = (0, smithy_client_1._json)(body);
1060
- const exception = new models_0_1.AccessDeniedException({
1061
- $metadata: deserializeMetadata(parsedOutput),
1062
- ...deserialized,
1063
- });
1064
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1065
- };
1066
- const de_DryRunOperationRes = async (parsedOutput, context) => {
1067
- const body = parsedOutput.body;
1068
- const deserialized = (0, smithy_client_1._json)(body);
1069
- const exception = new models_0_1.DryRunOperation({
1070
- $metadata: deserializeMetadata(parsedOutput),
1071
- ...deserialized,
1072
- });
1073
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1074
- };
1075
- const de_HomeRegionNotSetExceptionRes = async (parsedOutput, context) => {
1076
- const body = parsedOutput.body;
1077
- const deserialized = (0, smithy_client_1._json)(body);
1078
- const exception = new models_0_1.HomeRegionNotSetException({
1079
- $metadata: deserializeMetadata(parsedOutput),
1080
- ...deserialized,
1081
- });
1082
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1083
- };
1084
- const de_InternalServerErrorRes = async (parsedOutput, context) => {
1085
- const body = parsedOutput.body;
1086
- const deserialized = (0, smithy_client_1._json)(body);
1087
- const exception = new models_0_1.InternalServerError({
1088
- $metadata: deserializeMetadata(parsedOutput),
1089
- ...deserialized,
1090
- });
1091
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1092
- };
1093
- const de_InvalidInputExceptionRes = async (parsedOutput, context) => {
1094
- const body = parsedOutput.body;
1095
- const deserialized = (0, smithy_client_1._json)(body);
1096
- const exception = new models_0_1.InvalidInputException({
1097
- $metadata: deserializeMetadata(parsedOutput),
1098
- ...deserialized,
1099
- });
1100
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1101
- };
1102
- const de_PolicyErrorExceptionRes = async (parsedOutput, context) => {
1103
- const body = parsedOutput.body;
1104
- const deserialized = (0, smithy_client_1._json)(body);
1105
- const exception = new models_0_1.PolicyErrorException({
1106
- $metadata: deserializeMetadata(parsedOutput),
1107
- ...deserialized,
1108
- });
1109
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1110
- };
1111
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1112
- const body = parsedOutput.body;
1113
- const deserialized = (0, smithy_client_1._json)(body);
1114
- const exception = new models_0_1.ResourceNotFoundException({
1115
- $metadata: deserializeMetadata(parsedOutput),
1116
- ...deserialized,
1117
- });
1118
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1119
- };
1120
- const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
1121
- const body = parsedOutput.body;
1122
- const deserialized = (0, smithy_client_1._json)(body);
1123
- const exception = new models_0_1.ServiceUnavailableException({
1124
- $metadata: deserializeMetadata(parsedOutput),
1125
- ...deserialized,
1126
- });
1127
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1128
- };
1129
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1130
- const body = parsedOutput.body;
1131
- const deserialized = (0, smithy_client_1._json)(body);
1132
- const exception = new models_0_1.ThrottlingException({
1133
- $metadata: deserializeMetadata(parsedOutput),
1134
- ...deserialized,
1135
- });
1136
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1137
- };
1138
- const de_UnauthorizedOperationRes = async (parsedOutput, context) => {
1139
- const body = parsedOutput.body;
1140
- const deserialized = (0, smithy_client_1._json)(body);
1141
- const exception = new models_0_1.UnauthorizedOperation({
1142
- $metadata: deserializeMetadata(parsedOutput),
1143
- ...deserialized,
1144
- });
1145
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1146
- };
1147
- const se_NotifyApplicationStateRequest = (input, context) => {
1148
- return (0, smithy_client_1.take)(input, {
1149
- ApplicationId: [],
1150
- DryRun: [],
1151
- Status: [],
1152
- UpdateDateTime: (_) => Math.round(_.getTime() / 1000),
1153
- });
1154
- };
1155
- const se_NotifyMigrationTaskStateRequest = (input, context) => {
1156
- return (0, smithy_client_1.take)(input, {
1157
- DryRun: [],
1158
- MigrationTaskName: [],
1159
- NextUpdateSeconds: [],
1160
- ProgressUpdateStream: [],
1161
- Task: smithy_client_1._json,
1162
- UpdateDateTime: (_) => Math.round(_.getTime() / 1000),
1163
- });
1164
- };
1165
- const de_ApplicationState = (output, context) => {
1166
- return (0, smithy_client_1.take)(output, {
1167
- ApplicationId: smithy_client_1.expectString,
1168
- ApplicationStatus: smithy_client_1.expectString,
1169
- LastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1170
- });
1171
- };
1172
- const de_ApplicationStateList = (output, context) => {
1173
- const retVal = (output || [])
1174
- .filter((e) => e != null)
1175
- .map((entry) => {
1176
- return de_ApplicationState(entry, context);
1177
- });
1178
- return retVal;
1179
- };
1180
- const de_DescribeApplicationStateResult = (output, context) => {
1181
- return (0, smithy_client_1.take)(output, {
1182
- ApplicationStatus: smithy_client_1.expectString,
1183
- LastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1184
- });
1185
- };
1186
- const de_DescribeMigrationTaskResult = (output, context) => {
1187
- return (0, smithy_client_1.take)(output, {
1188
- MigrationTask: (_) => de_MigrationTask(_, context),
1189
- });
1190
- };
1191
- const de_ListApplicationStatesResult = (output, context) => {
1192
- return (0, smithy_client_1.take)(output, {
1193
- ApplicationStateList: (_) => de_ApplicationStateList(_, context),
1194
- NextToken: smithy_client_1.expectString,
1195
- });
1196
- };
1197
- const de_ListMigrationTasksResult = (output, context) => {
1198
- return (0, smithy_client_1.take)(output, {
1199
- MigrationTaskSummaryList: (_) => de_MigrationTaskSummaryList(_, context),
1200
- NextToken: smithy_client_1.expectString,
1201
- });
1202
- };
1203
- const de_MigrationTask = (output, context) => {
1204
- return (0, smithy_client_1.take)(output, {
1205
- MigrationTaskName: smithy_client_1.expectString,
1206
- ProgressUpdateStream: smithy_client_1.expectString,
1207
- ResourceAttributeList: smithy_client_1._json,
1208
- Task: smithy_client_1._json,
1209
- UpdateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1210
- });
1211
- };
1212
- const de_MigrationTaskSummary = (output, context) => {
1213
- return (0, smithy_client_1.take)(output, {
1214
- MigrationTaskName: smithy_client_1.expectString,
1215
- ProgressPercent: smithy_client_1.expectInt32,
1216
- ProgressUpdateStream: smithy_client_1.expectString,
1217
- Status: smithy_client_1.expectString,
1218
- StatusDetail: smithy_client_1.expectString,
1219
- UpdateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1220
- });
1221
- };
1222
- const de_MigrationTaskSummaryList = (output, context) => {
1223
- const retVal = (output || [])
1224
- .filter((e) => e != null)
1225
- .map((entry) => {
1226
- return de_MigrationTaskSummary(entry, context);
1227
- });
1228
- return retVal;
1229
- };
1230
- const deserializeMetadata = (output) => ({
1231
- httpStatusCode: output.statusCode,
1232
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1233
- extendedRequestId: output.headers["x-amz-id-2"],
1234
- cfId: output.headers["x-amz-cf-id"],
1235
- });
1236
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
1237
- const throwDefaultError = (0, smithy_client_1.withBaseException)(MigrationHubServiceException_1.MigrationHubServiceException);
1238
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1239
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1240
- const contents = {
1241
- protocol,
1242
- hostname,
1243
- port,
1244
- method: "POST",
1245
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1246
- headers,
1247
- };
1248
- if (resolvedHostname !== undefined) {
1249
- contents.hostname = resolvedHostname;
1250
- }
1251
- if (body !== undefined) {
1252
- contents.body = body;
1253
- }
1254
- return new protocol_http_1.HttpRequest(contents);
1255
- };
1256
- function sharedHeaders(operation) {
1257
- return {
1258
- "content-type": "application/x-amz-json-1.1",
1259
- "x-amz-target": `AWSMigrationHub.${operation}`,
1260
- };
1261
- }
1262
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1263
- if (encoded.length) {
1264
- return JSON.parse(encoded);
1265
- }
1266
- return {};
1267
- });
1268
- const parseErrorBody = async (errorBody, context) => {
1269
- const value = await parseBody(errorBody, context);
1270
- value.message = value.message ?? value.Message;
1271
- return value;
1272
- };
1273
- const loadRestJsonErrorCode = (output, data) => {
1274
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1275
- const sanitizeErrorCode = (rawValue) => {
1276
- let cleanValue = rawValue;
1277
- if (typeof cleanValue === "number") {
1278
- cleanValue = cleanValue.toString();
1279
- }
1280
- if (cleanValue.indexOf(",") >= 0) {
1281
- cleanValue = cleanValue.split(",")[0];
1282
- }
1283
- if (cleanValue.indexOf(":") >= 0) {
1284
- cleanValue = cleanValue.split(":")[0];
1285
- }
1286
- if (cleanValue.indexOf("#") >= 0) {
1287
- cleanValue = cleanValue.split("#")[1];
1288
- }
1289
- return cleanValue;
1290
- };
1291
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1292
- if (headerKey !== undefined) {
1293
- return sanitizeErrorCode(output.headers[headerKey]);
1294
- }
1295
- if (data.code !== undefined) {
1296
- return sanitizeErrorCode(data.code);
1297
- }
1298
- if (data["__type"] !== undefined) {
1299
- return sanitizeErrorCode(data["__type"]);
1300
- }
1301
- };
1
+ module.exports = require("../index.js");