@aws-sdk/client-drs 3.350.0 → 3.352.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/README.md +71 -7
  2. package/dist-cjs/Drs.js +16 -0
  3. package/dist-cjs/commands/AssociateSourceNetworkStackCommand.js +47 -0
  4. package/dist-cjs/commands/CreateSourceNetworkCommand.js +47 -0
  5. package/dist-cjs/commands/DeleteSourceNetworkCommand.js +46 -0
  6. package/dist-cjs/commands/DescribeSourceNetworksCommand.js +47 -0
  7. package/dist-cjs/commands/ExportSourceNetworkCfnTemplateCommand.js +46 -0
  8. package/dist-cjs/commands/StartSourceNetworkRecoveryCommand.js +47 -0
  9. package/dist-cjs/commands/StartSourceNetworkReplicationCommand.js +47 -0
  10. package/dist-cjs/commands/StopSourceNetworkReplicationCommand.js +47 -0
  11. package/dist-cjs/commands/index.js +8 -0
  12. package/dist-cjs/models/models_0.js +197 -96
  13. package/dist-cjs/pagination/DescribeSourceNetworksPaginator.js +29 -0
  14. package/dist-cjs/pagination/index.js +1 -0
  15. package/dist-cjs/protocols/Aws_restJson1.js +595 -2
  16. package/dist-es/Drs.js +16 -0
  17. package/dist-es/commands/AssociateSourceNetworkStackCommand.js +43 -0
  18. package/dist-es/commands/CreateSourceNetworkCommand.js +43 -0
  19. package/dist-es/commands/DeleteSourceNetworkCommand.js +42 -0
  20. package/dist-es/commands/DescribeSourceNetworksCommand.js +43 -0
  21. package/dist-es/commands/ExportSourceNetworkCfnTemplateCommand.js +42 -0
  22. package/dist-es/commands/StartSourceNetworkRecoveryCommand.js +43 -0
  23. package/dist-es/commands/StartSourceNetworkReplicationCommand.js +43 -0
  24. package/dist-es/commands/StopSourceNetworkReplicationCommand.js +43 -0
  25. package/dist-es/commands/index.js +8 -0
  26. package/dist-es/models/models_0.js +184 -93
  27. package/dist-es/pagination/DescribeSourceNetworksPaginator.js +25 -0
  28. package/dist-es/pagination/index.js +1 -0
  29. package/dist-es/protocols/Aws_restJson1.js +578 -1
  30. package/dist-types/Drs.d.ts +56 -0
  31. package/dist-types/DrsClient.d.ts +10 -2
  32. package/dist-types/commands/AssociateSourceNetworkStackCommand.d.ts +121 -0
  33. package/dist-types/commands/CreateExtendedSourceServerCommand.d.ts +1 -0
  34. package/dist-types/commands/CreateLaunchConfigurationTemplateCommand.d.ts +2 -0
  35. package/dist-types/commands/CreateSourceNetworkCommand.d.ts +99 -0
  36. package/dist-types/commands/DeleteSourceNetworkCommand.d.ts +86 -0
  37. package/dist-types/commands/DescribeJobLogItemsCommand.d.ts +8 -0
  38. package/dist-types/commands/DescribeJobsCommand.d.ts +8 -0
  39. package/dist-types/commands/DescribeLaunchConfigurationTemplatesCommand.d.ts +1 -0
  40. package/dist-types/commands/DescribeSourceNetworksCommand.d.ts +114 -0
  41. package/dist-types/commands/DescribeSourceServersCommand.d.ts +1 -0
  42. package/dist-types/commands/DisconnectSourceServerCommand.d.ts +1 -0
  43. package/dist-types/commands/ExportSourceNetworkCfnTemplateCommand.d.ts +91 -0
  44. package/dist-types/commands/RetryDataReplicationCommand.d.ts +1 -0
  45. package/dist-types/commands/StartFailbackLaunchCommand.d.ts +8 -0
  46. package/dist-types/commands/StartRecoveryCommand.d.ts +8 -0
  47. package/dist-types/commands/StartReplicationCommand.d.ts +1 -0
  48. package/dist-types/commands/StartSourceNetworkRecoveryCommand.d.ts +126 -0
  49. package/dist-types/commands/StartSourceNetworkReplicationCommand.d.ts +106 -0
  50. package/dist-types/commands/StopReplicationCommand.d.ts +1 -0
  51. package/dist-types/commands/StopSourceNetworkReplicationCommand.d.ts +109 -0
  52. package/dist-types/commands/TerminateRecoveryInstancesCommand.d.ts +8 -0
  53. package/dist-types/commands/UpdateLaunchConfigurationTemplateCommand.d.ts +2 -0
  54. package/dist-types/commands/index.d.ts +8 -0
  55. package/dist-types/models/models_0.d.ts +802 -325
  56. package/dist-types/pagination/DescribeSourceNetworksPaginator.d.ts +7 -0
  57. package/dist-types/pagination/index.d.ts +1 -0
  58. package/dist-types/protocols/Aws_restJson1.d.ts +72 -0
  59. package/dist-types/ts3.4/Drs.d.ts +136 -0
  60. package/dist-types/ts3.4/DrsClient.d.ts +48 -0
  61. package/dist-types/ts3.4/commands/AssociateSourceNetworkStackCommand.d.ts +42 -0
  62. package/dist-types/ts3.4/commands/CreateSourceNetworkCommand.d.ts +39 -0
  63. package/dist-types/ts3.4/commands/DeleteSourceNetworkCommand.d.ts +39 -0
  64. package/dist-types/ts3.4/commands/DescribeSourceNetworksCommand.d.ts +42 -0
  65. package/dist-types/ts3.4/commands/ExportSourceNetworkCfnTemplateCommand.d.ts +42 -0
  66. package/dist-types/ts3.4/commands/StartSourceNetworkRecoveryCommand.d.ts +42 -0
  67. package/dist-types/ts3.4/commands/StartSourceNetworkReplicationCommand.d.ts +42 -0
  68. package/dist-types/ts3.4/commands/StopSourceNetworkReplicationCommand.d.ts +42 -0
  69. package/dist-types/ts3.4/commands/index.d.ts +8 -0
  70. package/dist-types/ts3.4/models/models_0.d.ts +313 -116
  71. package/dist-types/ts3.4/pagination/DescribeSourceNetworksPaginator.d.ts +11 -0
  72. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  73. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +96 -0
  74. package/package.json +5 -5
