@aws-sdk/client-drs 3.409.0 → 3.412.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 (63) hide show
  1. package/README.md +24 -0
  2. package/dist-cjs/Drs.js +6 -0
  3. package/dist-cjs/commands/DeleteLaunchActionCommand.js +46 -0
  4. package/dist-cjs/commands/ListLaunchActionsCommand.js +46 -0
  5. package/dist-cjs/commands/PutLaunchActionCommand.js +46 -0
  6. package/dist-cjs/commands/index.js +3 -0
  7. package/dist-cjs/models/models_0.js +22 -2
  8. package/dist-cjs/pagination/ListLaunchActionsPaginator.js +29 -0
  9. package/dist-cjs/pagination/index.js +1 -0
  10. package/dist-cjs/protocols/Aws_restJson1.js +233 -2
  11. package/dist-cjs/runtimeExtensions.js +3 -0
  12. package/dist-es/Drs.js +6 -0
  13. package/dist-es/commands/DeleteLaunchActionCommand.js +42 -0
  14. package/dist-es/commands/ListLaunchActionsCommand.js +42 -0
  15. package/dist-es/commands/PutLaunchActionCommand.js +42 -0
  16. package/dist-es/commands/index.js +3 -0
  17. package/dist-es/models/models_0.js +20 -0
  18. package/dist-es/pagination/ListLaunchActionsPaginator.js +25 -0
  19. package/dist-es/pagination/index.js +1 -0
  20. package/dist-es/protocols/Aws_restJson1.js +226 -1
  21. package/dist-es/runtimeExtensions.js +3 -0
  22. package/dist-types/Drs.d.ts +21 -0
  23. package/dist-types/DrsClient.d.ts +5 -2
  24. package/dist-types/commands/AssociateSourceNetworkStackCommand.d.ts +28 -0
  25. package/dist-types/commands/CreateLaunchConfigurationTemplateCommand.d.ts +2 -0
  26. package/dist-types/commands/DeleteLaunchActionCommand.d.ts +87 -0
  27. package/dist-types/commands/DescribeJobsCommand.d.ts +28 -0
  28. package/dist-types/commands/DescribeLaunchConfigurationTemplatesCommand.d.ts +1 -0
  29. package/dist-types/commands/GetLaunchConfigurationCommand.d.ts +1 -0
  30. package/dist-types/commands/ListLaunchActionsCommand.d.ts +115 -0
  31. package/dist-types/commands/PutLaunchActionCommand.d.ts +122 -0
  32. package/dist-types/commands/StartFailbackLaunchCommand.d.ts +28 -0
  33. package/dist-types/commands/StartRecoveryCommand.d.ts +28 -0
  34. package/dist-types/commands/StartSourceNetworkRecoveryCommand.d.ts +28 -0
  35. package/dist-types/commands/TerminateRecoveryInstancesCommand.d.ts +28 -0
  36. package/dist-types/commands/UpdateLaunchConfigurationCommand.d.ts +2 -0
  37. package/dist-types/commands/UpdateLaunchConfigurationTemplateCommand.d.ts +2 -0
  38. package/dist-types/commands/index.d.ts +3 -0
  39. package/dist-types/extensionConfiguration.d.ts +2 -1
  40. package/dist-types/models/models_0.d.ts +397 -0
  41. package/dist-types/pagination/ListLaunchActionsPaginator.d.ts +7 -0
  42. package/dist-types/pagination/index.d.ts +1 -0
  43. package/dist-types/protocols/Aws_restJson1.d.ts +27 -0
  44. package/dist-types/runtimeConfig.browser.d.ts +4 -1
  45. package/dist-types/runtimeConfig.d.ts +4 -1
  46. package/dist-types/runtimeConfig.native.d.ts +4 -1
  47. package/dist-types/runtimeExtensions.d.ts +1 -1
  48. package/dist-types/ts3.4/Drs.d.ts +51 -0
  49. package/dist-types/ts3.4/DrsClient.d.ts +18 -0
  50. package/dist-types/ts3.4/commands/DeleteLaunchActionCommand.d.ts +39 -0
  51. package/dist-types/ts3.4/commands/ListLaunchActionsCommand.d.ts +39 -0
  52. package/dist-types/ts3.4/commands/PutLaunchActionCommand.d.ts +38 -0
  53. package/dist-types/ts3.4/commands/index.d.ts +3 -0
  54. package/dist-types/ts3.4/extensionConfiguration.d.ts +3 -1
  55. package/dist-types/ts3.4/models/models_0.d.ts +106 -0
  56. package/dist-types/ts3.4/pagination/ListLaunchActionsPaginator.d.ts +11 -0
  57. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  58. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +36 -0
  59. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +8 -1
  60. package/dist-types/ts3.4/runtimeConfig.d.ts +8 -1
  61. package/dist-types/ts3.4/runtimeConfig.native.d.ts +8 -1
  62. package/dist-types/ts3.4/runtimeExtensions.d.ts +1 -1
  63. package/package.json +28 -28
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_CreateLaunchConfigurationTemplateCommand = exports.de_CreateExtendedSourceServerCommand = exports.de_AssociateSourceNetworkStackCommand = exports.se_UpdateReplicationConfigurationTemplateCommand = exports.se_UpdateReplicationConfigurationCommand = exports.se_UpdateLaunchConfigurationTemplateCommand = exports.se_UpdateLaunchConfigurationCommand = exports.se_UpdateFailbackReplicationConfigurationCommand = exports.se_UntagResourceCommand = exports.se_TerminateRecoveryInstancesCommand = exports.se_TagResourceCommand = exports.se_StopSourceNetworkReplicationCommand = exports.se_StopReplicationCommand = exports.se_StopFailbackCommand = exports.se_StartSourceNetworkReplicationCommand = exports.se_StartSourceNetworkRecoveryCommand = exports.se_StartReplicationCommand = exports.se_StartRecoveryCommand = exports.se_StartFailbackLaunchCommand = exports.se_ReverseReplicationCommand = exports.se_RetryDataReplicationCommand = exports.se_ListTagsForResourceCommand = exports.se_ListStagingAccountsCommand = exports.se_ListExtensibleSourceServersCommand = exports.se_InitializeServiceCommand = exports.se_GetReplicationConfigurationCommand = exports.se_GetLaunchConfigurationCommand = exports.se_GetFailbackReplicationConfigurationCommand = exports.se_ExportSourceNetworkCfnTemplateCommand = exports.se_DisconnectSourceServerCommand = exports.se_DisconnectRecoveryInstanceCommand = exports.se_DescribeSourceServersCommand = exports.se_DescribeSourceNetworksCommand = exports.se_DescribeReplicationConfigurationTemplatesCommand = exports.se_DescribeRecoverySnapshotsCommand = exports.se_DescribeRecoveryInstancesCommand = exports.se_DescribeLaunchConfigurationTemplatesCommand = exports.se_DescribeJobsCommand = exports.se_DescribeJobLogItemsCommand = exports.se_DeleteSourceServerCommand = exports.se_DeleteSourceNetworkCommand = exports.se_DeleteReplicationConfigurationTemplateCommand = exports.se_DeleteRecoveryInstanceCommand = exports.se_DeleteLaunchConfigurationTemplateCommand = exports.se_DeleteJobCommand = exports.se_CreateSourceNetworkCommand = exports.se_CreateReplicationConfigurationTemplateCommand = exports.se_CreateLaunchConfigurationTemplateCommand = exports.se_CreateExtendedSourceServerCommand = exports.se_AssociateSourceNetworkStackCommand = void 0;
4
- exports.de_UpdateReplicationConfigurationTemplateCommand = exports.de_UpdateReplicationConfigurationCommand = exports.de_UpdateLaunchConfigurationTemplateCommand = exports.de_UpdateLaunchConfigurationCommand = exports.de_UpdateFailbackReplicationConfigurationCommand = exports.de_UntagResourceCommand = exports.de_TerminateRecoveryInstancesCommand = exports.de_TagResourceCommand = exports.de_StopSourceNetworkReplicationCommand = exports.de_StopReplicationCommand = exports.de_StopFailbackCommand = exports.de_StartSourceNetworkReplicationCommand = exports.de_StartSourceNetworkRecoveryCommand = exports.de_StartReplicationCommand = exports.de_StartRecoveryCommand = exports.de_StartFailbackLaunchCommand = exports.de_ReverseReplicationCommand = exports.de_RetryDataReplicationCommand = exports.de_ListTagsForResourceCommand = exports.de_ListStagingAccountsCommand = exports.de_ListExtensibleSourceServersCommand = exports.de_InitializeServiceCommand = exports.de_GetReplicationConfigurationCommand = exports.de_GetLaunchConfigurationCommand = exports.de_GetFailbackReplicationConfigurationCommand = exports.de_ExportSourceNetworkCfnTemplateCommand = exports.de_DisconnectSourceServerCommand = exports.de_DisconnectRecoveryInstanceCommand = exports.de_DescribeSourceServersCommand = exports.de_DescribeSourceNetworksCommand = exports.de_DescribeReplicationConfigurationTemplatesCommand = exports.de_DescribeRecoverySnapshotsCommand = exports.de_DescribeRecoveryInstancesCommand = exports.de_DescribeLaunchConfigurationTemplatesCommand = exports.de_DescribeJobsCommand = exports.de_DescribeJobLogItemsCommand = exports.de_DeleteSourceServerCommand = exports.de_DeleteSourceNetworkCommand = exports.de_DeleteReplicationConfigurationTemplateCommand = exports.de_DeleteRecoveryInstanceCommand = exports.de_DeleteLaunchConfigurationTemplateCommand = exports.de_DeleteJobCommand = exports.de_CreateSourceNetworkCommand = exports.de_CreateReplicationConfigurationTemplateCommand = void 0;
3
+ exports.se_UpdateReplicationConfigurationTemplateCommand = exports.se_UpdateReplicationConfigurationCommand = exports.se_UpdateLaunchConfigurationTemplateCommand = exports.se_UpdateLaunchConfigurationCommand = exports.se_UpdateFailbackReplicationConfigurationCommand = exports.se_UntagResourceCommand = exports.se_TerminateRecoveryInstancesCommand = exports.se_TagResourceCommand = exports.se_StopSourceNetworkReplicationCommand = exports.se_StopReplicationCommand = exports.se_StopFailbackCommand = exports.se_StartSourceNetworkReplicationCommand = exports.se_StartSourceNetworkRecoveryCommand = exports.se_StartReplicationCommand = exports.se_StartRecoveryCommand = exports.se_StartFailbackLaunchCommand = exports.se_ReverseReplicationCommand = exports.se_RetryDataReplicationCommand = exports.se_PutLaunchActionCommand = exports.se_ListTagsForResourceCommand = exports.se_ListStagingAccountsCommand = exports.se_ListLaunchActionsCommand = exports.se_ListExtensibleSourceServersCommand = exports.se_InitializeServiceCommand = exports.se_GetReplicationConfigurationCommand = exports.se_GetLaunchConfigurationCommand = exports.se_GetFailbackReplicationConfigurationCommand = exports.se_ExportSourceNetworkCfnTemplateCommand = exports.se_DisconnectSourceServerCommand = exports.se_DisconnectRecoveryInstanceCommand = exports.se_DescribeSourceServersCommand = exports.se_DescribeSourceNetworksCommand = exports.se_DescribeReplicationConfigurationTemplatesCommand = exports.se_DescribeRecoverySnapshotsCommand = exports.se_DescribeRecoveryInstancesCommand = exports.se_DescribeLaunchConfigurationTemplatesCommand = exports.se_DescribeJobsCommand = exports.se_DescribeJobLogItemsCommand = exports.se_DeleteSourceServerCommand = exports.se_DeleteSourceNetworkCommand = exports.se_DeleteReplicationConfigurationTemplateCommand = exports.se_DeleteRecoveryInstanceCommand = exports.se_DeleteLaunchConfigurationTemplateCommand = exports.se_DeleteLaunchActionCommand = exports.se_DeleteJobCommand = exports.se_CreateSourceNetworkCommand = exports.se_CreateReplicationConfigurationTemplateCommand = exports.se_CreateLaunchConfigurationTemplateCommand = exports.se_CreateExtendedSourceServerCommand = exports.se_AssociateSourceNetworkStackCommand = void 0;
4
+ exports.de_UpdateReplicationConfigurationTemplateCommand = exports.de_UpdateReplicationConfigurationCommand = exports.de_UpdateLaunchConfigurationTemplateCommand = exports.de_UpdateLaunchConfigurationCommand = exports.de_UpdateFailbackReplicationConfigurationCommand = exports.de_UntagResourceCommand = exports.de_TerminateRecoveryInstancesCommand = exports.de_TagResourceCommand = exports.de_StopSourceNetworkReplicationCommand = exports.de_StopReplicationCommand = exports.de_StopFailbackCommand = exports.de_StartSourceNetworkReplicationCommand = exports.de_StartSourceNetworkRecoveryCommand = exports.de_StartReplicationCommand = exports.de_StartRecoveryCommand = exports.de_StartFailbackLaunchCommand = exports.de_ReverseReplicationCommand = exports.de_RetryDataReplicationCommand = exports.de_PutLaunchActionCommand = exports.de_ListTagsForResourceCommand = exports.de_ListStagingAccountsCommand = exports.de_ListLaunchActionsCommand = exports.de_ListExtensibleSourceServersCommand = exports.de_InitializeServiceCommand = exports.de_GetReplicationConfigurationCommand = exports.de_GetLaunchConfigurationCommand = exports.de_GetFailbackReplicationConfigurationCommand = exports.de_ExportSourceNetworkCfnTemplateCommand = exports.de_DisconnectSourceServerCommand = exports.de_DisconnectRecoveryInstanceCommand = exports.de_DescribeSourceServersCommand = exports.de_DescribeSourceNetworksCommand = exports.de_DescribeReplicationConfigurationTemplatesCommand = exports.de_DescribeRecoverySnapshotsCommand = exports.de_DescribeRecoveryInstancesCommand = exports.de_DescribeLaunchConfigurationTemplatesCommand = exports.de_DescribeJobsCommand = exports.de_DescribeJobLogItemsCommand = exports.de_DeleteSourceServerCommand = exports.de_DeleteSourceNetworkCommand = exports.de_DeleteReplicationConfigurationTemplateCommand = exports.de_DeleteRecoveryInstanceCommand = exports.de_DeleteLaunchConfigurationTemplateCommand = exports.de_DeleteLaunchActionCommand = exports.de_DeleteJobCommand = exports.de_CreateSourceNetworkCommand = exports.de_CreateReplicationConfigurationTemplateCommand = exports.de_CreateLaunchConfigurationTemplateCommand = exports.de_CreateExtendedSourceServerCommand = exports.de_AssociateSourceNetworkStackCommand = void 0;
5
5
  const protocol_http_1 = require("@smithy/protocol-http");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  const DrsServiceException_1 = require("../models/DrsServiceException");
