@aws-sdk/client-drs 3.928.0 → 3.930.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 (74) hide show
  1. package/dist-cjs/index.js +2066 -2353
  2. package/dist-cjs/runtimeConfig.shared.js +2 -0
  3. package/dist-es/DrsClient.js +2 -0
  4. package/dist-es/commands/AssociateSourceNetworkStackCommand.js +3 -10
  5. package/dist-es/commands/CreateExtendedSourceServerCommand.js +3 -10
  6. package/dist-es/commands/CreateLaunchConfigurationTemplateCommand.js +3 -10
  7. package/dist-es/commands/CreateReplicationConfigurationTemplateCommand.js +3 -10
  8. package/dist-es/commands/CreateSourceNetworkCommand.js +3 -10
  9. package/dist-es/commands/DeleteJobCommand.js +3 -9
  10. package/dist-es/commands/DeleteLaunchActionCommand.js +3 -9
  11. package/dist-es/commands/DeleteLaunchConfigurationTemplateCommand.js +3 -9
  12. package/dist-es/commands/DeleteRecoveryInstanceCommand.js +3 -9
  13. package/dist-es/commands/DeleteReplicationConfigurationTemplateCommand.js +3 -9
  14. package/dist-es/commands/DeleteSourceNetworkCommand.js +3 -9
  15. package/dist-es/commands/DeleteSourceServerCommand.js +3 -9
  16. package/dist-es/commands/DescribeJobLogItemsCommand.js +3 -9
  17. package/dist-es/commands/DescribeJobsCommand.js +3 -10
  18. package/dist-es/commands/DescribeLaunchConfigurationTemplatesCommand.js +3 -10
  19. package/dist-es/commands/DescribeRecoveryInstancesCommand.js +3 -10
  20. package/dist-es/commands/DescribeRecoverySnapshotsCommand.js +3 -9
  21. package/dist-es/commands/DescribeReplicationConfigurationTemplatesCommand.js +3 -10
  22. package/dist-es/commands/DescribeSourceNetworksCommand.js +3 -10
  23. package/dist-es/commands/DescribeSourceServersCommand.js +3 -10
  24. package/dist-es/commands/DisconnectRecoveryInstanceCommand.js +3 -9
  25. package/dist-es/commands/DisconnectSourceServerCommand.js +3 -10
  26. package/dist-es/commands/ExportSourceNetworkCfnTemplateCommand.js +3 -9
  27. package/dist-es/commands/GetFailbackReplicationConfigurationCommand.js +3 -9
  28. package/dist-es/commands/GetLaunchConfigurationCommand.js +3 -9
  29. package/dist-es/commands/GetReplicationConfigurationCommand.js +3 -10
  30. package/dist-es/commands/InitializeServiceCommand.js +3 -9
  31. package/dist-es/commands/ListExtensibleSourceServersCommand.js +3 -10
  32. package/dist-es/commands/ListLaunchActionsCommand.js +3 -9
  33. package/dist-es/commands/ListStagingAccountsCommand.js +3 -9
  34. package/dist-es/commands/ListTagsForResourceCommand.js +3 -10
  35. package/dist-es/commands/PutLaunchActionCommand.js +3 -9
  36. package/dist-es/commands/RetryDataReplicationCommand.js +3 -10
  37. package/dist-es/commands/ReverseReplicationCommand.js +3 -9
  38. package/dist-es/commands/StartFailbackLaunchCommand.js +3 -10
  39. package/dist-es/commands/StartRecoveryCommand.js +3 -10
  40. package/dist-es/commands/StartReplicationCommand.js +3 -10
  41. package/dist-es/commands/StartSourceNetworkRecoveryCommand.js +3 -10
  42. package/dist-es/commands/StartSourceNetworkReplicationCommand.js +3 -10
  43. package/dist-es/commands/StopFailbackCommand.js +3 -9
  44. package/dist-es/commands/StopReplicationCommand.js +3 -10
  45. package/dist-es/commands/StopSourceNetworkReplicationCommand.js +3 -10
  46. package/dist-es/commands/TagResourceCommand.js +3 -10
  47. package/dist-es/commands/TerminateRecoveryInstancesCommand.js +3 -10
  48. package/dist-es/commands/UntagResourceCommand.js +3 -10
  49. package/dist-es/commands/UpdateFailbackReplicationConfigurationCommand.js +3 -9
  50. package/dist-es/commands/UpdateLaunchConfigurationCommand.js +3 -9
  51. package/dist-es/commands/UpdateLaunchConfigurationTemplateCommand.js +3 -10
  52. package/dist-es/commands/UpdateReplicationConfigurationCommand.js +3 -10
  53. package/dist-es/commands/UpdateReplicationConfigurationTemplateCommand.js +3 -10
  54. package/dist-es/models/models_0.js +0 -193
  55. package/dist-es/runtimeConfig.shared.js +2 -0
  56. package/dist-es/schemas/schemas_0.js +1961 -0
  57. package/dist-types/DrsClient.d.ts +10 -1
  58. package/dist-types/models/models_0.d.ts +8 -166
  59. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  60. package/dist-types/runtimeConfig.d.ts +1 -0
  61. package/dist-types/runtimeConfig.native.d.ts +1 -0
  62. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  63. package/dist-types/schemas/schemas_0.d.ts +260 -0
  64. package/dist-types/ts3.4/DrsClient.d.ts +4 -0
  65. package/dist-types/ts3.4/models/models_0.d.ts +0 -121
  66. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  67. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  68. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  69. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  70. package/dist-types/ts3.4/schemas/schemas_0.d.ts +267 -0
  71. package/package.json +33 -33
  72. package/dist-es/protocols/Aws_restJson1.js +0 -1751
  73. package/dist-types/protocols/Aws_restJson1.d.ts +0 -452
  74. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -605
