@aws-sdk/client-inspector2 3.325.0 → 3.327.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 (76) hide show
  1. package/README.md +40 -0
  2. package/dist-cjs/Inspector2.js +10 -0
  3. package/dist-cjs/commands/BatchGetMemberEc2DeepInspectionStatusCommand.js +45 -0
  4. package/dist-cjs/commands/BatchUpdateMemberEc2DeepInspectionStatusCommand.js +45 -0
  5. package/dist-cjs/commands/GetEc2DeepInspectionConfigurationCommand.js +45 -0
  6. package/dist-cjs/commands/UpdateEc2DeepInspectionConfigurationCommand.js +45 -0
  7. package/dist-cjs/commands/UpdateOrgEc2DeepInspectionConfigurationCommand.js +45 -0
  8. package/dist-cjs/commands/index.js +5 -0
  9. package/dist-cjs/endpoint/ruleset.js +3 -3
  10. package/dist-cjs/models/models_0.js +15 -2
  11. package/dist-cjs/protocols/Aws_restJson1.js +327 -2
  12. package/dist-es/Inspector2.js +10 -0
  13. package/dist-es/commands/BatchGetMemberEc2DeepInspectionStatusCommand.js +41 -0
  14. package/dist-es/commands/BatchUpdateMemberEc2DeepInspectionStatusCommand.js +41 -0
  15. package/dist-es/commands/GetEc2DeepInspectionConfigurationCommand.js +41 -0
  16. package/dist-es/commands/UpdateEc2DeepInspectionConfigurationCommand.js +41 -0
  17. package/dist-es/commands/UpdateOrgEc2DeepInspectionConfigurationCommand.js +41 -0
  18. package/dist-es/commands/index.js +5 -0
  19. package/dist-es/endpoint/ruleset.js +3 -3
  20. package/dist-es/models/models_0.js +13 -0
  21. package/dist-es/protocols/Aws_restJson1.js +315 -0
  22. package/dist-types/Inspector2.d.ts +35 -0
  23. package/dist-types/Inspector2Client.d.ts +7 -2
  24. package/dist-types/commands/AssociateMemberCommand.d.ts +7 -1
  25. package/dist-types/commands/BatchGetAccountStatusCommand.d.ts +45 -0
  26. package/dist-types/commands/BatchGetFreeTrialInfoCommand.d.ts +25 -0
  27. package/dist-types/commands/BatchGetMemberEc2DeepInspectionStatusCommand.d.ts +97 -0
  28. package/dist-types/commands/BatchUpdateMemberEc2DeepInspectionStatusCommand.d.ts +100 -0
  29. package/dist-types/commands/CancelFindingsReportCommand.d.ts +6 -0
  30. package/dist-types/commands/CreateFilterCommand.d.ts +6 -0
  31. package/dist-types/commands/CreateFindingsReportCommand.d.ts +7 -1
  32. package/dist-types/commands/DeleteFilterCommand.d.ts +6 -0
  33. package/dist-types/commands/DescribeOrganizationConfigurationCommand.d.ts +11 -0
  34. package/dist-types/commands/DisableCommand.d.ts +29 -0
  35. package/dist-types/commands/DisableDelegatedAdminAccountCommand.d.ts +6 -0
  36. package/dist-types/commands/DisassociateMemberCommand.d.ts +6 -0
  37. package/dist-types/commands/EnableCommand.d.ts +29 -0
  38. package/dist-types/commands/EnableDelegatedAdminAccountCommand.d.ts +6 -0
  39. package/dist-types/commands/GetConfigurationCommand.d.ts +12 -0
  40. package/dist-types/commands/GetDelegatedAdminAccountCommand.d.ts +9 -0
  41. package/dist-types/commands/GetEc2DeepInspectionConfigurationCommand.d.ts +87 -0
  42. package/dist-types/commands/GetFindingsReportStatusCommand.d.ts +133 -0
  43. package/dist-types/commands/GetMemberCommand.d.ts +11 -0
  44. package/dist-types/commands/ListAccountPermissionsCommand.d.ts +12 -0
  45. package/dist-types/commands/ListCoverageCommand.d.ts +46 -0
  46. package/dist-types/commands/ListCoverageStatisticsCommand.d.ts +13 -0
  47. package/dist-types/commands/ListDelegatedAdminAccountsCommand.d.ts +12 -0
  48. package/dist-types/commands/ListFiltersCommand.d.ts +140 -0
  49. package/dist-types/commands/ListFindingAggregationsCommand.d.ts +114 -0
  50. package/dist-types/commands/ListFindingsCommand.d.ts +164 -0
  51. package/dist-types/commands/ListMembersCommand.d.ts +14 -0
  52. package/dist-types/commands/ListTagsForResourceCommand.d.ts +8 -0
  53. package/dist-types/commands/ListUsageTotalsCommand.d.ts +19 -0
  54. package/dist-types/commands/TagResourceCommand.d.ts +4 -0
  55. package/dist-types/commands/UntagResourceCommand.d.ts +4 -0
  56. package/dist-types/commands/UpdateConfigurationCommand.d.ts +4 -0
  57. package/dist-types/commands/UpdateEc2DeepInspectionConfigurationCommand.d.ts +92 -0
  58. package/dist-types/commands/UpdateFilterCommand.d.ts +6 -0
  59. package/dist-types/commands/UpdateOrgEc2DeepInspectionConfigurationCommand.d.ts +82 -0
  60. package/dist-types/commands/UpdateOrganizationConfigurationCommand.d.ts +10 -0
  61. package/dist-types/commands/index.d.ts +5 -0
  62. package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
  63. package/dist-types/models/models_0.d.ts +200 -3
  64. package/dist-types/protocols/Aws_restJson1.d.ts +45 -0
  65. package/dist-types/ts3.4/Inspector2.d.ts +115 -0
  66. package/dist-types/ts3.4/Inspector2Client.d.ts +30 -0
  67. package/dist-types/ts3.4/commands/BatchGetMemberEc2DeepInspectionStatusCommand.d.ts +41 -0
  68. package/dist-types/ts3.4/commands/BatchUpdateMemberEc2DeepInspectionStatusCommand.d.ts +41 -0
  69. package/dist-types/ts3.4/commands/GetEc2DeepInspectionConfigurationCommand.d.ts +41 -0
  70. package/dist-types/ts3.4/commands/UpdateEc2DeepInspectionConfigurationCommand.d.ts +41 -0
  71. package/dist-types/ts3.4/commands/UpdateOrgEc2DeepInspectionConfigurationCommand.d.ts +41 -0
  72. package/dist-types/ts3.4/commands/index.d.ts +5 -0
  73. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
  74. package/dist-types/ts3.4/models/models_0.d.ts +64 -0
  75. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +60 -0
  76. package/package.json +7 -7
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_ListAccountPermissionsCommand = exports.de_GetMemberCommand = exports.de_GetFindingsReportStatusCommand = exports.de_GetDelegatedAdminAccountCommand = exports.de_GetConfigurationCommand = exports.de_EnableDelegatedAdminAccountCommand = exports.de_EnableCommand = exports.de_DisassociateMemberCommand = exports.de_DisableDelegatedAdminAccountCommand = exports.de_DisableCommand = exports.de_DescribeOrganizationConfigurationCommand = exports.de_DeleteFilterCommand = exports.de_CreateFindingsReportCommand = exports.de_CreateFilterCommand = exports.de_CancelFindingsReportCommand = exports.de_BatchGetFreeTrialInfoCommand = exports.de_BatchGetAccountStatusCommand = exports.de_AssociateMemberCommand = exports.se_UpdateOrganizationConfigurationCommand = exports.se_UpdateFilterCommand = exports.se_UpdateConfigurationCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListUsageTotalsCommand = exports.se_ListTagsForResourceCommand = exports.se_ListMembersCommand = exports.se_ListFindingsCommand = exports.se_ListFindingAggregationsCommand = exports.se_ListFiltersCommand = exports.se_ListDelegatedAdminAccountsCommand = exports.se_ListCoverageStatisticsCommand = exports.se_ListCoverageCommand = exports.se_ListAccountPermissionsCommand = exports.se_GetMemberCommand = exports.se_GetFindingsReportStatusCommand = exports.se_GetDelegatedAdminAccountCommand = exports.se_GetConfigurationCommand = exports.se_EnableDelegatedAdminAccountCommand = exports.se_EnableCommand = exports.se_DisassociateMemberCommand = exports.se_DisableDelegatedAdminAccountCommand = exports.se_DisableCommand = exports.se_DescribeOrganizationConfigurationCommand = exports.se_DeleteFilterCommand = exports.se_CreateFindingsReportCommand = exports.se_CreateFilterCommand = exports.se_CancelFindingsReportCommand = exports.se_BatchGetFreeTrialInfoCommand = exports.se_BatchGetAccountStatusCommand = exports.se_AssociateMemberCommand = void 0;
4
- exports.de_UpdateOrganizationConfigurationCommand = exports.de_UpdateFilterCommand = exports.de_UpdateConfigurationCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListUsageTotalsCommand = exports.de_ListTagsForResourceCommand = exports.de_ListMembersCommand = exports.de_ListFindingsCommand = exports.de_ListFindingAggregationsCommand = exports.de_ListFiltersCommand = exports.de_ListDelegatedAdminAccountsCommand = exports.de_ListCoverageStatisticsCommand = exports.de_ListCoverageCommand = void 0;
3
+ exports.de_DisassociateMemberCommand = exports.de_DisableDelegatedAdminAccountCommand = exports.de_DisableCommand = exports.de_DescribeOrganizationConfigurationCommand = exports.de_DeleteFilterCommand = exports.de_CreateFindingsReportCommand = exports.de_CreateFilterCommand = exports.de_CancelFindingsReportCommand = exports.de_BatchUpdateMemberEc2DeepInspectionStatusCommand = exports.de_BatchGetMemberEc2DeepInspectionStatusCommand = exports.de_BatchGetFreeTrialInfoCommand = exports.de_BatchGetAccountStatusCommand = exports.de_AssociateMemberCommand = exports.se_UpdateOrgEc2DeepInspectionConfigurationCommand = exports.se_UpdateOrganizationConfigurationCommand = exports.se_UpdateFilterCommand = exports.se_UpdateEc2DeepInspectionConfigurationCommand = exports.se_UpdateConfigurationCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListUsageTotalsCommand = exports.se_ListTagsForResourceCommand = exports.se_ListMembersCommand = exports.se_ListFindingsCommand = exports.se_ListFindingAggregationsCommand = exports.se_ListFiltersCommand = exports.se_ListDelegatedAdminAccountsCommand = exports.se_ListCoverageStatisticsCommand = exports.se_ListCoverageCommand = exports.se_ListAccountPermissionsCommand = exports.se_GetMemberCommand = exports.se_GetFindingsReportStatusCommand = exports.se_GetEc2DeepInspectionConfigurationCommand = exports.se_GetDelegatedAdminAccountCommand = exports.se_GetConfigurationCommand = exports.se_EnableDelegatedAdminAccountCommand = exports.se_EnableCommand = exports.se_DisassociateMemberCommand = exports.se_DisableDelegatedAdminAccountCommand = exports.se_DisableCommand = exports.se_DescribeOrganizationConfigurationCommand = exports.se_DeleteFilterCommand = exports.se_CreateFindingsReportCommand = exports.se_CreateFilterCommand = exports.se_CancelFindingsReportCommand = exports.se_BatchUpdateMemberEc2DeepInspectionStatusCommand = exports.se_BatchGetMemberEc2DeepInspectionStatusCommand = exports.se_BatchGetFreeTrialInfoCommand = exports.se_BatchGetAccountStatusCommand = exports.se_AssociateMemberCommand = void 0;
4
+ exports.de_UpdateOrgEc2DeepInspectionConfigurationCommand = exports.de_UpdateOrganizationConfigurationCommand = exports.de_UpdateFilterCommand = exports.de_UpdateEc2DeepInspectionConfigurationCommand = exports.de_UpdateConfigurationCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListUsageTotalsCommand = exports.de_ListTagsForResourceCommand = exports.de_ListMembersCommand = exports.de_ListFindingsCommand = exports.de_ListFindingAggregationsCommand = exports.de_ListFiltersCommand = exports.de_ListDelegatedAdminAccountsCommand = exports.de_ListCoverageStatisticsCommand = exports.de_ListCoverageCommand = exports.de_ListAccountPermissionsCommand = exports.de_GetMemberCommand = exports.de_GetFindingsReportStatusCommand = exports.de_GetEc2DeepInspectionConfigurationCommand = exports.de_GetDelegatedAdminAccountCommand = exports.de_GetConfigurationCommand = exports.de_EnableDelegatedAdminAccountCommand = exports.de_EnableCommand = 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 uuid_1 = require("uuid");
@@ -70,6 +70,49 @@ const se_BatchGetFreeTrialInfoCommand = async (input, context) => {
70
70
  });