@@ -63,6 +63,7 @@ const se_CreateLaunchConfigurationTemplateCommand = async (input, context) => {
63
63
  exportBucketArn: [],
64
64
  launchDisposition: [],
65
65
  licensing: (_) => (0, smithy_client_1._json)(_),
66
+ postLaunchEnabled: [],
66
67
  tags: (_) => (0, smithy_client_1._json)(_),
67
68
  targetInstanceTypeRightSizingMethod: [],
68
69
  }));
@@ -157,6 +158,28 @@ const se_DeleteJobCommand = async (input, context) => {
157
158
  });
158
159
  };
159
160
  exports.se_DeleteJobCommand = se_DeleteJobCommand;
161
+ const se_DeleteLaunchActionCommand = async (input, context) => {
162
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
163
+ const headers = {
164
+ "content-type": "application/json",
165
+ };
166
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteLaunchAction";
167
+ let body;
168
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
169
+ actionId: [],
170
+ resourceId: [],
171
+ }));
172
+ return new protocol_http_1.HttpRequest({
173
+ protocol,
174
+ hostname,
175
+ port,
176
+ method: "POST",
177
+ headers,
178
+ path: resolvedPath,
179
+ body,
180
+ });
181
+ };
182
+ exports.se_DeleteLaunchActionCommand = se_DeleteLaunchActionCommand;
160
183
  const se_DeleteLaunchConfigurationTemplateCommand = async (input, context) => {
161
184
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
162
185
  const headers = {
@@ -617,6 +640,30 @@ const se_ListExtensibleSourceServersCommand = async (input, context) => {
617
640
  });
618
641
  };
