@aws-sdk/client-inspector2 3.353.0 → 3.357.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.
- package/README.md +56 -0
- package/dist-cjs/Inspector2.js +14 -0
- package/dist-cjs/commands/BatchGetCodeSnippetCommand.js +46 -0
- package/dist-cjs/commands/CancelSbomExportCommand.js +46 -0
- package/dist-cjs/commands/CreateSbomExportCommand.js +46 -0
- package/dist-cjs/commands/GetEncryptionKeyCommand.js +46 -0
- package/dist-cjs/commands/GetSbomExportCommand.js +46 -0
- package/dist-cjs/commands/ResetEncryptionKeyCommand.js +46 -0
- package/dist-cjs/commands/UpdateEncryptionKeyCommand.js +46 -0
- package/dist-cjs/commands/index.js +7 -0
- package/dist-cjs/models/models_0.js +28 -2
- package/dist-cjs/protocols/Aws_restJson1.js +492 -13
- package/dist-es/Inspector2.js +14 -0
- package/dist-es/commands/BatchGetCodeSnippetCommand.js +42 -0
- package/dist-es/commands/CancelSbomExportCommand.js +42 -0
- package/dist-es/commands/CreateSbomExportCommand.js +42 -0
- package/dist-es/commands/GetEncryptionKeyCommand.js +42 -0
- package/dist-es/commands/GetSbomExportCommand.js +42 -0
- package/dist-es/commands/ResetEncryptionKeyCommand.js +42 -0
- package/dist-es/commands/UpdateEncryptionKeyCommand.js +42 -0
- package/dist-es/commands/index.js +7 -0
- package/dist-es/models/models_0.js +26 -0
- package/dist-es/protocols/Aws_restJson1.js +472 -7
- package/dist-types/Inspector2.d.ts +49 -0
- package/dist-types/Inspector2Client.d.ts +10 -3
- package/dist-types/commands/BatchGetAccountStatusCommand.d.ts +6 -0
- package/dist-types/commands/BatchGetCodeSnippetCommand.d.ts +113 -0
- package/dist-types/commands/CancelSbomExportCommand.d.ts +89 -0
- package/dist-types/commands/CreateFilterCommand.d.ts +9 -0
- package/dist-types/commands/CreateFindingsReportCommand.d.ts +9 -0
- package/dist-types/commands/CreateSbomExportCommand.d.ts +141 -0
- package/dist-types/commands/DescribeOrganizationConfigurationCommand.d.ts +1 -0
- package/dist-types/commands/DisableCommand.d.ts +2 -0
- package/dist-types/commands/EnableCommand.d.ts +2 -0
- package/dist-types/commands/GetEncryptionKeyCommand.d.ts +90 -0
- package/dist-types/commands/GetFindingsReportStatusCommand.d.ts +9 -0
- package/dist-types/commands/GetSbomExportCommand.d.ts +145 -0
- package/dist-types/commands/ListFiltersCommand.d.ts +9 -0
- package/dist-types/commands/ListFindingAggregationsCommand.d.ts +1 -0
- package/dist-types/commands/ListFindingsCommand.d.ts +33 -0
- package/dist-types/commands/ResetEncryptionKeyCommand.d.ts +88 -0
- package/dist-types/commands/UpdateEncryptionKeyCommand.d.ts +89 -0
- package/dist-types/commands/UpdateFilterCommand.d.ts +9 -0
- package/dist-types/commands/UpdateOrganizationConfigurationCommand.d.ts +2 -0
- package/dist-types/commands/index.d.ts +7 -0
- package/dist-types/models/models_0.d.ts +485 -1
- package/dist-types/protocols/Aws_restJson1.d.ts +63 -0
- package/dist-types/ts3.4/Inspector2.d.ts +119 -0
- package/dist-types/ts3.4/Inspector2Client.d.ts +42 -0
- package/dist-types/ts3.4/commands/BatchGetCodeSnippetCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/CancelSbomExportCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/CreateSbomExportCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetEncryptionKeyCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetSbomExportCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ResetEncryptionKeyCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/UpdateEncryptionKeyCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/index.d.ts +7 -0
- package/dist-types/ts3.4/models/models_0.d.ts +153 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +84 -0
- package/package.json +28 -28
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@aws-sdk/smithy-client";
|
|
1
|
+
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@aws-sdk/smithy-client";
|
|
2
2
|
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
3
3
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
4
4
|
import { Inspector2ServiceException as __BaseException } from "../models/Inspector2ServiceException";
|
|
@@ -43,6 +43,26 @@ export const se_BatchGetAccountStatusCommand = async (input, context) => {
|
|
|
43
43
|
body,
|
|
44
44
|
});
|
|
45
45
|
};
|
|
46
|
+
export const se_BatchGetCodeSnippetCommand = async (input, context) => {
|
|
47
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
48
|
+
const headers = {
|
|
49
|
+
"content-type": "application/json",
|
|
50
|
+
};
|
|
51
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/codesnippet/batchget";
|
|
52
|
+
let body;
|
|
53
|
+
body = JSON.stringify(take(input, {
|
|
54
|
+
findingArns: (_) => _json(_),
|
|
55
|
+
}));
|
|
56
|
+
return new __HttpRequest({
|
|
57
|
+
protocol,
|
|
58
|
+
hostname,
|
|
59
|
+
port,
|
|
60
|
+
method: "POST",
|
|
61
|
+
headers,
|
|
62
|
+
path: resolvedPath,
|
|
63
|
+
body,
|
|
64
|
+
});
|
|
65
|
+
};
|
|
46
66
|
export const se_BatchGetFreeTrialInfoCommand = async (input, context) => {
|
|
47
67
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
48
68
|
const headers = {
|
|
@@ -124,6 +144,26 @@ export const se_CancelFindingsReportCommand = async (input, context) => {
|
|
|
124
144
|
body,
|
|
125
145
|
});
|
|
126
146
|
};
|
|
147
|
+
export const se_CancelSbomExportCommand = async (input, context) => {
|
|
148
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
149
|
+
const headers = {
|
|
150
|
+
"content-type": "application/json",
|
|
151
|
+
};
|
|
152
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sbomexport/cancel";
|
|
153
|
+
let body;
|
|
154
|
+
body = JSON.stringify(take(input, {
|
|
155
|
+
reportId: [],
|
|
156
|
+
}));
|
|
157
|
+
return new __HttpRequest({
|
|
158
|
+
protocol,
|
|
159
|
+
hostname,
|
|
160
|
+
port,
|
|
161
|
+
method: "POST",
|
|
162
|
+
headers,
|
|
163
|
+
path: resolvedPath,
|
|
164
|
+
body,
|
|
165
|
+
});
|
|
166
|
+
};
|
|
127
167
|
export const se_CreateFilterCommand = async (input, context) => {
|
|
128
168
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
129
169
|
const headers = {
|
|
@@ -171,6 +211,28 @@ export const se_CreateFindingsReportCommand = async (input, context) => {
|
|
|
171
211
|
body,
|
|
172
212
|
});
|
|
173
213
|
};
|
|
214
|
+
export const se_CreateSbomExportCommand = async (input, context) => {
|
|
215
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
216
|
+
const headers = {
|
|
217
|
+
"content-type": "application/json",
|
|
218
|
+
};
|
|
219
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sbomexport/create";
|
|
220
|
+
let body;
|
|
221
|
+
body = JSON.stringify(take(input, {
|
|
222
|
+
reportFormat: [],
|
|
223
|
+
resourceFilterCriteria: (_) => _json(_),
|
|
224
|
+
s3Destination: (_) => _json(_),
|
|
225
|
+
}));
|
|
226
|
+
return new __HttpRequest({
|
|
227
|
+
protocol,
|
|
228
|
+
hostname,
|
|
229
|
+
port,
|
|
230
|
+
method: "POST",
|
|
231
|
+
headers,
|
|
232
|
+
path: resolvedPath,
|
|
233
|
+
body,
|
|
234
|
+
});
|
|
235
|
+
};
|
|
174
236
|
export const se_DeleteFilterCommand = async (input, context) => {
|
|
175
237
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
176
238
|
const headers = {
|
|
@@ -367,6 +429,26 @@ export const se_GetEc2DeepInspectionConfigurationCommand = async (input, context
|
|
|
367
429
|
body,
|
|
368
430
|
});
|
|
369
431
|
};
|
|
432
|
+
export const se_GetEncryptionKeyCommand = async (input, context) => {
|
|
433
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
434
|
+
const headers = {};
|
|
435
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/encryptionkey/get";
|
|
436
|
+
const query = map({
|
|
437
|
+
scanType: [, __expectNonNull(input.scanType, `scanType`)],
|
|
438
|
+
resourceType: [, __expectNonNull(input.resourceType, `resourceType`)],
|
|
439
|
+
});
|
|
440
|
+
let body;
|
|
441
|
+
return new __HttpRequest({
|
|
442
|
+
protocol,
|
|
443
|
+
hostname,
|
|
444
|
+
port,
|
|
445
|
+
method: "GET",
|
|
446
|
+
headers,
|
|
447
|
+
path: resolvedPath,
|
|
448
|
+
query,
|
|
449
|
+
body,
|
|
450
|
+
});
|
|
451
|
+
};
|
|
370
452
|
export const se_GetFindingsReportStatusCommand = async (input, context) => {
|
|
371
453
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
372
454
|
const headers = {
|
|
@@ -407,6 +489,26 @@ export const se_GetMemberCommand = async (input, context) => {
|
|
|
407
489
|
body,
|
|
408
490
|
});
|
|
409
491
|
};
|
|
492
|
+
export const se_GetSbomExportCommand = async (input, context) => {
|
|
493
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
494
|
+
const headers = {
|
|
495
|
+
"content-type": "application/json",
|
|
496
|
+
};
|
|
497
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sbomexport/get";
|
|
498
|
+
let body;
|
|
499
|
+
body = JSON.stringify(take(input, {
|
|
500
|
+
reportId: [],
|
|
501
|
+
}));
|
|
502
|
+
return new __HttpRequest({
|
|
503
|
+
protocol,
|
|
504
|
+
hostname,
|
|
505
|
+
port,
|
|
506
|
+
method: "POST",
|
|
507
|
+
headers,
|
|
508
|
+
path: resolvedPath,
|
|
509
|
+
body,
|
|
510
|
+
});
|
|
511
|
+
};
|
|
410
512
|
export const se_ListAccountPermissionsCommand = async (input, context) => {
|
|
411
513
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
412
514
|
const headers = {
|
|
@@ -624,6 +726,27 @@ export const se_ListUsageTotalsCommand = async (input, context) => {
|
|
|
624
726
|
body,
|
|
625
727
|
});
|
|
626
728
|
};
|
|
729
|
+
export const se_ResetEncryptionKeyCommand = async (input, context) => {
|
|
730
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
731
|
+
const headers = {
|
|
732
|
+
"content-type": "application/json",
|
|
733
|
+
};
|
|
734
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/encryptionkey/reset";
|
|
735
|
+
let body;
|
|
736
|
+
body = JSON.stringify(take(input, {
|
|
737
|
+
resourceType: [],
|
|
738
|
+
scanType: [],
|
|
739
|
+
}));
|
|
740
|
+
return new __HttpRequest({
|
|
741
|
+
protocol,
|
|
742
|
+
hostname,
|
|
743
|
+
port,
|
|
744
|
+
method: "PUT",
|
|
745
|
+
headers,
|
|
746
|
+
path: resolvedPath,
|
|
747
|
+
body,
|
|
748
|
+
});
|
|
749
|
+
};
|
|
627
750
|
export const se_SearchVulnerabilitiesCommand = async (input, context) => {
|
|
628
751
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
629
752
|
const headers = {
|
|
@@ -730,6 +853,28 @@ export const se_UpdateEc2DeepInspectionConfigurationCommand = async (input, cont
|
|
|
730
853
|
body,
|
|
731
854
|
});
|
|
732
855
|
};
|
|
856
|
+
export const se_UpdateEncryptionKeyCommand = async (input, context) => {
|
|
857
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
858
|
+
const headers = {
|
|
859
|
+
"content-type": "application/json",
|
|
860
|
+
};
|
|
861
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/encryptionkey/update";
|
|
862
|
+
let body;
|
|
863
|
+
body = JSON.stringify(take(input, {
|
|
864
|
+
kmsKeyId: [],
|
|
865
|
+
resourceType: [],
|
|
866
|
+
scanType: [],
|
|
867
|
+
}));
|
|
868
|
+
return new __HttpRequest({
|
|
869
|
+
protocol,
|
|
870
|
+
hostname,
|
|
871
|
+
port,
|
|
872
|
+
method: "PUT",
|
|
873
|
+
headers,
|
|
874
|
+
path: resolvedPath,
|
|
875
|
+
body,
|
|
876
|
+
});
|
|
877
|
+
};
|
|
733
878
|
export const se_UpdateFilterCommand = async (input, context) => {
|
|
734
879
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
735
880
|
const headers = {
|
|
@@ -884,6 +1029,49 @@ const de_BatchGetAccountStatusCommandError = async (output, context) => {
|
|
|
884
1029
|
});
|
|
885
1030
|
}
|
|
886
1031
|
};
|
|
1032
|
+
export const de_BatchGetCodeSnippetCommand = async (output, context) => {
|
|
1033
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1034
|
+
return de_BatchGetCodeSnippetCommandError(output, context);
|
|
1035
|
+
}
|
|
1036
|
+
const contents = map({
|
|
1037
|
+
$metadata: deserializeMetadata(output),
|
|
1038
|
+
});
|
|
1039
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1040
|
+
const doc = take(data, {
|
|
1041
|
+
codeSnippetResults: _json,
|
|
1042
|
+
errors: _json,
|
|
1043
|
+
});
|
|
1044
|
+
Object.assign(contents, doc);
|
|
1045
|
+
return contents;
|
|
1046
|
+
};
|
|
1047
|
+
const de_BatchGetCodeSnippetCommandError = async (output, context) => {
|
|
1048
|
+
const parsedOutput = {
|
|
1049
|
+
...output,
|
|
1050
|
+
body: await parseErrorBody(output.body, context),
|
|
1051
|
+
};
|
|
1052
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1053
|
+
switch (errorCode) {
|
|
1054
|
+
case "AccessDeniedException":
|
|
1055
|
+
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
1056
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1057
|
+
case "InternalServerException":
|
|
1058
|
+
case "com.amazonaws.inspector2#InternalServerException":
|
|
1059
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1060
|
+
case "ThrottlingException":
|
|
1061
|
+
case "com.amazonaws.inspector2#ThrottlingException":
|
|
1062
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1063
|
+
case "ValidationException":
|
|
1064
|
+
case "com.amazonaws.inspector2#ValidationException":
|
|
1065
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1066
|
+
default:
|
|
1067
|
+
const parsedBody = parsedOutput.body;
|
|
1068
|
+
return throwDefaultError({
|
|
1069
|
+
output,
|
|
1070
|
+
parsedBody,
|
|
1071
|
+
errorCode,
|
|
1072
|
+
});
|
|
1073
|
+
}
|
|
1074
|
+
};
|
|
887
1075
|
export const de_BatchGetFreeTrialInfoCommand = async (output, context) => {
|
|
888
1076
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
889
1077
|
return de_BatchGetFreeTrialInfoCommandError(output, context);
|
|
@@ -1058,6 +1246,51 @@ const de_CancelFindingsReportCommandError = async (output, context) => {
|
|
|
1058
1246
|
});
|
|
1059
1247
|
}
|
|
1060
1248
|
};
|
|
1249
|
+
export const de_CancelSbomExportCommand = async (output, context) => {
|
|
1250
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1251
|
+
return de_CancelSbomExportCommandError(output, context);
|
|
1252
|
+
}
|
|
1253
|
+
const contents = map({
|
|
1254
|
+
$metadata: deserializeMetadata(output),
|
|
1255
|
+
});
|
|
1256
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1257
|
+
const doc = take(data, {
|
|
1258
|
+
reportId: __expectString,
|
|
1259
|
+
});
|
|
1260
|
+
Object.assign(contents, doc);
|
|
1261
|
+
return contents;
|
|
1262
|
+
};
|
|
1263
|
+
const de_CancelSbomExportCommandError = async (output, context) => {
|
|
1264
|
+
const parsedOutput = {
|
|
1265
|
+
...output,
|
|
1266
|
+
body: await parseErrorBody(output.body, context),
|
|
1267
|
+
};
|
|
1268
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1269
|
+
switch (errorCode) {
|
|
1270
|
+
case "AccessDeniedException":
|
|
1271
|
+
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
1272
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1273
|
+
case "InternalServerException":
|
|
1274
|
+
case "com.amazonaws.inspector2#InternalServerException":
|
|
1275
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1276
|
+
case "ResourceNotFoundException":
|
|
1277
|
+
case "com.amazonaws.inspector2#ResourceNotFoundException":
|
|
1278
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1279
|
+
case "ThrottlingException":
|
|
1280
|
+
case "com.amazonaws.inspector2#ThrottlingException":
|
|
1281
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1282
|
+
case "ValidationException":
|
|
1283
|
+
case "com.amazonaws.inspector2#ValidationException":
|
|
1284
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1285
|
+
default:
|
|
1286
|
+
const parsedBody = parsedOutput.body;
|
|
1287
|
+
return throwDefaultError({
|
|
1288
|
+
output,
|
|
1289
|
+
parsedBody,
|
|
1290
|
+
errorCode,
|
|
1291
|
+
});
|
|
1292
|
+
}
|
|
1293
|
+
};
|
|
1061
1294
|
export const de_CreateFilterCommand = async (output, context) => {
|
|
1062
1295
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1063
1296
|
return de_CreateFilterCommandError(output, context);
|
|
@@ -1151,6 +1384,51 @@ const de_CreateFindingsReportCommandError = async (output, context) => {
|
|
|
1151
1384
|
});
|
|
1152
1385
|
}
|
|
1153
1386
|
};
|
|
1387
|
+
export const de_CreateSbomExportCommand = async (output, context) => {
|
|
1388
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1389
|
+
return de_CreateSbomExportCommandError(output, context);
|
|
1390
|
+
}
|
|
1391
|
+
const contents = map({
|
|
1392
|
+
$metadata: deserializeMetadata(output),
|
|
1393
|
+
});
|
|
1394
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1395
|
+
const doc = take(data, {
|
|
1396
|
+
reportId: __expectString,
|
|
1397
|
+
});
|
|
1398
|
+
Object.assign(contents, doc);
|
|
1399
|
+
return contents;
|
|
1400
|
+
};
|
|
1401
|
+
const de_CreateSbomExportCommandError = async (output, context) => {
|
|
1402
|
+
const parsedOutput = {
|
|
1403
|
+
...output,
|
|
1404
|
+
body: await parseErrorBody(output.body, context),
|
|
1405
|
+
};
|
|
1406
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1407
|
+
switch (errorCode) {
|
|
1408
|
+
case "AccessDeniedException":
|
|
1409
|
+
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
1410
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1411
|
+
case "InternalServerException":
|
|
1412
|
+
case "com.amazonaws.inspector2#InternalServerException":
|
|
1413
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1414
|
+
case "ResourceNotFoundException":
|
|
1415
|
+
case "com.amazonaws.inspector2#ResourceNotFoundException":
|
|
1416
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1417
|
+
case "ThrottlingException":
|
|
1418
|
+
case "com.amazonaws.inspector2#ThrottlingException":
|
|
1419
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1420
|
+
case "ValidationException":
|
|
1421
|
+
case "com.amazonaws.inspector2#ValidationException":
|
|
1422
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1423
|
+
default:
|
|
1424
|
+
const parsedBody = parsedOutput.body;
|
|
1425
|
+
return throwDefaultError({
|
|
1426
|
+
output,
|
|
1427
|
+
parsedBody,
|
|
1428
|
+
errorCode,
|
|
1429
|
+
});
|
|
1430
|
+
}
|
|
1431
|
+
};
|
|
1154
1432
|
export const de_DeleteFilterCommand = async (output, context) => {
|
|
1155
1433
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1156
1434
|
return de_DeleteFilterCommandError(output, context);
|
|
@@ -1598,6 +1876,51 @@ const de_GetEc2DeepInspectionConfigurationCommandError = async (output, context)
|
|
|
1598
1876
|
});
|
|
1599
1877
|
}
|
|
1600
1878
|
};
|
|
1879
|
+
export const de_GetEncryptionKeyCommand = async (output, context) => {
|
|
1880
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1881
|
+
return de_GetEncryptionKeyCommandError(output, context);
|
|
1882
|
+
}
|
|
1883
|
+
const contents = map({
|
|
1884
|
+
$metadata: deserializeMetadata(output),
|
|
1885
|
+
});
|
|
1886
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1887
|
+
const doc = take(data, {
|
|
1888
|
+
kmsKeyId: __expectString,
|
|
1889
|
+
});
|
|
1890
|
+
Object.assign(contents, doc);
|
|
1891
|
+
return contents;
|
|
1892
|
+
};
|
|
1893
|
+
const de_GetEncryptionKeyCommandError = async (output, context) => {
|
|
1894
|
+
const parsedOutput = {
|
|
1895
|
+
...output,
|
|
1896
|
+
body: await parseErrorBody(output.body, context),
|
|
1897
|
+
};
|
|
1898
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1899
|
+
switch (errorCode) {
|
|
1900
|
+
case "AccessDeniedException":
|
|
1901
|
+
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
1902
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1903
|
+
case "InternalServerException":
|
|
1904
|
+
case "com.amazonaws.inspector2#InternalServerException":
|
|
1905
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1906
|
+
case "ResourceNotFoundException":
|
|
1907
|
+
case "com.amazonaws.inspector2#ResourceNotFoundException":
|
|
1908
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1909
|
+
case "ThrottlingException":
|
|
1910
|
+
case "com.amazonaws.inspector2#ThrottlingException":
|
|
1911
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1912
|
+
case "ValidationException":
|
|
1913
|
+
case "com.amazonaws.inspector2#ValidationException":
|
|
1914
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1915
|
+
default:
|
|
1916
|
+
const parsedBody = parsedOutput.body;
|
|
1917
|
+
return throwDefaultError({
|
|
1918
|
+
output,
|
|
1919
|
+
parsedBody,
|
|
1920
|
+
errorCode,
|
|
1921
|
+
});
|
|
1922
|
+
}
|
|
1923
|
+
};
|
|
1601
1924
|
export const de_GetFindingsReportStatusCommand = async (output, context) => {
|
|
1602
1925
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1603
1926
|
return de_GetFindingsReportStatusCommandError(output, context);
|
|
@@ -1693,6 +2016,57 @@ const de_GetMemberCommandError = async (output, context) => {
|
|
|
1693
2016
|
});
|
|
1694
2017
|
}
|
|
1695
2018
|
};
|
|
2019
|
+
export const de_GetSbomExportCommand = async (output, context) => {
|
|
2020
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2021
|
+
return de_GetSbomExportCommandError(output, context);
|
|
2022
|
+
}
|
|
2023
|
+
const contents = map({
|
|
2024
|
+
$metadata: deserializeMetadata(output),
|
|
2025
|
+
});
|
|
2026
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2027
|
+
const doc = take(data, {
|
|
2028
|
+
errorCode: __expectString,
|
|
2029
|
+
errorMessage: __expectString,
|
|
2030
|
+
filterCriteria: _json,
|
|
2031
|
+
format: __expectString,
|
|
2032
|
+
reportId: __expectString,
|
|
2033
|
+
s3Destination: _json,
|
|
2034
|
+
status: __expectString,
|
|
2035
|
+
});
|
|
2036
|
+
Object.assign(contents, doc);
|
|
2037
|
+
return contents;
|
|
2038
|
+
};
|
|
2039
|
+
const de_GetSbomExportCommandError = async (output, context) => {
|
|
2040
|
+
const parsedOutput = {
|
|
2041
|
+
...output,
|
|
2042
|
+
body: await parseErrorBody(output.body, context),
|
|
2043
|
+
};
|
|
2044
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2045
|
+
switch (errorCode) {
|
|
2046
|
+
case "AccessDeniedException":
|
|
2047
|
+
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
2048
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2049
|
+
case "InternalServerException":
|
|
2050
|
+
case "com.amazonaws.inspector2#InternalServerException":
|
|
2051
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2052
|
+
case "ResourceNotFoundException":
|
|
2053
|
+
case "com.amazonaws.inspector2#ResourceNotFoundException":
|
|
2054
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2055
|
+
case "ThrottlingException":
|
|
2056
|
+
case "com.amazonaws.inspector2#ThrottlingException":
|
|
2057
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2058
|
+
case "ValidationException":
|
|
2059
|
+
case "com.amazonaws.inspector2#ValidationException":
|
|
2060
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2061
|
+
default:
|
|
2062
|
+
const parsedBody = parsedOutput.body;
|
|
2063
|
+
return throwDefaultError({
|
|
2064
|
+
output,
|
|
2065
|
+
parsedBody,
|
|
2066
|
+
errorCode,
|
|
2067
|
+
});
|
|
2068
|
+
}
|
|
2069
|
+
};
|
|
1696
2070
|
export const de_ListAccountPermissionsCommand = async (output, context) => {
|
|
1697
2071
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1698
2072
|
return de_ListAccountPermissionsCommandError(output, context);
|
|
@@ -2112,6 +2486,47 @@ const de_ListUsageTotalsCommandError = async (output, context) => {
|
|
|
2112
2486
|
});
|
|
2113
2487
|
}
|
|
2114
2488
|
};
|
|
2489
|
+
export const de_ResetEncryptionKeyCommand = async (output, context) => {
|
|
2490
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2491
|
+
return de_ResetEncryptionKeyCommandError(output, context);
|
|
2492
|
+
}
|
|
2493
|
+
const contents = map({
|
|
2494
|
+
$metadata: deserializeMetadata(output),
|
|
2495
|
+
});
|
|
2496
|
+
await collectBody(output.body, context);
|
|
2497
|
+
return contents;
|
|
2498
|
+
};
|
|
2499
|
+
const de_ResetEncryptionKeyCommandError = async (output, context) => {
|
|
2500
|
+
const parsedOutput = {
|
|
2501
|
+
...output,
|
|
2502
|
+
body: await parseErrorBody(output.body, context),
|
|
2503
|
+
};
|
|
2504
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2505
|
+
switch (errorCode) {
|
|
2506
|
+
case "AccessDeniedException":
|
|
2507
|
+
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
2508
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2509
|
+
case "InternalServerException":
|
|
2510
|
+
case "com.amazonaws.inspector2#InternalServerException":
|
|
2511
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2512
|
+
case "ResourceNotFoundException":
|
|
2513
|
+
case "com.amazonaws.inspector2#ResourceNotFoundException":
|
|
2514
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2515
|
+
case "ThrottlingException":
|
|
2516
|
+
case "com.amazonaws.inspector2#ThrottlingException":
|
|
2517
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2518
|
+
case "ValidationException":
|
|
2519
|
+
case "com.amazonaws.inspector2#ValidationException":
|
|
2520
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2521
|
+
default:
|
|
2522
|
+
const parsedBody = parsedOutput.body;
|
|
2523
|
+
return throwDefaultError({
|
|
2524
|
+
output,
|
|
2525
|
+
parsedBody,
|
|
2526
|
+
errorCode,
|
|
2527
|
+
});
|
|
2528
|
+
}
|
|
2529
|
+
};
|
|
2115
2530
|
export const de_SearchVulnerabilitiesCommand = async (output, context) => {
|
|
2116
2531
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2117
2532
|
return de_SearchVulnerabilitiesCommandError(output, context);
|
|
@@ -2317,6 +2732,47 @@ const de_UpdateEc2DeepInspectionConfigurationCommandError = async (output, conte
|
|
|
2317
2732
|
});
|
|
2318
2733
|
}
|
|
2319
2734
|
};
|
|
2735
|
+
export const de_UpdateEncryptionKeyCommand = async (output, context) => {
|
|
2736
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2737
|
+
return de_UpdateEncryptionKeyCommandError(output, context);
|
|
2738
|
+
}
|
|
2739
|
+
const contents = map({
|
|
2740
|
+
$metadata: deserializeMetadata(output),
|
|
2741
|
+
});
|
|
2742
|
+
await collectBody(output.body, context);
|
|
2743
|
+
return contents;
|
|
2744
|
+
};
|
|
2745
|
+
const de_UpdateEncryptionKeyCommandError = async (output, context) => {
|
|
2746
|
+
const parsedOutput = {
|
|
2747
|
+
...output,
|
|
2748
|
+
body: await parseErrorBody(output.body, context),
|
|
2749
|
+
};
|
|
2750
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2751
|
+
switch (errorCode) {
|
|
2752
|
+
case "AccessDeniedException":
|
|
2753
|
+
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
2754
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2755
|
+
case "InternalServerException":
|
|
2756
|
+
case "com.amazonaws.inspector2#InternalServerException":
|
|
2757
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2758
|
+
case "ResourceNotFoundException":
|
|
2759
|
+
case "com.amazonaws.inspector2#ResourceNotFoundException":
|
|
2760
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2761
|
+
case "ThrottlingException":
|
|
2762
|
+
case "com.amazonaws.inspector2#ThrottlingException":
|
|
2763
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2764
|
+
case "ValidationException":
|
|
2765
|
+
case "com.amazonaws.inspector2#ValidationException":
|
|
2766
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2767
|
+
default:
|
|
2768
|
+
const parsedBody = parsedOutput.body;
|
|
2769
|
+
return throwDefaultError({
|
|
2770
|
+
output,
|
|
2771
|
+
parsedBody,
|
|
2772
|
+
errorCode,
|
|
2773
|
+
});
|
|
2774
|
+
}
|
|
2775
|
+
};
|
|
2320
2776
|
export const de_UpdateFilterCommand = async (output, context) => {
|
|
2321
2777
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2322
2778
|
return de_UpdateFilterCommandError(output, context);
|
|
@@ -2608,6 +3064,9 @@ const se_DateFilterList = (input, context) => {
|
|
|
2608
3064
|
const se_FilterCriteria = (input, context) => {
|
|
2609
3065
|
return take(input, {
|
|
2610
3066
|
awsAccountId: _json,
|
|
3067
|
+
codeVulnerabilityDetectorName: _json,
|
|
3068
|
+
codeVulnerabilityDetectorTags: _json,
|
|
3069
|
+
codeVulnerabilityFilePath: _json,
|
|
2611
3070
|
componentId: _json,
|
|
2612
3071
|
componentType: _json,
|
|
2613
3072
|
ec2InstanceImageId: _json,
|
|
@@ -2619,6 +3078,7 @@ const se_FilterCriteria = (input, context) => {
|
|
|
2619
3078
|
ecrImageRegistry: _json,
|
|
2620
3079
|
ecrImageRepositoryName: _json,
|
|
2621
3080
|
ecrImageTags: _json,
|
|
3081
|
+
epssScore: (_) => se_NumberFilterList(_, context),
|
|
2622
3082
|
exploitAvailable: _json,
|
|
2623
3083
|
findingArn: _json,
|
|
2624
3084
|
findingStatus: _json,
|
|
@@ -2887,6 +3347,11 @@ const de_Epss = (output, context) => {
|
|
|
2887
3347
|
score: __limitedParseDouble,
|
|
2888
3348
|
});
|
|
2889
3349
|
};
|
|
3350
|
+
const de_EpssDetails = (output, context) => {
|
|
3351
|
+
return take(output, {
|
|
3352
|
+
score: __limitedParseDouble,
|
|
3353
|
+
});
|
|
3354
|
+
};
|
|
2890
3355
|
const de_ExploitabilityDetails = (output, context) => {
|
|
2891
3356
|
return take(output, {
|
|
2892
3357
|
lastKnownExploitAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
@@ -2915,6 +3380,9 @@ const de_Filter = (output, context) => {
|
|
|
2915
3380
|
const de_FilterCriteria = (output, context) => {
|
|
2916
3381
|
return take(output, {
|
|
2917
3382
|
awsAccountId: _json,
|
|
3383
|
+
codeVulnerabilityDetectorName: _json,
|
|
3384
|
+
codeVulnerabilityDetectorTags: _json,
|
|
3385
|
+
codeVulnerabilityFilePath: _json,
|
|
2918
3386
|
componentId: _json,
|
|
2919
3387
|
componentType: _json,
|
|
2920
3388
|
ec2InstanceImageId: _json,
|
|
@@ -2926,6 +3394,7 @@ const de_FilterCriteria = (output, context) => {
|
|
|
2926
3394
|
ecrImageRegistry: _json,
|
|
2927
3395
|
ecrImageRepositoryName: _json,
|
|
2928
3396
|
ecrImageTags: _json,
|
|
3397
|
+
epssScore: (_) => de_NumberFilterList(_, context),
|
|
2929
3398
|
exploitAvailable: _json,
|
|
2930
3399
|
findingArn: _json,
|
|
2931
3400
|
findingStatus: _json,
|
|
@@ -2965,7 +3434,9 @@ const de_FilterList = (output, context) => {
|
|
|
2965
3434
|
const de_Finding = (output, context) => {
|
|
2966
3435
|
return take(output, {
|
|
2967
3436
|
awsAccountId: __expectString,
|
|
3437
|
+
codeVulnerabilityDetails: _json,
|
|
2968
3438
|
description: __expectString,
|
|
3439
|
+
epss: (_) => de_EpssDetails(_, context),
|
|
2969
3440
|
exploitAvailable: __expectString,
|
|
2970
3441
|
exploitabilityDetails: (_) => de_ExploitabilityDetails(_, context),
|
|
2971
3442
|
findingArn: __expectString,
|
|
@@ -3192,12 +3663,6 @@ const deserializeMetadata = (output) => ({
|
|
|
3192
3663
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
3193
3664
|
cfId: output.headers["x-amz-cf-id"],
|
|
3194
3665
|
});
|
|
3195
|
-
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
3196
|
-
if (streamBody instanceof Uint8Array) {
|
|
3197
|
-
return Promise.resolve(streamBody);
|
|
3198
|
-
}
|
|
3199
|
-
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
3200
|
-
};
|
|
3201
3666
|
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
3202
3667
|
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
3203
3668
|
value !== null &&
|