@aws-sdk/client-securityhub 3.278.0 → 3.281.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 (140) hide show
  1. package/README.md +505 -17
  2. package/dist-cjs/SecurityHub.js +75 -0
  3. package/dist-cjs/commands/BatchGetSecurityControlsCommand.js +46 -0
  4. package/dist-cjs/commands/BatchGetStandardsControlAssociationsCommand.js +46 -0
  5. package/dist-cjs/commands/BatchUpdateStandardsControlAssociationsCommand.js +46 -0
  6. package/dist-cjs/commands/DeleteFindingAggregatorCommand.js +3 -3
  7. package/dist-cjs/commands/DeleteInsightCommand.js +3 -3
  8. package/dist-cjs/commands/DeleteInvitationsCommand.js +3 -3
  9. package/dist-cjs/commands/DeleteMembersCommand.js +3 -3
  10. package/dist-cjs/commands/DescribeActionTargetsCommand.js +3 -3
  11. package/dist-cjs/commands/DescribeHubCommand.js +3 -3
  12. package/dist-cjs/commands/DescribeOrganizationConfigurationCommand.js +3 -3
  13. package/dist-cjs/commands/DescribeProductsCommand.js +1 -2
  14. package/dist-cjs/commands/ListSecurityControlDefinitionsCommand.js +46 -0
  15. package/dist-cjs/commands/ListStandardsControlAssociationsCommand.js +46 -0
  16. package/dist-cjs/commands/index.js +5 -0
  17. package/dist-cjs/models/models_0.js +11 -10
  18. package/dist-cjs/models/models_1.js +81 -76
  19. package/dist-cjs/models/models_2.js +102 -9
  20. package/dist-cjs/pagination/ListSecurityControlDefinitionsPaginator.js +36 -0
  21. package/dist-cjs/pagination/ListStandardsControlAssociationsPaginator.js +36 -0
  22. package/dist-cjs/pagination/index.js +2 -0
  23. package/dist-cjs/protocols/Aws_restJson1.js +557 -3
  24. package/dist-es/SecurityHub.js +75 -0
  25. package/dist-es/commands/BatchGetSecurityControlsCommand.js +42 -0
  26. package/dist-es/commands/BatchGetStandardsControlAssociationsCommand.js +42 -0
  27. package/dist-es/commands/BatchUpdateStandardsControlAssociationsCommand.js +42 -0
  28. package/dist-es/commands/DeleteFindingAggregatorCommand.js +1 -1
  29. package/dist-es/commands/DeleteInsightCommand.js +1 -1
  30. package/dist-es/commands/DeleteInvitationsCommand.js +1 -1
  31. package/dist-es/commands/DeleteMembersCommand.js +1 -1
  32. package/dist-es/commands/DescribeActionTargetsCommand.js +1 -1
  33. package/dist-es/commands/DescribeHubCommand.js +1 -1
  34. package/dist-es/commands/DescribeOrganizationConfigurationCommand.js +1 -1
  35. package/dist-es/commands/DescribeProductsCommand.js +1 -2
  36. package/dist-es/commands/ListSecurityControlDefinitionsCommand.js +42 -0
  37. package/dist-es/commands/ListStandardsControlAssociationsCommand.js +42 -0
  38. package/dist-es/commands/index.js +5 -0
  39. package/dist-es/models/models_0.js +5 -3
  40. package/dist-es/models/models_1.js +57 -50
  41. package/dist-es/models/models_2.js +77 -7
  42. package/dist-es/pagination/ListSecurityControlDefinitionsPaginator.js +32 -0
  43. package/dist-es/pagination/ListStandardsControlAssociationsPaginator.js +32 -0
  44. package/dist-es/pagination/index.js +2 -0
  45. package/dist-es/protocols/Aws_restJson1.js +544 -0
  46. package/dist-types/SecurityHub.d.ts +59 -17
  47. package/dist-types/SecurityHubClient.d.ts +21 -19
  48. package/dist-types/commands/AcceptAdministratorInvitationCommand.d.ts +6 -0
  49. package/dist-types/commands/AcceptInvitationCommand.d.ts +6 -0
  50. package/dist-types/commands/BatchDisableStandardsCommand.d.ts +6 -0
  51. package/dist-types/commands/BatchEnableStandardsCommand.d.ts +6 -0
  52. package/dist-types/commands/BatchGetSecurityControlsCommand.d.ts +45 -0
  53. package/dist-types/commands/BatchGetStandardsControlAssociationsCommand.d.ts +45 -0
  54. package/dist-types/commands/BatchImportFindingsCommand.d.ts +6 -0
  55. package/dist-types/commands/BatchUpdateFindingsCommand.d.ts +6 -0
  56. package/dist-types/commands/BatchUpdateStandardsControlAssociationsCommand.d.ts +45 -0
  57. package/dist-types/commands/CreateActionTargetCommand.d.ts +6 -0
  58. package/dist-types/commands/CreateFindingAggregatorCommand.d.ts +6 -0
  59. package/dist-types/commands/CreateInsightCommand.d.ts +6 -0
  60. package/dist-types/commands/CreateMembersCommand.d.ts +6 -0
  61. package/dist-types/commands/DeclineInvitationsCommand.d.ts +6 -0
  62. package/dist-types/commands/DeleteActionTargetCommand.d.ts +6 -0
  63. package/dist-types/commands/DeleteFindingAggregatorCommand.d.ts +7 -1
  64. package/dist-types/commands/DeleteInsightCommand.d.ts +7 -1
  65. package/dist-types/commands/DeleteInvitationsCommand.d.ts +7 -1
  66. package/dist-types/commands/DeleteMembersCommand.d.ts +7 -1
  67. package/dist-types/commands/DescribeActionTargetsCommand.d.ts +7 -1
  68. package/dist-types/commands/DescribeHubCommand.d.ts +7 -1
  69. package/dist-types/commands/DescribeOrganizationConfigurationCommand.d.ts +7 -1
  70. package/dist-types/commands/DescribeProductsCommand.d.ts +7 -2
  71. package/dist-types/commands/DescribeStandardsCommand.d.ts +6 -0
  72. package/dist-types/commands/DescribeStandardsControlsCommand.d.ts +6 -0
  73. package/dist-types/commands/DisableImportFindingsForProductCommand.d.ts +6 -0
  74. package/dist-types/commands/DisableOrganizationAdminAccountCommand.d.ts +6 -0
  75. package/dist-types/commands/DisableSecurityHubCommand.d.ts +6 -0
  76. package/dist-types/commands/DisassociateFromAdministratorAccountCommand.d.ts +6 -0
  77. package/dist-types/commands/DisassociateFromMasterAccountCommand.d.ts +6 -0
  78. package/dist-types/commands/DisassociateMembersCommand.d.ts +6 -0
  79. package/dist-types/commands/EnableImportFindingsForProductCommand.d.ts +6 -0
  80. package/dist-types/commands/EnableOrganizationAdminAccountCommand.d.ts +6 -0
  81. package/dist-types/commands/EnableSecurityHubCommand.d.ts +6 -0
  82. package/dist-types/commands/GetAdministratorAccountCommand.d.ts +6 -0
  83. package/dist-types/commands/GetEnabledStandardsCommand.d.ts +6 -0
  84. package/dist-types/commands/GetFindingAggregatorCommand.d.ts +6 -0
  85. package/dist-types/commands/GetFindingsCommand.d.ts +6 -0
  86. package/dist-types/commands/GetInsightResultsCommand.d.ts +6 -0
  87. package/dist-types/commands/GetInsightsCommand.d.ts +6 -0
  88. package/dist-types/commands/GetInvitationsCountCommand.d.ts +6 -0
  89. package/dist-types/commands/GetMasterAccountCommand.d.ts +6 -0
  90. package/dist-types/commands/GetMembersCommand.d.ts +6 -0
  91. package/dist-types/commands/InviteMembersCommand.d.ts +6 -0
  92. package/dist-types/commands/ListEnabledProductsForImportCommand.d.ts +6 -0
  93. package/dist-types/commands/ListFindingAggregatorsCommand.d.ts +6 -0
  94. package/dist-types/commands/ListInvitationsCommand.d.ts +6 -0
  95. package/dist-types/commands/ListMembersCommand.d.ts +6 -0
  96. package/dist-types/commands/ListOrganizationAdminAccountsCommand.d.ts +6 -0
  97. package/dist-types/commands/ListSecurityControlDefinitionsCommand.d.ts +45 -0
  98. package/dist-types/commands/ListStandardsControlAssociationsCommand.d.ts +45 -0
  99. package/dist-types/commands/ListTagsForResourceCommand.d.ts +6 -0
  100. package/dist-types/commands/TagResourceCommand.d.ts +6 -0
  101. package/dist-types/commands/UntagResourceCommand.d.ts +6 -0
  102. package/dist-types/commands/UpdateActionTargetCommand.d.ts +6 -0
  103. package/dist-types/commands/UpdateFindingAggregatorCommand.d.ts +6 -0
  104. package/dist-types/commands/UpdateFindingsCommand.d.ts +6 -0
  105. package/dist-types/commands/UpdateInsightCommand.d.ts +6 -0
  106. package/dist-types/commands/UpdateOrganizationConfigurationCommand.d.ts +6 -0
  107. package/dist-types/commands/UpdateSecurityHubConfigurationCommand.d.ts +6 -0
  108. package/dist-types/commands/UpdateStandardsControlCommand.d.ts +6 -0
  109. package/dist-types/commands/index.d.ts +5 -0
  110. package/dist-types/models/models_0.d.ts +18 -25
  111. package/dist-types/models/models_1.d.ts +370 -260
  112. package/dist-types/models/models_2.d.ts +513 -8
  113. package/dist-types/pagination/ListSecurityControlDefinitionsPaginator.d.ts +4 -0
  114. package/dist-types/pagination/ListStandardsControlAssociationsPaginator.d.ts +4 -0
  115. package/dist-types/pagination/index.d.ts +2 -0
  116. package/dist-types/protocols/Aws_restJson1.d.ts +15 -0
  117. package/dist-types/ts3.4/SecurityHub.d.ts +97 -0
  118. package/dist-types/ts3.4/SecurityHubClient.d.ts +30 -0
  119. package/dist-types/ts3.4/commands/BatchGetSecurityControlsCommand.d.ts +41 -0
  120. package/dist-types/ts3.4/commands/BatchGetStandardsControlAssociationsCommand.d.ts +41 -0
  121. package/dist-types/ts3.4/commands/BatchUpdateStandardsControlAssociationsCommand.d.ts +41 -0
  122. package/dist-types/ts3.4/commands/DeleteFindingAggregatorCommand.d.ts +1 -1
  123. package/dist-types/ts3.4/commands/DeleteInsightCommand.d.ts +1 -1
  124. package/dist-types/ts3.4/commands/DeleteInvitationsCommand.d.ts +1 -1
  125. package/dist-types/ts3.4/commands/DeleteMembersCommand.d.ts +1 -1
  126. package/dist-types/ts3.4/commands/DescribeActionTargetsCommand.d.ts +1 -1
  127. package/dist-types/ts3.4/commands/DescribeHubCommand.d.ts +1 -1
  128. package/dist-types/ts3.4/commands/DescribeOrganizationConfigurationCommand.d.ts +1 -1
  129. package/dist-types/ts3.4/commands/DescribeProductsCommand.d.ts +4 -2
  130. package/dist-types/ts3.4/commands/ListSecurityControlDefinitionsCommand.d.ts +41 -0
  131. package/dist-types/ts3.4/commands/ListStandardsControlAssociationsCommand.d.ts +41 -0
  132. package/dist-types/ts3.4/commands/index.d.ts +5 -0
  133. package/dist-types/ts3.4/models/models_0.d.ts +4 -6
  134. package/dist-types/ts3.4/models/models_1.d.ts +137 -118
  135. package/dist-types/ts3.4/models/models_2.d.ts +184 -8
  136. package/dist-types/ts3.4/pagination/ListSecurityControlDefinitionsPaginator.d.ts +11 -0
  137. package/dist-types/ts3.4/pagination/ListStandardsControlAssociationsPaginator.d.ts +11 -0
  138. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  139. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +60 -0
  140. package/package.json +6 -6