@@ -1,1751 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseLong as __strictParseLong, take, withBaseException, } from "@smithy/smithy-client";
4
- import { DrsServiceException as __BaseException } from "../models/DrsServiceException";
5
- import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, UninitializedAccountException, ValidationException, } from "../models/models_0";
6
- export const se_AssociateSourceNetworkStackCommand = async (input, context) => {
7
- const b = rb(input, context);
8
- const headers = {
9
- "content-type": "application/json",
10
- };
11
- b.bp("/AssociateSourceNetworkStack");
12
- let body;
13
- body = JSON.stringify(take(input, {
14
- cfnStackName: [],
15
- sourceNetworkID: [],
16
- }));
17
- b.m("POST").h(headers).b(body);
18
- return b.build();
19
- };
20
- export const se_CreateExtendedSourceServerCommand = async (input, context) => {
21
- const b = rb(input, context);
22
- const headers = {
23
- "content-type": "application/json",
24
- };
25
- b.bp("/CreateExtendedSourceServer");
26
- let body;
27
- body = JSON.stringify(take(input, {
28
- sourceServerArn: [],
29
- tags: (_) => _json(_),
30
- }));
31
- b.m("POST").h(headers).b(body);
32
- return b.build();
33
- };
34
- export const se_CreateLaunchConfigurationTemplateCommand = async (input, context) => {
35
- const b = rb(input, context);
36
- const headers = {
37
- "content-type": "application/json",
38
- };
39
- b.bp("/CreateLaunchConfigurationTemplate");
40
- let body;
41
- body = JSON.stringify(take(input, {
42
- copyPrivateIp: [],
43
- copyTags: [],
44
- exportBucketArn: [],
45
- launchDisposition: [],
46
- launchIntoSourceInstance: [],
47
- licensing: (_) => _json(_),
48
- postLaunchEnabled: [],
49
- tags: (_) => _json(_),
50
- targetInstanceTypeRightSizingMethod: [],
51
- }));
52
- b.m("POST").h(headers).b(body);
53
- return b.build();
54
- };
55
- export const se_CreateReplicationConfigurationTemplateCommand = async (input, context) => {
56
- const b = rb(input, context);
57
- const headers = {
58
- "content-type": "application/json",
59
- };
60
- b.bp("/CreateReplicationConfigurationTemplate");
61
- let body;
62
- body = JSON.stringify(take(input, {
63
- associateDefaultSecurityGroup: [],
64
- autoReplicateNewDisks: [],
65
- bandwidthThrottling: [],
66
- createPublicIP: [],
67
- dataPlaneRouting: [],
68
- defaultLargeStagingDiskType: [],
69
- ebsEncryption: [],
70
- ebsEncryptionKeyArn: [],
71
- pitPolicy: (_) => _json(_),
72
- replicationServerInstanceType: [],
73
- replicationServersSecurityGroupsIDs: (_) => _json(_),
74
- stagingAreaSubnetId: [],
75
- stagingAreaTags: (_) => _json(_),
76
- tags: (_) => _json(_),
77
- useDedicatedReplicationServer: [],
78
- }));
79
- b.m("POST").h(headers).b(body);
80
- return b.build();
81
- };
82
- export const se_CreateSourceNetworkCommand = async (input, context) => {
83
- const b = rb(input, context);
84
- const headers = {
85
- "content-type": "application/json",
86
- };
87
- b.bp("/CreateSourceNetwork");
88
- let body;
89
- body = JSON.stringify(take(input, {
90
- originAccountID: [],
91
- originRegion: [],
92
- tags: (_) => _json(_),
93
- vpcID: [],
94
- }));
95
- b.m("POST").h(headers).b(body);
96
- return b.build();
97
- };
98
- export const se_DeleteJobCommand = async (input, context) => {
99
- const b = rb(input, context);
100
- const headers = {
101
- "content-type": "application/json",
102
- };
103
- b.bp("/DeleteJob");
104
- let body;
105
- body = JSON.stringify(take(input, {
106
- jobID: [],
107
- }));
108
- b.m("POST").h(headers).b(body);
109
- return b.build();
110
- };
111
- export const se_DeleteLaunchActionCommand = async (input, context) => {
112
- const b = rb(input, context);
113
- const headers = {
114
- "content-type": "application/json",
115
- };
116
- b.bp("/DeleteLaunchAction");
117
- let body;
118
- body = JSON.stringify(take(input, {
119
- actionId: [],
120
- resourceId: [],
121
- }));
122
- b.m("POST").h(headers).b(body);
123
- return b.build();
124
- };
125
- export const se_DeleteLaunchConfigurationTemplateCommand = async (input, context) => {
126
- const b = rb(input, context);
127
- const headers = {
128
- "content-type": "application/json",
129
- };
130
- b.bp("/DeleteLaunchConfigurationTemplate");
131
- let body;
132
- body = JSON.stringify(take(input, {
133
- launchConfigurationTemplateID: [],
134
- }));
135
- b.m("POST").h(headers).b(body);
136
- return b.build();
137
- };
138
- export const se_DeleteRecoveryInstanceCommand = async (input, context) => {
139
- const b = rb(input, context);
140
- const headers = {
141
- "content-type": "application/json",
142
- };
143
- b.bp("/DeleteRecoveryInstance");
144
- let body;
145
- body = JSON.stringify(take(input, {
146
- recoveryInstanceID: [],
147
- }));
148
- b.m("POST").h(headers).b(body);
149
- return b.build();
150
- };
151
- export const se_DeleteReplicationConfigurationTemplateCommand = async (input, context) => {
152
- const b = rb(input, context);
153
- const headers = {
154
- "content-type": "application/json",
155
- };
156
- b.bp("/DeleteReplicationConfigurationTemplate");
157
- let body;
158
- body = JSON.stringify(take(input, {
159
- replicationConfigurationTemplateID: [],
160
- }));
161
- b.m("POST").h(headers).b(body);
162
- return b.build();
163
- };
164
- export const se_DeleteSourceNetworkCommand = async (input, context) => {
165
- const b = rb(input, context);
166
- const headers = {
167
- "content-type": "application/json",
168
- };
169
- b.bp("/DeleteSourceNetwork");
170
- let body;
171
- body = JSON.stringify(take(input, {
172
- sourceNetworkID: [],
173
- }));
174
- b.m("POST").h(headers).b(body);
175
- return b.build();
176
- };
177
- export const se_DeleteSourceServerCommand = async (input, context) => {
178
- const b = rb(input, context);
179
- const headers = {
180
- "content-type": "application/json",
181
- };
182
- b.bp("/DeleteSourceServer");
183
- let body;
184
- body = JSON.stringify(take(input, {
185
- sourceServerID: [],
186
- }));
187
- b.m("POST").h(headers).b(body);
188
- return b.build();
189
- };
190
- export const se_DescribeJobLogItemsCommand = async (input, context) => {
191
- const b = rb(input, context);
192
- const headers = {
193
- "content-type": "application/json",
194
- };
195
- b.bp("/DescribeJobLogItems");
196
- let body;
197
- body = JSON.stringify(take(input, {
198
- jobID: [],
199
- maxResults: [],
200
- nextToken: [],
201
- }));
202
- b.m("POST").h(headers).b(body);
203
- return b.build();
204
- };
205
- export const se_DescribeJobsCommand = async (input, context) => {
206
- const b = rb(input, context);
207
- const headers = {
208
- "content-type": "application/json",
209
- };
210
- b.bp("/DescribeJobs");
211
- let body;
212
- body = JSON.stringify(take(input, {
213
- filters: (_) => _json(_),
214
- maxResults: [],
215
- nextToken: [],
216
- }));
217
- b.m("POST").h(headers).b(body);
218
- return b.build();
219
- };
220
- export const se_DescribeLaunchConfigurationTemplatesCommand = async (input, context) => {
221
- const b = rb(input, context);
222
- const headers = {
223
- "content-type": "application/json",
224
- };
225
- b.bp("/DescribeLaunchConfigurationTemplates");
226
- let body;
227
- body = JSON.stringify(take(input, {
228
- launchConfigurationTemplateIDs: (_) => _json(_),
229
- maxResults: [],
230
- nextToken: [],
231
- }));
232
- b.m("POST").h(headers).b(body);
233
- return b.build();
234
- };
235
- export const se_DescribeRecoveryInstancesCommand = async (input, context) => {
236
- const b = rb(input, context);
237
- const headers = {
238
- "content-type": "application/json",
239
- };
240
- b.bp("/DescribeRecoveryInstances");
241
- let body;
242
- body = JSON.stringify(take(input, {
243
- filters: (_) => _json(_),
244
- maxResults: [],
245
- nextToken: [],
246
- }));
247
- b.m("POST").h(headers).b(body);
248
- return b.build();
249
- };
250
- export const se_DescribeRecoverySnapshotsCommand = async (input, context) => {
251
- const b = rb(input, context);
252
- const headers = {
253
- "content-type": "application/json",
254
- };
255
- b.bp("/DescribeRecoverySnapshots");
256
- let body;
257
- body = JSON.stringify(take(input, {
258
- filters: (_) => _json(_),
259
- maxResults: [],
260
- nextToken: [],
261
- order: [],
262
- sourceServerID: [],
263
- }));
264
- b.m("POST").h(headers).b(body);
265
- return b.build();
266
- };
267
- export const se_DescribeReplicationConfigurationTemplatesCommand = async (input, context) => {
268
- const b = rb(input, context);
269
- const headers = {
270
- "content-type": "application/json",
271
- };
272
- b.bp("/DescribeReplicationConfigurationTemplates");
273
- let body;
274
- body = JSON.stringify(take(input, {
275
- maxResults: [],
276
- nextToken: [],
277
- replicationConfigurationTemplateIDs: (_) => _json(_),
278
- }));
279
- b.m("POST").h(headers).b(body);
280
- return b.build();
281
- };
282
- export const se_DescribeSourceNetworksCommand = async (input, context) => {
283
- const b = rb(input, context);
284
- const headers = {
285
- "content-type": "application/json",
286
- };
287
- b.bp("/DescribeSourceNetworks");
288
- let body;
289
- body = JSON.stringify(take(input, {
290
- filters: (_) => _json(_),
291
- maxResults: [],
292
- nextToken: [],
293
- }));
294
- b.m("POST").h(headers).b(body);
295
- return b.build();
296
- };
297
- export const se_DescribeSourceServersCommand = async (input, context) => {
298
- const b = rb(input, context);
299
- const headers = {
300
- "content-type": "application/json",
301
- };
302
- b.bp("/DescribeSourceServers");
303
- let body;
304
- body = JSON.stringify(take(input, {
305
- filters: (_) => _json(_),
306
- maxResults: [],
307
- nextToken: [],
308
- }));
309
- b.m("POST").h(headers).b(body);
310
- return b.build();
311
- };
312
- export const se_DisconnectRecoveryInstanceCommand = async (input, context) => {
313
- const b = rb(input, context);
314
- const headers = {
315
- "content-type": "application/json",
316
- };
317
- b.bp("/DisconnectRecoveryInstance");
318
- let body;
319
- body = JSON.stringify(take(input, {
320
- recoveryInstanceID: [],
321
- }));
322
- b.m("POST").h(headers).b(body);
323
- return b.build();
324
- };
325
- export const se_DisconnectSourceServerCommand = async (input, context) => {
326
- const b = rb(input, context);
327
- const headers = {
328
- "content-type": "application/json",
329
- };
330
- b.bp("/DisconnectSourceServer");
331
- let body;
332
- body = JSON.stringify(take(input, {
333
- sourceServerID: [],
334
- }));
335
- b.m("POST").h(headers).b(body);
336
- return b.build();
337
- };
338
- export const se_ExportSourceNetworkCfnTemplateCommand = async (input, context) => {
339
- const b = rb(input, context);
340
- const headers = {
341
- "content-type": "application/json",
342
- };
343
- b.bp("/ExportSourceNetworkCfnTemplate");
344
- let body;
345
- body = JSON.stringify(take(input, {
346
- sourceNetworkID: [],
347
- }));
348
- b.m("POST").h(headers).b(body);
349
- return b.build();
350
- };
351
- export const se_GetFailbackReplicationConfigurationCommand = async (input, context) => {
352
- const b = rb(input, context);
353
- const headers = {
354
- "content-type": "application/json",
355
- };
356
- b.bp("/GetFailbackReplicationConfiguration");
357
- let body;
358
- body = JSON.stringify(take(input, {
359
- recoveryInstanceID: [],
360
- }));
361
- b.m("POST").h(headers).b(body);
362
- return b.build();
363
- };
364
- export const se_GetLaunchConfigurationCommand = async (input, context) => {
365
- const b = rb(input, context);
366
- const headers = {
367
- "content-type": "application/json",
368
- };
369
- b.bp("/GetLaunchConfiguration");
370
- let body;
371
- body = JSON.stringify(take(input, {
372
- sourceServerID: [],
373
- }));
374
- b.m("POST").h(headers).b(body);
375
- return b.build();
376
- };
377
- export const se_GetReplicationConfigurationCommand = async (input, context) => {
378
- const b = rb(input, context);
379
- const headers = {
380
- "content-type": "application/json",
381
- };
382
- b.bp("/GetReplicationConfiguration");
383
- let body;
384
- body = JSON.stringify(take(input, {
385
- sourceServerID: [],
386
- }));
387
- b.m("POST").h(headers).b(body);
388
- return b.build();
389
- };
390
- export const se_InitializeServiceCommand = async (input, context) => {
391
- const b = rb(input, context);
392
- const headers = {};
393
- b.bp("/InitializeService");
394
- let body;
395
- b.m("POST").h(headers).b(body);
396
- return b.build();
397
- };
398
- export const se_ListExtensibleSourceServersCommand = async (input, context) => {
399
- const b = rb(input, context);
400
- const headers = {
401
- "content-type": "application/json",
402
- };
403
- b.bp("/ListExtensibleSourceServers");
404
- let body;
405
- body = JSON.stringify(take(input, {
406
- maxResults: [],
407
- nextToken: [],
408
- stagingAccountID: [],
409
- }));
410
- b.m("POST").h(headers).b(body);
411
- return b.build();
412
- };
413
- export const se_ListLaunchActionsCommand = async (input, context) => {
414
- const b = rb(input, context);
415
- const headers = {
416
- "content-type": "application/json",
417
- };
418
- b.bp("/ListLaunchActions");
419
- let body;
420
- body = JSON.stringify(take(input, {
421
- filters: (_) => _json(_),
422
- maxResults: [],
423
- nextToken: [],
424
- resourceId: [],
425
- }));
426
- b.m("POST").h(headers).b(body);
427
- return b.build();
428
- };
429
- export const se_ListStagingAccountsCommand = async (input, context) => {
430
- const b = rb(input, context);
431
- const headers = {};
432
- b.bp("/ListStagingAccounts");
433
- const query = map({
434
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
435
- [_nT]: [, input[_nT]],
436
- });
437
- let body;
438
- b.m("GET").h(headers).q(query).b(body);
439
- return b.build();
440
- };
441
- export const se_ListTagsForResourceCommand = async (input, context) => {
442
- const b = rb(input, context);
443
- const headers = {};
444
- b.bp("/tags/{resourceArn}");
445
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
446
- let body;
447
- b.m("GET").h(headers).b(body);
448
- return b.build();
449
- };
450
- export const se_PutLaunchActionCommand = async (input, context) => {
451
- const b = rb(input, context);
452
- const headers = {
453
- "content-type": "application/json",
454
- };
455
- b.bp("/PutLaunchAction");
456
- let body;
457
- body = JSON.stringify(take(input, {
458
- actionCode: [],
459
- actionId: [],
460
- actionVersion: [],
461
- active: [],
462
- category: [],
463
- description: [],
464
- name: [],
465
- optional: [],
466
- order: [],
467
- parameters: (_) => _json(_),
468
- resourceId: [],
469
- }));
470
- b.m("POST").h(headers).b(body);
471
- return b.build();
472
- };
473
- export const se_RetryDataReplicationCommand = async (input, context) => {
474
- const b = rb(input, context);
475
- const headers = {
476
- "content-type": "application/json",
477
- };
478
- b.bp("/RetryDataReplication");
479
- let body;
480
- body = JSON.stringify(take(input, {
481
- sourceServerID: [],
482
- }));
483
- b.m("POST").h(headers).b(body);
484
- return b.build();
485
- };
486
- export const se_ReverseReplicationCommand = async (input, context) => {
487
- const b = rb(input, context);
488
- const headers = {
489
- "content-type": "application/json",
490
- };
491
- b.bp("/ReverseReplication");
492
- let body;
493
- body = JSON.stringify(take(input, {
494
- recoveryInstanceID: [],
495
- }));
496
- b.m("POST").h(headers).b(body);
497
- return b.build();
498
- };
499
- export const se_StartFailbackLaunchCommand = async (input, context) => {
500
- const b = rb(input, context);
501
- const headers = {
502
- "content-type": "application/json",
503
- };
504
- b.bp("/StartFailbackLaunch");
505
- let body;
506
- body = JSON.stringify(take(input, {
507
- recoveryInstanceIDs: (_) => _json(_),
508
- tags: (_) => _json(_),
509
- }));
510
- b.m("POST").h(headers).b(body);
511
- return b.build();
512
- };
513
- export const se_StartRecoveryCommand = async (input, context) => {
514
- const b = rb(input, context);
515
- const headers = {
516
- "content-type": "application/json",
517
- };
518
- b.bp("/StartRecovery");
519
- let body;
520
- body = JSON.stringify(take(input, {
521
- isDrill: [],
522
- sourceServers: (_) => _json(_),
523
- tags: (_) => _json(_),
524
- }));
525
- b.m("POST").h(headers).b(body);
526
- return b.build();
527
- };
528
- export const se_StartReplicationCommand = async (input, context) => {
529
- const b = rb(input, context);
530
- const headers = {
531
- "content-type": "application/json",
532
- };
533
- b.bp("/StartReplication");
534
- let body;
535
- body = JSON.stringify(take(input, {
536
- sourceServerID: [],
537
- }));
538
- b.m("POST").h(headers).b(body);
539
- return b.build();
540
- };
541
- export const se_StartSourceNetworkRecoveryCommand = async (input, context) => {
542
- const b = rb(input, context);
543
- const headers = {
544
- "content-type": "application/json",
545
- };
546
- b.bp("/StartSourceNetworkRecovery");
547
- let body;
548
- body = JSON.stringify(take(input, {
549
- deployAsNew: [],
550
- sourceNetworks: (_) => _json(_),
551
- tags: (_) => _json(_),
552
- }));
553
- b.m("POST").h(headers).b(body);
554
- return b.build();
555
- };
556
- export const se_StartSourceNetworkReplicationCommand = async (input, context) => {
557
- const b = rb(input, context);
558
- const headers = {
559
- "content-type": "application/json",
560
- };
561
- b.bp("/StartSourceNetworkReplication");
562
- let body;
563
- body = JSON.stringify(take(input, {
564
- sourceNetworkID: [],
565
- }));
566
- b.m("POST").h(headers).b(body);
567
- return b.build();
568
- };
569
- export const se_StopFailbackCommand = async (input, context) => {
570
- const b = rb(input, context);
571
- const headers = {
572
- "content-type": "application/json",
573
- };
574
- b.bp("/StopFailback");
575
- let body;
576
- body = JSON.stringify(take(input, {
577
- recoveryInstanceID: [],
578
- }));
579
- b.m("POST").h(headers).b(body);
580
- return b.build();
581
- };
582
- export const se_StopReplicationCommand = async (input, context) => {
583
- const b = rb(input, context);
584
- const headers = {
585
- "content-type": "application/json",
586
- };
587
- b.bp("/StopReplication");
588
- let body;
589
- body = JSON.stringify(take(input, {
590
- sourceServerID: [],
591
- }));
592
- b.m("POST").h(headers).b(body);
593
- return b.build();
594
- };
595
- export const se_StopSourceNetworkReplicationCommand = async (input, context) => {
596
- const b = rb(input, context);
597
- const headers = {
598
- "content-type": "application/json",
599
- };
600
- b.bp("/StopSourceNetworkReplication");
601
- let body;
602
- body = JSON.stringify(take(input, {
603
- sourceNetworkID: [],
604
- }));
605
- b.m("POST").h(headers).b(body);
606
- return b.build();
607
- };
608
- export const se_TagResourceCommand = async (input, context) => {
609
- const b = rb(input, context);
610
- const headers = {
611
- "content-type": "application/json",
612
- };
613
- b.bp("/tags/{resourceArn}");
614
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
615
- let body;
616
- body = JSON.stringify(take(input, {
617
- tags: (_) => _json(_),
618
- }));
619
- b.m("POST").h(headers).b(body);
620
- return b.build();
621
- };
622
- export const se_TerminateRecoveryInstancesCommand = async (input, context) => {
623
- const b = rb(input, context);
624
- const headers = {
625
- "content-type": "application/json",
626
- };
627
- b.bp("/TerminateRecoveryInstances");
628
- let body;
629
- body = JSON.stringify(take(input, {
630
- recoveryInstanceIDs: (_) => _json(_),
631
- }));
632
- b.m("POST").h(headers).b(body);
633
- return b.build();
634
- };
635
- export const se_UntagResourceCommand = async (input, context) => {
636
- const b = rb(input, context);
637
- const headers = {};
638
- b.bp("/tags/{resourceArn}");
639
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
640
- const query = map({
641
- [_tK]: [__expectNonNull(input.tagKeys, `tagKeys`) != null, () => input[_tK] || []],
642
- });
643
- let body;
644
- b.m("DELETE").h(headers).q(query).b(body);
645
- return b.build();
646
- };
647
- export const se_UpdateFailbackReplicationConfigurationCommand = async (input, context) => {
648
- const b = rb(input, context);
649
- const headers = {
650
- "content-type": "application/json",
651
- };
652
- b.bp("/UpdateFailbackReplicationConfiguration");
653
- let body;
654
- body = JSON.stringify(take(input, {
655
- bandwidthThrottling: [],
656
- name: [],
657
- recoveryInstanceID: [],
658
- usePrivateIP: [],
659
- }));
660
- b.m("POST").h(headers).b(body);
661
- return b.build();
662
- };
663
- export const se_UpdateLaunchConfigurationCommand = async (input, context) => {
664
- const b = rb(input, context);
665
- const headers = {
666
- "content-type": "application/json",
667
- };
668
- b.bp("/UpdateLaunchConfiguration");
669
- let body;
670
- body = JSON.stringify(take(input, {
671
- copyPrivateIp: [],
672
- copyTags: [],
673
- launchDisposition: [],
674
- launchIntoInstanceProperties: (_) => _json(_),
675
- licensing: (_) => _json(_),
676
- name: [],
677
- postLaunchEnabled: [],
678
- sourceServerID: [],
679
- targetInstanceTypeRightSizingMethod: [],
680
- }));
681
- b.m("POST").h(headers).b(body);
682
- return b.build();
683
- };
684
- export const se_UpdateLaunchConfigurationTemplateCommand = async (input, context) => {
685
- const b = rb(input, context);
686
- const headers = {
687
- "content-type": "application/json",
688
- };
689
- b.bp("/UpdateLaunchConfigurationTemplate");
690
- let body;
691
- body = JSON.stringify(take(input, {
692
- copyPrivateIp: [],
693
- copyTags: [],
694
- exportBucketArn: [],
695
- launchConfigurationTemplateID: [],
696
- launchDisposition: [],
697
- launchIntoSourceInstance: [],
698
- licensing: (_) => _json(_),
699
- postLaunchEnabled: [],
700
- targetInstanceTypeRightSizingMethod: [],
701
- }));
702
- b.m("POST").h(headers).b(body);
703
- return b.build();
704
- };
705
- export const se_UpdateReplicationConfigurationCommand = async (input, context) => {
706
- const b = rb(input, context);
707
- const headers = {
708
- "content-type": "application/json",
709
- };
710
- b.bp("/UpdateReplicationConfiguration");
711
- let body;
712
- body = JSON.stringify(take(input, {
713
- associateDefaultSecurityGroup: [],
714
- autoReplicateNewDisks: [],
715
- bandwidthThrottling: [],
716
- createPublicIP: [],
717
- dataPlaneRouting: [],
718
- defaultLargeStagingDiskType: [],
719
- ebsEncryption: [],
720
- ebsEncryptionKeyArn: [],
721
- name: [],
722
- pitPolicy: (_) => _json(_),
723
- replicatedDisks: (_) => _json(_),
724
- replicationServerInstanceType: [],
725
- replicationServersSecurityGroupsIDs: (_) => _json(_),
726
- sourceServerID: [],
727
- stagingAreaSubnetId: [],
728
- stagingAreaTags: (_) => _json(_),
729
- useDedicatedReplicationServer: [],
730
- }));
731
- b.m("POST").h(headers).b(body);
732
- return b.build();
733
- };
734
- export const se_UpdateReplicationConfigurationTemplateCommand = async (input, context) => {
735
- const b = rb(input, context);
736
- const headers = {
737
- "content-type": "application/json",
738
- };
739
- b.bp("/UpdateReplicationConfigurationTemplate");
740
- let body;
741
- body = JSON.stringify(take(input, {
742
- arn: [],
743
- associateDefaultSecurityGroup: [],
744
- autoReplicateNewDisks: [],
745
- bandwidthThrottling: [],
746
- createPublicIP: [],
747
- dataPlaneRouting: [],
748
- defaultLargeStagingDiskType: [],
749
- ebsEncryption: [],
750
- ebsEncryptionKeyArn: [],
751
- pitPolicy: (_) => _json(_),
752
- replicationConfigurationTemplateID: [],
753
- replicationServerInstanceType: [],
754
- replicationServersSecurityGroupsIDs: (_) => _json(_),
755
- stagingAreaSubnetId: [],
756
- stagingAreaTags: (_) => _json(_),
757
- useDedicatedReplicationServer: [],
758
- }));
759
- b.m("POST").h(headers).b(body);
760
- return b.build();
761
- };
762
- export const de_AssociateSourceNetworkStackCommand = async (output, context) => {
763
- if (output.statusCode !== 202 && output.statusCode >= 300) {
764
- return de_CommandError(output, context);
765
- }
766
- const contents = map({
767
- $metadata: deserializeMetadata(output),
768
- });
769
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
770
- const doc = take(data, {
771
- job: _json,
772
- });
773
- Object.assign(contents, doc);
774
- return contents;
775
- };
776
- export const de_CreateExtendedSourceServerCommand = async (output, context) => {
777
- if (output.statusCode !== 201 && output.statusCode >= 300) {
778
- return de_CommandError(output, context);
779
- }
780
- const contents = map({
781
- $metadata: deserializeMetadata(output),
782
- });
783
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
784
- const doc = take(data, {
785
- sourceServer: _json,
786
- });
787
- Object.assign(contents, doc);
788
- return contents;
789
- };
790
- export const de_CreateLaunchConfigurationTemplateCommand = async (output, context) => {
791
- if (output.statusCode !== 201 && output.statusCode >= 300) {
792
- return de_CommandError(output, context);
793
- }
794
- const contents = map({
795
- $metadata: deserializeMetadata(output),
796
- });
797
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
798
- const doc = take(data, {
799
- launchConfigurationTemplate: _json,
800
- });
801
- Object.assign(contents, doc);
802
- return contents;
803
- };
804
- export const de_CreateReplicationConfigurationTemplateCommand = async (output, context) => {
805
- if (output.statusCode !== 201 && output.statusCode >= 300) {
806
- return de_CommandError(output, context);
807
- }
808
- const contents = map({
809
- $metadata: deserializeMetadata(output),
810
- });
811
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
812
- const doc = take(data, {
813
- arn: __expectString,
814
- associateDefaultSecurityGroup: __expectBoolean,
815
- autoReplicateNewDisks: __expectBoolean,
816
- bandwidthThrottling: __expectLong,
817
- createPublicIP: __expectBoolean,
818
- dataPlaneRouting: __expectString,
819
- defaultLargeStagingDiskType: __expectString,
820
- ebsEncryption: __expectString,
821
- ebsEncryptionKeyArn: __expectString,
822
- pitPolicy: _json,
823
- replicationConfigurationTemplateID: __expectString,
824
- replicationServerInstanceType: __expectString,
825
- replicationServersSecurityGroupsIDs: _json,
826
- stagingAreaSubnetId: __expectString,
827
- stagingAreaTags: _json,
828
- tags: _json,
829
- useDedicatedReplicationServer: __expectBoolean,
830
- });
831
- Object.assign(contents, doc);
832
- return contents;
833
- };
834
- export const de_CreateSourceNetworkCommand = async (output, context) => {
835
- if (output.statusCode !== 201 && output.statusCode >= 300) {
836
- return de_CommandError(output, context);
837
- }
838
- const contents = map({
839
- $metadata: deserializeMetadata(output),
840
- });
841
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
842
- const doc = take(data, {
843
- sourceNetworkID: __expectString,
844
- });
845
- Object.assign(contents, doc);
846
- return contents;
847
- };
848
- export const de_DeleteJobCommand = async (output, context) => {
849
- if (output.statusCode !== 204 && output.statusCode >= 300) {
850
- return de_CommandError(output, context);
851
- }
852
- const contents = map({
853
- $metadata: deserializeMetadata(output),
854
- });
855
- await collectBody(output.body, context);
856
- return contents;
857
- };
858
- export const de_DeleteLaunchActionCommand = async (output, context) => {
859
- if (output.statusCode !== 204 && output.statusCode >= 300) {
860
- return de_CommandError(output, context);
861
- }
862
- const contents = map({
863
- $metadata: deserializeMetadata(output),
864
- });
865
- await collectBody(output.body, context);
866
- return contents;
867
- };
868
- export const de_DeleteLaunchConfigurationTemplateCommand = async (output, context) => {
869
- if (output.statusCode !== 204 && output.statusCode >= 300) {
870
- return de_CommandError(output, context);
871
- }
872
- const contents = map({
873
- $metadata: deserializeMetadata(output),
874
- });
875
- await collectBody(output.body, context);
876
- return contents;
877
- };
878
- export const de_DeleteRecoveryInstanceCommand = async (output, context) => {
879
- if (output.statusCode !== 200 && output.statusCode >= 300) {
880
- return de_CommandError(output, context);
881
- }
882
- const contents = map({
883
- $metadata: deserializeMetadata(output),
884
- });
885
- await collectBody(output.body, context);
886
- return contents;
887
- };
888
- export const de_DeleteReplicationConfigurationTemplateCommand = async (output, context) => {
889
- if (output.statusCode !== 204 && output.statusCode >= 300) {
890
- return de_CommandError(output, context);
891
- }
892
- const contents = map({
893
- $metadata: deserializeMetadata(output),
894
- });
895
- await collectBody(output.body, context);
896
- return contents;
897
- };
898
- export const de_DeleteSourceNetworkCommand = async (output, context) => {
899
- if (output.statusCode !== 204 && output.statusCode >= 300) {
900
- return de_CommandError(output, context);
901
- }
902
- const contents = map({
903
- $metadata: deserializeMetadata(output),
904
- });
905
- await collectBody(output.body, context);
906
- return contents;
907
- };
908
- export const de_DeleteSourceServerCommand = async (output, context) => {
909
- if (output.statusCode !== 204 && output.statusCode >= 300) {
910
- return de_CommandError(output, context);
911
- }
912
- const contents = map({
913
- $metadata: deserializeMetadata(output),
914
- });
915
- await collectBody(output.body, context);
916
- return contents;
917
- };
918
- export const de_DescribeJobLogItemsCommand = async (output, context) => {
919
- if (output.statusCode !== 200 && output.statusCode >= 300) {
920
- return de_CommandError(output, context);
921
- }
922
- const contents = map({
923
- $metadata: deserializeMetadata(output),
924
- });
925
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
926
- const doc = take(data, {
927
- items: _json,
928
- nextToken: __expectString,
929
- });
930
- Object.assign(contents, doc);
931
- return contents;
932
- };
933
- export const de_DescribeJobsCommand = async (output, context) => {
934
- if (output.statusCode !== 200 && output.statusCode >= 300) {
935
- return de_CommandError(output, context);
936
- }
937
- const contents = map({
938
- $metadata: deserializeMetadata(output),
939
- });
940
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
941
- const doc = take(data, {
942
- items: _json,
943
- nextToken: __expectString,
944
- });
945
- Object.assign(contents, doc);
946
- return contents;
947
- };
948
- export const de_DescribeLaunchConfigurationTemplatesCommand = async (output, context) => {
949
- if (output.statusCode !== 200 && output.statusCode >= 300) {
950
- return de_CommandError(output, context);
951
- }
952
- const contents = map({
953
- $metadata: deserializeMetadata(output),
954
- });
955
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
956
- const doc = take(data, {
957
- items: _json,
958
- nextToken: __expectString,
959
- });
960
- Object.assign(contents, doc);
961
- return contents;
962
- };
963
- export const de_DescribeRecoveryInstancesCommand = async (output, context) => {
964
- if (output.statusCode !== 200 && output.statusCode >= 300) {
965
- return de_CommandError(output, context);
966
- }
967
- const contents = map({
968
- $metadata: deserializeMetadata(output),
969
- });
970
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
971
- const doc = take(data, {
972
- items: _json,
973
- nextToken: __expectString,
974
- });
975
- Object.assign(contents, doc);
976
- return contents;
977
- };
978
- export const de_DescribeRecoverySnapshotsCommand = async (output, context) => {
979
- if (output.statusCode !== 200 && output.statusCode >= 300) {
980
- return de_CommandError(output, context);
981
- }
982
- const contents = map({
983
- $metadata: deserializeMetadata(output),
984
- });
985
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
986
- const doc = take(data, {
987
- items: _json,
988
- nextToken: __expectString,
989
- });
990
- Object.assign(contents, doc);
991
- return contents;
992
- };
993
- export const de_DescribeReplicationConfigurationTemplatesCommand = async (output, context) => {
994
- if (output.statusCode !== 200 && output.statusCode >= 300) {
995
- return de_CommandError(output, context);
996
- }
997
- const contents = map({
998
- $metadata: deserializeMetadata(output),
999
- });
1000
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1001
- const doc = take(data, {
1002
- items: _json,
1003
- nextToken: __expectString,
1004
- });
1005
- Object.assign(contents, doc);
1006
- return contents;
1007
- };
1008
- export const de_DescribeSourceNetworksCommand = async (output, context) => {
1009
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1010
- return de_CommandError(output, context);
1011
- }
1012
- const contents = map({
1013
- $metadata: deserializeMetadata(output),
1014
- });
1015
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1016
- const doc = take(data, {
1017
- items: (_) => de_SourceNetworksList(_, context),
1018
- nextToken: __expectString,
1019
- });
1020
- Object.assign(contents, doc);
1021
- return contents;
1022
- };
1023
- export const de_DescribeSourceServersCommand = async (output, context) => {
1024
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1025
- return de_CommandError(output, context);
1026
- }
1027
- const contents = map({
1028
- $metadata: deserializeMetadata(output),
1029
- });
1030
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1031
- const doc = take(data, {
1032
- items: _json,
1033
- nextToken: __expectString,
1034
- });
1035
- Object.assign(contents, doc);
1036
- return contents;
1037
- };
1038
- export const de_DisconnectRecoveryInstanceCommand = async (output, context) => {
1039
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1040
- return de_CommandError(output, context);
1041
- }
1042
- const contents = map({
1043
- $metadata: deserializeMetadata(output),
1044
- });
1045
- await collectBody(output.body, context);
1046
- return contents;
1047
- };
1048
- export const de_DisconnectSourceServerCommand = async (output, context) => {
1049
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1050
- return de_CommandError(output, context);
1051
- }
1052
- const contents = map({
1053
- $metadata: deserializeMetadata(output),
1054
- });
1055
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1056
- const doc = take(data, {
1057
- agentVersion: __expectString,
1058
- arn: __expectString,
1059
- dataReplicationInfo: _json,
1060
- lastLaunchResult: __expectString,
1061
- lifeCycle: _json,
1062
- recoveryInstanceId: __expectString,
1063
- replicationDirection: __expectString,
1064
- reversedDirectionSourceServerArn: __expectString,
1065
- sourceCloudProperties: _json,
1066
- sourceNetworkID: __expectString,
1067
- sourceProperties: _json,
1068
- sourceServerID: __expectString,
1069
- stagingArea: _json,
1070
- tags: _json,
1071
- });
1072
- Object.assign(contents, doc);
1073
- return contents;
1074
- };
1075
- export const de_ExportSourceNetworkCfnTemplateCommand = async (output, context) => {
1076
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1077
- return de_CommandError(output, context);
1078
- }
1079
- const contents = map({
1080
- $metadata: deserializeMetadata(output),
1081
- });
1082
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1083
- const doc = take(data, {
1084
- s3DestinationUrl: __expectString,
1085
- });
1086
- Object.assign(contents, doc);
1087
- return contents;
1088
- };
1089
- export const de_GetFailbackReplicationConfigurationCommand = async (output, context) => {
1090
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1091
- return de_CommandError(output, context);
1092
- }
1093
- const contents = map({
1094
- $metadata: deserializeMetadata(output),
1095
- });
1096
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1097
- const doc = take(data, {
1098
- bandwidthThrottling: __expectLong,
1099
- name: __expectString,
1100
- recoveryInstanceID: __expectString,
1101
- usePrivateIP: __expectBoolean,
1102
- });
1103
- Object.assign(contents, doc);
1104
- return contents;
1105
- };
1106
- export const de_GetLaunchConfigurationCommand = async (output, context) => {
1107
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1108
- return de_CommandError(output, context);
1109
- }
1110
- const contents = map({
1111
- $metadata: deserializeMetadata(output),
1112
- });
1113
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1114
- const doc = take(data, {
1115
- copyPrivateIp: __expectBoolean,
1116
- copyTags: __expectBoolean,
1117
- ec2LaunchTemplateID: __expectString,
1118
- launchDisposition: __expectString,
1119
- launchIntoInstanceProperties: _json,
1120
- licensing: _json,
1121
- name: __expectString,
1122
- postLaunchEnabled: __expectBoolean,
1123
- sourceServerID: __expectString,
1124
- targetInstanceTypeRightSizingMethod: __expectString,
1125
- });
1126
- Object.assign(contents, doc);
1127
- return contents;
1128
- };
1129
- export const de_GetReplicationConfigurationCommand = async (output, context) => {
1130
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1131
- return de_CommandError(output, context);
1132
- }
1133
- const contents = map({
1134
- $metadata: deserializeMetadata(output),
1135
- });
1136
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1137
- const doc = take(data, {
1138
- associateDefaultSecurityGroup: __expectBoolean,
1139
- autoReplicateNewDisks: __expectBoolean,
1140
- bandwidthThrottling: __expectLong,
1141
- createPublicIP: __expectBoolean,
1142
- dataPlaneRouting: __expectString,
1143
- defaultLargeStagingDiskType: __expectString,
1144
- ebsEncryption: __expectString,
1145
- ebsEncryptionKeyArn: __expectString,
1146
- name: __expectString,
1147
- pitPolicy: _json,
1148
- replicatedDisks: _json,
1149
- replicationServerInstanceType: __expectString,
1150
- replicationServersSecurityGroupsIDs: _json,
1151
- sourceServerID: __expectString,
1152
- stagingAreaSubnetId: __expectString,
1153
- stagingAreaTags: _json,
1154
- useDedicatedReplicationServer: __expectBoolean,
1155
- });
1156
- Object.assign(contents, doc);
1157
- return contents;
1158
- };
1159
- export const de_InitializeServiceCommand = async (output, context) => {
1160
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1161
- return de_CommandError(output, context);
1162
- }
1163
- const contents = map({
1164
- $metadata: deserializeMetadata(output),
1165
- });
1166
- await collectBody(output.body, context);
1167
- return contents;
1168
- };
1169
- export const de_ListExtensibleSourceServersCommand = async (output, context) => {
1170
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1171
- return de_CommandError(output, context);
1172
- }
1173
- const contents = map({
1174
- $metadata: deserializeMetadata(output),
1175
- });
1176
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1177
- const doc = take(data, {
1178
- items: _json,
1179
- nextToken: __expectString,
1180
- });
1181
- Object.assign(contents, doc);
1182
- return contents;
1183
- };
1184
- export const de_ListLaunchActionsCommand = async (output, context) => {
1185
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1186
- return de_CommandError(output, context);
1187
- }
1188
- const contents = map({
1189
- $metadata: deserializeMetadata(output),
1190
- });
1191
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1192
- const doc = take(data, {
1193
- items: _json,
1194
- nextToken: __expectString,
1195
- });
1196
- Object.assign(contents, doc);
1197
- return contents;
1198
- };
1199
- export const de_ListStagingAccountsCommand = async (output, context) => {
1200
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1201
- return de_CommandError(output, context);
1202
- }
1203
- const contents = map({
1204
- $metadata: deserializeMetadata(output),
1205
- });
1206
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1207
- const doc = take(data, {
1208
- accounts: _json,
1209
- nextToken: __expectString,
1210
- });
1211
- Object.assign(contents, doc);
1212
- return contents;
1213
- };
1214
- export const de_ListTagsForResourceCommand = async (output, context) => {
1215
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1216
- return de_CommandError(output, context);
1217
- }
1218
- const contents = map({
1219
- $metadata: deserializeMetadata(output),
1220
- });
1221
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1222
- const doc = take(data, {
1223
- tags: _json,
1224
- });
1225
- Object.assign(contents, doc);
1226
- return contents;
1227
- };
1228
- export const de_PutLaunchActionCommand = async (output, context) => {
1229
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1230
- return de_CommandError(output, context);
1231
- }
1232
- const contents = map({
1233
- $metadata: deserializeMetadata(output),
1234
- });
1235
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1236
- const doc = take(data, {
1237
- actionCode: __expectString,
1238
- actionId: __expectString,
1239
- actionVersion: __expectString,
1240
- active: __expectBoolean,
1241
- category: __expectString,
1242
- description: __expectString,
1243
- name: __expectString,
1244
- optional: __expectBoolean,
1245
- order: __expectInt32,
1246
- parameters: _json,
1247
- resourceId: __expectString,
1248
- type: __expectString,
1249
- });
1250
- Object.assign(contents, doc);
1251
- return contents;
1252
- };
1253
- export const de_RetryDataReplicationCommand = async (output, context) => {
1254
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1255
- return de_CommandError(output, context);
1256
- }
1257
- const contents = map({
1258
- $metadata: deserializeMetadata(output),
1259
- });
1260
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1261
- const doc = take(data, {
1262
- agentVersion: __expectString,
1263
- arn: __expectString,
1264
- dataReplicationInfo: _json,
1265
- lastLaunchResult: __expectString,
1266
- lifeCycle: _json,
1267
- recoveryInstanceId: __expectString,
1268
- replicationDirection: __expectString,
1269
- reversedDirectionSourceServerArn: __expectString,
1270
- sourceCloudProperties: _json,
1271
- sourceNetworkID: __expectString,
1272
- sourceProperties: _json,
1273
- sourceServerID: __expectString,
1274
- stagingArea: _json,
1275
- tags: _json,
1276
- });
1277
- Object.assign(contents, doc);
1278
- return contents;
1279
- };
1280
- export const de_ReverseReplicationCommand = async (output, context) => {
1281
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1282
- return de_CommandError(output, context);
1283
- }
1284
- const contents = map({
1285
- $metadata: deserializeMetadata(output),
1286
- });
1287
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1288
- const doc = take(data, {
1289
- reversedDirectionSourceServerArn: __expectString,
1290
- });
1291
- Object.assign(contents, doc);
1292
- return contents;
1293
- };
1294
- export const de_StartFailbackLaunchCommand = async (output, context) => {
1295
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1296
- return de_CommandError(output, context);
1297
- }
1298
- const contents = map({
1299
- $metadata: deserializeMetadata(output),
1300
- });
1301
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1302
- const doc = take(data, {
1303
- job: _json,
1304
- });
1305
- Object.assign(contents, doc);
1306
- return contents;
1307
- };
1308
- export const de_StartRecoveryCommand = async (output, context) => {
1309
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1310
- return de_CommandError(output, context);
1311
- }
1312
- const contents = map({
1313
- $metadata: deserializeMetadata(output),
1314
- });
1315
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1316
- const doc = take(data, {
1317
- job: _json,
1318
- });
1319
- Object.assign(contents, doc);
1320
- return contents;
1321
- };
1322
- export const de_StartReplicationCommand = async (output, context) => {
1323
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1324
- return de_CommandError(output, context);
1325
- }
1326
- const contents = map({
1327
- $metadata: deserializeMetadata(output),
1328
- });
1329
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1330
- const doc = take(data, {
1331
- sourceServer: _json,
1332
- });
1333
- Object.assign(contents, doc);
1334
- return contents;
1335
- };
1336
- export const de_StartSourceNetworkRecoveryCommand = async (output, context) => {
1337
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1338
- return de_CommandError(output, context);
1339
- }
1340
- const contents = map({
1341
- $metadata: deserializeMetadata(output),
1342
- });
1343
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1344
- const doc = take(data, {
1345
- job: _json,
1346
- });
1347
- Object.assign(contents, doc);
1348
- return contents;
1349
- };
1350
- export const de_StartSourceNetworkReplicationCommand = async (output, context) => {
1351
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1352
- return de_CommandError(output, context);
1353
- }
1354
- const contents = map({
1355
- $metadata: deserializeMetadata(output),
1356
- });
1357
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1358
- const doc = take(data, {
1359
- sourceNetwork: (_) => de_SourceNetwork(_, context),
1360
- });
1361
- Object.assign(contents, doc);
1362
- return contents;
1363
- };
1364
- export const de_StopFailbackCommand = async (output, context) => {
1365
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1366
- return de_CommandError(output, context);
1367
- }
1368
- const contents = map({
1369
- $metadata: deserializeMetadata(output),
1370
- });
1371
- await collectBody(output.body, context);
1372
- return contents;
1373
- };
1374
- export const de_StopReplicationCommand = async (output, context) => {
1375
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1376
- return de_CommandError(output, context);
1377
- }
1378
- const contents = map({
1379
- $metadata: deserializeMetadata(output),
1380
- });
1381
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1382
- const doc = take(data, {
1383
- sourceServer: _json,
1384
- });
1385
- Object.assign(contents, doc);
1386
- return contents;
1387
- };
1388
- export const de_StopSourceNetworkReplicationCommand = async (output, context) => {
1389
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1390
- return de_CommandError(output, context);
1391
- }
1392
- const contents = map({
1393
- $metadata: deserializeMetadata(output),
1394
- });
1395
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1396
- const doc = take(data, {
1397
- sourceNetwork: (_) => de_SourceNetwork(_, context),
1398
- });
1399
- Object.assign(contents, doc);
1400
- return contents;
1401
- };
1402
- export const de_TagResourceCommand = async (output, context) => {
1403
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1404
- return de_CommandError(output, context);
1405
- }
1406
- const contents = map({
1407
- $metadata: deserializeMetadata(output),
1408
- });
1409
- await collectBody(output.body, context);
1410
- return contents;
1411
- };
1412
- export const de_TerminateRecoveryInstancesCommand = async (output, context) => {
1413
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1414
- return de_CommandError(output, context);
1415
- }
1416
- const contents = map({
1417
- $metadata: deserializeMetadata(output),
1418
- });
1419
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1420
- const doc = take(data, {
1421
- job: _json,
1422
- });
1423
- Object.assign(contents, doc);
1424
- return contents;
1425
- };
1426
- export const de_UntagResourceCommand = async (output, context) => {
1427
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1428
- return de_CommandError(output, context);
1429
- }
1430
- const contents = map({
1431
- $metadata: deserializeMetadata(output),
1432
- });
1433
- await collectBody(output.body, context);
1434
- return contents;
1435
- };
1436
- export const de_UpdateFailbackReplicationConfigurationCommand = async (output, context) => {
1437
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1438
- return de_CommandError(output, context);
1439
- }
1440
- const contents = map({
1441
- $metadata: deserializeMetadata(output),
1442
- });
1443
- await collectBody(output.body, context);
1444
- return contents;
1445
- };
1446
- export const de_UpdateLaunchConfigurationCommand = async (output, context) => {
1447
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1448
- return de_CommandError(output, context);
1449
- }
1450
- const contents = map({
1451
- $metadata: deserializeMetadata(output),
1452
- });
1453
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1454
- const doc = take(data, {
1455
- copyPrivateIp: __expectBoolean,
1456
- copyTags: __expectBoolean,
1457
- ec2LaunchTemplateID: __expectString,
1458
- launchDisposition: __expectString,
1459
- launchIntoInstanceProperties: _json,
1460
- licensing: _json,
1461
- name: __expectString,
1462
- postLaunchEnabled: __expectBoolean,
1463
- sourceServerID: __expectString,
1464
- targetInstanceTypeRightSizingMethod: __expectString,
1465
- });
1466
- Object.assign(contents, doc);
1467
- return contents;
1468
- };
1469
- export const de_UpdateLaunchConfigurationTemplateCommand = async (output, context) => {
1470
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1471
- return de_CommandError(output, context);
1472
- }
1473
- const contents = map({
1474
- $metadata: deserializeMetadata(output),
1475
- });
1476
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1477
- const doc = take(data, {
1478
- launchConfigurationTemplate: _json,
1479
- });
1480
- Object.assign(contents, doc);
1481
- return contents;
1482
- };
1483
- export const de_UpdateReplicationConfigurationCommand = async (output, context) => {
1484
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1485
- return de_CommandError(output, context);
1486
- }
1487
- const contents = map({
1488
- $metadata: deserializeMetadata(output),
1489
- });
1490
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1491
- const doc = take(data, {
1492
- associateDefaultSecurityGroup: __expectBoolean,
1493
- autoReplicateNewDisks: __expectBoolean,
1494
- bandwidthThrottling: __expectLong,
1495
- createPublicIP: __expectBoolean,
1496
- dataPlaneRouting: __expectString,
1497
- defaultLargeStagingDiskType: __expectString,
1498
- ebsEncryption: __expectString,
1499
- ebsEncryptionKeyArn: __expectString,
1500
- name: __expectString,
1501
- pitPolicy: _json,
1502
- replicatedDisks: _json,
1503
- replicationServerInstanceType: __expectString,
1504
- replicationServersSecurityGroupsIDs: _json,
1505
- sourceServerID: __expectString,
1506
- stagingAreaSubnetId: __expectString,
1507
- stagingAreaTags: _json,
1508
- useDedicatedReplicationServer: __expectBoolean,
1509
- });
1510
- Object.assign(contents, doc);
1511
- return contents;
1512
- };
1513
- export const de_UpdateReplicationConfigurationTemplateCommand = async (output, context) => {
1514
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1515
- return de_CommandError(output, context);
1516
- }
1517
- const contents = map({
1518
- $metadata: deserializeMetadata(output),
1519
- });
1520
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1521
- const doc = take(data, {
1522
- arn: __expectString,
1523
- associateDefaultSecurityGroup: __expectBoolean,
1524
- autoReplicateNewDisks: __expectBoolean,
1525
- bandwidthThrottling: __expectLong,
1526
- createPublicIP: __expectBoolean,
1527
- dataPlaneRouting: __expectString,
1528
- defaultLargeStagingDiskType: __expectString,
1529
- ebsEncryption: __expectString,
1530
- ebsEncryptionKeyArn: __expectString,
1531
- pitPolicy: _json,
1532
- replicationConfigurationTemplateID: __expectString,
1533
- replicationServerInstanceType: __expectString,
1534
- replicationServersSecurityGroupsIDs: _json,
1535
- stagingAreaSubnetId: __expectString,
1536
- stagingAreaTags: _json,
1537
- tags: _json,
1538
- useDedicatedReplicationServer: __expectBoolean,
1539
- });
1540
- Object.assign(contents, doc);
1541
- return contents;
1542
- };
1543
- const de_CommandError = async (output, context) => {
1544
- const parsedOutput = {
1545
- ...output,
1546
- body: await parseErrorBody(output.body, context),
1547
- };
1548
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1549
- switch (errorCode) {
1550
- case "ConflictException":
1551
- case "com.amazonaws.drs#ConflictException":
1552
- throw await de_ConflictExceptionRes(parsedOutput, context);
1553
- case "InternalServerException":
1554
- case "com.amazonaws.drs#InternalServerException":
1555
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1556
- case "ResourceNotFoundException":
1557
- case "com.amazonaws.drs#ResourceNotFoundException":
1558
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1559
- case "ServiceQuotaExceededException":
1560
- case "com.amazonaws.drs#ServiceQuotaExceededException":
1561
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1562
- case "ThrottlingException":
1563
- case "com.amazonaws.drs#ThrottlingException":
1564
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1565
- case "UninitializedAccountException":
1566
- case "com.amazonaws.drs#UninitializedAccountException":
1567
- throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1568
- case "ValidationException":
1569
- case "com.amazonaws.drs#ValidationException":
1570
- throw await de_ValidationExceptionRes(parsedOutput, context);
1571
- case "AccessDeniedException":
1572
- case "com.amazonaws.drs#AccessDeniedException":
1573
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1574
- default:
1575
- const parsedBody = parsedOutput.body;
1576
- return throwDefaultError({
1577
- output,
1578
- parsedBody,
1579
- errorCode,
1580
- });
1581
- }
1582
- };
1583
- const throwDefaultError = withBaseException(__BaseException);
1584
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1585
- const contents = map({});
1586
- const data = parsedOutput.body;
1587
- const doc = take(data, {
1588
- code: __expectString,
1589
- message: __expectString,
1590
- });
1591
- Object.assign(contents, doc);
1592
- const exception = new AccessDeniedException({
1593
- $metadata: deserializeMetadata(parsedOutput),
1594
- ...contents,
1595
- });
1596
- return __decorateServiceException(exception, parsedOutput.body);
1597
- };
1598
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
1599
- const contents = map({});
1600
- const data = parsedOutput.body;
1601
- const doc = take(data, {
1602
- code: __expectString,
1603
- message: __expectString,
1604
- resourceId: __expectString,
1605
- resourceType: __expectString,
1606
- });
1607
- Object.assign(contents, doc);
1608
- const exception = new ConflictException({
1609
- $metadata: deserializeMetadata(parsedOutput),
1610
- ...contents,
1611
- });
1612
- return __decorateServiceException(exception, parsedOutput.body);
1613
- };
1614
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1615
- const contents = map({
1616
- [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseLong(parsedOutput.headers[_ra])],
1617
- });
1618
- const data = parsedOutput.body;
1619
- const doc = take(data, {
1620
- message: __expectString,
1621
- });
1622
- Object.assign(contents, doc);
1623
- const exception = new InternalServerException({
1624
- $metadata: deserializeMetadata(parsedOutput),
1625
- ...contents,
1626
- });
1627
- return __decorateServiceException(exception, parsedOutput.body);
1628
- };
1629
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1630
- const contents = map({});
1631
- const data = parsedOutput.body;
1632
- const doc = take(data, {
1633
- code: __expectString,
1634
- message: __expectString,
1635
- resourceId: __expectString,
1636
- resourceType: __expectString,
1637
- });
1638
- Object.assign(contents, doc);
1639
- const exception = new ResourceNotFoundException({
1640
- $metadata: deserializeMetadata(parsedOutput),
1641
- ...contents,
1642
- });
1643
- return __decorateServiceException(exception, parsedOutput.body);
1644
- };
1645
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1646
- const contents = map({});
1647
- const data = parsedOutput.body;
1648
- const doc = take(data, {
1649
- code: __expectString,
1650
- message: __expectString,
1651
- quotaCode: __expectString,
1652
- resourceId: __expectString,
1653
- resourceType: __expectString,
1654
- serviceCode: __expectString,
1655
- });
1656
- Object.assign(contents, doc);
1657
- const exception = new ServiceQuotaExceededException({
1658
- $metadata: deserializeMetadata(parsedOutput),
1659
- ...contents,
1660
- });
1661
- return __decorateServiceException(exception, parsedOutput.body);
1662
- };
1663
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1664
- const contents = map({
1665
- [_rAS]: [, parsedOutput.headers[_ra]],
1666
- });
1667
- const data = parsedOutput.body;
1668
- const doc = take(data, {
1669
- message: __expectString,
1670
- quotaCode: __expectString,
1671
- serviceCode: __expectString,
1672
- });
1673
- Object.assign(contents, doc);
1674
- const exception = new ThrottlingException({
1675
- $metadata: deserializeMetadata(parsedOutput),
1676
- ...contents,
1677
- });
1678
- return __decorateServiceException(exception, parsedOutput.body);
1679
- };
1680
- const de_UninitializedAccountExceptionRes = async (parsedOutput, context) => {
1681
- const contents = map({});
1682
- const data = parsedOutput.body;
1683
- const doc = take(data, {
1684
- code: __expectString,
1685
- message: __expectString,
1686
- });
1687
- Object.assign(contents, doc);
1688
- const exception = new UninitializedAccountException({
1689
- $metadata: deserializeMetadata(parsedOutput),
1690
- ...contents,
1691
- });
1692
- return __decorateServiceException(exception, parsedOutput.body);
1693
- };
1694
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
1695
- const contents = map({});
1696
- const data = parsedOutput.body;
1697
- const doc = take(data, {
1698
- code: __expectString,
1699
- fieldList: _json,
1700
- message: __expectString,
1701
- reason: __expectString,
1702
- });
1703
- Object.assign(contents, doc);
1704
- const exception = new ValidationException({
1705
- $metadata: deserializeMetadata(parsedOutput),
1706
- ...contents,
1707
- });
1708
- return __decorateServiceException(exception, parsedOutput.body);
1709
- };
1710
- const de_RecoveryLifeCycle = (output, context) => {
1711
- return take(output, {
1712
- apiCallDateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1713
- jobID: __expectString,
1714
- lastRecoveryResult: __expectString,
1715
- });
1716
- };
1717
- const de_SourceNetwork = (output, context) => {
1718
- return take(output, {
1719
- arn: __expectString,
1720
- cfnStackName: __expectString,
1721
- lastRecovery: (_) => de_RecoveryLifeCycle(_, context),
1722
- launchedVpcID: __expectString,
1723
- replicationStatus: __expectString,
1724
- replicationStatusDetails: __expectString,
1725
- sourceAccountID: __expectString,
1726
- sourceNetworkID: __expectString,
1727
- sourceRegion: __expectString,
1728
- sourceVpcID: __expectString,
1729
- tags: _json,
1730
- });
1731
- };
1732
- const de_SourceNetworksList = (output, context) => {
1733
- const retVal = (output || [])
1734
- .filter((e) => e != null)
1735
- .map((entry) => {
1736
- return de_SourceNetwork(entry, context);
1737
- });
1738
- return retVal;
1739
- };
1740
- const deserializeMetadata = (output) => ({
1741
- httpStatusCode: output.statusCode,
1742
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1743
- extendedRequestId: output.headers["x-amz-id-2"],
1744
- cfId: output.headers["x-amz-cf-id"],
1745
- });
1746
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1747
- const _mR = "maxResults";
1748
- const _nT = "nextToken";
1749
- const _rAS = "retryAfterSeconds";
1750
- const _ra = "retry-after";
1751
- const _tK = "tagKeys";