619
642
  exports.se_ListExtensibleSourceServersCommand = se_ListExtensibleSourceServersCommand;
643
+ const se_ListLaunchActionsCommand = async (input, context) => {
644
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
645
+ const headers = {
646
+ "content-type": "application/json",
647
+ };
648
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListLaunchActions";
649
+ let body;
650
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
651
+ filters: (_) => (0, smithy_client_1._json)(_),
652
+ maxResults: [],
653
+ nextToken: [],
654
+ resourceId: [],
655
+ }));
656
+ return new protocol_http_1.HttpRequest({
657
+ protocol,
658
+ hostname,
659
+ port,
660
+ method: "POST",
661
+ headers,
662
+ path: resolvedPath,
663
+ body,
664
+ });
665
+ };
666
+ exports.se_ListLaunchActionsCommand = se_ListLaunchActionsCommand;
620
667
  const se_ListStagingAccountsCommand = async (input, context) => {
621
668
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
622
669
  const headers = {};
@@ -655,6 +702,37 @@ const se_ListTagsForResourceCommand = async (input, context) => {
655
702
  });
656
703
  };
657
704
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
705
+ const se_PutLaunchActionCommand = async (input, context) => {
706
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
707
+ const headers = {
708
+ "content-type": "application/json",
709
+ };
710
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/PutLaunchAction";
711
+ let body;
712
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
713
+ actionCode: [],
714
+ actionId: [],
715
+ actionVersion: [],
716
+ active: [],
717
+ category: [],
718
+ description: [],
719
+ name: [],
720
+ optional: [],
721
+ order: [],
722
+ parameters: (_) => (0, smithy_client_1._json)(_),
723
+ resourceId: [],
724
+ }));
725
+ return new protocol_http_1.HttpRequest({
726
+ protocol,
727
+ hostname,
728
+ port,
729
+ method: "POST",
730
+ headers,
731
+ path: resolvedPath,
732
+ body,
733
+ });
734
+ };
735
+ exports.se_PutLaunchActionCommand = se_PutLaunchActionCommand;
658
736
  const se_RetryDataReplicationCommand = async (input, context) => {
659
737
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
660
738
  const headers = {
@@ -974,6 +1052,7 @@ const se_UpdateLaunchConfigurationCommand = async (input, context) => {
974
1052
  launchDisposition: [],
975
1053
  licensing: (_) => (0, smithy_client_1._json)(_),
976
1054
  name: [],
1055
+ postLaunchEnabled: [],
977
1056
  sourceServerID: [],
978
1057
  targetInstanceTypeRightSizingMethod: [],
979
1058
  }));
