@aws-sdk/client-accessanalyzer 3.454.0 → 3.458.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 +84 -37
- package/dist-cjs/AccessAnalyzer.js +8 -0
- package/dist-cjs/commands/CheckAccessNotGrantedCommand.js +52 -0
- package/dist-cjs/commands/CheckNoNewAccessCommand.js +52 -0
- package/dist-cjs/commands/GetFindingV2Command.js +51 -0
- package/dist-cjs/commands/ListFindingsV2Command.js +51 -0
- package/dist-cjs/commands/index.js +4 -0
- package/dist-cjs/models/models_0.js +83 -1
- package/dist-cjs/pagination/GetFindingV2Paginator.js +29 -0
- package/dist-cjs/pagination/ListFindingsV2Paginator.js +29 -0
- package/dist-cjs/pagination/index.js +2 -0
- package/dist-cjs/protocols/Aws_restJson1.js +426 -2
- package/dist-es/AccessAnalyzer.js +8 -0
- package/dist-es/commands/CheckAccessNotGrantedCommand.js +48 -0
- package/dist-es/commands/CheckNoNewAccessCommand.js +48 -0
- package/dist-es/commands/GetFindingV2Command.js +47 -0
- package/dist-es/commands/ListFindingsV2Command.js +47 -0
- package/dist-es/commands/index.js +4 -0
- package/dist-es/models/models_0.js +78 -0
- package/dist-es/pagination/GetFindingV2Paginator.js +25 -0
- package/dist-es/pagination/ListFindingsV2Paginator.js +25 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +417 -1
- package/dist-types/AccessAnalyzer.d.ts +52 -9
- package/dist-types/AccessAnalyzerClient.d.ts +30 -11
- package/dist-types/commands/CheckAccessNotGrantedCommand.d.ts +107 -0
- package/dist-types/commands/CheckNoNewAccessCommand.d.ts +106 -0
- package/dist-types/commands/CreateAnalyzerCommand.d.ts +5 -0
- package/dist-types/commands/GetAnalyzerCommand.d.ts +5 -0
- package/dist-types/commands/GetFindingV2Command.d.ts +146 -0
- package/dist-types/commands/ListAnalyzersCommand.d.ts +5 -0
- package/dist-types/commands/ListFindingsV2Command.d.ts +123 -0
- package/dist-types/commands/index.d.ts +4 -0
- package/dist-types/index.d.ts +24 -9
- package/dist-types/models/models_0.d.ts +705 -11
- package/dist-types/pagination/GetFindingV2Paginator.d.ts +7 -0
- package/dist-types/pagination/ListFindingsV2Paginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +36 -0
- package/dist-types/ts3.4/AccessAnalyzer.d.ts +68 -0
- package/dist-types/ts3.4/AccessAnalyzerClient.d.ts +24 -0
- package/dist-types/ts3.4/commands/CheckAccessNotGrantedCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/CheckNoNewAccessCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetFindingV2Command.d.ts +35 -0
- package/dist-types/ts3.4/commands/ListFindingsV2Command.d.ts +38 -0
- package/dist-types/ts3.4/commands/index.d.ts +4 -0
- package/dist-types/ts3.4/models/models_0.d.ts +238 -1
- package/dist-types/ts3.4/pagination/GetFindingV2Paginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListFindingsV2Paginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +48 -0
- package/package.json +3 -3
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.de_ValidatePolicyCommand = exports.de_UpdateFindingsCommand = exports.de_UpdateArchiveRuleCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartResourceScanCommand = void 0;
|
|
3
|
+
exports.de_ListAccessPreviewsCommand = exports.de_ListAccessPreviewFindingsCommand = exports.de_GetGeneratedPolicyCommand = exports.de_GetFindingV2Command = exports.de_GetFindingCommand = exports.de_GetArchiveRuleCommand = exports.de_GetAnalyzerCommand = exports.de_GetAnalyzedResourceCommand = exports.de_GetAccessPreviewCommand = exports.de_DeleteArchiveRuleCommand = exports.de_DeleteAnalyzerCommand = exports.de_CreateArchiveRuleCommand = exports.de_CreateAnalyzerCommand = exports.de_CreateAccessPreviewCommand = exports.de_CheckNoNewAccessCommand = exports.de_CheckAccessNotGrantedCommand = exports.de_CancelPolicyGenerationCommand = exports.de_ApplyArchiveRuleCommand = exports.se_ValidatePolicyCommand = exports.se_UpdateFindingsCommand = exports.se_UpdateArchiveRuleCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StartResourceScanCommand = exports.se_StartPolicyGenerationCommand = exports.se_ListTagsForResourceCommand = exports.se_ListPolicyGenerationsCommand = exports.se_ListFindingsV2Command = exports.se_ListFindingsCommand = exports.se_ListArchiveRulesCommand = exports.se_ListAnalyzersCommand = exports.se_ListAnalyzedResourcesCommand = exports.se_ListAccessPreviewsCommand = exports.se_ListAccessPreviewFindingsCommand = exports.se_GetGeneratedPolicyCommand = exports.se_GetFindingV2Command = exports.se_GetFindingCommand = exports.se_GetArchiveRuleCommand = exports.se_GetAnalyzerCommand = exports.se_GetAnalyzedResourceCommand = exports.se_GetAccessPreviewCommand = exports.se_DeleteArchiveRuleCommand = exports.se_DeleteAnalyzerCommand = exports.se_CreateArchiveRuleCommand = exports.se_CreateAnalyzerCommand = exports.se_CreateAccessPreviewCommand = exports.se_CheckNoNewAccessCommand = exports.se_CheckAccessNotGrantedCommand = exports.se_CancelPolicyGenerationCommand = exports.se_ApplyArchiveRuleCommand = void 0;
|
|
4
|
+
exports.de_ValidatePolicyCommand = exports.de_UpdateFindingsCommand = exports.de_UpdateArchiveRuleCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartResourceScanCommand = exports.de_StartPolicyGenerationCommand = exports.de_ListTagsForResourceCommand = exports.de_ListPolicyGenerationsCommand = exports.de_ListFindingsV2Command = exports.de_ListFindingsCommand = exports.de_ListArchiveRulesCommand = exports.de_ListAnalyzersCommand = exports.de_ListAnalyzedResourcesCommand = void 0;
|
|
5
|
+
const core_1 = require("@aws-sdk/core");
|
|
5
6
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
7
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
8
|
const uuid_1 = require("uuid");
|
|
@@ -47,6 +48,52 @@ const se_CancelPolicyGenerationCommand = async (input, context) => {
|
|
|
47
48
|
});
|
|
48
49
|
};
|
|
49
50
|
exports.se_CancelPolicyGenerationCommand = se_CancelPolicyGenerationCommand;
|
|
51
|
+
const se_CheckAccessNotGrantedCommand = async (input, context) => {
|
|
52
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
53
|
+
const headers = {
|
|
54
|
+
"content-type": "application/json",
|
|
55
|
+
};
|
|
56
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policy/check-access-not-granted";
|
|
57
|
+
let body;
|
|
58
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
59
|
+
access: (_) => (0, smithy_client_1._json)(_),
|
|
60
|
+
policyDocument: [],
|
|
61
|
+
policyType: [],
|
|
62
|
+
}));
|
|
63
|
+
return new protocol_http_1.HttpRequest({
|
|
64
|
+
protocol,
|
|
65
|
+
hostname,
|
|
66
|
+
port,
|
|
67
|
+
method: "POST",
|
|
68
|
+
headers,
|
|
69
|
+
path: resolvedPath,
|
|
70
|
+
body,
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
exports.se_CheckAccessNotGrantedCommand = se_CheckAccessNotGrantedCommand;
|
|
74
|
+
const se_CheckNoNewAccessCommand = async (input, context) => {
|
|
75
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
76
|
+
const headers = {
|
|
77
|
+
"content-type": "application/json",
|
|
78
|
+
};
|
|
79
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policy/check-no-new-access";
|
|
80
|
+
let body;
|
|
81
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
82
|
+
existingPolicyDocument: [],
|
|
83
|
+
newPolicyDocument: [],
|
|
84
|
+
policyType: [],
|
|
85
|
+
}));
|
|
86
|
+
return new protocol_http_1.HttpRequest({
|
|
87
|
+
protocol,
|
|
88
|
+
hostname,
|
|
89
|
+
port,
|
|
90
|
+
method: "POST",
|
|
91
|
+
headers,
|
|
92
|
+
path: resolvedPath,
|
|
93
|
+
body,
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
exports.se_CheckNoNewAccessCommand = se_CheckNoNewAccessCommand;
|
|
50
97
|
const se_CreateAccessPreviewCommand = async (input, context) => {
|
|
51
98
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
52
99
|
const headers = {
|
|
@@ -81,6 +128,7 @@ const se_CreateAnalyzerCommand = async (input, context) => {
|
|
|
81
128
|
analyzerName: [],
|
|
82
129
|
archiveRules: (_) => (0, smithy_client_1._json)(_),
|
|
83
130
|
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
131
|
+
configuration: (_) => (0, smithy_client_1._json)(_),
|
|
84
132
|
tags: (_) => (0, smithy_client_1._json)(_),
|
|
85
133
|
type: [],
|
|
86
134
|
}));
|
|
@@ -262,6 +310,29 @@ const se_GetFindingCommand = async (input, context) => {
|
|
|
262
310
|
});
|
|
263
311
|
};
|
|
264
312
|
exports.se_GetFindingCommand = se_GetFindingCommand;
|
|
313
|
+
const se_GetFindingV2Command = async (input, context) => {
|
|
314
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
315
|
+
const headers = {};
|
|
316
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findingv2/{id}";
|
|
317
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
318
|
+
const query = (0, smithy_client_1.map)({
|
|
319
|
+
analyzerArn: [, (0, smithy_client_1.expectNonNull)(input.analyzerArn, `analyzerArn`)],
|
|
320
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
321
|
+
nextToken: [, input.nextToken],
|
|
322
|
+
});
|
|
323
|
+
let body;
|
|
324
|
+
return new protocol_http_1.HttpRequest({
|
|
325
|
+
protocol,
|
|
326
|
+
hostname,
|
|
327
|
+
port,
|
|
328
|
+
method: "GET",
|
|
329
|
+
headers,
|
|
330
|
+
path: resolvedPath,
|
|
331
|
+
query,
|
|
332
|
+
body,
|
|
333
|
+
});
|
|
334
|
+
};
|
|
335
|
+
exports.se_GetFindingV2Command = se_GetFindingV2Command;
|
|
265
336
|
const se_GetGeneratedPolicyCommand = async (input, context) => {
|
|
266
337
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
267
338
|
const headers = {};
|
|
@@ -430,6 +501,31 @@ const se_ListFindingsCommand = async (input, context) => {
|
|
|
430
501
|
});
|
|
431
502
|
};
|
|
432
503
|
exports.se_ListFindingsCommand = se_ListFindingsCommand;
|
|
504
|
+
const se_ListFindingsV2Command = async (input, context) => {
|
|
505
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
506
|
+
const headers = {
|
|
507
|
+
"content-type": "application/json",
|
|
508
|
+
};
|
|
509
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findingv2";
|
|
510
|
+
let body;
|
|
511
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
512
|
+
analyzerArn: [],
|
|
513
|
+
filter: (_) => (0, smithy_client_1._json)(_),
|
|
514
|
+
maxResults: [],
|
|
515
|
+
nextToken: [],
|
|
516
|
+
sort: (_) => (0, smithy_client_1._json)(_),
|
|
517
|
+
}));
|
|
518
|
+
return new protocol_http_1.HttpRequest({
|
|
519
|
+
protocol,
|
|
520
|
+
hostname,
|
|
521
|
+
port,
|
|
522
|
+
method: "POST",
|
|
523
|
+
headers,
|
|
524
|
+
path: resolvedPath,
|
|
525
|
+
body,
|
|
526
|
+
});
|
|
527
|
+
};
|
|
528
|
+
exports.se_ListFindingsV2Command = se_ListFindingsV2Command;
|
|
433
529
|
const se_ListPolicyGenerationsCommand = async (input, context) => {
|
|
434
530
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
435
531
|
const headers = {};
|
|
@@ -721,6 +817,108 @@ const de_CancelPolicyGenerationCommandError = async (output, context) => {
|
|
|
721
817
|
});
|
|
722
818
|
}
|
|
723
819
|
};
|
|
820
|
+
const de_CheckAccessNotGrantedCommand = async (output, context) => {
|
|
821
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
822
|
+
return de_CheckAccessNotGrantedCommandError(output, context);
|
|
823
|
+
}
|
|
824
|
+
const contents = (0, smithy_client_1.map)({
|
|
825
|
+
$metadata: deserializeMetadata(output),
|
|
826
|
+
});
|
|
827
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
828
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
829
|
+
message: smithy_client_1.expectString,
|
|
830
|
+
reasons: smithy_client_1._json,
|
|
831
|
+
result: smithy_client_1.expectString,
|
|
832
|
+
});
|
|
833
|
+
Object.assign(contents, doc);
|
|
834
|
+
return contents;
|
|
835
|
+
};
|
|
836
|
+
exports.de_CheckAccessNotGrantedCommand = de_CheckAccessNotGrantedCommand;
|
|
837
|
+
const de_CheckAccessNotGrantedCommandError = async (output, context) => {
|
|
838
|
+
const parsedOutput = {
|
|
839
|
+
...output,
|
|
840
|
+
body: await parseErrorBody(output.body, context),
|
|
841
|
+
};
|
|
842
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
843
|
+
switch (errorCode) {
|
|
844
|
+
case "AccessDeniedException":
|
|
845
|
+
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
846
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
847
|
+
case "InternalServerException":
|
|
848
|
+
case "com.amazonaws.accessanalyzer#InternalServerException":
|
|
849
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
850
|
+
case "InvalidParameterException":
|
|
851
|
+
case "com.amazonaws.accessanalyzer#InvalidParameterException":
|
|
852
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
853
|
+
case "ThrottlingException":
|
|
854
|
+
case "com.amazonaws.accessanalyzer#ThrottlingException":
|
|
855
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
856
|
+
case "UnprocessableEntityException":
|
|
857
|
+
case "com.amazonaws.accessanalyzer#UnprocessableEntityException":
|
|
858
|
+
throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
|
|
859
|
+
case "ValidationException":
|
|
860
|
+
case "com.amazonaws.accessanalyzer#ValidationException":
|
|
861
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
862
|
+
default:
|
|
863
|
+
const parsedBody = parsedOutput.body;
|
|
864
|
+
return throwDefaultError({
|
|
865
|
+
output,
|
|
866
|
+
parsedBody,
|
|
867
|
+
errorCode,
|
|
868
|
+
});
|
|
869
|
+
}
|
|
870
|
+
};
|
|
871
|
+
const de_CheckNoNewAccessCommand = async (output, context) => {
|
|
872
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
873
|
+
return de_CheckNoNewAccessCommandError(output, context);
|
|
874
|
+
}
|
|
875
|
+
const contents = (0, smithy_client_1.map)({
|
|
876
|
+
$metadata: deserializeMetadata(output),
|
|
877
|
+
});
|
|
878
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
879
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
880
|
+
message: smithy_client_1.expectString,
|
|
881
|
+
reasons: smithy_client_1._json,
|
|
882
|
+
result: smithy_client_1.expectString,
|
|
883
|
+
});
|
|
884
|
+
Object.assign(contents, doc);
|
|
885
|
+
return contents;
|
|
886
|
+
};
|
|
887
|
+
exports.de_CheckNoNewAccessCommand = de_CheckNoNewAccessCommand;
|
|
888
|
+
const de_CheckNoNewAccessCommandError = async (output, context) => {
|
|
889
|
+
const parsedOutput = {
|
|
890
|
+
...output,
|
|
891
|
+
body: await parseErrorBody(output.body, context),
|
|
892
|
+
};
|
|
893
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
894
|
+
switch (errorCode) {
|
|
895
|
+
case "AccessDeniedException":
|
|
896
|
+
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
897
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
898
|
+
case "InternalServerException":
|
|
899
|
+
case "com.amazonaws.accessanalyzer#InternalServerException":
|
|
900
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
901
|
+
case "InvalidParameterException":
|
|
902
|
+
case "com.amazonaws.accessanalyzer#InvalidParameterException":
|
|
903
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
904
|
+
case "ThrottlingException":
|
|
905
|
+
case "com.amazonaws.accessanalyzer#ThrottlingException":
|
|
906
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
907
|
+
case "UnprocessableEntityException":
|
|
908
|
+
case "com.amazonaws.accessanalyzer#UnprocessableEntityException":
|
|
909
|
+
throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
|
|
910
|
+
case "ValidationException":
|
|
911
|
+
case "com.amazonaws.accessanalyzer#ValidationException":
|
|
912
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
913
|
+
default:
|
|
914
|
+
const parsedBody = parsedOutput.body;
|
|
915
|
+
return throwDefaultError({
|
|
916
|
+
output,
|
|
917
|
+
parsedBody,
|
|
918
|
+
errorCode,
|
|
919
|
+
});
|
|
920
|
+
}
|
|
921
|
+
};
|
|
724
922
|
const de_CreateAccessPreviewCommand = async (output, context) => {
|
|
725
923
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
726
924
|
return de_CreateAccessPreviewCommandError(output, context);
|
|
@@ -1184,6 +1382,63 @@ const de_GetFindingCommandError = async (output, context) => {
|
|
|
1184
1382
|
});
|
|
1185
1383
|
}
|
|
1186
1384
|
};
|
|
1385
|
+
const de_GetFindingV2Command = async (output, context) => {
|
|
1386
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1387
|
+
return de_GetFindingV2CommandError(output, context);
|
|
1388
|
+
}
|
|
1389
|
+
const contents = (0, smithy_client_1.map)({
|
|
1390
|
+
$metadata: deserializeMetadata(output),
|
|
1391
|
+
});
|
|
1392
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1393
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1394
|
+
analyzedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1395
|
+
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1396
|
+
error: smithy_client_1.expectString,
|
|
1397
|
+
findingDetails: (_) => de_FindingDetailsList(_, context),
|
|
1398
|
+
findingType: smithy_client_1.expectString,
|
|
1399
|
+
id: smithy_client_1.expectString,
|
|
1400
|
+
nextToken: smithy_client_1.expectString,
|
|
1401
|
+
resource: smithy_client_1.expectString,
|
|
1402
|
+
resourceOwnerAccount: smithy_client_1.expectString,
|
|
1403
|
+
resourceType: smithy_client_1.expectString,
|
|
1404
|
+
status: smithy_client_1.expectString,
|
|
1405
|
+
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1406
|
+
});
|
|
1407
|
+
Object.assign(contents, doc);
|
|
1408
|
+
return contents;
|
|
1409
|
+
};
|
|
1410
|
+
exports.de_GetFindingV2Command = de_GetFindingV2Command;
|
|
1411
|
+
const de_GetFindingV2CommandError = async (output, context) => {
|
|
1412
|
+
const parsedOutput = {
|
|
1413
|
+
...output,
|
|
1414
|
+
body: await parseErrorBody(output.body, context),
|
|
1415
|
+
};
|
|
1416
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1417
|
+
switch (errorCode) {
|
|
1418
|
+
case "AccessDeniedException":
|
|
1419
|
+
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
1420
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1421
|
+
case "InternalServerException":
|
|
1422
|
+
case "com.amazonaws.accessanalyzer#InternalServerException":
|
|
1423
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1424
|
+
case "ResourceNotFoundException":
|
|
1425
|
+
case "com.amazonaws.accessanalyzer#ResourceNotFoundException":
|
|
1426
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1427
|
+
case "ThrottlingException":
|
|
1428
|
+
case "com.amazonaws.accessanalyzer#ThrottlingException":
|
|
1429
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1430
|
+
case "ValidationException":
|
|
1431
|
+
case "com.amazonaws.accessanalyzer#ValidationException":
|
|
1432
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1433
|
+
default:
|
|
1434
|
+
const parsedBody = parsedOutput.body;
|
|
1435
|
+
return throwDefaultError({
|
|
1436
|
+
output,
|
|
1437
|
+
parsedBody,
|
|
1438
|
+
errorCode,
|
|
1439
|
+
});
|
|
1440
|
+
}
|
|
1441
|
+
};
|
|
1187
1442
|
const de_GetGeneratedPolicyCommand = async (output, context) => {
|
|
1188
1443
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1189
1444
|
return de_GetGeneratedPolicyCommandError(output, context);
|
|
@@ -1507,6 +1762,53 @@ const de_ListFindingsCommandError = async (output, context) => {
|
|
|
1507
1762
|
});
|
|
1508
1763
|
}
|
|
1509
1764
|
};
|
|
1765
|
+
const de_ListFindingsV2Command = async (output, context) => {
|
|
1766
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1767
|
+
return de_ListFindingsV2CommandError(output, context);
|
|
1768
|
+
}
|
|
1769
|
+
const contents = (0, smithy_client_1.map)({
|
|
1770
|
+
$metadata: deserializeMetadata(output),
|
|
1771
|
+
});
|
|
1772
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1773
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1774
|
+
findings: (_) => de_FindingsListV2(_, context),
|
|
1775
|
+
nextToken: smithy_client_1.expectString,
|
|
1776
|
+
});
|
|
1777
|
+
Object.assign(contents, doc);
|
|
1778
|
+
return contents;
|
|
1779
|
+
};
|
|
1780
|
+
exports.de_ListFindingsV2Command = de_ListFindingsV2Command;
|
|
1781
|
+
const de_ListFindingsV2CommandError = async (output, context) => {
|
|
1782
|
+
const parsedOutput = {
|
|
1783
|
+
...output,
|
|
1784
|
+
body: await parseErrorBody(output.body, context),
|
|
1785
|
+
};
|
|
1786
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1787
|
+
switch (errorCode) {
|
|
1788
|
+
case "AccessDeniedException":
|
|
1789
|
+
case "com.amazonaws.accessanalyzer#AccessDeniedException":
|
|
1790
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1791
|
+
case "InternalServerException":
|
|
1792
|
+
case "com.amazonaws.accessanalyzer#InternalServerException":
|
|
1793
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1794
|
+
case "ResourceNotFoundException":
|
|
1795
|
+
case "com.amazonaws.accessanalyzer#ResourceNotFoundException":
|
|
1796
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1797
|
+
case "ThrottlingException":
|
|
1798
|
+
case "com.amazonaws.accessanalyzer#ThrottlingException":
|
|
1799
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1800
|
+
case "ValidationException":
|
|
1801
|
+
case "com.amazonaws.accessanalyzer#ValidationException":
|
|
1802
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1803
|
+
default:
|
|
1804
|
+
const parsedBody = parsedOutput.body;
|
|
1805
|
+
return throwDefaultError({
|
|
1806
|
+
output,
|
|
1807
|
+
parsedBody,
|
|
1808
|
+
errorCode,
|
|
1809
|
+
});
|
|
1810
|
+
}
|
|
1811
|
+
};
|
|
1510
1812
|
const de_ListPolicyGenerationsCommand = async (output, context) => {
|
|
1511
1813
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1512
1814
|
return de_ListPolicyGenerationsCommandError(output, context);
|
|
@@ -1947,6 +2249,19 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
|
1947
2249
|
});
|
|
1948
2250
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1949
2251
|
};
|
|
2252
|
+
const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
|
|
2253
|
+
const contents = (0, smithy_client_1.map)({});
|
|
2254
|
+
const data = parsedOutput.body;
|
|
2255
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2256
|
+
message: smithy_client_1.expectString,
|
|
2257
|
+
});
|
|
2258
|
+
Object.assign(contents, doc);
|
|
2259
|
+
const exception = new models_0_1.InvalidParameterException({
|
|
2260
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
2261
|
+
...contents,
|
|
2262
|
+
});
|
|
2263
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2264
|
+
};
|
|
1950
2265
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1951
2266
|
const contents = (0, smithy_client_1.map)({});
|
|
1952
2267
|
const data = parsedOutput.body;
|
|
@@ -1995,6 +2310,19 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
|
1995
2310
|
});
|
|
1996
2311
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1997
2312
|
};
|
|
2313
|
+
const de_UnprocessableEntityExceptionRes = async (parsedOutput, context) => {
|
|
2314
|
+
const contents = (0, smithy_client_1.map)({});
|
|
2315
|
+
const data = parsedOutput.body;
|
|
2316
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2317
|
+
message: smithy_client_1.expectString,
|
|
2318
|
+
});
|
|
2319
|
+
Object.assign(contents, doc);
|
|
2320
|
+
const exception = new models_0_1.UnprocessableEntityException({
|
|
2321
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
2322
|
+
...contents,
|
|
2323
|
+
});
|
|
2324
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2325
|
+
};
|
|
1998
2326
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
1999
2327
|
const contents = (0, smithy_client_1.map)({});
|
|
2000
2328
|
const data = parsedOutput.body;
|
|
@@ -2098,6 +2426,7 @@ const de_AnalyzersList = (output, context) => {
|
|
|
2098
2426
|
const de_AnalyzerSummary = (output, context) => {
|
|
2099
2427
|
return (0, smithy_client_1.take)(output, {
|
|
2100
2428
|
arn: smithy_client_1.expectString,
|
|
2429
|
+
configuration: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
|
|
2101
2430
|
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
2102
2431
|
lastResourceAnalyzed: smithy_client_1.expectString,
|
|
2103
2432
|
lastResourceAnalyzedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
@@ -2149,6 +2478,42 @@ const de_Finding = (output, context) => {
|
|
|
2149
2478
|
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
2150
2479
|
});
|
|
2151
2480
|
};
|
|
2481
|
+
const de_FindingDetails = (output, context) => {
|
|
2482
|
+
if (output.externalAccessDetails != null) {
|
|
2483
|
+
return {
|
|
2484
|
+
externalAccessDetails: (0, smithy_client_1._json)(output.externalAccessDetails),
|
|
2485
|
+
};
|
|
2486
|
+
}
|
|
2487
|
+
if (output.unusedIamRoleDetails != null) {
|
|
2488
|
+
return {
|
|
2489
|
+
unusedIamRoleDetails: de_UnusedIamRoleDetails(output.unusedIamRoleDetails, context),
|
|
2490
|
+
};
|
|
2491
|
+
}
|
|
2492
|
+
if (output.unusedIamUserAccessKeyDetails != null) {
|
|
2493
|
+
return {
|
|
2494
|
+
unusedIamUserAccessKeyDetails: de_UnusedIamUserAccessKeyDetails(output.unusedIamUserAccessKeyDetails, context),
|
|
2495
|
+
};
|
|
2496
|
+
}
|
|
2497
|
+
if (output.unusedIamUserPasswordDetails != null) {
|
|
2498
|
+
return {
|
|
2499
|
+
unusedIamUserPasswordDetails: de_UnusedIamUserPasswordDetails(output.unusedIamUserPasswordDetails, context),
|
|
2500
|
+
};
|
|
2501
|
+
}
|
|
2502
|
+
if (output.unusedPermissionDetails != null) {
|
|
2503
|
+
return {
|
|
2504
|
+
unusedPermissionDetails: de_UnusedPermissionDetails(output.unusedPermissionDetails, context),
|
|
2505
|
+
};
|
|
2506
|
+
}
|
|
2507
|
+
return { $unknown: Object.entries(output)[0] };
|
|
2508
|
+
};
|
|
2509
|
+
const de_FindingDetailsList = (output, context) => {
|
|
2510
|
+
const retVal = (output || [])
|
|
2511
|
+
.filter((e) => e != null)
|
|
2512
|
+
.map((entry) => {
|
|
2513
|
+
return de_FindingDetails((0, core_1.awsExpectUnion)(entry), context);
|
|
2514
|
+
});
|
|
2515
|
+
return retVal;
|
|
2516
|
+
};
|
|
2152
2517
|
const de_FindingsList = (output, context) => {
|
|
2153
2518
|
const retVal = (output || [])
|
|
2154
2519
|
.filter((e) => e != null)
|
|
@@ -2157,6 +2522,14 @@ const de_FindingsList = (output, context) => {
|
|
|
2157
2522
|
});
|
|
2158
2523
|
return retVal;
|
|
2159
2524
|
};
|
|
2525
|
+
const de_FindingsListV2 = (output, context) => {
|
|
2526
|
+
const retVal = (output || [])
|
|
2527
|
+
.filter((e) => e != null)
|
|
2528
|
+
.map((entry) => {
|
|
2529
|
+
return de_FindingSummaryV2(entry, context);
|
|
2530
|
+
});
|
|
2531
|
+
return retVal;
|
|
2532
|
+
};
|
|
2160
2533
|
const de_FindingSummary = (output, context) => {
|
|
2161
2534
|
return (0, smithy_client_1.take)(output, {
|
|
2162
2535
|
action: smithy_client_1._json,
|
|
@@ -2175,6 +2548,20 @@ const de_FindingSummary = (output, context) => {
|
|
|
2175
2548
|
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
2176
2549
|
});
|
|
2177
2550
|
};
|
|
2551
|
+
const de_FindingSummaryV2 = (output, context) => {
|
|
2552
|
+
return (0, smithy_client_1.take)(output, {
|
|
2553
|
+
analyzedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
2554
|
+
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
2555
|
+
error: smithy_client_1.expectString,
|
|
2556
|
+
findingType: smithy_client_1.expectString,
|
|
2557
|
+
id: smithy_client_1.expectString,
|
|
2558
|
+
resource: smithy_client_1.expectString,
|
|
2559
|
+
resourceOwnerAccount: smithy_client_1.expectString,
|
|
2560
|
+
resourceType: smithy_client_1.expectString,
|
|
2561
|
+
status: smithy_client_1.expectString,
|
|
2562
|
+
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
2563
|
+
});
|
|
2564
|
+
};
|
|
2178
2565
|
const de_GeneratedPolicyProperties = (output, context) => {
|
|
2179
2566
|
return (0, smithy_client_1.take)(output, {
|
|
2180
2567
|
cloudTrailProperties: (_) => de_CloudTrailProperties(_, context),
|
|
@@ -2214,6 +2601,43 @@ const de_PolicyGenerationList = (output, context) => {
|
|
|
2214
2601
|
});
|
|
2215
2602
|
return retVal;
|
|
2216
2603
|
};
|
|
2604
|
+
const de_UnusedAction = (output, context) => {
|
|
2605
|
+
return (0, smithy_client_1.take)(output, {
|
|
2606
|
+
action: smithy_client_1.expectString,
|
|
2607
|
+
lastAccessed: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
2608
|
+
});
|
|
2609
|
+
};
|
|
2610
|
+
const de_UnusedActionList = (output, context) => {
|
|
2611
|
+
const retVal = (output || [])
|
|
2612
|
+
.filter((e) => e != null)
|
|
2613
|
+
.map((entry) => {
|
|
2614
|
+
return de_UnusedAction(entry, context);
|
|
2615
|
+
});
|
|
2616
|
+
return retVal;
|
|
2617
|
+
};
|
|
2618
|
+
const de_UnusedIamRoleDetails = (output, context) => {
|
|
2619
|
+
return (0, smithy_client_1.take)(output, {
|
|
2620
|
+
lastAccessed: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
2621
|
+
});
|
|
2622
|
+
};
|
|
2623
|
+
const de_UnusedIamUserAccessKeyDetails = (output, context) => {
|
|
2624
|
+
return (0, smithy_client_1.take)(output, {
|
|
2625
|
+
accessKeyId: smithy_client_1.expectString,
|
|
2626
|
+
lastAccessed: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
2627
|
+
});
|
|
2628
|
+
};
|
|
2629
|
+
const de_UnusedIamUserPasswordDetails = (output, context) => {
|
|
2630
|
+
return (0, smithy_client_1.take)(output, {
|
|
2631
|
+
lastAccessed: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
2632
|
+
});
|
|
2633
|
+
};
|
|
2634
|
+
const de_UnusedPermissionDetails = (output, context) => {
|
|
2635
|
+
return (0, smithy_client_1.take)(output, {
|
|
2636
|
+
actions: (_) => de_UnusedActionList(_, context),
|
|
2637
|
+
lastAccessed: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
2638
|
+
serviceNamespace: smithy_client_1.expectString,
|
|
2639
|
+
});
|
|
2640
|
+
};
|
|
2217
2641
|
const deserializeMetadata = (output) => ({
|
|
2218
2642
|
httpStatusCode: output.statusCode,
|
|
2219
2643
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -2,6 +2,8 @@ import { createAggregatedClient } from "@smithy/smithy-client";
|
|
|
2
2
|
import { AccessAnalyzerClient } from "./AccessAnalyzerClient";
|
|
3
3
|
import { ApplyArchiveRuleCommand, } from "./commands/ApplyArchiveRuleCommand";
|
|
4
4
|
import { CancelPolicyGenerationCommand, } from "./commands/CancelPolicyGenerationCommand";
|
|
5
|
+
import { CheckAccessNotGrantedCommand, } from "./commands/CheckAccessNotGrantedCommand";
|
|
6
|
+
import { CheckNoNewAccessCommand, } from "./commands/CheckNoNewAccessCommand";
|
|
5
7
|
import { CreateAccessPreviewCommand, } from "./commands/CreateAccessPreviewCommand";
|
|
6
8
|
import { CreateAnalyzerCommand, } from "./commands/CreateAnalyzerCommand";
|
|
7
9
|
import { CreateArchiveRuleCommand, } from "./commands/CreateArchiveRuleCommand";
|
|
@@ -12,6 +14,7 @@ import { GetAnalyzedResourceCommand, } from "./commands/GetAnalyzedResourceComma
|
|
|
12
14
|
import { GetAnalyzerCommand } from "./commands/GetAnalyzerCommand";
|
|
13
15
|
import { GetArchiveRuleCommand, } from "./commands/GetArchiveRuleCommand";
|
|
14
16
|
import { GetFindingCommand } from "./commands/GetFindingCommand";
|
|
17
|
+
import { GetFindingV2Command, } from "./commands/GetFindingV2Command";
|
|
15
18
|
import { GetGeneratedPolicyCommand, } from "./commands/GetGeneratedPolicyCommand";
|
|
16
19
|
import { ListAccessPreviewFindingsCommand, } from "./commands/ListAccessPreviewFindingsCommand";
|
|
17
20
|
import { ListAccessPreviewsCommand, } from "./commands/ListAccessPreviewsCommand";
|
|
@@ -19,6 +22,7 @@ import { ListAnalyzedResourcesCommand, } from "./commands/ListAnalyzedResourcesC
|
|
|
19
22
|
import { ListAnalyzersCommand, } from "./commands/ListAnalyzersCommand";
|
|
20
23
|
import { ListArchiveRulesCommand, } from "./commands/ListArchiveRulesCommand";
|
|
21
24
|
import { ListFindingsCommand, } from "./commands/ListFindingsCommand";
|
|
25
|
+
import { ListFindingsV2Command, } from "./commands/ListFindingsV2Command";
|
|
22
26
|
import { ListPolicyGenerationsCommand, } from "./commands/ListPolicyGenerationsCommand";
|
|
23
27
|
import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
|
|
24
28
|
import { StartPolicyGenerationCommand, } from "./commands/StartPolicyGenerationCommand";
|
|
@@ -31,6 +35,8 @@ import { ValidatePolicyCommand, } from "./commands/ValidatePolicyCommand";
|
|
|
31
35
|
const commands = {
|
|
32
36
|
ApplyArchiveRuleCommand,
|
|
33
37
|
CancelPolicyGenerationCommand,
|
|
38
|
+
CheckAccessNotGrantedCommand,
|
|
39
|
+
CheckNoNewAccessCommand,
|
|
34
40
|
CreateAccessPreviewCommand,
|
|
35
41
|
CreateAnalyzerCommand,
|
|
36
42
|
CreateArchiveRuleCommand,
|
|
@@ -41,6 +47,7 @@ const commands = {
|
|
|
41
47
|
GetAnalyzerCommand,
|
|
42
48
|
GetArchiveRuleCommand,
|
|
43
49
|
GetFindingCommand,
|
|
50
|
+
GetFindingV2Command,
|
|
44
51
|
GetGeneratedPolicyCommand,
|
|
45
52
|
ListAccessPreviewFindingsCommand,
|
|
46
53
|
ListAccessPreviewsCommand,
|
|
@@ -48,6 +55,7 @@ const commands = {
|
|
|
48
55
|
ListAnalyzersCommand,
|
|
49
56
|
ListArchiveRulesCommand,
|
|
50
57
|
ListFindingsCommand,
|
|
58
|
+
ListFindingsV2Command,
|
|
51
59
|
ListPolicyGenerationsCommand,
|
|
52
60
|
ListTagsForResourceCommand,
|
|
53
61
|
StartPolicyGenerationCommand,
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
import { CheckAccessNotGrantedRequestFilterSensitiveLog, } from "../models/models_0";
|
|
6
|
+
import { de_CheckAccessNotGrantedCommand, se_CheckAccessNotGrantedCommand } from "../protocols/Aws_restJson1";
|
|
7
|
+
export { $Command };
|
|
8
|
+
export class CheckAccessNotGrantedCommand extends $Command {
|
|
9
|
+
static getEndpointParameterInstructions() {
|
|
10
|
+
return {
|
|
11
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
12
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
13
|
+
Region: { type: "builtInParams", name: "region" },
|
|
14
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
constructor(input) {
|
|
18
|
+
super();
|
|
19
|
+
this.input = input;
|
|
20
|
+
}
|
|
21
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
22
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
23
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, CheckAccessNotGrantedCommand.getEndpointParameterInstructions()));
|
|
24
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
25
|
+
const { logger } = configuration;
|
|
26
|
+
const clientName = "AccessAnalyzerClient";
|
|
27
|
+
const commandName = "CheckAccessNotGrantedCommand";
|
|
28
|
+
const handlerExecutionContext = {
|
|
29
|
+
logger,
|
|
30
|
+
clientName,
|
|
31
|
+
commandName,
|
|
32
|
+
inputFilterSensitiveLog: CheckAccessNotGrantedRequestFilterSensitiveLog,
|
|
33
|
+
outputFilterSensitiveLog: (_) => _,
|
|
34
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
35
|
+
service: "AccessAnalyzer",
|
|
36
|
+
operation: "CheckAccessNotGranted",
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
const { requestHandler } = configuration;
|
|
40
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
41
|
+
}
|
|
42
|
+
serialize(input, context) {
|
|
43
|
+
return se_CheckAccessNotGrantedCommand(input, context);
|
|
44
|
+
}
|
|
45
|
+
deserialize(output, context) {
|
|
46
|
+
return de_CheckAccessNotGrantedCommand(output, context);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
import { CheckNoNewAccessRequestFilterSensitiveLog, } from "../models/models_0";
|
|
6
|
+
import { de_CheckNoNewAccessCommand, se_CheckNoNewAccessCommand } from "../protocols/Aws_restJson1";
|
|
7
|
+
export { $Command };
|
|
8
|
+
export class CheckNoNewAccessCommand extends $Command {
|
|
9
|
+
static getEndpointParameterInstructions() {
|
|
10
|
+
return {
|
|
11
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
12
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
13
|
+
Region: { type: "builtInParams", name: "region" },
|
|
14
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
constructor(input) {
|
|
18
|
+
super();
|
|
19
|
+
this.input = input;
|
|
20
|
+
}
|
|
21
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
22
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
23
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, CheckNoNewAccessCommand.getEndpointParameterInstructions()));
|
|
24
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
25
|
+
const { logger } = configuration;
|
|
26
|
+
const clientName = "AccessAnalyzerClient";
|
|
27
|
+
const commandName = "CheckNoNewAccessCommand";
|
|
28
|
+
const handlerExecutionContext = {
|
|
29
|
+
logger,
|
|
30
|
+
clientName,
|
|
31
|
+
commandName,
|
|
32
|
+
inputFilterSensitiveLog: CheckNoNewAccessRequestFilterSensitiveLog,
|
|
33
|
+
outputFilterSensitiveLog: (_) => _,
|
|
34
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
35
|
+
service: "AccessAnalyzer",
|
|
36
|
+
operation: "CheckNoNewAccess",
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
const { requestHandler } = configuration;
|
|
40
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
41
|
+
}
|
|
42
|
+
serialize(input, context) {
|
|
43
|
+
return se_CheckNoNewAccessCommand(input, context);
|
|
44
|
+
}
|
|
45
|
+
deserialize(output, context) {
|
|
46
|
+
return de_CheckNoNewAccessCommand(output, context);
|
|
47
|
+
}
|
|
48
|
+
}
|