@@ -1,7 +1,28 @@
1
- import { _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, resolvedPath as __resolvedPath, strictParseLong as __strictParseLong, take, withBaseException, } from "@aws-sdk/smithy-client";
1
+ import { _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, strictParseLong as __strictParseLong, take, withBaseException, } from "@aws-sdk/smithy-client";
2
2
  import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
3
  import { DrsServiceException as __BaseException } from "../models/DrsServiceException";
4
4
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, UninitializedAccountException, ValidationException, } from "../models/models_0";
5
+ export const se_AssociateSourceNetworkStackCommand = async (input, context) => {
6
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const headers = {
8
+ "content-type": "application/json",
9
+ };
10
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/AssociateSourceNetworkStack";
11
+ let body;
12
+ body = JSON.stringify(take(input, {
13
+ cfnStackName: [],
14
+ sourceNetworkID: [],
15
+ }));
16
+ return new __HttpRequest({
17
+ protocol,
18
+ hostname,
19
+ port,
20
+ method: "POST",
21
+ headers,
22
+ path: resolvedPath,
23
+ body,
24
+ });
25
+ };
5
26
  export const se_CreateExtendedSourceServerCommand = async (input, context) => {
6
27
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
28
  const headers = {
@@ -33,6 +54,7 @@ export const se_CreateLaunchConfigurationTemplateCommand = async (input, context
33
54
  body = JSON.stringify(take(input, {
34
55
  copyPrivateIp: [],
35
56
  copyTags: [],
57
+ exportBucketArn: [],
36
58
  launchDisposition: [],
37
59
  licensing: (_) => _json(_),
38
60
  tags: (_) => _json(_),
@@ -82,6 +104,29 @@ export const se_CreateReplicationConfigurationTemplateCommand = async (input, co
82
104
  body,
83
105
  });
84
106
  };
107
+ export const se_CreateSourceNetworkCommand = async (input, context) => {
108
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
109
+ const headers = {
110
+ "content-type": "application/json",
111
+ };
112
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateSourceNetwork";
113
+ let body;
114
+ body = JSON.stringify(take(input, {
115
+ originAccountID: [],
116
+ originRegion: [],
117
+ tags: (_) => _json(_),
118
+ vpcID: [],
119
+ }));
120
+ return new __HttpRequest({
121
+ protocol,
122
+ hostname,
123
+ port,
124
+ method: "POST",
125
+ headers,
126
+ path: resolvedPath,
127
+ body,
128
+ });
129
+ };
85
130
  export const se_DeleteJobCommand = async (input, context) => {
86
131
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
87
132
  const headers = {
@@ -162,6 +207,26 @@ export const se_DeleteReplicationConfigurationTemplateCommand = async (input, co
162
207
  body,
163
208
  });
164
209
  };
210
+ export const se_DeleteSourceNetworkCommand = async (input, context) => {
211
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
212
+ const headers = {
213
+ "content-type": "application/json",
214
+ };
215
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteSourceNetwork";
216
+ let body;
217
+ body = JSON.stringify(take(input, {
218
+ sourceNetworkID: [],
219
+ }));
220
+ return new __HttpRequest({
221
+ protocol,
222
+ hostname,
223
+ port,
224
+ method: "POST",
225
+ headers,
226
+ path: resolvedPath,
227
+ body,
228
+ });
229
+ };
165
230
  export const se_DeleteSourceServerCommand = async (input, context) => {
166
231
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
167
232
  const headers = {
@@ -317,6 +382,28 @@ export const se_DescribeReplicationConfigurationTemplatesCommand = async (input,
317
382
  body,
318
383
  });
319
384
  };
385
+ export const se_DescribeSourceNetworksCommand = async (input, context) => {
386
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
387
+ const headers = {
388
+ "content-type": "application/json",
389
+ };
390
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeSourceNetworks";
391
+ let body;
392
+ body = JSON.stringify(take(input, {
393
+ filters: (_) => _json(_),
394
+ maxResults: [],
395
+ nextToken: [],
396
+ }));
397
+ return new __HttpRequest({
398
+ protocol,
399
+ hostname,
400
+ port,
401
+ method: "POST",
402
+ headers,
403
+ path: resolvedPath,
404
+ body,
405
+ });
406
+ };
320
407
  export const se_DescribeSourceServersCommand = async (input, context) => {
321
408
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
322
409
  const headers = {
@@ -379,6 +466,26 @@ export const se_DisconnectSourceServerCommand = async (input, context) => {
379
466
  body,
380
467
  });
381
468
  };
469
+ export const se_ExportSourceNetworkCfnTemplateCommand = async (input, context) => {
470
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
471
+ const headers = {
472
+ "content-type": "application/json",
473
+ };
474
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ExportSourceNetworkCfnTemplate";
475
+ let body;
476
+ body = JSON.stringify(take(input, {
477
+ sourceNetworkID: [],
478
+ }));
479
+ return new __HttpRequest({
480
+ protocol,
481
+ hostname,
482
+ port,
483
+ method: "POST",
484
+ headers,
485
+ path: resolvedPath,
486
+ body,
487
+ });
488
+ };
382
489
  export const se_GetFailbackReplicationConfigurationCommand = async (input, context) => {
383
490
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
384
491
  const headers = {
@@ -618,6 +725,48 @@ export const se_StartReplicationCommand = async (input, context) => {
618
725
  body,
619
726
  });
620
727
  };
728
+ export const se_StartSourceNetworkRecoveryCommand = async (input, context) => {
729
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
730
+ const headers = {
731
+ "content-type": "application/json",
732
+ };
733
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StartSourceNetworkRecovery";
734
+ let body;
735
+ body = JSON.stringify(take(input, {
736
+ deployAsNew: [],
737
+ sourceNetworks: (_) => _json(_),
738
+ tags: (_) => _json(_),
739
+ }));
740
+ return new __HttpRequest({
741
+ protocol,
742
+ hostname,
743
+ port,
744
+ method: "POST",
745
+ headers,
746
+ path: resolvedPath,
747
+ body,
748
+ });
749
+ };
750
+ export const se_StartSourceNetworkReplicationCommand = async (input, context) => {
751
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
752
+ const headers = {
753
+ "content-type": "application/json",
754
+ };
755
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StartSourceNetworkReplication";
756
+ let body;
757
+ body = JSON.stringify(take(input, {
758
+ sourceNetworkID: [],
759
+ }));
760
+ return new __HttpRequest({
761
+ protocol,
762
+ hostname,
763
+ port,
764
+ method: "POST",
765
+ headers,
766
+ path: resolvedPath,
767
+ body,
768
+ });
769
+ };
621
770
  export const se_StopFailbackCommand = async (input, context) => {
622
771
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
623
772
  const headers = {
@@ -658,6 +807,26 @@ export const se_StopReplicationCommand = async (input, context) => {
658
807
  body,
659
808
  });
660
809
  };
810
+ export const se_StopSourceNetworkReplicationCommand = async (input, context) => {
811
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
812
+ const headers = {
813
+ "content-type": "application/json",
814
+ };
815
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StopSourceNetworkReplication";
816
+ let body;
817
+ body = JSON.stringify(take(input, {
818
+ sourceNetworkID: [],
819
+ }));
820
+ return new __HttpRequest({
821
+ protocol,
822
+ hostname,
823
+ port,
824
+ method: "POST",
825
+ headers,
826
+ path: resolvedPath,
827
+ body,
828
+ });
829
+ };
661
830
  export const se_TagResourceCommand = async (input, context) => {
662
831
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
663
832
  const headers = {
@@ -781,6 +950,7 @@ export const se_UpdateLaunchConfigurationTemplateCommand = async (input, context
781
950
  body = JSON.stringify(take(input, {
782
951
  copyPrivateIp: [],
783
952
  copyTags: [],
953
+ exportBucketArn: [],
784
954
  launchConfigurationTemplateID: [],
785
955
  launchDisposition: [],
786
956
  licensing: (_) => _json(_),
@@ -867,6 +1037,57 @@ export const se_UpdateReplicationConfigurationTemplateCommand = async (input, co
867
1037
  body,
868
1038
  });
869
1039
  };
1040
+ export const de_AssociateSourceNetworkStackCommand = async (output, context) => {
1041
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
1042
+ return de_AssociateSourceNetworkStackCommandError(output, context);
1043
+ }
1044
+ const contents = map({
1045
+ $metadata: deserializeMetadata(output),
1046
+ });
1047
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1048
+ const doc = take(data, {
1049
+ job: _json,
1050
+ });
1051
+ Object.assign(contents, doc);
1052
+ return contents;
1053
+ };
1054
+ const de_AssociateSourceNetworkStackCommandError = async (output, context) => {
1055
+ const parsedOutput = {
1056
+ ...output,
1057
+ body: await parseErrorBody(output.body, context),
1058
+ };
1059
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1060
+ switch (errorCode) {
1061
+ case "ConflictException":
1062
+ case "com.amazonaws.drs#ConflictException":
1063
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1064
+ case "InternalServerException":
1065
+ case "com.amazonaws.drs#InternalServerException":
1066
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1067
+ case "ResourceNotFoundException":
1068
+ case "com.amazonaws.drs#ResourceNotFoundException":
1069
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1070
+ case "ServiceQuotaExceededException":
1071
+ case "com.amazonaws.drs#ServiceQuotaExceededException":
1072
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1073
+ case "ThrottlingException":
1074
+ case "com.amazonaws.drs#ThrottlingException":
1075
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1076
+ case "UninitializedAccountException":
1077
+ case "com.amazonaws.drs#UninitializedAccountException":
1078
+ throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1079
+ case "ValidationException":
1080
+ case "com.amazonaws.drs#ValidationException":
1081
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1082
+ default:
1083
+ const parsedBody = parsedOutput.body;
1084
+ return throwDefaultError({
1085
+ output,
1086
+ parsedBody,
1087
+ errorCode,
1088
+ });
1089
+ }
1090
+ };
870
1091
  export const de_CreateExtendedSourceServerCommand = async (output, context) => {
871
1092
  if (output.statusCode !== 201 && output.statusCode >= 300) {
872
1093
  return de_CreateExtendedSourceServerCommandError(output, context);
@@ -1030,6 +1251,57 @@ const de_CreateReplicationConfigurationTemplateCommandError = async (output, con
1030
1251
  });
1031
1252
  }
1032
1253
  };
1254
+ export const de_CreateSourceNetworkCommand = async (output, context) => {
1255
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
1256
+ return de_CreateSourceNetworkCommandError(output, context);
1257
+ }
1258
+ const contents = map({
1259
+ $metadata: deserializeMetadata(output),
1260
+ });
1261
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1262
+ const doc = take(data, {
1263
+ sourceNetworkID: __expectString,
1264
+ });
1265
+ Object.assign(contents, doc);
1266
+ return contents;
1267
+ };
1268
+ const de_CreateSourceNetworkCommandError = async (output, context) => {
1269
+ const parsedOutput = {
1270
+ ...output,
1271
+ body: await parseErrorBody(output.body, context),
1272
+ };
1273
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1274
+ switch (errorCode) {
1275
+ case "ConflictException":
1276
+ case "com.amazonaws.drs#ConflictException":
1277
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1278
+ case "InternalServerException":
1279
+ case "com.amazonaws.drs#InternalServerException":
1280
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1281
+ case "ResourceNotFoundException":
1282
+ case "com.amazonaws.drs#ResourceNotFoundException":
1283
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1284
+ case "ServiceQuotaExceededException":
1285
+ case "com.amazonaws.drs#ServiceQuotaExceededException":
1286
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1287
+ case "ThrottlingException":
1288
+ case "com.amazonaws.drs#ThrottlingException":
1289
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1290
+ case "UninitializedAccountException":
1291
+ case "com.amazonaws.drs#UninitializedAccountException":
1292
+ throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1293
+ case "ValidationException":
1294
+ case "com.amazonaws.drs#ValidationException":
1295
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1296
+ default:
1297
+ const parsedBody = parsedOutput.body;
1298
+ return throwDefaultError({
1299
+ output,
1300
+ parsedBody,
1301
+ errorCode,
1302
+ });
1303
+ }
1304
+ };
1033
1305
  export const de_DeleteJobCommand = async (output, context) => {
1034
1306
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1035
1307
  return de_DeleteJobCommandError(output, context);
@@ -1194,6 +1466,47 @@ const de_DeleteReplicationConfigurationTemplateCommandError = async (output, con
1194
1466
  });
1195
1467
  }
1196
1468
  };
1469
+ export const de_DeleteSourceNetworkCommand = async (output, context) => {
1470
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
1471
+ return de_DeleteSourceNetworkCommandError(output, context);
1472
+ }
1473
+ const contents = map({
1474
+ $metadata: deserializeMetadata(output),
1475
+ });
1476
+ await collectBody(output.body, context);
1477
+ return contents;
1478
+ };
1479
+ const de_DeleteSourceNetworkCommandError = async (output, context) => {
1480
+ const parsedOutput = {
1481
+ ...output,
1482
+ body: await parseErrorBody(output.body, context),
1483
+ };
1484
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1485
+ switch (errorCode) {
1486
+ case "ConflictException":
1487
+ case "com.amazonaws.drs#ConflictException":
1488
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1489
+ case "InternalServerException":
1490
+ case "com.amazonaws.drs#InternalServerException":
1491
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1492
+ case "ResourceNotFoundException":
1493
+ case "com.amazonaws.drs#ResourceNotFoundException":
1494
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1495
+ case "ThrottlingException":
1496
+ case "com.amazonaws.drs#ThrottlingException":
1497
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1498
+ case "UninitializedAccountException":
1499
+ case "com.amazonaws.drs#UninitializedAccountException":
1500
+ throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1501
+ default:
1502
+ const parsedBody = parsedOutput.body;
1503
+ return throwDefaultError({
1504
+ output,
1505
+ parsedBody,
1506
+ errorCode,
1507
+ });
1508
+ }
1509
+ };
1197
1510
  export const de_DeleteSourceServerCommand = async (output, context) => {
1198
1511
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1199
1512
  return de_DeleteSourceServerCommandError(output, context);
@@ -1502,6 +1815,49 @@ const de_DescribeReplicationConfigurationTemplatesCommandError = async (output,
1502
1815
  });
1503
1816
  }
1504
1817
  };