@@ -1002,6 +1081,7 @@ const se_UpdateLaunchConfigurationTemplateCommand = async (input, context) => {
1002
1081
  launchConfigurationTemplateID: [],
1003
1082
  launchDisposition: [],
1004
1083
  licensing: (_) => (0, smithy_client_1._json)(_),
1084
+ postLaunchEnabled: [],
1005
1085
  targetInstanceTypeRightSizingMethod: [],
1006
1086
  }));
1007
1087
  return new protocol_http_1.HttpRequest({
@@ -1400,6 +1480,48 @@ const de_DeleteJobCommandError = async (output, context) => {
1400
1480
  });
1401
1481
  }
1402
1482
  };
1483
+ const de_DeleteLaunchActionCommand = async (output, context) => {
1484
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
1485
+ return de_DeleteLaunchActionCommandError(output, context);
1486
+ }
1487
+ const contents = (0, smithy_client_1.map)({
1488
+ $metadata: deserializeMetadata(output),
1489
+ });
1490
+ await (0, smithy_client_1.collectBody)(output.body, context);
1491
+ return contents;
1492
+ };
1493
+ exports.de_DeleteLaunchActionCommand = de_DeleteLaunchActionCommand;
1494
+ const de_DeleteLaunchActionCommandError = async (output, context) => {
1495
+ const parsedOutput = {
1496
+ ...output,
1497
+ body: await parseErrorBody(output.body, context),
1498
+ };
1499
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1500
+ switch (errorCode) {
1501
+ case "InternalServerException":
1502
+ case "com.amazonaws.drs#InternalServerException":
1503
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1504
+ case "ResourceNotFoundException":
1505
+ case "com.amazonaws.drs#ResourceNotFoundException":
1506
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1507
+ case "ThrottlingException":
1508
+ case "com.amazonaws.drs#ThrottlingException":
1509
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1510
+ case "UninitializedAccountException":
1511
+ case "com.amazonaws.drs#UninitializedAccountException":
1512
+ throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1513
+ case "ValidationException":
1514
+ case "com.amazonaws.drs#ValidationException":
1515
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1516
+ default:
1517
+ const parsedBody = parsedOutput.body;
1518
+ return throwDefaultError({
1519
+ output,
1520
+ parsedBody,
1521
+ errorCode,
1522
+ });
1523
+ }
1524
+ };
1403
1525
  const de_DeleteLaunchConfigurationTemplateCommand = async (output, context) => {
1404
1526
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1405
1527
  return de_DeleteLaunchConfigurationTemplateCommandError(output, context);
@@ -2184,6 +2306,7 @@ const de_GetLaunchConfigurationCommand = async (output, context) => {
2184
2306
  launchDisposition: smithy_client_1.expectString,
2185
2307
  licensing: smithy_client_1._json,
2186
2308
  name: smithy_client_1.expectString,
2309
+ postLaunchEnabled: smithy_client_1.expectBoolean,
2187
2310
  sourceServerID: smithy_client_1.expectString,
2188
2311
  targetInstanceTypeRightSizingMethod: smithy_client_1.expectString,
2189
2312
  });
