@aws-sdk/client-drs 3.215.0 → 3.218.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 (31) hide show
  1. package/dist-cjs/Drs.js +45 -0
  2. package/dist-cjs/commands/ReverseReplicationCommand.js +46 -0
  3. package/dist-cjs/commands/StartReplicationCommand.js +46 -0
  4. package/dist-cjs/commands/StopReplicationCommand.js +46 -0
  5. package/dist-cjs/commands/index.js +3 -0
  6. package/dist-cjs/models/models_0.js +75 -3
  7. package/dist-cjs/protocols/Aws_restJson1.js +245 -3
  8. package/dist-es/Drs.js +45 -0
  9. package/dist-es/commands/ReverseReplicationCommand.js +42 -0
  10. package/dist-es/commands/StartReplicationCommand.js +42 -0
  11. package/dist-es/commands/StopReplicationCommand.js +42 -0
  12. package/dist-es/commands/index.js +3 -0
  13. package/dist-es/models/models_0.js +65 -0
  14. package/dist-es/protocols/Aws_restJson1.js +237 -1
  15. package/dist-types/Drs.d.ts +24 -0
  16. package/dist-types/DrsClient.d.ts +5 -2
  17. package/dist-types/commands/ReverseReplicationCommand.d.ts +40 -0
  18. package/dist-types/commands/StartReplicationCommand.d.ts +37 -0
  19. package/dist-types/commands/StopReplicationCommand.d.ts +37 -0
  20. package/dist-types/commands/index.d.ts +3 -0
  21. package/dist-types/models/models_0.d.ts +142 -2
  22. package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
  23. package/dist-types/ts3.4/Drs.d.ts +51 -0
  24. package/dist-types/ts3.4/DrsClient.d.ts +18 -0
  25. package/dist-types/ts3.4/commands/ReverseReplicationCommand.d.ts +38 -0
  26. package/dist-types/ts3.4/commands/StartReplicationCommand.d.ts +37 -0
  27. package/dist-types/ts3.4/commands/StopReplicationCommand.d.ts +37 -0
  28. package/dist-types/ts3.4/commands/index.d.ts +3 -0
  29. package/dist-types/ts3.4/models/models_0.d.ts +88 -0
  30. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +36 -0
  31. package/package.json +4 -4
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1InitializeServiceCommand = exports.deserializeAws_restJson1GetReplicationConfigurationCommand = exports.deserializeAws_restJson1GetLaunchConfigurationCommand = exports.deserializeAws_restJson1GetFailbackReplicationConfigurationCommand = exports.deserializeAws_restJson1DisconnectSourceServerCommand = exports.deserializeAws_restJson1DisconnectRecoveryInstanceCommand = exports.deserializeAws_restJson1DescribeSourceServersCommand = exports.deserializeAws_restJson1DescribeReplicationConfigurationTemplatesCommand = exports.deserializeAws_restJson1DescribeRecoverySnapshotsCommand = exports.deserializeAws_restJson1DescribeRecoveryInstancesCommand = exports.deserializeAws_restJson1DescribeJobsCommand = exports.deserializeAws_restJson1DescribeJobLogItemsCommand = exports.deserializeAws_restJson1DeleteSourceServerCommand = exports.deserializeAws_restJson1DeleteReplicationConfigurationTemplateCommand = exports.deserializeAws_restJson1DeleteRecoveryInstanceCommand = exports.deserializeAws_restJson1DeleteJobCommand = exports.deserializeAws_restJson1CreateReplicationConfigurationTemplateCommand = exports.deserializeAws_restJson1CreateExtendedSourceServerCommand = exports.serializeAws_restJson1UpdateReplicationConfigurationTemplateCommand = exports.serializeAws_restJson1UpdateReplicationConfigurationCommand = exports.serializeAws_restJson1UpdateLaunchConfigurationCommand = exports.serializeAws_restJson1UpdateFailbackReplicationConfigurationCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TerminateRecoveryInstancesCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StopFailbackCommand = exports.serializeAws_restJson1StartRecoveryCommand = exports.serializeAws_restJson1StartFailbackLaunchCommand = exports.serializeAws_restJson1RetryDataReplicationCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListStagingAccountsCommand = exports.serializeAws_restJson1ListExtensibleSourceServersCommand = exports.serializeAws_restJson1InitializeServiceCommand = exports.serializeAws_restJson1GetReplicationConfigurationCommand = exports.serializeAws_restJson1GetLaunchConfigurationCommand = exports.serializeAws_restJson1GetFailbackReplicationConfigurationCommand = exports.serializeAws_restJson1DisconnectSourceServerCommand = exports.serializeAws_restJson1DisconnectRecoveryInstanceCommand = exports.serializeAws_restJson1DescribeSourceServersCommand = exports.serializeAws_restJson1DescribeReplicationConfigurationTemplatesCommand = exports.serializeAws_restJson1DescribeRecoverySnapshotsCommand = exports.serializeAws_restJson1DescribeRecoveryInstancesCommand = exports.serializeAws_restJson1DescribeJobsCommand = exports.serializeAws_restJson1DescribeJobLogItemsCommand = exports.serializeAws_restJson1DeleteSourceServerCommand = exports.serializeAws_restJson1DeleteReplicationConfigurationTemplateCommand = exports.serializeAws_restJson1DeleteRecoveryInstanceCommand = exports.serializeAws_restJson1DeleteJobCommand = exports.serializeAws_restJson1CreateReplicationConfigurationTemplateCommand = exports.serializeAws_restJson1CreateExtendedSourceServerCommand = void 0;
4
- exports.deserializeAws_restJson1UpdateReplicationConfigurationTemplateCommand = exports.deserializeAws_restJson1UpdateReplicationConfigurationCommand = exports.deserializeAws_restJson1UpdateLaunchConfigurationCommand = exports.deserializeAws_restJson1UpdateFailbackReplicationConfigurationCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TerminateRecoveryInstancesCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StopFailbackCommand = exports.deserializeAws_restJson1StartRecoveryCommand = exports.deserializeAws_restJson1StartFailbackLaunchCommand = exports.deserializeAws_restJson1RetryDataReplicationCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListStagingAccountsCommand = exports.deserializeAws_restJson1ListExtensibleSourceServersCommand = void 0;
3
+ exports.deserializeAws_restJson1GetFailbackReplicationConfigurationCommand = exports.deserializeAws_restJson1DisconnectSourceServerCommand = exports.deserializeAws_restJson1DisconnectRecoveryInstanceCommand = exports.deserializeAws_restJson1DescribeSourceServersCommand = exports.deserializeAws_restJson1DescribeReplicationConfigurationTemplatesCommand = exports.deserializeAws_restJson1DescribeRecoverySnapshotsCommand = exports.deserializeAws_restJson1DescribeRecoveryInstancesCommand = exports.deserializeAws_restJson1DescribeJobsCommand = exports.deserializeAws_restJson1DescribeJobLogItemsCommand = exports.deserializeAws_restJson1DeleteSourceServerCommand = exports.deserializeAws_restJson1DeleteReplicationConfigurationTemplateCommand = exports.deserializeAws_restJson1DeleteRecoveryInstanceCommand = exports.deserializeAws_restJson1DeleteJobCommand = exports.deserializeAws_restJson1CreateReplicationConfigurationTemplateCommand = exports.deserializeAws_restJson1CreateExtendedSourceServerCommand = exports.serializeAws_restJson1UpdateReplicationConfigurationTemplateCommand = exports.serializeAws_restJson1UpdateReplicationConfigurationCommand = exports.serializeAws_restJson1UpdateLaunchConfigurationCommand = exports.serializeAws_restJson1UpdateFailbackReplicationConfigurationCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TerminateRecoveryInstancesCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StopReplicationCommand = exports.serializeAws_restJson1StopFailbackCommand = exports.serializeAws_restJson1StartReplicationCommand = exports.serializeAws_restJson1StartRecoveryCommand = exports.serializeAws_restJson1StartFailbackLaunchCommand = exports.serializeAws_restJson1ReverseReplicationCommand = exports.serializeAws_restJson1RetryDataReplicationCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListStagingAccountsCommand = exports.serializeAws_restJson1ListExtensibleSourceServersCommand = exports.serializeAws_restJson1InitializeServiceCommand = exports.serializeAws_restJson1GetReplicationConfigurationCommand = exports.serializeAws_restJson1GetLaunchConfigurationCommand = exports.serializeAws_restJson1GetFailbackReplicationConfigurationCommand = exports.serializeAws_restJson1DisconnectSourceServerCommand = exports.serializeAws_restJson1DisconnectRecoveryInstanceCommand = exports.serializeAws_restJson1DescribeSourceServersCommand = exports.serializeAws_restJson1DescribeReplicationConfigurationTemplatesCommand = exports.serializeAws_restJson1DescribeRecoverySnapshotsCommand = exports.serializeAws_restJson1DescribeRecoveryInstancesCommand = exports.serializeAws_restJson1DescribeJobsCommand = exports.serializeAws_restJson1DescribeJobLogItemsCommand = exports.serializeAws_restJson1DeleteSourceServerCommand = exports.serializeAws_restJson1DeleteReplicationConfigurationTemplateCommand = exports.serializeAws_restJson1DeleteRecoveryInstanceCommand = exports.serializeAws_restJson1DeleteJobCommand = exports.serializeAws_restJson1CreateReplicationConfigurationTemplateCommand = exports.serializeAws_restJson1CreateExtendedSourceServerCommand = void 0;
4
+ exports.deserializeAws_restJson1UpdateReplicationConfigurationTemplateCommand = exports.deserializeAws_restJson1UpdateReplicationConfigurationCommand = exports.deserializeAws_restJson1UpdateLaunchConfigurationCommand = exports.deserializeAws_restJson1UpdateFailbackReplicationConfigurationCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TerminateRecoveryInstancesCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StopReplicationCommand = exports.deserializeAws_restJson1StopFailbackCommand = exports.deserializeAws_restJson1StartReplicationCommand = exports.deserializeAws_restJson1StartRecoveryCommand = exports.deserializeAws_restJson1StartFailbackLaunchCommand = exports.deserializeAws_restJson1ReverseReplicationCommand = exports.deserializeAws_restJson1RetryDataReplicationCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListStagingAccountsCommand = exports.deserializeAws_restJson1ListExtensibleSourceServersCommand = exports.deserializeAws_restJson1InitializeServiceCommand = exports.deserializeAws_restJson1GetReplicationConfigurationCommand = exports.deserializeAws_restJson1GetLaunchConfigurationCommand = void 0;
5
5
  const protocol_http_1 = require("@aws-sdk/protocol-http");