@@ -89,6 +89,50 @@ export const serializeAws_restJson1BatchEnableStandardsCommand = async (input, c
89
89
  body,
90
90
  });
91
91
  };
92
+ export const serializeAws_restJson1BatchGetSecurityControlsCommand = async (input, context) => {
93
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
94
+ const headers = {
95
+ "content-type": "application/json",
96
+ };
97
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/securityControls/batchGet";
98
+ let body;
99
+ body = JSON.stringify({
100
+ ...(input.SecurityControlIds != null && {
101
+ SecurityControlIds: serializeAws_restJson1StringList(input.SecurityControlIds, context),
102
+ }),
103
+ });
104
+ return new __HttpRequest({
105
+ protocol,
106
+ hostname,
107
+ port,
108
+ method: "POST",
109
+ headers,
110
+ path: resolvedPath,
111
+ body,
112
+ });
113
+ };
114
+ export const serializeAws_restJson1BatchGetStandardsControlAssociationsCommand = async (input, context) => {
115
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
116
+ const headers = {
117
+ "content-type": "application/json",
118
+ };
119
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associations/batchGet";
120
+ let body;
121
+ body = JSON.stringify({
122
+ ...(input.StandardsControlAssociationIds != null && {
123
+ StandardsControlAssociationIds: serializeAws_restJson1StandardsControlAssociationIds(input.StandardsControlAssociationIds, context),
124
+ }),
125
+ });
126
+ return new __HttpRequest({
127
+ protocol,
128
+ hostname,
129
+ port,
130
+ method: "POST",
131
+ headers,
132
+ path: resolvedPath,
133
+ body,
134
+ });
135
+ };
92
136
  export const serializeAws_restJson1BatchImportFindingsCommand = async (input, context) => {
93
137
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
94
138
  const headers = {
@@ -146,6 +190,28 @@ export const serializeAws_restJson1BatchUpdateFindingsCommand = async (input, co
146
190
  body,
147
191
  });
148
192
  };