1818
+ export const de_DescribeSourceNetworksCommand = async (output, context) => {
1819
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1820
+ return de_DescribeSourceNetworksCommandError(output, context);
1821
+ }
1822
+ const contents = map({
1823
+ $metadata: deserializeMetadata(output),
1824
+ });
1825
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1826
+ const doc = take(data, {
1827
+ items: (_) => de_SourceNetworksList(_, context),
1828
+ nextToken: __expectString,
1829
+ });
1830
+ Object.assign(contents, doc);
1831
+ return contents;
1832
+ };
1833
+ const de_DescribeSourceNetworksCommandError = async (output, context) => {
1834
+ const parsedOutput = {
1835
+ ...output,
1836
+ body: await parseErrorBody(output.body, context),
1837
+ };
1838
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1839
+ switch (errorCode) {
1840
+ case "InternalServerException":
1841
+ case "com.amazonaws.drs#InternalServerException":
1842
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1843
+ case "ThrottlingException":
1844
+ case "com.amazonaws.drs#ThrottlingException":
1845
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1846
+ case "UninitializedAccountException":
1847
+ case "com.amazonaws.drs#UninitializedAccountException":
1848
+ throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1849
+ case "ValidationException":
1850
+ case "com.amazonaws.drs#ValidationException":
1851
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1852
+ default:
1853
+ const parsedBody = parsedOutput.body;
1854
+ return throwDefaultError({
1855
+ output,
1856
+ parsedBody,
1857
+ errorCode,
1858
+ });
1859
+ }
1860
+ };
1505
1861
  export const de_DescribeSourceServersCommand = async (output, context) => {
1506
1862
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1507
1863
  return de_DescribeSourceServersCommandError(output, context);
@@ -1606,6 +1962,7 @@ export const de_DisconnectSourceServerCommand = async (output, context) => {
1606
1962
  replicationDirection: __expectString,
1607
1963
  reversedDirectionSourceServerArn: __expectString,
1608
1964
  sourceCloudProperties: _json,
1965
+ sourceNetworkID: __expectString,
1609
1966
  sourceProperties: _json,
1610
1967
  sourceServerID: __expectString,
1611
1968
  stagingArea: _json,
@@ -1645,6 +2002,54 @@ const de_DisconnectSourceServerCommandError = async (output, context) => {
1645
2002
  });
1646
2003
  }