6
6
  const smithy_client_1 = require("@aws-sdk/smithy-client");
7
7
  const DrsServiceException_1 = require("../models/DrsServiceException");
@@ -515,6 +515,27 @@ const serializeAws_restJson1RetryDataReplicationCommand = async (input, context)
515
515
  });
516
516
  };
517
517
  exports.serializeAws_restJson1RetryDataReplicationCommand = serializeAws_restJson1RetryDataReplicationCommand;
518
+ const serializeAws_restJson1ReverseReplicationCommand = async (input, context) => {
519
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
520
+ const headers = {
521
+ "content-type": "application/json",
522
+ };
523
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ReverseReplication";
524
+ let body;
525
+ body = JSON.stringify({
526
+ ...(input.recoveryInstanceID != null && { recoveryInstanceID: input.recoveryInstanceID }),
527
+ });
528
+ return new protocol_http_1.HttpRequest({
529
+ protocol,
530
+ hostname,
531
+ port,
532
+ method: "POST",
533
+ headers,
534
+ path: resolvedPath,
535
+ body,
536
+ });
537
+ };
538
+ exports.serializeAws_restJson1ReverseReplicationCommand = serializeAws_restJson1ReverseReplicationCommand;
518
539
  const serializeAws_restJson1StartFailbackLaunchCommand = async (input, context) => {
519
540
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
520
541
  const headers = {
@@ -564,6 +585,27 @@ const serializeAws_restJson1StartRecoveryCommand = async (input, context) => {
564
585
  });
565
586
  };