193
+ export const serializeAws_restJson1BatchUpdateStandardsControlAssociationsCommand = async (input, context) => {
194
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
195
+ const headers = {
196
+ "content-type": "application/json",
197
+ };
198
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associations";
199
+ let body;
200
+ body = JSON.stringify({
201
+ ...(input.StandardsControlAssociationUpdates != null && {
202
+ StandardsControlAssociationUpdates: serializeAws_restJson1StandardsControlAssociationUpdates(input.StandardsControlAssociationUpdates, context),
203
+ }),
204
+ });
205
+ return new __HttpRequest({
206
+ protocol,
207
+ hostname,
208
+ port,
209
+ method: "PATCH",
210
+ headers,
211
+ path: resolvedPath,
212
+ body,
213
+ });
214
+ };
149
215
  export const serializeAws_restJson1CreateActionTargetCommand = async (input, context) => {
150
216
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
151
217
  const headers = {
@@ -625,6 +691,7 @@ export const serializeAws_restJson1EnableSecurityHubCommand = async (input, cont
625
691
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts";
626
692
  let body;
627
693
  body = JSON.stringify({
694
+ ...(input.ControlFindingGenerator != null && { ControlFindingGenerator: input.ControlFindingGenerator }),
628
695
  ...(input.EnableDefaultStandards != null && { EnableDefaultStandards: input.EnableDefaultStandards }),
629
696
  ...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
630
697
  });
@@ -937,6 +1004,48 @@ export const serializeAws_restJson1ListOrganizationAdminAccountsCommand = async
937
1004
  body,
938
1005
  });
939
1006
  };