@@ -2367,6 +2490,53 @@ const de_ListExtensibleSourceServersCommandError = async (output, context) => {
2367
2490
  });
2368
2491
  }
2369
2492
  };
2493
+ const de_ListLaunchActionsCommand = async (output, context) => {
2494
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2495
+ return de_ListLaunchActionsCommandError(output, context);
2496
+ }
2497
+ const contents = (0, smithy_client_1.map)({
2498
+ $metadata: deserializeMetadata(output),
2499
+ });
2500
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2501
+ const doc = (0, smithy_client_1.take)(data, {
2502
+ items: smithy_client_1._json,
2503
+ nextToken: smithy_client_1.expectString,
2504
+ });
2505
+ Object.assign(contents, doc);
2506
+ return contents;
2507
+ };
2508
+ exports.de_ListLaunchActionsCommand = de_ListLaunchActionsCommand;
2509
+ const de_ListLaunchActionsCommandError = async (output, context) => {
2510
+ const parsedOutput = {
2511
+ ...output,
2512
+ body: await parseErrorBody(output.body, context),
2513
+ };
2514
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2515
+ switch (errorCode) {
2516
+ case "InternalServerException":
2517
+ case "com.amazonaws.drs#InternalServerException":
2518
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2519
+ case "ResourceNotFoundException":
2520
+ case "com.amazonaws.drs#ResourceNotFoundException":
2521
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2522
+ case "ServiceQuotaExceededException":
2523
+ case "com.amazonaws.drs#ServiceQuotaExceededException":
2524
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2525
+ case "ThrottlingException":
2526
+ case "com.amazonaws.drs#ThrottlingException":
2527
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2528
+ case "UninitializedAccountException":
2529
+ case "com.amazonaws.drs#UninitializedAccountException":
2530
+ throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2531
+ default:
2532
+ const parsedBody = parsedOutput.body;
2533
+ return throwDefaultError({
2534
+ output,
2535
+ parsedBody,
2536
+ errorCode,
2537
+ });
2538
+ }
2539
+ };
2370
2540
  const de_ListStagingAccountsCommand = async (output, context) => {
2371
2541
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2372
2542
  return de_ListStagingAccountsCommandError(output, context);
@@ -2460,6 +2630,66 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
2460
2630
  });