566
587
  exports.serializeAws_restJson1StartRecoveryCommand = serializeAws_restJson1StartRecoveryCommand;
588
+ const serializeAws_restJson1StartReplicationCommand = async (input, context) => {
589
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
590
+ const headers = {
591
+ "content-type": "application/json",
592
+ };
593
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StartReplication";
594
+ let body;
595
+ body = JSON.stringify({
596
+ ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }),
597
+ });
598
+ return new protocol_http_1.HttpRequest({
599
+ protocol,
600
+ hostname,
601
+ port,
602
+ method: "POST",
603
+ headers,
604
+ path: resolvedPath,
605
+ body,
606
+ });
607
+ };
608
+ exports.serializeAws_restJson1StartReplicationCommand = serializeAws_restJson1StartReplicationCommand;
567
609
  const serializeAws_restJson1StopFailbackCommand = async (input, context) => {
568
610
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
569
611
  const headers = {
@@ -585,6 +627,27 @@ const serializeAws_restJson1StopFailbackCommand = async (input, context) => {
585
627
  });
586
628
  };
587
629
  exports.serializeAws_restJson1StopFailbackCommand = serializeAws_restJson1StopFailbackCommand;
630
+ const serializeAws_restJson1StopReplicationCommand = async (input, context) => {
631
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
632
+ const headers = {
633
+ "content-type": "application/json",
634
+ };
635
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StopReplication";
636
+ let body;
637
+ body = JSON.stringify({
638
+ ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }),
639
+ });
640
+ return new protocol_http_1.HttpRequest({
641
+ protocol,
642
+ hostname,
643
+ port,
644
+ method: "POST",
645
+ headers,
646
+ path: resolvedPath,
647
+ body,
648
+ });
649
+ };
650
+ exports.serializeAws_restJson1StopReplicationCommand = serializeAws_restJson1StopReplicationCommand;
588
651
  const serializeAws_restJson1TagResourceCommand = async (input, context) => {
589
652
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
590
653
  const headers = {
@@ -636,7 +699,10 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
636
699
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
637
700
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
638
701
  const query = map({
639
- tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
702
+ tagKeys: [
703
+ (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
704
+ () => (input.tagKeys || []).map((_entry) => _entry),
705
+ ],
640
706
  });
641
707
  let body;
642
708
  return new protocol_http_1.HttpRequest({
@@ -1472,6 +1538,15 @@ const deserializeAws_restJson1DisconnectSourceServerCommand = async (output, con
1472
1538
  if (data.recoveryInstanceId != null) {
1473
1539
  contents.recoveryInstanceId = (0, smithy_client_1.expectString)(data.recoveryInstanceId);
1474
1540
  }
1541
+ if (data.replicationDirection != null) {
1542
+ contents.replicationDirection = (0, smithy_client_1.expectString)(data.replicationDirection);
1543
+ }
1544
+ if (data.reversedDirectionSourceServerArn != null) {
1545
+ contents.reversedDirectionSourceServerArn = (0, smithy_client_1.expectString)(data.reversedDirectionSourceServerArn);
1546
+ }
1547
+ if (data.sourceCloudProperties != null) {
1548
+ contents.sourceCloudProperties = deserializeAws_restJson1SourceCloudProperties(data.sourceCloudProperties, context);
1549
+ }
1475
1550
  if (data.sourceProperties != null) {
1476
1551
  contents.sourceProperties = deserializeAws_restJson1SourceProperties(data.sourceProperties, context);
1477
1552
  }
@@ -1933,6 +2008,15 @@ const deserializeAws_restJson1RetryDataReplicationCommand = async (output, conte
1933
2008
  if (data.recoveryInstanceId != null) {
1934
2009
  contents.recoveryInstanceId = (0, smithy_client_1.expectString)(data.recoveryInstanceId);
1935
2010
  }
2011
+ if (data.replicationDirection != null) {
2012
+ contents.replicationDirection = (0, smithy_client_1.expectString)(data.replicationDirection);
2013
+ }
2014
+ if (data.reversedDirectionSourceServerArn != null) {
2015
+ contents.reversedDirectionSourceServerArn = (0, smithy_client_1.expectString)(data.reversedDirectionSourceServerArn);
2016
+ }
2017
+ if (data.sourceCloudProperties != null) {
2018
+ contents.sourceCloudProperties = deserializeAws_restJson1SourceCloudProperties(data.sourceCloudProperties, context);
2019
+ }
1936
2020
  if (data.sourceProperties != null) {
1937
2021
  contents.sourceProperties = deserializeAws_restJson1SourceProperties(data.sourceProperties, context);
1938
2022
  }
@@ -1980,6 +2064,58 @@ const deserializeAws_restJson1RetryDataReplicationCommandError = async (output,
1980
2064
  });
1981
2065
  }
1982
2066
  };
2067
+ const deserializeAws_restJson1ReverseReplicationCommand = async (output, context) => {
2068
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2069
+ return deserializeAws_restJson1ReverseReplicationCommandError(output, context);
2070
+ }
2071
+ const contents = map({
2072
+ $metadata: deserializeMetadata(output),
2073
+ });
2074
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2075
+ if (data.reversedDirectionSourceServerArn != null) {
2076
+ contents.reversedDirectionSourceServerArn = (0, smithy_client_1.expectString)(data.reversedDirectionSourceServerArn);
2077
+ }
2078
+ return contents;
2079
+ };
2080
+ exports.deserializeAws_restJson1ReverseReplicationCommand = deserializeAws_restJson1ReverseReplicationCommand;
2081
+ const deserializeAws_restJson1ReverseReplicationCommandError = async (output, context) => {
2082
+ const parsedOutput = {
2083
+ ...output,
2084
+ body: await parseErrorBody(output.body, context),
2085
+ };
2086
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2087
+ switch (errorCode) {
2088
+ case "AccessDeniedException":
2089
+ case "com.amazonaws.drs#AccessDeniedException":
2090
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2091
+ case "ConflictException":
2092
+ case "com.amazonaws.drs#ConflictException":
2093
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2094
+ case "InternalServerException":
2095
+ case "com.amazonaws.drs#InternalServerException":
2096
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2097
+ case "ResourceNotFoundException":
2098
+ case "com.amazonaws.drs#ResourceNotFoundException":
2099
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2100
+ case "ThrottlingException":
2101
+ case "com.amazonaws.drs#ThrottlingException":
2102
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2103
+ case "UninitializedAccountException":
2104
+ case "com.amazonaws.drs#UninitializedAccountException":
2105
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
2106
+ case "ValidationException":
2107
+ case "com.amazonaws.drs#ValidationException":
2108
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2109
+ default:
2110
+ const parsedBody = parsedOutput.body;
2111
+ (0, smithy_client_1.throwDefaultError)({
2112
+ output,
2113
+ parsedBody,
2114
+ exceptionCtor: DrsServiceException_1.DrsServiceException,
2115
+ errorCode,
2116
+ });
2117
+ }
2118
+ };
1983
2119
  const deserializeAws_restJson1StartFailbackLaunchCommand = async (output, context) => {
1984
2120
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1985
2121
  return deserializeAws_restJson1StartFailbackLaunchCommandError(output, context);
@@ -2075,6 +2211,52 @@ const deserializeAws_restJson1StartRecoveryCommandError = async (output, context
2075
2211
  });
2076
2212
  }
2077
2213
  };
2214
+ const deserializeAws_restJson1StartReplicationCommand = async (output, context) => {
2215
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2216
+ return deserializeAws_restJson1StartReplicationCommandError(output, context);
2217
+ }
2218
+ const contents = map({
2219
+ $metadata: deserializeMetadata(output),
2220
+ });
2221
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2222
+ if (data.sourceServer != null) {
2223
+ contents.sourceServer = deserializeAws_restJson1SourceServer(data.sourceServer, context);
2224
+ }
2225
+ return contents;
2226
+ };
2227
+ exports.deserializeAws_restJson1StartReplicationCommand = deserializeAws_restJson1StartReplicationCommand;
2228
+ const deserializeAws_restJson1StartReplicationCommandError = async (output, context) => {
2229
+ const parsedOutput = {
2230
+ ...output,
2231
+ body: await parseErrorBody(output.body, context),
2232
+ };
2233
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2234
+ switch (errorCode) {
2235
+ case "ConflictException":
2236
+ case "com.amazonaws.drs#ConflictException":
2237
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2238
+ case "InternalServerException":
2239
+ case "com.amazonaws.drs#InternalServerException":
2240
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2241
+ case "ResourceNotFoundException":
2242
+ case "com.amazonaws.drs#ResourceNotFoundException":
2243
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2244
+ case "ThrottlingException":
2245
+ case "com.amazonaws.drs#ThrottlingException":
2246
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2247
+ case "UninitializedAccountException":
2248
+ case "com.amazonaws.drs#UninitializedAccountException":
2249
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
2250
+ default:
2251
+ const parsedBody = parsedOutput.body;
2252
+ (0, smithy_client_1.throwDefaultError)({
2253
+ output,
2254
+ parsedBody,
2255
+ exceptionCtor: DrsServiceException_1.DrsServiceException,
2256
+ errorCode,
2257
+ });
2258
+ }
2259
+ };
2078
2260
  const deserializeAws_restJson1StopFailbackCommand = async (output, context) => {
2079
2261
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2080
2262
  return deserializeAws_restJson1StopFailbackCommandError(output, context);
@@ -2115,6 +2297,52 @@ const deserializeAws_restJson1StopFailbackCommandError = async (output, context)
2115
2297
  });