1007
+ export const serializeAws_restJson1ListSecurityControlDefinitionsCommand = async (input, context) => {
1008
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1009
+ const headers = {};
1010
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/securityControls/definitions";
1011
+ const query = map({
1012
+ StandardsArn: [, input.StandardsArn],
1013
+ NextToken: [, input.NextToken],
1014
+ MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
1015
+ });
1016
+ let body;
1017
+ return new __HttpRequest({
1018
+ protocol,
1019
+ hostname,
1020
+ port,
1021
+ method: "GET",
1022
+ headers,
1023
+ path: resolvedPath,
1024
+ query,
1025
+ body,
1026
+ });
1027
+ };
1028
+ export const serializeAws_restJson1ListStandardsControlAssociationsCommand = async (input, context) => {
1029
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1030
+ const headers = {};
1031
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associations";
1032
+ const query = map({
1033
+ SecurityControlId: [, __expectNonNull(input.SecurityControlId, `SecurityControlId`)],
1034
+ NextToken: [, input.NextToken],
1035
+ MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
1036
+ });
1037
+ let body;
1038
+ return new __HttpRequest({
1039
+ protocol,
1040
+ hostname,
1041
+ port,
1042
+ method: "GET",
1043
+ headers,
1044
+ path: resolvedPath,
1045
+ query,
1046
+ body,
1047
+ });
1048
+ };
940
1049
  export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
941
1050
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
942
1051
  const headers = {};
@@ -1116,6 +1225,7 @@ export const serializeAws_restJson1UpdateSecurityHubConfigurationCommand = async
1116
1225
  let body;
1117
1226
  body = JSON.stringify({
1118
1227
  ...(input.AutoEnableControls != null && { AutoEnableControls: input.AutoEnableControls }),
1228
+ ...(input.ControlFindingGenerator != null && { ControlFindingGenerator: input.ControlFindingGenerator }),
1119
1229
  });
1120
1230
  return new __HttpRequest({
1121
1231
  protocol,
@@ -1317,6 +1427,96 @@ const deserializeAws_restJson1BatchEnableStandardsCommandError = async (output,
1317
1427
  });
1318
1428
  }
1319
1429
  };
1430
+ export const deserializeAws_restJson1BatchGetSecurityControlsCommand = async (output, context) => {
1431
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1432
+ return deserializeAws_restJson1BatchGetSecurityControlsCommandError(output, context);
1433
+ }
1434
+ const contents = map({
1435
+ $metadata: deserializeMetadata(output),
1436
+ });
1437
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1438
+ if (data.SecurityControls != null) {
1439
+ contents.SecurityControls = deserializeAws_restJson1SecurityControls(data.SecurityControls, context);
1440
+ }
1441
+ if (data.UnprocessedIds != null) {
1442
+ contents.UnprocessedIds = deserializeAws_restJson1UnprocessedSecurityControls(data.UnprocessedIds, context);
1443
+ }
1444
+ return contents;
1445
+ };
1446
+ const deserializeAws_restJson1BatchGetSecurityControlsCommandError = async (output, context) => {
1447
+ const parsedOutput = {
1448
+ ...output,
1449
+ body: await parseErrorBody(output.body, context),
1450
+ };
1451
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1452
+ switch (errorCode) {
1453
+ case "InternalException":
1454
+ case "com.amazonaws.securityhub#InternalException":
1455
+ throw await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context);
1456
+ case "InvalidAccessException":
1457
+ case "com.amazonaws.securityhub#InvalidAccessException":
1458
+ throw await deserializeAws_restJson1InvalidAccessExceptionResponse(parsedOutput, context);
1459
+ case "InvalidInputException":
1460
+ case "com.amazonaws.securityhub#InvalidInputException":
1461
+ throw await deserializeAws_restJson1InvalidInputExceptionResponse(parsedOutput, context);
1462
+ case "LimitExceededException":
1463
+ case "com.amazonaws.securityhub#LimitExceededException":
1464
+ throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
1465
+ default:
1466
+ const parsedBody = parsedOutput.body;
1467
+ throwDefaultError({
1468
+ output,
1469
+ parsedBody,
1470
+ exceptionCtor: __BaseException,
1471
+ errorCode,
1472
+ });
1473
+ }
1474
+ };
1475
+ export const deserializeAws_restJson1BatchGetStandardsControlAssociationsCommand = async (output, context) => {
1476
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1477
+ return deserializeAws_restJson1BatchGetStandardsControlAssociationsCommandError(output, context);
1478
+ }
1479
+ const contents = map({
1480
+ $metadata: deserializeMetadata(output),
1481
+ });
1482
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1483
+ if (data.StandardsControlAssociationDetails != null) {
1484
+ contents.StandardsControlAssociationDetails = deserializeAws_restJson1StandardsControlAssociationDetails(data.StandardsControlAssociationDetails, context);
1485
+ }
1486
+ if (data.UnprocessedAssociations != null) {
1487
+ contents.UnprocessedAssociations = deserializeAws_restJson1UnprocessedStandardsControlAssociations(data.UnprocessedAssociations, context);
1488
+ }
1489
+ return contents;
1490
+ };
1491
+ const deserializeAws_restJson1BatchGetStandardsControlAssociationsCommandError = async (output, context) => {
1492
+ const parsedOutput = {
1493
+ ...output,
1494
+ body: await parseErrorBody(output.body, context),
1495
+ };
1496
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1497
+ switch (errorCode) {
1498
+ case "InternalException":
1499
+ case "com.amazonaws.securityhub#InternalException":
1500
+ throw await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context);
1501
+ case "InvalidAccessException":
1502
+ case "com.amazonaws.securityhub#InvalidAccessException":
1503
+ throw await deserializeAws_restJson1InvalidAccessExceptionResponse(parsedOutput, context);
1504
+ case "InvalidInputException":
1505
+ case "com.amazonaws.securityhub#InvalidInputException":
1506
+ throw await deserializeAws_restJson1InvalidInputExceptionResponse(parsedOutput, context);
1507
+ case "LimitExceededException":
1508
+ case "com.amazonaws.securityhub#LimitExceededException":
1509
+ throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
1510
+ default:
1511
+ const parsedBody = parsedOutput.body;
1512
+ throwDefaultError({
1513
+ output,
1514
+ parsedBody,
1515
+ exceptionCtor: __BaseException,
1516
+ errorCode,
1517
+ });
1518
+ }
1519
+ };
1320
1520
  export const deserializeAws_restJson1BatchImportFindingsCommand = async (output, context) => {
1321
1521
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1322
1522
  return deserializeAws_restJson1BatchImportFindingsCommandError(output, context);
@@ -1410,6 +1610,48 @@ const deserializeAws_restJson1BatchUpdateFindingsCommandError = async (output, c
1410
1610
  });