2461
2631
  }
2462
2632
  };
2633
+ const de_PutLaunchActionCommand = async (output, context) => {
2634
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2635
+ return de_PutLaunchActionCommandError(output, context);
2636
+ }
2637
+ const contents = (0, smithy_client_1.map)({
2638
+ $metadata: deserializeMetadata(output),
2639
+ });
2640
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2641
+ const doc = (0, smithy_client_1.take)(data, {
2642
+ actionCode: smithy_client_1.expectString,
2643
+ actionId: smithy_client_1.expectString,
2644
+ actionVersion: smithy_client_1.expectString,
2645
+ active: smithy_client_1.expectBoolean,
2646
+ category: smithy_client_1.expectString,
2647
+ description: smithy_client_1.expectString,
2648
+ name: smithy_client_1.expectString,
2649
+ optional: smithy_client_1.expectBoolean,
2650
+ order: smithy_client_1.expectInt32,
2651
+ parameters: smithy_client_1._json,
2652
+ resourceId: smithy_client_1.expectString,
2653
+ type: smithy_client_1.expectString,
2654
+ });
2655
+ Object.assign(contents, doc);
2656
+ return contents;
2657
+ };
2658
+ exports.de_PutLaunchActionCommand = de_PutLaunchActionCommand;
2659
+ const de_PutLaunchActionCommandError = async (output, context) => {
2660
+ const parsedOutput = {
2661
+ ...output,
2662
+ body: await parseErrorBody(output.body, context),
2663
+ };
2664
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2665
+ switch (errorCode) {
2666
+ case "ConflictException":
2667
+ case "com.amazonaws.drs#ConflictException":
2668
+ throw await de_ConflictExceptionRes(parsedOutput, context);
2669
+ case "InternalServerException":
2670
+ case "com.amazonaws.drs#InternalServerException":
2671
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2672
+ case "ResourceNotFoundException":
2673
+ case "com.amazonaws.drs#ResourceNotFoundException":
2674
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2675
+ case "ThrottlingException":
2676
+ case "com.amazonaws.drs#ThrottlingException":
2677
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2678
+ case "UninitializedAccountException":
2679
+ case "com.amazonaws.drs#UninitializedAccountException":
2680
+ throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2681
+ case "ValidationException":
2682
+ case "com.amazonaws.drs#ValidationException":
2683
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2684
+ default:
2685
+ const parsedBody = parsedOutput.body;
2686
+ return throwDefaultError({
2687
+ output,
2688
+ parsedBody,
2689
+ errorCode,
2690
+ });
2691
+ }
2692
+ };
2463
2693
  const de_RetryDataReplicationCommand = async (output, context) => {
2464
2694
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2465
2695
  return de_RetryDataReplicationCommandError(output, context);
@@ -3127,6 +3357,7 @@ const de_UpdateLaunchConfigurationCommand = async (output, context) => {
3127
3357
  launchDisposition: smithy_client_1.expectString,
3128
3358
  licensing: smithy_client_1._json,
3129
3359
  name: smithy_client_1.expectString,
3360
+ postLaunchEnabled: smithy_client_1.expectBoolean,
3130
3361
  sourceServerID: smithy_client_1.expectString,
3131
3362
  targetInstanceTypeRightSizingMethod: smithy_client_1.expectString,
3132
3363
  });
@@ -1,16 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.resolveRuntimeExtensions = void 0;
4
+ const protocol_http_1 = require("@smithy/protocol-http");
4
5
  const smithy_client_1 = require("@smithy/smithy-client");
5
6
  const asPartial = (t) => t;
6
7
  const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
7
8
  const extensionConfiguration = {
8
9
  ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
10
+ ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
9
11
  };
10
12
  extensions.forEach((extension) => extension.configure(extensionConfiguration));
11
13
  return {
12
14
  ...runtimeConfig,
13
15
  ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
16
+ ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
14
17
  };
15
18
  };
16
19
  exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