1647
2004
  };
2005
+ export const de_ExportSourceNetworkCfnTemplateCommand = async (output, context) => {
2006
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2007
+ return de_ExportSourceNetworkCfnTemplateCommandError(output, context);
2008
+ }
2009
+ const contents = map({
2010
+ $metadata: deserializeMetadata(output),
2011
+ });
2012
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2013
+ const doc = take(data, {
2014
+ s3DestinationUrl: __expectString,
2015
+ });
2016
+ Object.assign(contents, doc);
2017
+ return contents;
2018
+ };
2019
+ const de_ExportSourceNetworkCfnTemplateCommandError = async (output, context) => {
2020
+ const parsedOutput = {
2021
+ ...output,
2022
+ body: await parseErrorBody(output.body, context),
2023
+ };
2024
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2025
+ switch (errorCode) {
2026
+ case "ConflictException":
2027
+ case "com.amazonaws.drs#ConflictException":
2028
+ throw await de_ConflictExceptionRes(parsedOutput, context);
2029
+ case "InternalServerException":
2030
+ case "com.amazonaws.drs#InternalServerException":
2031
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2032
+ case "ResourceNotFoundException":
2033
+ case "com.amazonaws.drs#ResourceNotFoundException":
2034
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2035
+ case "ThrottlingException":
2036
+ case "com.amazonaws.drs#ThrottlingException":
2037
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2038
+ case "UninitializedAccountException":
2039
+ case "com.amazonaws.drs#UninitializedAccountException":
2040
+ throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2041
+ case "ValidationException":
2042
+ case "com.amazonaws.drs#ValidationException":
2043
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2044
+ default:
2045
+ const parsedBody = parsedOutput.body;
2046
+ return throwDefaultError({
2047
+ output,
2048
+ parsedBody,
2049
+ errorCode,
2050
+ });
2051
+ }
2052
+ };
1648
2053
  export const de_GetFailbackReplicationConfigurationCommand = async (output, context) => {
1649
2054
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1650
2055
  return de_GetFailbackReplicationConfigurationCommandError(output, context);
@@ -1992,6 +2397,7 @@ export const de_RetryDataReplicationCommand = async (output, context) => {
1992
2397
  replicationDirection: __expectString,
1993
2398
  reversedDirectionSourceServerArn: __expectString,
1994
2399
  sourceCloudProperties: _json,
2400
+ sourceNetworkID: __expectString,
1995
2401
  sourceProperties: _json,
1996
2402
  sourceServerID: __expectString,
1997
2403
  stagingArea: _json,
@@ -2220,6 +2626,99 @@ const de_StartReplicationCommandError = async (output, context) => {
2220
2626
  });
2221
2627
  }