1411
1611
  }
1412
1612
  };
1613
+ export const deserializeAws_restJson1BatchUpdateStandardsControlAssociationsCommand = async (output, context) => {
1614
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1615
+ return deserializeAws_restJson1BatchUpdateStandardsControlAssociationsCommandError(output, context);
1616
+ }
1617
+ const contents = map({
1618
+ $metadata: deserializeMetadata(output),
1619
+ });
1620
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1621
+ if (data.UnprocessedAssociationUpdates != null) {
1622
+ contents.UnprocessedAssociationUpdates = deserializeAws_restJson1UnprocessedStandardsControlAssociationUpdates(data.UnprocessedAssociationUpdates, context);
1623
+ }
1624
+ return contents;
1625
+ };
1626
+ const deserializeAws_restJson1BatchUpdateStandardsControlAssociationsCommandError = async (output, context) => {
1627
+ const parsedOutput = {
1628
+ ...output,
1629
+ body: await parseErrorBody(output.body, context),
1630
+ };
1631
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1632
+ switch (errorCode) {
1633
+ case "InternalException":
1634
+ case "com.amazonaws.securityhub#InternalException":
1635
+ throw await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context);
1636
+ case "InvalidAccessException":
1637
+ case "com.amazonaws.securityhub#InvalidAccessException":
1638
+ throw await deserializeAws_restJson1InvalidAccessExceptionResponse(parsedOutput, context);
1639
+ case "InvalidInputException":
1640
+ case "com.amazonaws.securityhub#InvalidInputException":
1641
+ throw await deserializeAws_restJson1InvalidInputExceptionResponse(parsedOutput, context);
1642
+ case "LimitExceededException":
1643
+ case "com.amazonaws.securityhub#LimitExceededException":
1644
+ throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
1645
+ default:
1646
+ const parsedBody = parsedOutput.body;
1647
+ throwDefaultError({
1648
+ output,
1649
+ parsedBody,
1650
+ exceptionCtor: __BaseException,
1651
+ errorCode,
1652
+ });
1653
+ }
1654
+ };
1413
1655
  export const deserializeAws_restJson1CreateActionTargetCommand = async (output, context) => {
1414
1656
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1415
1657
  return deserializeAws_restJson1CreateActionTargetCommandError(output, context);
@@ -1919,6 +2161,9 @@ export const deserializeAws_restJson1DescribeHubCommand = async (output, context
1919
2161
  if (data.AutoEnableControls != null) {
1920
2162
  contents.AutoEnableControls = __expectBoolean(data.AutoEnableControls);
1921
2163
  }
2164
+ if (data.ControlFindingGenerator != null) {
2165
+ contents.ControlFindingGenerator = __expectString(data.ControlFindingGenerator);
2166
+ }
1922
2167
  if (data.HubArn != null) {
1923
2168
  contents.HubArn = __expectString(data.HubArn);
1924
2169
  }
@@ -3201,6 +3446,96 @@ const deserializeAws_restJson1ListOrganizationAdminAccountsCommandError = async
3201
3446
  });
3202
3447
  }
3203
3448
  };