package/dist-es/Drs.js CHANGED
@@ -5,6 +5,7 @@ import { CreateLaunchConfigurationTemplateCommand, } from "./commands/CreateLaun
5
5
  import { CreateReplicationConfigurationTemplateCommand, } from "./commands/CreateReplicationConfigurationTemplateCommand";
6
6
  import { CreateSourceNetworkCommand, } from "./commands/CreateSourceNetworkCommand";
7
7
  import { DeleteJobCommand } from "./commands/DeleteJobCommand";
8
+ import { DeleteLaunchActionCommand, } from "./commands/DeleteLaunchActionCommand";
8
9
  import { DeleteLaunchConfigurationTemplateCommand, } from "./commands/DeleteLaunchConfigurationTemplateCommand";
9
10
  import { DeleteRecoveryInstanceCommand, } from "./commands/DeleteRecoveryInstanceCommand";
10
11
  import { DeleteReplicationConfigurationTemplateCommand, } from "./commands/DeleteReplicationConfigurationTemplateCommand";
@@ -26,8 +27,10 @@ import { GetLaunchConfigurationCommand, } from "./commands/GetLaunchConfiguratio
26
27
  import { GetReplicationConfigurationCommand, } from "./commands/GetReplicationConfigurationCommand";
27
28
  import { InitializeServiceCommand, } from "./commands/InitializeServiceCommand";
28
29
  import { ListExtensibleSourceServersCommand, } from "./commands/ListExtensibleSourceServersCommand";
30
+ import { ListLaunchActionsCommand, } from "./commands/ListLaunchActionsCommand";
29
31
  import { ListStagingAccountsCommand, } from "./commands/ListStagingAccountsCommand";
30
32
  import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
33
+ import { PutLaunchActionCommand, } from "./commands/PutLaunchActionCommand";
31
34
  import { RetryDataReplicationCommand, } from "./commands/RetryDataReplicationCommand";
32
35
  import { ReverseReplicationCommand, } from "./commands/ReverseReplicationCommand";
33
36
  import { StartFailbackLaunchCommand, } from "./commands/StartFailbackLaunchCommand";
@@ -54,6 +57,7 @@ const commands = {
54
57
  CreateReplicationConfigurationTemplateCommand,
55
58
  CreateSourceNetworkCommand,
56
59
  DeleteJobCommand,
60
+ DeleteLaunchActionCommand,
57
61
  DeleteLaunchConfigurationTemplateCommand,
58
62
  DeleteRecoveryInstanceCommand,
59
63
  DeleteReplicationConfigurationTemplateCommand,
@@ -75,8 +79,10 @@ const commands = {
75
79
  GetReplicationConfigurationCommand,
76
80
  InitializeServiceCommand,
77
81
  ListExtensibleSourceServersCommand,
82
+ ListLaunchActionsCommand,
78
83
  ListStagingAccountsCommand,
79
84
  ListTagsForResourceCommand,
85
+ PutLaunchActionCommand,
80
86
  RetryDataReplicationCommand,
81
87
  ReverseReplicationCommand,
82
88
  StartFailbackLaunchCommand,
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { de_DeleteLaunchActionCommand, se_DeleteLaunchActionCommand } from "../protocols/Aws_restJson1";
5
+ export { $Command };
6
+ export class DeleteLaunchActionCommand extends $Command {
7
+ static getEndpointParameterInstructions() {
8
+ return {
9
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
10
+ Endpoint: { type: "builtInParams", name: "endpoint" },
11
+ Region: { type: "builtInParams", name: "region" },
12
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
13
+ };
14
+ }
15
+ constructor(input) {
16
+ super();
17
+ this.input = input;
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, DeleteLaunchActionCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "DrsClient";
25
+ const commandName = "DeleteLaunchActionCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: (_) => _,
31
+ outputFilterSensitiveLog: (_) => _,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return se_DeleteLaunchActionCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return de_DeleteLaunchActionCommand(output, context);
41
+ }
42
+ }
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { de_ListLaunchActionsCommand, se_ListLaunchActionsCommand } from "../protocols/Aws_restJson1";
5
+ export { $Command };
6
+ export class ListLaunchActionsCommand extends $Command {
7
+ static getEndpointParameterInstructions() {
8
+ return {
9
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
10
+ Endpoint: { type: "builtInParams", name: "endpoint" },
11
+ Region: { type: "builtInParams", name: "region" },
12
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
13
+ };
14
+ }
15
+ constructor(input) {
16
+ super();
17
+ this.input = input;
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, ListLaunchActionsCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "DrsClient";
25
+ const commandName = "ListLaunchActionsCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: (_) => _,
31
+ outputFilterSensitiveLog: (_) => _,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return se_ListLaunchActionsCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return de_ListLaunchActionsCommand(output, context);
41
+ }
42
+ }
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { de_PutLaunchActionCommand, se_PutLaunchActionCommand } from "../protocols/Aws_restJson1";
5
+ export { $Command };
6
+ export class PutLaunchActionCommand extends $Command {
7
+ static getEndpointParameterInstructions() {
8
+ return {
9
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
10
+ Endpoint: { type: "builtInParams", name: "endpoint" },
11
+ Region: { type: "builtInParams", name: "region" },
12
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
13
+ };
14
+ }
15
+ constructor(input) {
16
+ super();
17
+ this.input = input;
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, PutLaunchActionCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "DrsClient";
25
+ const commandName = "PutLaunchActionCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: (_) => _,
31
+ outputFilterSensitiveLog: (_) => _,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return se_PutLaunchActionCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return de_PutLaunchActionCommand(output, context);
41
+ }
42
+ }
@@ -4,6 +4,7 @@ export * from "./CreateLaunchConfigurationTemplateCommand";
4
4
  export * from "./CreateReplicationConfigurationTemplateCommand";
5
5
  export * from "./CreateSourceNetworkCommand";
6
6
  export * from "./DeleteJobCommand";
7
+ export * from "./DeleteLaunchActionCommand";
7
8
  export * from "./DeleteLaunchConfigurationTemplateCommand";
8
9
  export * from "./DeleteRecoveryInstanceCommand";
9
10
  export * from "./DeleteReplicationConfigurationTemplateCommand";
@@ -25,8 +26,10 @@ export * from "./GetLaunchConfigurationCommand";
25
26
  export * from "./GetReplicationConfigurationCommand";
26
27
  export * from "./InitializeServiceCommand";
27
28
  export * from "./ListExtensibleSourceServersCommand";
29
+ export * from "./ListLaunchActionsCommand";
28
30
  export * from "./ListStagingAccountsCommand";
29
31
  export * from "./ListTagsForResourceCommand";
32
+ export * from "./PutLaunchActionCommand";
30
33
  export * from "./RetryDataReplicationCommand";
31
34
  export * from "./ReverseReplicationCommand";
32
35
  export * from "./StartFailbackLaunchCommand";
@@ -39,6 +39,26 @@ export var ParticipatingResourceID;
39
39
  return visitor._(value.$unknown[0], value.$unknown[1]);
40
40
  };
41
41
  })(ParticipatingResourceID || (ParticipatingResourceID = {}));