71
71
  };
72
72
  exports.se_BatchGetFreeTrialInfoCommand = se_BatchGetFreeTrialInfoCommand;
73
+ const se_BatchGetMemberEc2DeepInspectionStatusCommand = async (input, context) => {
74
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
75
+ const headers = {
76
+ "content-type": "application/json",
77
+ };
78
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ec2deepinspectionstatus/member/batch/get";
79
+ let body;
80
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
81
+ accountIds: (_) => (0, smithy_client_1._json)(_),
82
+ }));
83
+ return new protocol_http_1.HttpRequest({
84
+ protocol,
85
+ hostname,
86
+ port,
87
+ method: "POST",
88
+ headers,
89
+ path: resolvedPath,
90
+ body,
91
+ });
92
+ };
93
+ exports.se_BatchGetMemberEc2DeepInspectionStatusCommand = se_BatchGetMemberEc2DeepInspectionStatusCommand;
94
+ const se_BatchUpdateMemberEc2DeepInspectionStatusCommand = async (input, context) => {
95
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
96
+ const headers = {
97
+ "content-type": "application/json",
98
+ };
99
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
100
+ "/ec2deepinspectionstatus/member/batch/update";
101
+ let body;
102
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
103
+ accountIds: (_) => (0, smithy_client_1._json)(_),
104
+ }));
105
+ return new protocol_http_1.HttpRequest({
106
+ protocol,
107
+ hostname,
108
+ port,
109
+ method: "POST",
110
+ headers,
111
+ path: resolvedPath,
112
+ body,
113
+ });
114
+ };
115
+ exports.se_BatchUpdateMemberEc2DeepInspectionStatusCommand = se_BatchUpdateMemberEc2DeepInspectionStatusCommand;
73
116
  const se_CancelFindingsReportCommand = async (input, context) => {
74
117
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
75
118
  const headers = {
@@ -327,6 +370,25 @@ const se_GetDelegatedAdminAccountCommand = async (input, context) => {
327
370
  });
328
371
  };