2116
2298
  }
2117
2299
  };
2300
+ const deserializeAws_restJson1StopReplicationCommand = async (output, context) => {
2301
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2302
+ return deserializeAws_restJson1StopReplicationCommandError(output, context);
2303
+ }
2304
+ const contents = map({
2305
+ $metadata: deserializeMetadata(output),
2306
+ });
2307
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2308
+ if (data.sourceServer != null) {
2309
+ contents.sourceServer = deserializeAws_restJson1SourceServer(data.sourceServer, context);
2310
+ }
2311
+ return contents;
2312
+ };
2313
+ exports.deserializeAws_restJson1StopReplicationCommand = deserializeAws_restJson1StopReplicationCommand;
2314
+ const deserializeAws_restJson1StopReplicationCommandError = async (output, context) => {
2315
+ const parsedOutput = {
2316
+ ...output,
2317
+ body: await parseErrorBody(output.body, context),
2318
+ };
2319
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2320
+ switch (errorCode) {
2321
+ case "ConflictException":
2322
+ case "com.amazonaws.drs#ConflictException":
2323
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2324
+ case "InternalServerException":
2325
+ case "com.amazonaws.drs#InternalServerException":
2326
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2327
+ case "ResourceNotFoundException":
2328
+ case "com.amazonaws.drs#ResourceNotFoundException":
2329
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2330
+ case "ThrottlingException":
2331
+ case "com.amazonaws.drs#ThrottlingException":
2332
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2333
+ case "UninitializedAccountException":
2334
+ case "com.amazonaws.drs#UninitializedAccountException":
2335
+ throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
2336
+ default:
2337
+ const parsedBody = parsedOutput.body;
2338
+ (0, smithy_client_1.throwDefaultError)({
2339
+ output,
2340
+ parsedBody,
2341
+ exceptionCtor: DrsServiceException_1.DrsServiceException,
2342
+ errorCode,
2343
+ });
2344
+ }
2345
+ };
2118
2346
  const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