3449
+ export const deserializeAws_restJson1ListSecurityControlDefinitionsCommand = async (output, context) => {
3450
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3451
+ return deserializeAws_restJson1ListSecurityControlDefinitionsCommandError(output, context);
3452
+ }
3453
+ const contents = map({
3454
+ $metadata: deserializeMetadata(output),
3455
+ });
3456
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3457
+ if (data.NextToken != null) {
3458
+ contents.NextToken = __expectString(data.NextToken);
3459
+ }
3460
+ if (data.SecurityControlDefinitions != null) {
3461
+ contents.SecurityControlDefinitions = deserializeAws_restJson1SecurityControlDefinitions(data.SecurityControlDefinitions, context);
3462
+ }
3463
+ return contents;
3464
+ };
3465
+ const deserializeAws_restJson1ListSecurityControlDefinitionsCommandError = async (output, context) => {
3466
+ const parsedOutput = {
3467
+ ...output,
3468
+ body: await parseErrorBody(output.body, context),
3469
+ };
3470
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3471
+ switch (errorCode) {
3472
+ case "InternalException":
3473
+ case "com.amazonaws.securityhub#InternalException":
3474
+ throw await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context);
3475
+ case "InvalidAccessException":
3476
+ case "com.amazonaws.securityhub#InvalidAccessException":
3477
+ throw await deserializeAws_restJson1InvalidAccessExceptionResponse(parsedOutput, context);
3478
+ case "InvalidInputException":
3479
+ case "com.amazonaws.securityhub#InvalidInputException":
3480
+ throw await deserializeAws_restJson1InvalidInputExceptionResponse(parsedOutput, context);
3481
+ case "LimitExceededException":
3482
+ case "com.amazonaws.securityhub#LimitExceededException":
3483
+ throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
3484
+ default:
3485
+ const parsedBody = parsedOutput.body;
3486
+ throwDefaultError({
3487
+ output,
3488
+ parsedBody,
3489
+ exceptionCtor: __BaseException,
3490
+ errorCode,
3491
+ });
3492
+ }
3493
+ };
3494
+ export const deserializeAws_restJson1ListStandardsControlAssociationsCommand = async (output, context) => {
3495
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3496
+ return deserializeAws_restJson1ListStandardsControlAssociationsCommandError(output, context);
3497
+ }
3498
+ const contents = map({
3499
+ $metadata: deserializeMetadata(output),
3500
+ });
3501
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3502
+ if (data.NextToken != null) {
3503
+ contents.NextToken = __expectString(data.NextToken);
3504
+ }
3505
+ if (data.StandardsControlAssociationSummaries != null) {
3506
+ contents.StandardsControlAssociationSummaries = deserializeAws_restJson1StandardsControlAssociationSummaries(data.StandardsControlAssociationSummaries, context);
3507
+ }
3508
+ return contents;
3509
+ };
3510
+ const deserializeAws_restJson1ListStandardsControlAssociationsCommandError = async (output, context) => {
3511
+ const parsedOutput = {
3512
+ ...output,
3513
+ body: await parseErrorBody(output.body, context),
3514
+ };
3515
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3516
+ switch (errorCode) {
3517
+ case "InternalException":
3518
+ case "com.amazonaws.securityhub#InternalException":
3519
+ throw await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context);
3520
+ case "InvalidAccessException":
3521
+ case "com.amazonaws.securityhub#InvalidAccessException":
3522
+ throw await deserializeAws_restJson1InvalidAccessExceptionResponse(parsedOutput, context);
3523
+ case "InvalidInputException":
3524
+ case "com.amazonaws.securityhub#InvalidInputException":
3525
+ throw await deserializeAws_restJson1InvalidInputExceptionResponse(parsedOutput, context);
3526
+ case "LimitExceededException":
3527
+ case "com.amazonaws.securityhub#LimitExceededException":
3528
+ throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
3529
+ default:
3530
+ const parsedBody = parsedOutput.body;
3531
+ throwDefaultError({
3532
+ output,
3533
+ parsedBody,
3534
+ exceptionCtor: __BaseException,
3535
+ errorCode,
3536
+ });
3537
+ }
3538
+ };
3204
3539
  export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
3205
3540
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3206
3541
  return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
@@ -11001,6 +11336,34 @@ const serializeAws_restJson1SortCriterion = (input, context) => {
11001
11336
  ...(input.SortOrder != null && { SortOrder: input.SortOrder }),
11002
11337
  };
11003
11338
  };