329
372
  exports.se_GetDelegatedAdminAccountCommand = se_GetDelegatedAdminAccountCommand;
373
+ const se_GetEc2DeepInspectionConfigurationCommand = async (input, context) => {
374
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
375
+ const headers = {
376
+ "content-type": "application/json",
377
+ };
378
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ec2deepinspectionconfiguration/get";
379
+ let body;
380
+ body = "";
381
+ return new protocol_http_1.HttpRequest({
382
+ protocol,
383
+ hostname,
384
+ port,
385
+ method: "POST",
386
+ headers,
387
+ path: resolvedPath,
388
+ body,
389
+ });
390
+ };
391
+ exports.se_GetEc2DeepInspectionConfigurationCommand = se_GetEc2DeepInspectionConfigurationCommand;
330
392
  const se_GetFindingsReportStatusCommand = async (input, context) => {
331
393
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
332
394
  const headers = {
@@ -663,6 +725,28 @@ const se_UpdateConfigurationCommand = async (input, context) => {
663
725
  });
664
726
  };
665
727
  exports.se_UpdateConfigurationCommand = se_UpdateConfigurationCommand;
728
+ const se_UpdateEc2DeepInspectionConfigurationCommand = 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 || ""}` + "/ec2deepinspectionconfiguration/update";
734
+ let body;
735
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
736
+ activateDeepInspection: [],
737
+ packagePaths: (_) => (0, smithy_client_1._json)(_),
738
+ }));
739
+ return new protocol_http_1.HttpRequest({
740
+ protocol,
741
+ hostname,
742
+ port,
743
+ method: "POST",
744
+ headers,
745
+ path: resolvedPath,
746
+ body,
747
+ });
748
+ };
749
+ exports.se_UpdateEc2DeepInspectionConfigurationCommand = se_UpdateEc2DeepInspectionConfigurationCommand;
666
750
  const se_UpdateFilterCommand = async (input, context) => {
667
751
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
668
752
  const headers = {
@@ -710,6 +794,28 @@ const se_UpdateOrganizationConfigurationCommand = async (input, context) => {
710
794
  });
711
795
  };
712
796
  exports.se_UpdateOrganizationConfigurationCommand = se_UpdateOrganizationConfigurationCommand;
797
+ const se_UpdateOrgEc2DeepInspectionConfigurationCommand = async (input, context) => {
798
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
799
+ const headers = {
800
+ "content-type": "application/json",
801
+ };
802
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
803
+ "/ec2deepinspectionconfiguration/org/update";
804
+ let body;
805
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
806
+ orgPackagePaths: (_) => (0, smithy_client_1._json)(_),
807
+ }));
808
+ return new protocol_http_1.HttpRequest({
809
+ protocol,
810
+ hostname,
811
+ port,
812
+ method: "POST",
813
+ headers,
814
+ path: resolvedPath,
815
+ body,
816
+ });
817
+ };
818
+ exports.se_UpdateOrgEc2DeepInspectionConfigurationCommand = se_UpdateOrgEc2DeepInspectionConfigurationCommand;
713
819
  const de_AssociateMemberCommand = async (output, context) => {
714
820
  if (output.statusCode !== 200 && output.statusCode >= 300) {
715
821
  return de_AssociateMemberCommandError(output, context);
@@ -844,6 +950,94 @@ const de_BatchGetFreeTrialInfoCommandError = async (output, context) => {
844
950
  });
845
951
  }
846
952
  };
953
+ const de_BatchGetMemberEc2DeepInspectionStatusCommand = async (output, context) => {
954
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
955
+ return de_BatchGetMemberEc2DeepInspectionStatusCommandError(output, context);
956
+ }
957
+ const contents = (0, smithy_client_1.map)({
958
+ $metadata: deserializeMetadata(output),
959
+ });
960
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
961
+ const doc = (0, smithy_client_1.take)(data, {
962
+ accountIds: smithy_client_1._json,
963
+ failedAccountIds: smithy_client_1._json,
964
+ });
965
+ Object.assign(contents, doc);
966
+ return contents;
967
+ };
968
+ exports.de_BatchGetMemberEc2DeepInspectionStatusCommand = de_BatchGetMemberEc2DeepInspectionStatusCommand;
969
+ const de_BatchGetMemberEc2DeepInspectionStatusCommandError = async (output, context) => {
970
+ const parsedOutput = {
971
+ ...output,
972
+ body: await parseErrorBody(output.body, context),
973
+ };
974
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
975
+ switch (errorCode) {
976
+ case "AccessDeniedException":
977
+ case "com.amazonaws.inspector2#AccessDeniedException":
978
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
979
+ case "InternalServerException":
980
+ case "com.amazonaws.inspector2#InternalServerException":
981
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
982
+ case "ThrottlingException":
983
+ case "com.amazonaws.inspector2#ThrottlingException":
984
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
985
+ case "ValidationException":
986
+ case "com.amazonaws.inspector2#ValidationException":
987
+ throw await de_ValidationExceptionRes(parsedOutput, context);
988
+ default:
989
+ const parsedBody = parsedOutput.body;
990
+ return throwDefaultError({
991
+ output,
992
+ parsedBody,
993
+ errorCode,
994
+ });
995
+ }
996
+ };
997
+ const de_BatchUpdateMemberEc2DeepInspectionStatusCommand = async (output, context) => {
998
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
999
+ return de_BatchUpdateMemberEc2DeepInspectionStatusCommandError(output, context);
1000
+ }
1001
+ const contents = (0, smithy_client_1.map)({
1002
+ $metadata: deserializeMetadata(output),
1003
+ });
1004
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1005
+ const doc = (0, smithy_client_1.take)(data, {
1006
+ accountIds: smithy_client_1._json,
1007
+ failedAccountIds: smithy_client_1._json,
1008
+ });
1009
+ Object.assign(contents, doc);
1010
+ return contents;
1011
+ };
1012
+ exports.de_BatchUpdateMemberEc2DeepInspectionStatusCommand = de_BatchUpdateMemberEc2DeepInspectionStatusCommand;
1013
+ const de_BatchUpdateMemberEc2DeepInspectionStatusCommandError = async (output, context) => {
1014
+ const parsedOutput = {
1015
+ ...output,
1016
+ body: await parseErrorBody(output.body, context),
1017
+ };
1018
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1019
+ switch (errorCode) {
1020
+ case "AccessDeniedException":
1021
+ case "com.amazonaws.inspector2#AccessDeniedException":
1022
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1023
+ case "InternalServerException":
1024
+ case "com.amazonaws.inspector2#InternalServerException":
1025
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1026
+ case "ThrottlingException":
1027
+ case "com.amazonaws.inspector2#ThrottlingException":
1028
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1029
+ case "ValidationException":
1030
+ case "com.amazonaws.inspector2#ValidationException":
1031
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1032
+ default:
1033
+ const parsedBody = parsedOutput.body;
1034
+ return throwDefaultError({
1035
+ output,
1036
+ parsedBody,
1037
+ errorCode,
1038
+ });
1039
+ }
1040
+ };
847
1041
  const de_CancelFindingsReportCommand = async (output, context) => {
848
1042
  if (output.statusCode !== 200 && output.statusCode >= 300) {
849
1043
  return de_CancelFindingsReportCommandError(output, context);
@@ -1396,6 +1590,52 @@ const de_GetDelegatedAdminAccountCommandError = async (output, context) => {
1396
1590
  });
1397
1591
  }
1398
1592
  };
1593
+ const de_GetEc2DeepInspectionConfigurationCommand = async (output, context) => {
1594
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1595
+ return de_GetEc2DeepInspectionConfigurationCommandError(output, context);
1596
+ }
1597
+ const contents = (0, smithy_client_1.map)({
1598
+ $metadata: deserializeMetadata(output),
1599
+ });
1600
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1601
+ const doc = (0, smithy_client_1.take)(data, {
1602
+ errorMessage: smithy_client_1.expectString,
1603
+ orgPackagePaths: smithy_client_1._json,
1604
+ packagePaths: smithy_client_1._json,
1605
+ status: smithy_client_1.expectString,
1606
+ });
1607
+ Object.assign(contents, doc);
1608
+ return contents;
1609
+ };
1610
+ exports.de_GetEc2DeepInspectionConfigurationCommand = de_GetEc2DeepInspectionConfigurationCommand;
1611
+ const de_GetEc2DeepInspectionConfigurationCommandError = async (output, context) => {
1612
+ const parsedOutput = {
1613
+ ...output,
1614
+ body: await parseErrorBody(output.body, context),
1615
+ };
1616
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1617
+ switch (errorCode) {
1618
+ case "AccessDeniedException":
1619
+ case "com.amazonaws.inspector2#AccessDeniedException":
1620
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1621
+ case "InternalServerException":
1622
+ case "com.amazonaws.inspector2#InternalServerException":
1623
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1624
+ case "ResourceNotFoundException":
1625
+ case "com.amazonaws.inspector2#ResourceNotFoundException":
1626
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1627
+ case "ThrottlingException":
1628
+ case "com.amazonaws.inspector2#ThrottlingException":
1629
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1630
+ default:
1631
+ const parsedBody = parsedOutput.body;
1632
+ return throwDefaultError({
1633
+ output,
1634
+ parsedBody,
1635
+ errorCode,
1636
+ });
1637
+ }
1638
+ };
1399
1639
  const de_GetFindingsReportStatusCommand = async (output, context) => {
1400
1640
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1401
1641
  return de_GetFindingsReportStatusCommandError(output, context);
@@ -2042,6 +2282,52 @@ const de_UpdateConfigurationCommandError = async (output, context) => {
2042
2282
  });
2043
2283
  }
2044
2284
  };
2285
+ const de_UpdateEc2DeepInspectionConfigurationCommand = async (output, context) => {
2286
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2287
+ return de_UpdateEc2DeepInspectionConfigurationCommandError(output, context);
2288
+ }
2289
+ const contents = (0, smithy_client_1.map)({
2290
+ $metadata: deserializeMetadata(output),
2291
+ });
2292
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2293
+ const doc = (0, smithy_client_1.take)(data, {
2294
+ errorMessage: smithy_client_1.expectString,
2295
+ orgPackagePaths: smithy_client_1._json,
2296
+ packagePaths: smithy_client_1._json,
2297
+ status: smithy_client_1.expectString,
2298
+ });
2299
+ Object.assign(contents, doc);
2300
+ return contents;
2301
+ };
2302
+ exports.de_UpdateEc2DeepInspectionConfigurationCommand = de_UpdateEc2DeepInspectionConfigurationCommand;
2303
+ const de_UpdateEc2DeepInspectionConfigurationCommandError = async (output, context) => {
2304
+ const parsedOutput = {
2305
+ ...output,
2306
+ body: await parseErrorBody(output.body, context),
2307
+ };
2308
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2309
+ switch (errorCode) {
2310
+ case "AccessDeniedException":
2311
+ case "com.amazonaws.inspector2#AccessDeniedException":
2312
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2313
+ case "InternalServerException":
2314
+ case "com.amazonaws.inspector2#InternalServerException":
2315
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2316
+ case "ThrottlingException":
2317
+ case "com.amazonaws.inspector2#ThrottlingException":
2318
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2319
+ case "ValidationException":
2320
+ case "com.amazonaws.inspector2#ValidationException":
2321
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2322
+ default:
2323
+ const parsedBody = parsedOutput.body;
2324
+ return throwDefaultError({
2325
+ output,
2326
+ parsedBody,
2327
+ errorCode,
2328
+ });
2329
+ }
2330
+ };
2045
2331
  const de_UpdateFilterCommand = async (output, context) => {
2046
2332
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2047
2333
  return de_UpdateFilterCommandError(output, context);
@@ -2131,6 +2417,45 @@ const de_UpdateOrganizationConfigurationCommandError = async (output, context) =
2131
2417
  });
2132
2418
  }
2133
2419
  };
2420
+ const de_UpdateOrgEc2DeepInspectionConfigurationCommand = async (output, context) => {
2421
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2422
+ return de_UpdateOrgEc2DeepInspectionConfigurationCommandError(output, context);
2423
+ }
2424
+ const contents = (0, smithy_client_1.map)({
2425
+ $metadata: deserializeMetadata(output),
2426
+ });
2427
+ await collectBody(output.body, context);
2428
+ return contents;
2429
+ };
2430
+ exports.de_UpdateOrgEc2DeepInspectionConfigurationCommand = de_UpdateOrgEc2DeepInspectionConfigurationCommand;
2431
+ const de_UpdateOrgEc2DeepInspectionConfigurationCommandError = async (output, context) => {
2432
+ const parsedOutput = {
2433
+ ...output,
2434
+ body: await parseErrorBody(output.body, context),
2435
+ };
2436
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2437
+ switch (errorCode) {
2438
+ case "AccessDeniedException":
2439
+ case "com.amazonaws.inspector2#AccessDeniedException":
2440
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2441
+ case "InternalServerException":
2442
+ case "com.amazonaws.inspector2#InternalServerException":
2443
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2444
+ case "ThrottlingException":
2445
+ case "com.amazonaws.inspector2#ThrottlingException":
2446
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2447
+ case "ValidationException":
2448
+ case "com.amazonaws.inspector2#ValidationException":
2449
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2450
+ default:
2451
+ const parsedBody = parsedOutput.body;
2452
+ return throwDefaultError({
2453
+ output,
2454
+ parsedBody,
2455
+ errorCode,
2456
+ });
2457
+ }
2458
+ };
2134
2459
  const throwDefaultError = (0, smithy_client_1.withBaseException)(Inspector2ServiceException_1.Inspector2ServiceException);
2135
2460
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2136
2461
  const contents = (0, smithy_client_1.map)({});
@@ -2,6 +2,8 @@ import { createAggregatedClient } from "@aws-sdk/smithy-client";
2
2
  import { AssociateMemberCommand, } from "./commands/AssociateMemberCommand";
3
3
  import { BatchGetAccountStatusCommand, } from "./commands/BatchGetAccountStatusCommand";
4
4
  import { BatchGetFreeTrialInfoCommand, } from "./commands/BatchGetFreeTrialInfoCommand";
5
+ import { BatchGetMemberEc2DeepInspectionStatusCommand, } from "./commands/BatchGetMemberEc2DeepInspectionStatusCommand";
6
+ import { BatchUpdateMemberEc2DeepInspectionStatusCommand, } from "./commands/BatchUpdateMemberEc2DeepInspectionStatusCommand";
5
7
  import { CancelFindingsReportCommand, } from "./commands/CancelFindingsReportCommand";
6
8
  import { CreateFilterCommand, } from "./commands/CreateFilterCommand";
7
9
  import { CreateFindingsReportCommand, } from "./commands/CreateFindingsReportCommand";
@@ -14,6 +16,7 @@ import { EnableCommand } from "./commands/EnableCommand";
14
16
  import { EnableDelegatedAdminAccountCommand, } from "./commands/EnableDelegatedAdminAccountCommand";
15
17
  import { GetConfigurationCommand, } from "./commands/GetConfigurationCommand";
16
18
  import { GetDelegatedAdminAccountCommand, } from "./commands/GetDelegatedAdminAccountCommand";
19
+ import { GetEc2DeepInspectionConfigurationCommand, } from "./commands/GetEc2DeepInspectionConfigurationCommand";
17
20
  import { GetFindingsReportStatusCommand, } from "./commands/GetFindingsReportStatusCommand";
18
21
  import { GetMemberCommand } from "./commands/GetMemberCommand";
19
22
  import { ListAccountPermissionsCommand, } from "./commands/ListAccountPermissionsCommand";
@@ -29,13 +32,17 @@ import { ListUsageTotalsCommand, } from "./commands/ListUsageTotalsCommand";
29
32
  import { TagResourceCommand } from "./commands/TagResourceCommand";
30
33
  import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
31
34
  import { UpdateConfigurationCommand, } from "./commands/UpdateConfigurationCommand";
35
+ import { UpdateEc2DeepInspectionConfigurationCommand, } from "./commands/UpdateEc2DeepInspectionConfigurationCommand";
32
36
  import { UpdateFilterCommand, } from "./commands/UpdateFilterCommand";
33
37
  import { UpdateOrganizationConfigurationCommand, } from "./commands/UpdateOrganizationConfigurationCommand";
38
+ import { UpdateOrgEc2DeepInspectionConfigurationCommand, } from "./commands/UpdateOrgEc2DeepInspectionConfigurationCommand";
34
39
  import { Inspector2Client } from "./Inspector2Client";
35
40
  const commands = {
36
41
  AssociateMemberCommand,
37
42
  BatchGetAccountStatusCommand,
38
43
  BatchGetFreeTrialInfoCommand,
44
+ BatchGetMemberEc2DeepInspectionStatusCommand,
45
+ BatchUpdateMemberEc2DeepInspectionStatusCommand,
39
46
  CancelFindingsReportCommand,
40
47
  CreateFilterCommand,
41
48
  CreateFindingsReportCommand,
@@ -48,6 +55,7 @@ const commands = {
48
55
  EnableDelegatedAdminAccountCommand,
49
56
  GetConfigurationCommand,
50
57
  GetDelegatedAdminAccountCommand,
58
+ GetEc2DeepInspectionConfigurationCommand,
51
59
  GetFindingsReportStatusCommand,
52
60
  GetMemberCommand,
53
61
  ListAccountPermissionsCommand,
@@ -63,8 +71,10 @@ const commands = {
63
71
  TagResourceCommand,
64
72
  UntagResourceCommand,
65
73
  UpdateConfigurationCommand,
74
+ UpdateEc2DeepInspectionConfigurationCommand,
66
75
  UpdateFilterCommand,
67
76
  UpdateOrganizationConfigurationCommand,
77
+ UpdateOrgEc2DeepInspectionConfigurationCommand,
68
78
  };
69
79
  export class Inspector2 extends Inspector2Client {
70
80
  }
@@ -0,0 +1,41 @@
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 { de_BatchGetMemberEc2DeepInspectionStatusCommand, se_BatchGetMemberEc2DeepInspectionStatusCommand, } from "../protocols/Aws_restJson1";
5
+ export class BatchGetMemberEc2DeepInspectionStatusCommand extends $Command {
6
+ static getEndpointParameterInstructions() {
7
+ return {
8
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
9
+ Endpoint: { type: "builtInParams", name: "endpoint" },
10
+ Region: { type: "builtInParams", name: "region" },
11
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
12
+ };
13
+ }
14
+ constructor(input) {
15
+ super();
16
+ this.input = input;
17
+ }
18
+ resolveMiddleware(clientStack, configuration, options) {
19
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
20
+ this.middlewareStack.use(getEndpointPlugin(configuration, BatchGetMemberEc2DeepInspectionStatusCommand.getEndpointParameterInstructions()));
21
+ const stack = clientStack.concat(this.middlewareStack);
22
+ const { logger } = configuration;
23
+ const clientName = "Inspector2Client";
24
+ const commandName = "BatchGetMemberEc2DeepInspectionStatusCommand";
25
+ const handlerExecutionContext = {
26
+ logger,
27
+ clientName,
28
+ commandName,
29
+ inputFilterSensitiveLog: (_) => _,
30
+ outputFilterSensitiveLog: (_) => _,
31
+ };
32
+ const { requestHandler } = configuration;
33
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
34
+ }
35
+ serialize(input, context) {
36
+ return se_BatchGetMemberEc2DeepInspectionStatusCommand(input, context);
37
+ }
38
+ deserialize(output, context) {
39
+ return de_BatchGetMemberEc2DeepInspectionStatusCommand(output, context);
40
+ }
41
+ }
@@ -0,0 +1,41 @@
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 { de_BatchUpdateMemberEc2DeepInspectionStatusCommand, se_BatchUpdateMemberEc2DeepInspectionStatusCommand, } from "../protocols/Aws_restJson1";
5
+ export class BatchUpdateMemberEc2DeepInspectionStatusCommand extends $Command {
6
+ static getEndpointParameterInstructions() {
7
+ return {
8
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
9
+ Endpoint: { type: "builtInParams", name: "endpoint" },
10
+ Region: { type: "builtInParams", name: "region" },
11
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
12
+ };
13
+ }
14
+ constructor(input) {
15
+ super();
16
+ this.input = input;
17
+ }
18
+ resolveMiddleware(clientStack, configuration, options) {
19
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
20
+ this.middlewareStack.use(getEndpointPlugin(configuration, BatchUpdateMemberEc2DeepInspectionStatusCommand.getEndpointParameterInstructions()));
21
+ const stack = clientStack.concat(this.middlewareStack);
22
+ const { logger } = configuration;
23
+ const clientName = "Inspector2Client";
24
+ const commandName = "BatchUpdateMemberEc2DeepInspectionStatusCommand";
25
+ const handlerExecutionContext = {
26
+ logger,
27
+ clientName,
28
+ commandName,
29
+ inputFilterSensitiveLog: (_) => _,
30
+ outputFilterSensitiveLog: (_) => _,
31
+ };
32
+ const { requestHandler } = configuration;
33
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
34
+ }
35
+ serialize(input, context) {
36
+ return se_BatchUpdateMemberEc2DeepInspectionStatusCommand(input, context);
37
+ }
38
+ deserialize(output, context) {
39
+ return de_BatchUpdateMemberEc2DeepInspectionStatusCommand(output, context);
40
+ }
41
+ }
@@ -0,0 +1,41 @@
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 { de_GetEc2DeepInspectionConfigurationCommand, se_GetEc2DeepInspectionConfigurationCommand, } from "../protocols/Aws_restJson1";
5
+ export class GetEc2DeepInspectionConfigurationCommand extends $Command {
6
+ static getEndpointParameterInstructions() {
7
+ return {
8
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
9
+ Endpoint: { type: "builtInParams", name: "endpoint" },
10
+ Region: { type: "builtInParams", name: "region" },
11
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
12
+ };
13
+ }
14
+ constructor(input) {
15
+ super();
16
+ this.input = input;
17
+ }
18
+ resolveMiddleware(clientStack, configuration, options) {
19
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
20
+ this.middlewareStack.use(getEndpointPlugin(configuration, GetEc2DeepInspectionConfigurationCommand.getEndpointParameterInstructions()));
21
+ const stack = clientStack.concat(this.middlewareStack);
22
+ const { logger } = configuration;
23
+ const clientName = "Inspector2Client";
24
+ const commandName = "GetEc2DeepInspectionConfigurationCommand";
25
+ const handlerExecutionContext = {
26
+ logger,
27
+ clientName,
28
+ commandName,
29
+ inputFilterSensitiveLog: (_) => _,
30
+ outputFilterSensitiveLog: (_) => _,
31
+ };
32
+ const { requestHandler } = configuration;
33
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
34
+ }
35
+ serialize(input, context) {
36
+ return se_GetEc2DeepInspectionConfigurationCommand(input, context);
37
+ }
38
+ deserialize(output, context) {
39
+ return de_GetEc2DeepInspectionConfigurationCommand(output, context);
40
+ }
41
+ }
@@ -0,0 +1,41 @@
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 { de_UpdateEc2DeepInspectionConfigurationCommand, se_UpdateEc2DeepInspectionConfigurationCommand, } from "../protocols/Aws_restJson1";
5
+ export class UpdateEc2DeepInspectionConfigurationCommand extends $Command {
6
+ static getEndpointParameterInstructions() {
7
+ return {
8
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
9
+ Endpoint: { type: "builtInParams", name: "endpoint" },
10
+ Region: { type: "builtInParams", name: "region" },
11
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
12
+ };
13
+ }
14
+ constructor(input) {
15
+ super();
16
+ this.input = input;
17
+ }
18
+ resolveMiddleware(clientStack, configuration, options) {
19
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
20
+ this.middlewareStack.use(getEndpointPlugin(configuration, UpdateEc2DeepInspectionConfigurationCommand.getEndpointParameterInstructions()));
21
+ const stack = clientStack.concat(this.middlewareStack);
22
+ const { logger } = configuration;
23
+ const clientName = "Inspector2Client";
24
+ const commandName = "UpdateEc2DeepInspectionConfigurationCommand";
25
+ const handlerExecutionContext = {
26
+ logger,
27
+ clientName,
28
+ commandName,
29
+ inputFilterSensitiveLog: (_) => _,
30
+ outputFilterSensitiveLog: (_) => _,
31
+ };
32
+ const { requestHandler } = configuration;
33
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
34
+ }
35
+ serialize(input, context) {
36
+ return se_UpdateEc2DeepInspectionConfigurationCommand(input, context);
37
+ }
38
+ deserialize(output, context) {
39
+ return de_UpdateEc2DeepInspectionConfigurationCommand(output, context);
40
+ }
41
+ }
@@ -0,0 +1,41 @@
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 { de_UpdateOrgEc2DeepInspectionConfigurationCommand, se_UpdateOrgEc2DeepInspectionConfigurationCommand, } from "../protocols/Aws_restJson1";
5
+ export class UpdateOrgEc2DeepInspectionConfigurationCommand extends $Command {
6
+ static getEndpointParameterInstructions() {
7
+ return {
8
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
9
+ Endpoint: { type: "builtInParams", name: "endpoint" },
10
+ Region: { type: "builtInParams", name: "region" },
11
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
12
+ };
13
+ }
14
+ constructor(input) {
15
+ super();
16
+ this.input = input;
17
+ }
18
+ resolveMiddleware(clientStack, configuration, options) {
19
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
20
+ this.middlewareStack.use(getEndpointPlugin(configuration, UpdateOrgEc2DeepInspectionConfigurationCommand.getEndpointParameterInstructions()));
21
+ const stack = clientStack.concat(this.middlewareStack);
22
+ const { logger } = configuration;
23
+ const clientName = "Inspector2Client";
24
+ const commandName = "UpdateOrgEc2DeepInspectionConfigurationCommand";
25
+ const handlerExecutionContext = {
26
+ logger,
27
+ clientName,
28
+ commandName,
29
+ inputFilterSensitiveLog: (_) => _,
30
+ outputFilterSensitiveLog: (_) => _,
31
+ };
32
+ const { requestHandler } = configuration;
33
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
34
+ }
35
+ serialize(input, context) {
36
+ return se_UpdateOrgEc2DeepInspectionConfigurationCommand(input, context);
37
+ }
38
+ deserialize(output, context) {
39
+ return de_UpdateOrgEc2DeepInspectionConfigurationCommand(output, context);
40
+ }
41
+ }