2222
2628
  };
2629
+ export const de_StartSourceNetworkRecoveryCommand = async (output, context) => {
2630
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
2631
+ return de_StartSourceNetworkRecoveryCommandError(output, context);
2632
+ }
2633
+ const contents = map({
2634
+ $metadata: deserializeMetadata(output),
2635
+ });
2636
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2637
+ const doc = take(data, {
2638
+ job: _json,
2639
+ });
2640
+ Object.assign(contents, doc);
2641
+ return contents;
2642
+ };
2643
+ const de_StartSourceNetworkRecoveryCommandError = async (output, context) => {
2644
+ const parsedOutput = {
2645
+ ...output,
2646
+ body: await parseErrorBody(output.body, context),
2647
+ };
2648
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2649
+ switch (errorCode) {
2650
+ case "ConflictException":
2651
+ case "com.amazonaws.drs#ConflictException":
2652
+ throw await de_ConflictExceptionRes(parsedOutput, context);
2653
+ case "InternalServerException":
2654
+ case "com.amazonaws.drs#InternalServerException":
2655
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2656
+ case "ServiceQuotaExceededException":
2657
+ case "com.amazonaws.drs#ServiceQuotaExceededException":
2658
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2659
+ case "ThrottlingException":
2660
+ case "com.amazonaws.drs#ThrottlingException":
2661
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2662
+ case "UninitializedAccountException":
2663
+ case "com.amazonaws.drs#UninitializedAccountException":
2664
+ throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2665
+ case "ValidationException":
2666
+ case "com.amazonaws.drs#ValidationException":
2667
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2668
+ default:
2669
+ const parsedBody = parsedOutput.body;
2670
+ return throwDefaultError({
2671
+ output,
2672
+ parsedBody,
2673
+ errorCode,
2674
+ });
2675
+ }
2676
+ };
2677
+ export const de_StartSourceNetworkReplicationCommand = async (output, context) => {
2678
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2679
+ return de_StartSourceNetworkReplicationCommandError(output, context);
2680
+ }
2681
+ const contents = map({
2682
+ $metadata: deserializeMetadata(output),
2683
+ });
2684
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2685
+ const doc = take(data, {
2686
+ sourceNetwork: (_) => de_SourceNetwork(_, context),
2687
+ });
2688
+ Object.assign(contents, doc);
2689
+ return contents;
2690
+ };
2691
+ const de_StartSourceNetworkReplicationCommandError = async (output, context) => {
2692
+ const parsedOutput = {
2693
+ ...output,
2694
+ body: await parseErrorBody(output.body, context),
2695
+ };
2696
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2697
+ switch (errorCode) {
2698
+ case "ConflictException":
2699
+ case "com.amazonaws.drs#ConflictException":
2700
+ throw await de_ConflictExceptionRes(parsedOutput, context);
2701
+ case "InternalServerException":
2702
+ case "com.amazonaws.drs#InternalServerException":
2703
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2704
+ case "ResourceNotFoundException":
2705
+ case "com.amazonaws.drs#ResourceNotFoundException":
2706
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2707
+ case "ThrottlingException":
2708
+ case "com.amazonaws.drs#ThrottlingException":
2709
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2710
+ case "UninitializedAccountException":
2711
+ case "com.amazonaws.drs#UninitializedAccountException":
2712
+ throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2713
+ default:
2714
+ const parsedBody = parsedOutput.body;
2715
+ return throwDefaultError({
2716
+ output,
2717
+ parsedBody,
2718
+ errorCode,
2719
+ });
2720
+ }
2721
+ };
2223
2722
  export const de_StopFailbackCommand = async (output, context) => {
2224
2723
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2225
2724
  return de_StopFailbackCommandError(output, context);
@@ -2303,6 +2802,54 @@ const de_StopReplicationCommandError = async (output, context) => {
2303
2802
  });