2119
2347
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2120
2348
  return deserializeAws_restJson1TagResourceCommandError(output, context);
@@ -3202,6 +3430,7 @@ const deserializeAws_restJson1RecoveryInstance = (output, context) => {
3202
3430
  failback: output.failback != null ? deserializeAws_restJson1RecoveryInstanceFailback(output.failback, context) : undefined,
3203
3431
  isDrill: (0, smithy_client_1.expectBoolean)(output.isDrill),
3204
3432
  jobID: (0, smithy_client_1.expectString)(output.jobID),
3433
+ originEnvironment: (0, smithy_client_1.expectString)(output.originEnvironment),
3205
3434
  pointInTimeSnapshotDateTime: (0, smithy_client_1.expectString)(output.pointInTimeSnapshotDateTime),
3206
3435
  recoveryInstanceID: (0, smithy_client_1.expectString)(output.recoveryInstanceID),
3207
3436
  recoveryInstanceProperties: output.recoveryInstanceProperties != null
@@ -3304,6 +3533,7 @@ const deserializeAws_restJson1RecoveryInstanceFailback = (output, context) => {
3304
3533
  failbackClientLastSeenByServiceDateTime: (0, smithy_client_1.expectString)(output.failbackClientLastSeenByServiceDateTime),
3305
3534
  failbackInitiationTime: (0, smithy_client_1.expectString)(output.failbackInitiationTime),
3306
3535
  failbackJobID: (0, smithy_client_1.expectString)(output.failbackJobID),
3536
+ failbackLaunchType: (0, smithy_client_1.expectString)(output.failbackLaunchType),
3307
3537
  failbackToOriginalServer: (0, smithy_client_1.expectBoolean)(output.failbackToOriginalServer),
3308
3538
  firstByteDateTime: (0, smithy_client_1.expectString)(output.firstByteDateTime),
3309
3539
  state: (0, smithy_client_1.expectString)(output.state),
@@ -3409,6 +3639,13 @@ const deserializeAws_restJson1ReplicationServersSecurityGroupsIDs = (output, con
3409
3639
  });
3410
3640
  return retVal;
3411
3641
  };