11339
+ const serializeAws_restJson1StandardsControlAssociationId = (input, context) => {
11340
+ return {
11341
+ ...(input.SecurityControlId != null && { SecurityControlId: input.SecurityControlId }),
11342
+ ...(input.StandardsArn != null && { StandardsArn: input.StandardsArn }),
11343
+ };
11344
+ };
11345
+ const serializeAws_restJson1StandardsControlAssociationIds = (input, context) => {
11346
+ return input
11347
+ .filter((e) => e != null)
11348
+ .map((entry) => {
11349
+ return serializeAws_restJson1StandardsControlAssociationId(entry, context);
11350
+ });
11351
+ };
11352
+ const serializeAws_restJson1StandardsControlAssociationUpdate = (input, context) => {
11353
+ return {
11354
+ ...(input.AssociationStatus != null && { AssociationStatus: input.AssociationStatus }),
11355
+ ...(input.SecurityControlId != null && { SecurityControlId: input.SecurityControlId }),
11356
+ ...(input.StandardsArn != null && { StandardsArn: input.StandardsArn }),
11357
+ ...(input.UpdatedReason != null && { UpdatedReason: input.UpdatedReason }),
11358
+ };
11359
+ };
11360
+ const serializeAws_restJson1StandardsControlAssociationUpdates = (input, context) => {
11361
+ return input
11362
+ .filter((e) => e != null)
11363
+ .map((entry) => {
11364
+ return serializeAws_restJson1StandardsControlAssociationUpdate(entry, context);
11365
+ });
11366
+ };
11004
11367
  const serializeAws_restJson1StandardsInputParameterMap = (input, context) => {
11005
11368
  return Object.entries(input).reduce((acc, [key, value]) => {
11006
11369
  if (value === null) {
@@ -19160,6 +19523,49 @@ const deserializeAws_restJson1RuleGroupVariablesPortSetsDetails = (output, conte
19160
19523
  Definition: output.Definition != null ? deserializeAws_restJson1NonEmptyStringList(output.Definition, context) : undefined,
19161
19524
  };
19162
19525
  };
19526
+ const deserializeAws_restJson1SecurityControl = (output, context) => {
19527
+ return {
19528
+ Description: __expectString(output.Description),
19529
+ RemediationUrl: __expectString(output.RemediationUrl),
19530
+ SecurityControlArn: __expectString(output.SecurityControlArn),
19531
+ SecurityControlId: __expectString(output.SecurityControlId),
19532
+ SecurityControlStatus: __expectString(output.SecurityControlStatus),
19533
+ SeverityRating: __expectString(output.SeverityRating),
19534
+ Title: __expectString(output.Title),
19535
+ };
19536
+ };
19537
+ const deserializeAws_restJson1SecurityControlDefinition = (output, context) => {
19538
+ return {
19539
+ CurrentRegionAvailability: __expectString(output.CurrentRegionAvailability),
19540
+ Description: __expectString(output.Description),
19541
+ RemediationUrl: __expectString(output.RemediationUrl),
19542
+ SecurityControlId: __expectString(output.SecurityControlId),
19543
+ SeverityRating: __expectString(output.SeverityRating),
19544
+ Title: __expectString(output.Title),
19545
+ };
19546
+ };
19547
+ const deserializeAws_restJson1SecurityControlDefinitions = (output, context) => {
19548
+ const retVal = (output || [])
19549
+ .filter((e) => e != null)
19550
+ .map((entry) => {
19551
+ if (entry === null) {
19552
+ return null;
19553
+ }
19554
+ return deserializeAws_restJson1SecurityControlDefinition(entry, context);
19555
+ });
19556
+ return retVal;
19557
+ };
19558
+ const deserializeAws_restJson1SecurityControls = (output, context) => {
19559
+ const retVal = (output || [])
19560
+ .filter((e) => e != null)
19561
+ .map((entry) => {
19562
+ if (entry === null) {
19563
+ return null;
19564
+ }
19565
+ return deserializeAws_restJson1SecurityControl(entry, context);
19566
+ });
19567
+ return retVal;
19568
+ };
19163
19569
  const deserializeAws_restJson1SecurityGroups = (output, context) => {
19164
19570
  const retVal = (output || [])
19165
19571
  .filter((e) => e != null)
@@ -19283,6 +19689,86 @@ const deserializeAws_restJson1StandardsControl = (output, context) => {
19283
19689
  Title: __expectString(output.Title),
19284
19690
  };
19285
19691
  };
19692
+ const deserializeAws_restJson1StandardsControlArnList = (output, context) => {
19693
+ const retVal = (output || [])
19694
+ .filter((e) => e != null)
19695
+ .map((entry) => {
19696
+ if (entry === null) {
19697
+ return null;
19698
+ }
19699
+ return __expectString(entry);
19700
+ });
19701
+ return retVal;
19702
+ };
19703
+ const deserializeAws_restJson1StandardsControlAssociationDetail = (output, context) => {
19704
+ return {
19705
+ AssociationStatus: __expectString(output.AssociationStatus),
19706
+ RelatedRequirements: output.RelatedRequirements != null
19707
+ ? deserializeAws_restJson1RelatedRequirementsList(output.RelatedRequirements, context)
19708
+ : undefined,
19709
+ SecurityControlArn: __expectString(output.SecurityControlArn),
19710
+ SecurityControlId: __expectString(output.SecurityControlId),
19711
+ StandardsArn: __expectString(output.StandardsArn),
19712
+ StandardsControlArns: output.StandardsControlArns != null
19713
+ ? deserializeAws_restJson1StandardsControlArnList(output.StandardsControlArns, context)
19714
+ : undefined,
19715
+ StandardsControlDescription: __expectString(output.StandardsControlDescription),
19716
+ StandardsControlTitle: __expectString(output.StandardsControlTitle),
19717
+ UpdatedAt: output.UpdatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedAt)) : undefined,
19718
+ UpdatedReason: __expectString(output.UpdatedReason),
19719
+ };
19720
+ };
19721
+ const deserializeAws_restJson1StandardsControlAssociationDetails = (output, context) => {
19722
+ const retVal = (output || [])
19723
+ .filter((e) => e != null)
19724
+ .map((entry) => {
19725
+ if (entry === null) {
19726
+ return null;
19727
+ }
19728
+ return deserializeAws_restJson1StandardsControlAssociationDetail(entry, context);
19729
+ });
19730
+ return retVal;
19731
+ };
19732
+ const deserializeAws_restJson1StandardsControlAssociationId = (output, context) => {
19733
+ return {
19734
+ SecurityControlId: __expectString(output.SecurityControlId),
19735
+ StandardsArn: __expectString(output.StandardsArn),
19736
+ };
19737
+ };
19738
+ const deserializeAws_restJson1StandardsControlAssociationSummaries = (output, context) => {
19739
+ const retVal = (output || [])
19740
+ .filter((e) => e != null)
19741
+ .map((entry) => {
19742
+ if (entry === null) {
19743
+ return null;
19744
+ }
19745
+ return deserializeAws_restJson1StandardsControlAssociationSummary(entry, context);
19746
+ });
19747
+ return retVal;
19748
+ };
19749
+ const deserializeAws_restJson1StandardsControlAssociationSummary = (output, context) => {
19750
+ return {
19751
+ AssociationStatus: __expectString(output.AssociationStatus),
19752
+ RelatedRequirements: output.RelatedRequirements != null
19753
+ ? deserializeAws_restJson1RelatedRequirementsList(output.RelatedRequirements, context)
19754
+ : undefined,
19755
+ SecurityControlArn: __expectString(output.SecurityControlArn),
19756
+ SecurityControlId: __expectString(output.SecurityControlId),
19757
+ StandardsArn: __expectString(output.StandardsArn),
19758
+ StandardsControlDescription: __expectString(output.StandardsControlDescription),
19759
+ StandardsControlTitle: __expectString(output.StandardsControlTitle),
19760
+ UpdatedAt: output.UpdatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedAt)) : undefined,
19761
+ UpdatedReason: __expectString(output.UpdatedReason),
19762
+ };
19763
+ };
19764
+ const deserializeAws_restJson1StandardsControlAssociationUpdate = (output, context) => {
19765
+ return {
19766
+ AssociationStatus: __expectString(output.AssociationStatus),
19767
+ SecurityControlId: __expectString(output.SecurityControlId),
19768
+ StandardsArn: __expectString(output.StandardsArn),
19769
+ UpdatedReason: __expectString(output.UpdatedReason),
19770
+ };
19771
+ };
19286
19772
  const deserializeAws_restJson1StandardsControls = (output, context) => {
19287
19773
  const retVal = (output || [])
19288
19774
  .filter((e) => e != null)
@@ -19473,6 +19959,64 @@ const deserializeAws_restJson1TypeList = (output, context) => {
19473
19959
  });