2304
2803
  }
2305
2804
  };
2805
+ export const de_StopSourceNetworkReplicationCommand = async (output, context) => {
2806
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2807
+ return de_StopSourceNetworkReplicationCommandError(output, context);
2808
+ }
2809
+ const contents = map({
2810
+ $metadata: deserializeMetadata(output),
2811
+ });
2812
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2813
+ const doc = take(data, {
2814
+ sourceNetwork: (_) => de_SourceNetwork(_, context),
2815
+ });
2816
+ Object.assign(contents, doc);
2817
+ return contents;
2818
+ };
2819
+ const de_StopSourceNetworkReplicationCommandError = async (output, context) => {
2820
+ const parsedOutput = {
2821
+ ...output,
2822
+ body: await parseErrorBody(output.body, context),
2823
+ };
2824
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2825
+ switch (errorCode) {
2826
+ case "ConflictException":
2827
+ case "com.amazonaws.drs#ConflictException":
2828
+ throw await de_ConflictExceptionRes(parsedOutput, context);
2829
+ case "InternalServerException":
2830
+ case "com.amazonaws.drs#InternalServerException":
2831
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2832
+ case "ResourceNotFoundException":
2833
+ case "com.amazonaws.drs#ResourceNotFoundException":
2834
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2835
+ case "ThrottlingException":
2836
+ case "com.amazonaws.drs#ThrottlingException":
2837
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2838
+ case "UninitializedAccountException":
2839
+ case "com.amazonaws.drs#UninitializedAccountException":
2840
+ throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2841
+ case "ValidationException":
2842
+ case "com.amazonaws.drs#ValidationException":
2843
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2844
+ default:
2845
+ const parsedBody = parsedOutput.body;
2846
+ return throwDefaultError({
2847
+ output,
2848
+ parsedBody,
2849
+ errorCode,
2850
+ });
2851
+ }
2852
+ };
2306
2853
  export const de_TagResourceCommand = async (output, context) => {
2307
2854
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2308
2855
  return de_TagResourceCommandError(output, context);
@@ -2835,6 +3382,36 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
2835
3382
  });