42
+ export const LaunchActionCategory = {
43
+ CONFIGURATION: "CONFIGURATION",
44
+ MONITORING: "MONITORING",
45
+ OTHER: "OTHER",
46
+ SECURITY: "SECURITY",
47
+ VALIDATION: "VALIDATION",
48
+ };
49
+ export const LaunchActionParameterType = {
50
+ DYNAMIC: "DYNAMIC",
51
+ SSM_STORE: "SSM_STORE",
52
+ };
53
+ export const LaunchActionType = {
54
+ SSM_AUTOMATION: "SSM_AUTOMATION",
55
+ SSM_COMMAND: "SSM_COMMAND",
56
+ };
57
+ export const LaunchActionRunStatus = {
58
+ FAILED: "FAILED",
59
+ IN_PROGRESS: "IN_PROGRESS",
60
+ SUCCEEDED: "SUCCEEDED",
61
+ };
42
62
  export const JobStatus = {
43
63
  COMPLETED: "COMPLETED",
44
64
  PENDING: "PENDING",
@@ -0,0 +1,25 @@
1
+ import { ListLaunchActionsCommand, } from "../commands/ListLaunchActionsCommand";
2
+ import { DrsClient } from "../DrsClient";
3
+ const makePagedClientRequest = async (client, input, ...args) => {
4
+ return await client.send(new ListLaunchActionsCommand(input), ...args);
5
+ };
6
+ export async function* paginateListLaunchActions(config, input, ...additionalArguments) {
7
+ let token = config.startingToken || undefined;
8
+ let hasNext = true;
9
+ let page;
10
+ while (hasNext) {
11
+ input.nextToken = token;
12
+ input["maxResults"] = config.pageSize;
13
+ if (config.client instanceof DrsClient) {
14
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
+ }
16
+ else {
17
+ throw new Error("Invalid client, expected Drs | DrsClient");
18
+ }
19
+ yield page;
20
+ const prevToken = token;
21
+ token = page.nextToken;
22
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
+ }
24
+ return undefined;
25
+ }
@@ -8,4 +8,5 @@ export * from "./DescribeSourceNetworksPaginator";
8
8
  export * from "./DescribeSourceServersPaginator";
9
9
  export * from "./Interfaces";
10
10
  export * from "./ListExtensibleSourceServersPaginator";
11
+ export * from "./ListLaunchActionsPaginator";
11
12
  export * from "./ListStagingAccountsPaginator";