19474
19960
  return retVal;
19475
19961
  };
19962
+ const deserializeAws_restJson1UnprocessedSecurityControl = (output, context) => {
19963
+ return {
19964
+ ErrorCode: __expectString(output.ErrorCode),
19965
+ ErrorReason: __expectString(output.ErrorReason),
19966
+ SecurityControlId: __expectString(output.SecurityControlId),
19967
+ };
19968
+ };
19969
+ const deserializeAws_restJson1UnprocessedSecurityControls = (output, context) => {
19970
+ const retVal = (output || [])
19971
+ .filter((e) => e != null)
19972
+ .map((entry) => {
19973
+ if (entry === null) {
19974
+ return null;
19975
+ }
19976
+ return deserializeAws_restJson1UnprocessedSecurityControl(entry, context);
19977
+ });
19978
+ return retVal;
19979
+ };
19980
+ const deserializeAws_restJson1UnprocessedStandardsControlAssociation = (output, context) => {
19981
+ return {
19982
+ ErrorCode: __expectString(output.ErrorCode),
19983
+ ErrorReason: __expectString(output.ErrorReason),
19984
+ StandardsControlAssociationId: output.StandardsControlAssociationId != null
19985
+ ? deserializeAws_restJson1StandardsControlAssociationId(output.StandardsControlAssociationId, context)
19986
+ : undefined,
19987
+ };
19988
+ };
19989
+ const deserializeAws_restJson1UnprocessedStandardsControlAssociations = (output, context) => {
19990
+ const retVal = (output || [])
19991
+ .filter((e) => e != null)
19992
+ .map((entry) => {
19993
+ if (entry === null) {
19994
+ return null;
19995
+ }
19996
+ return deserializeAws_restJson1UnprocessedStandardsControlAssociation(entry, context);
19997
+ });
19998
+ return retVal;
19999
+ };
20000
+ const deserializeAws_restJson1UnprocessedStandardsControlAssociationUpdate = (output, context) => {
20001
+ return {
20002
+ ErrorCode: __expectString(output.ErrorCode),
20003
+ ErrorReason: __expectString(output.ErrorReason),
20004
+ StandardsControlAssociationUpdate: output.StandardsControlAssociationUpdate != null
20005
+ ? deserializeAws_restJson1StandardsControlAssociationUpdate(output.StandardsControlAssociationUpdate, context)
20006
+ : undefined,
20007
+ };
20008
+ };
20009
+ const deserializeAws_restJson1UnprocessedStandardsControlAssociationUpdates = (output, context) => {
20010
+ const retVal = (output || [])
20011
+ .filter((e) => e != null)
20012
+ .map((entry) => {
20013
+ if (entry === null) {
20014
+ return null;
20015
+ }
20016
+ return deserializeAws_restJson1UnprocessedStandardsControlAssociationUpdate(entry, context);
20017
+ });
20018
+ return retVal;
20019
+ };
19476
20020
  const deserializeAws_restJson1VolumeMount = (output, context) => {
19477
20021
  return {
19478
20022
  MountPath: __expectString(output.MountPath),