2836
3383
  return __decorateServiceException(exception, parsedOutput.body);
2837
3384
  };
3385
+ const de_RecoveryLifeCycle = (output, context) => {
3386
+ return take(output, {
3387
+ apiCallDateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3388
+ jobID: __expectString,
3389
+ lastRecoveryResult: __expectString,
3390
+ });
3391
+ };
3392
+ const de_SourceNetwork = (output, context) => {
3393
+ return take(output, {
3394
+ arn: __expectString,
3395
+ cfnStackName: __expectString,
3396
+ lastRecovery: (_) => de_RecoveryLifeCycle(_, context),
3397
+ launchedVpcID: __expectString,
3398
+ replicationStatus: __expectString,
3399
+ replicationStatusDetails: __expectString,
3400
+ sourceAccountID: __expectString,
3401
+ sourceNetworkID: __expectString,
3402
+ sourceRegion: __expectString,
3403
+ sourceVpcID: __expectString,
3404
+ tags: _json,
3405
+ });
3406
+ };
3407
+ const de_SourceNetworksList = (output, context) => {
3408
+ const retVal = (output || [])
3409
+ .filter((e) => e != null)
3410
+ .map((entry) => {
3411
+ return de_SourceNetwork(entry, context);
3412
+ });
3413
+ return retVal;
3414
+ };
2838
3415
  const deserializeMetadata = (output) => ({
2839
3416
  httpStatusCode: output.statusCode,
2840
3417
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],