3642
+ const deserializeAws_restJson1SourceCloudProperties = (output, context) => {
3643
+ return {
3644
+ originAccountID: (0, smithy_client_1.expectString)(output.originAccountID),
3645
+ originAvailabilityZone: (0, smithy_client_1.expectString)(output.originAvailabilityZone),
3646
+ originRegion: (0, smithy_client_1.expectString)(output.originRegion),
3647
+ };
3648
+ };
3412
3649
  const deserializeAws_restJson1SourceProperties = (output, context) => {
3413
3650
  return {
3414
3651
  cpus: output.cpus != null ? deserializeAws_restJson1Cpus(output.cpus, context) : undefined,
@@ -3434,6 +3671,11 @@ const deserializeAws_restJson1SourceServer = (output, context) => {
3434
3671
  lastLaunchResult: (0, smithy_client_1.expectString)(output.lastLaunchResult),
3435
3672
  lifeCycle: output.lifeCycle != null ? deserializeAws_restJson1LifeCycle(output.lifeCycle, context) : undefined,
3436
3673
  recoveryInstanceId: (0, smithy_client_1.expectString)(output.recoveryInstanceId),
3674
+ replicationDirection: (0, smithy_client_1.expectString)(output.replicationDirection),
3675
+ reversedDirectionSourceServerArn: (0, smithy_client_1.expectString)(output.reversedDirectionSourceServerArn),
3676
+ sourceCloudProperties: output.sourceCloudProperties != null
3677
+ ? deserializeAws_restJson1SourceCloudProperties(output.sourceCloudProperties, context)
3678
+ : undefined,
3437
3679
  sourceProperties: output.sourceProperties != null
3438
3680
  ? deserializeAws_restJson1SourceProperties(output.sourceProperties, context)
3439
3681
  : undefined,
package/dist-es/Drs.js CHANGED
@@ -20,9 +20,12 @@ import { ListExtensibleSourceServersCommand, } from "./commands/ListExtensibleSo
20
20
  import { ListStagingAccountsCommand, } from "./commands/ListStagingAccountsCommand";
21
21
  import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
22
22
  import { RetryDataReplicationCommand, } from "./commands/RetryDataReplicationCommand";
23
+ import { ReverseReplicationCommand, } from "./commands/ReverseReplicationCommand";
23
24
  import { StartFailbackLaunchCommand, } from "./commands/StartFailbackLaunchCommand";
24
25
  import { StartRecoveryCommand, } from "./commands/StartRecoveryCommand";
26
+ import { StartReplicationCommand, } from "./commands/StartReplicationCommand";
25
27
  import { StopFailbackCommand, } from "./commands/StopFailbackCommand";
28
+ import { StopReplicationCommand, } from "./commands/StopReplicationCommand";
26
29
  import { TagResourceCommand } from "./commands/TagResourceCommand";
27
30
  import { TerminateRecoveryInstancesCommand, } from "./commands/TerminateRecoveryInstancesCommand";
28
31
  import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
@@ -340,6 +343,20 @@ export class Drs extends DrsClient {
340
343
  return this.send(command, optionsOrCb);
341
344
  }
342
345
  }
346
+ reverseReplication(args, optionsOrCb, cb) {
347
+ const command = new ReverseReplicationCommand(args);
348
+ if (typeof optionsOrCb === "function") {
349
+ this.send(command, optionsOrCb);
350
+ }
351
+ else if (typeof cb === "function") {
352
+ if (typeof optionsOrCb !== "object")
353
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
354
+ this.send(command, optionsOrCb || {}, cb);
355
+ }
356
+ else {
357
+ return this.send(command, optionsOrCb);
358
+ }
359
+ }
343
360
  startFailbackLaunch(args, optionsOrCb, cb) {
344
361
  const command = new StartFailbackLaunchCommand(args);
345
362
  if (typeof optionsOrCb === "function") {
@@ -368,6 +385,20 @@ export class Drs extends DrsClient {
368
385
  return this.send(command, optionsOrCb);
369
386
  }
370
387
  }
388
+ startReplication(args, optionsOrCb, cb) {
389
+ const command = new StartReplicationCommand(args);
390
+ if (typeof optionsOrCb === "function") {
391
+ this.send(command, optionsOrCb);
392
+ }
393
+ else if (typeof cb === "function") {
394
+ if (typeof optionsOrCb !== "object")
395
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
396
+ this.send(command, optionsOrCb || {}, cb);
397
+ }
398
+ else {
399
+ return this.send(command, optionsOrCb);
400
+ }
401
+ }
371
402
  stopFailback(args, optionsOrCb, cb) {
372
403
  const command = new StopFailbackCommand(args);
373
404
  if (typeof optionsOrCb === "function") {
@@ -382,6 +413,20 @@ export class Drs extends DrsClient {
382
413
  return this.send(command, optionsOrCb);
383
414
  }
384
415
  }
416
+ stopReplication(args, optionsOrCb, cb) {
417
+ const command = new StopReplicationCommand(args);
418
+ if (typeof optionsOrCb === "function") {
419
+ this.send(command, optionsOrCb);
420
+ }
421
+ else if (typeof cb === "function") {
422
+ if (typeof optionsOrCb !== "object")
423
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
424
+ this.send(command, optionsOrCb || {}, cb);
425
+ }
426
+ else {
427
+ return this.send(command, optionsOrCb);
428
+ }
429
+ }
385
430
  tagResource(args, optionsOrCb, cb) {
386
431
  const command = new TagResourceCommand(args);
387
432
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { ReverseReplicationRequestFilterSensitiveLog, ReverseReplicationResponseFilterSensitiveLog, } from "../models/models_0";
5
+ import { deserializeAws_restJson1ReverseReplicationCommand, serializeAws_restJson1ReverseReplicationCommand, } from "../protocols/Aws_restJson1";
6
+ export class ReverseReplicationCommand extends $Command {
7
+ constructor(input) {
8
+ super();
9
+ this.input = input;
10
+ }
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, ReverseReplicationCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "DrsClient";
25
+ const commandName = "ReverseReplicationCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: ReverseReplicationRequestFilterSensitiveLog,
31
+ outputFilterSensitiveLog: ReverseReplicationResponseFilterSensitiveLog,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return serializeAws_restJson1ReverseReplicationCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return deserializeAws_restJson1ReverseReplicationCommand(output, context);
41
+ }
42
+ }
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { StartReplicationRequestFilterSensitiveLog, StartReplicationResponseFilterSensitiveLog, } from "../models/models_0";
5
+ import { deserializeAws_restJson1StartReplicationCommand, serializeAws_restJson1StartReplicationCommand, } from "../protocols/Aws_restJson1";
6
+ export class StartReplicationCommand extends $Command {
7
+ constructor(input) {
8
+ super();
9
+ this.input = input;
10
+ }
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, StartReplicationCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "DrsClient";
25
+ const commandName = "StartReplicationCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: StartReplicationRequestFilterSensitiveLog,
31
+ outputFilterSensitiveLog: StartReplicationResponseFilterSensitiveLog,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return serializeAws_restJson1StartReplicationCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return deserializeAws_restJson1StartReplicationCommand(output, context);
41
+ }
42
+ }
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { StopReplicationRequestFilterSensitiveLog, StopReplicationResponseFilterSensitiveLog, } from "../models/models_0";
5
+ import { deserializeAws_restJson1StopReplicationCommand, serializeAws_restJson1StopReplicationCommand, } from "../protocols/Aws_restJson1";
6
+ export class StopReplicationCommand extends $Command {
7
+ constructor(input) {
8
+ super();
9
+ this.input = input;
10
+ }
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, StopReplicationCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "DrsClient";
25
+ const commandName = "StopReplicationCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: StopReplicationRequestFilterSensitiveLog,
31
+ outputFilterSensitiveLog: StopReplicationResponseFilterSensitiveLog,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return serializeAws_restJson1StopReplicationCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return deserializeAws_restJson1StopReplicationCommand(output, context);
41
+ }
42
+ }
@@ -20,9 +20,12 @@ export * from "./ListExtensibleSourceServersCommand";
20
20
  export * from "./ListStagingAccountsCommand";
21
21
  export * from "./ListTagsForResourceCommand";
22
22
  export * from "./RetryDataReplicationCommand";
23
+ export * from "./ReverseReplicationCommand";
23
24
  export * from "./StartFailbackLaunchCommand";
24
25
  export * from "./StartRecoveryCommand";
26
+ export * from "./StartReplicationCommand";
25
27
  export * from "./StopFailbackCommand";
28
+ export * from "./StopReplicationCommand";
26
29
  export * from "./TagResourceCommand";
27
30
  export * from "./TerminateRecoveryInstancesCommand";
28
31
  export * from "./UntagResourceCommand";