@aws-sdk/client-accessanalyzer 3.592.0 → 3.596.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 (33) hide show
  1. package/README.md +24 -0
  2. package/dist-cjs/index.js +241 -1
  3. package/dist-es/AccessAnalyzer.js +6 -0
  4. package/dist-es/commands/CheckNoPublicAccessCommand.js +25 -0
  5. package/dist-es/commands/GenerateFindingRecommendationCommand.js +24 -0
  6. package/dist-es/commands/GetFindingRecommendationCommand.js +24 -0
  7. package/dist-es/commands/index.js +3 -0
  8. package/dist-es/models/models_0.js +49 -0
  9. package/dist-es/pagination/GetFindingRecommendationPaginator.js +4 -0
  10. package/dist-es/pagination/index.js +1 -0
  11. package/dist-es/protocols/Aws_restJson1.js +111 -0
  12. package/dist-types/AccessAnalyzer.d.ts +21 -0
  13. package/dist-types/AccessAnalyzerClient.d.ts +5 -2
  14. package/dist-types/commands/CheckAccessNotGrantedCommand.d.ts +86 -1
  15. package/dist-types/commands/CheckNoPublicAccessCommand.d.ts +131 -0
  16. package/dist-types/commands/GenerateFindingRecommendationCommand.d.ts +95 -0
  17. package/dist-types/commands/GetFindingRecommendationCommand.d.ts +194 -0
  18. package/dist-types/commands/index.d.ts +3 -0
  19. package/dist-types/models/models_0.d.ts +308 -5
  20. package/dist-types/pagination/GetFindingRecommendationPaginator.d.ts +7 -0
  21. package/dist-types/pagination/index.d.ts +1 -0
  22. package/dist-types/protocols/Aws_restJson1.d.ts +27 -0
  23. package/dist-types/ts3.4/AccessAnalyzer.d.ts +51 -0
  24. package/dist-types/ts3.4/AccessAnalyzerClient.d.ts +18 -0
  25. package/dist-types/ts3.4/commands/CheckNoPublicAccessCommand.d.ts +40 -0
  26. package/dist-types/ts3.4/commands/GenerateFindingRecommendationCommand.d.ts +36 -0
  27. package/dist-types/ts3.4/commands/GetFindingRecommendationCommand.d.ts +40 -0
  28. package/dist-types/ts3.4/commands/index.d.ts +3 -0
  29. package/dist-types/ts3.4/models/models_0.d.ts +110 -1
  30. package/dist-types/ts3.4/pagination/GetFindingRecommendationPaginator.d.ts +11 -0
  31. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  32. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +36 -0
  33. package/package.json +4 -4
@@ -87,6 +87,7 @@ export class ThrottlingException extends __BaseException {
87
87
  export const ValidationExceptionReason = {
88
88
  CANNOT_PARSE: "cannotParse",
89
89
  FIELD_VALIDATION_FAILED: "fieldValidationFailed",
90
+ NOT_SUPPORTED: "notSupported",
90
91
  OTHER: "other",
91
92
  UNKNOWN_OPERATION: "unknownOperation",
92
93
  };
@@ -149,6 +150,30 @@ export const CheckNoNewAccessResult = {
149
150
  FAIL: "FAIL",
150
151
  PASS: "PASS",
151
152
  };
153
+ export const AccessCheckResourceType = {
154
+ DYNAMODB_STREAM: "AWS::DynamoDB::Stream",
155
+ DYNAMODB_TABLE: "AWS::DynamoDB::Table",
156
+ EFS_FILESYSTEM: "AWS::EFS::FileSystem",
157
+ KINESIS_DATA_STREAM: "AWS::Kinesis::Stream",
158
+ KINESIS_STREAM_CONSUMER: "AWS::Kinesis::StreamConsumer",
159
+ KMS_KEY: "AWS::KMS::Key",
160
+ LAMBDA_FUNCTION: "AWS::Lambda::Function",
161
+ OPENSEARCHSERVICE_DOMAIN: "AWS::OpenSearchService::Domain",
162
+ ROLE_TRUST: "AWS::IAM::AssumeRolePolicyDocument",
163
+ S3EXPRESS_DIRECTORYBUCKET: "AWS::S3Express::DirectoryBucket",
164
+ S3_ACCESS_POINT: "AWS::S3::AccessPoint",
165
+ S3_BUCKET: "AWS::S3::Bucket",
166
+ S3_GLACIER: "AWS::S3::Glacier",
167
+ S3_OUTPOSTS_ACCESS_POINT: "AWS::S3Outposts::AccessPoint",
168
+ S3_OUTPOSTS_BUCKET: "AWS::S3Outposts::Bucket",
169
+ SECRETSMANAGER_SECRET: "AWS::SecretsManager::Secret",
170
+ SNS_TOPIC: "AWS::SNS::Topic",
171
+ SQS_QUEUE: "AWS::SQS::Queue",
172
+ };
173
+ export const CheckNoPublicAccessResult = {
174
+ FAIL: "FAIL",
175
+ PASS: "PASS",
176
+ };
152
177
  export const KmsGrantOperation = {
153
178
  CREATE_GRANT: "CreateGrant",
154
179
  DECRYPT: "Decrypt",
@@ -251,6 +276,26 @@ export const AccessPreviewStatusReasonCode = {
251
276
  INTERNAL_ERROR: "INTERNAL_ERROR",
252
277
  INVALID_CONFIGURATION: "INVALID_CONFIGURATION",
253
278
  };
279
+ export const RecommendationType = {
280
+ UNUSED_PERMISSION_RECOMMENDATION: "UnusedPermissionRecommendation",
281
+ };
282
+ export const RecommendedRemediationAction = {
283
+ CREATE_POLICY: "CREATE_POLICY",
284
+ DETACH_POLICY: "DETACH_POLICY",
285
+ };
286
+ export var RecommendedStep;
287
+ (function (RecommendedStep) {
288
+ RecommendedStep.visit = (value, visitor) => {
289
+ if (value.unusedPermissionsRecommendedStep !== undefined)
290
+ return visitor.unusedPermissionsRecommendedStep(value.unusedPermissionsRecommendedStep);
291
+ return visitor._(value.$unknown[0], value.$unknown[1]);
292
+ };
293
+ })(RecommendedStep || (RecommendedStep = {}));
294
+ export const Status = {
295
+ FAILED: "FAILED",
296
+ IN_PROGRESS: "IN_PROGRESS",
297
+ SUCCEEDED: "SUCCEEDED",
298
+ };
254
299
  export var FindingDetails;
255
300
  (function (FindingDetails) {
256
301
  FindingDetails.visit = (value, visitor) => {
@@ -345,3 +390,7 @@ export const CheckNoNewAccessRequestFilterSensitiveLog = (obj) => ({
345
390
  ...(obj.newPolicyDocument && { newPolicyDocument: SENSITIVE_STRING }),
346
391
  ...(obj.existingPolicyDocument && { existingPolicyDocument: SENSITIVE_STRING }),
347
392
  });
393
+ export const CheckNoPublicAccessRequestFilterSensitiveLog = (obj) => ({
394
+ ...obj,
395
+ ...(obj.policyDocument && { policyDocument: SENSITIVE_STRING }),
396
+ });
@@ -0,0 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
2
+ import { AccessAnalyzerClient } from "../AccessAnalyzerClient";
3
+ import { GetFindingRecommendationCommand, } from "../commands/GetFindingRecommendationCommand";
4
+ export const paginateGetFindingRecommendation = createPaginator(AccessAnalyzerClient, GetFindingRecommendationCommand, "nextToken", "nextToken", "maxResults");
@@ -1,3 +1,4 @@
1
+ export * from "./GetFindingRecommendationPaginator";
1
2
  export * from "./GetFindingV2Paginator";
2
3
  export * from "./Interfaces";
3
4
  export * from "./ListAccessPreviewFindingsPaginator";
@@ -58,6 +58,20 @@ export const se_CheckNoNewAccessCommand = async (input, context) => {
58
58
  b.m("POST").h(headers).b(body);
59
59
  return b.build();
60
60
  };
61
+ export const se_CheckNoPublicAccessCommand = async (input, context) => {
62
+ const b = rb(input, context);
63
+ const headers = {
64
+ "content-type": "application/json",
65
+ };
66
+ b.bp("/policy/check-no-public-access");
67
+ let body;
68
+ body = JSON.stringify(take(input, {
69
+ policyDocument: [],
70
+ resourceType: [],
71
+ }));
72
+ b.m("POST").h(headers).b(body);
73
+ return b.build();
74
+ };
61
75
  export const se_CreateAccessPreviewCommand = async (input, context) => {
62
76
  const b = rb(input, context);
63
77
  const headers = {
@@ -132,6 +146,18 @@ export const se_DeleteArchiveRuleCommand = async (input, context) => {
132
146
  b.m("DELETE").h(headers).q(query).b(body);
133
147
  return b.build();
134
148
  };
149
+ export const se_GenerateFindingRecommendationCommand = async (input, context) => {
150
+ const b = rb(input, context);
151
+ const headers = {};
152
+ b.bp("/recommendation/{id}");
153
+ b.p("id", () => input.id, "{id}", false);
154
+ const query = map({
155
+ [_aA]: [, __expectNonNull(input[_aA], `analyzerArn`)],
156
+ });
157
+ let body;
158
+ b.m("POST").h(headers).q(query).b(body);
159
+ return b.build();
160
+ };
135
161
  export const se_GetAccessPreviewCommand = async (input, context) => {
136
162
  const b = rb(input, context);
137
163
  const headers = {};
@@ -187,6 +213,20 @@ export const se_GetFindingCommand = async (input, context) => {
187
213
  b.m("GET").h(headers).q(query).b(body);
188
214
  return b.build();
189
215
  };
216
+ export const se_GetFindingRecommendationCommand = async (input, context) => {
217
+ const b = rb(input, context);
218
+ const headers = {};
219
+ b.bp("/recommendation/{id}");
220
+ b.p("id", () => input.id, "{id}", false);
221
+ const query = map({
222
+ [_aA]: [, __expectNonNull(input[_aA], `analyzerArn`)],
223
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
224
+ [_nT]: [, input[_nT]],
225
+ });
226
+ let body;
227
+ b.m("GET").h(headers).q(query).b(body);
228
+ return b.build();
229
+ };
190
230
  export const se_GetFindingV2Command = async (input, context) => {
191
231
  const b = rb(input, context);
192
232
  const headers = {};
@@ -506,6 +546,22 @@ export const de_CheckNoNewAccessCommand = async (output, context) => {
506
546
  Object.assign(contents, doc);
507
547
  return contents;
508
548
  };
549
+ export const de_CheckNoPublicAccessCommand = async (output, context) => {
550
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
551
+ return de_CommandError(output, context);
552
+ }
553
+ const contents = map({
554
+ $metadata: deserializeMetadata(output),
555
+ });
556
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
557
+ const doc = take(data, {
558
+ message: __expectString,
559
+ reasons: _json,
560
+ result: __expectString,
561
+ });
562
+ Object.assign(contents, doc);
563
+ return contents;
564
+ };
509
565
  export const de_CreateAccessPreviewCommand = async (output, context) => {
510
566
  if (output.statusCode !== 200 && output.statusCode >= 300) {
511
567
  return de_CommandError(output, context);
@@ -564,6 +620,16 @@ export const de_DeleteArchiveRuleCommand = async (output, context) => {
564
620
  await collectBody(output.body, context);
565
621
  return contents;
566
622
  };
623
+ export const de_GenerateFindingRecommendationCommand = async (output, context) => {
624
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
625
+ return de_CommandError(output, context);
626
+ }
627
+ const contents = map({
628
+ $metadata: deserializeMetadata(output),
629
+ });
630
+ await collectBody(output.body, context);
631
+ return contents;
632
+ };
567
633
  export const de_GetAccessPreviewCommand = async (output, context) => {
568
634
  if (output.statusCode !== 200 && output.statusCode >= 300) {
569
635
  return de_CommandError(output, context);
@@ -634,6 +700,27 @@ export const de_GetFindingCommand = async (output, context) => {
634
700
  Object.assign(contents, doc);
635
701
  return contents;
636
702
  };
703
+ export const de_GetFindingRecommendationCommand = async (output, context) => {
704
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
705
+ return de_CommandError(output, context);
706
+ }
707
+ const contents = map({
708
+ $metadata: deserializeMetadata(output),
709
+ });
710
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
711
+ const doc = take(data, {
712
+ completedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
713
+ error: _json,
714
+ nextToken: __expectString,
715
+ recommendationType: __expectString,
716
+ recommendedSteps: (_) => de_RecommendedStepList(_, context),
717
+ resourceArn: __expectString,
718
+ startedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
719
+ status: __expectString,
720
+ });
721
+ Object.assign(contents, doc);
722
+ return contents;
723
+ };
637
724
  export const de_GetFindingV2Command = async (output, context) => {
638
725
  if (output.statusCode !== 200 && output.statusCode >= 300) {
639
726
  return de_CommandError(output, context);
@@ -1323,6 +1410,22 @@ const de_PolicyGenerationList = (output, context) => {
1323
1410
  });
1324
1411
  return retVal;
1325
1412
  };
1413
+ const de_RecommendedStep = (output, context) => {
1414
+ if (output.unusedPermissionsRecommendedStep != null) {
1415
+ return {
1416
+ unusedPermissionsRecommendedStep: de_UnusedPermissionsRecommendedStep(output.unusedPermissionsRecommendedStep, context),
1417
+ };
1418
+ }
1419
+ return { $unknown: Object.entries(output)[0] };
1420
+ };
1421
+ const de_RecommendedStepList = (output, context) => {
1422
+ const retVal = (output || [])
1423
+ .filter((e) => e != null)
1424
+ .map((entry) => {
1425
+ return de_RecommendedStep(__expectUnion(entry), context);
1426
+ });
1427
+ return retVal;
1428
+ };
1326
1429
  const de_UnusedAction = (output, context) => {
1327
1430
  return take(output, {
1328
1431
  action: __expectString,
@@ -1360,6 +1463,14 @@ const de_UnusedPermissionDetails = (output, context) => {
1360
1463
  serviceNamespace: __expectString,
1361
1464
  });
1362
1465
  };
1466
+ const de_UnusedPermissionsRecommendedStep = (output, context) => {
1467
+ return take(output, {
1468
+ existingPolicyId: __expectString,
1469
+ policyUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1470
+ recommendedAction: __expectString,
1471
+ recommendedPolicy: __expectString,
1472
+ });
1473
+ };
1363
1474
  const deserializeMetadata = (output) => ({
1364
1475
  httpStatusCode: output.statusCode,
1365
1476
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -4,16 +4,19 @@ import { ApplyArchiveRuleCommandInput, ApplyArchiveRuleCommandOutput } from "./c
4
4
  import { CancelPolicyGenerationCommandInput, CancelPolicyGenerationCommandOutput } from "./commands/CancelPolicyGenerationCommand";
5
5
  import { CheckAccessNotGrantedCommandInput, CheckAccessNotGrantedCommandOutput } from "./commands/CheckAccessNotGrantedCommand";
6
6
  import { CheckNoNewAccessCommandInput, CheckNoNewAccessCommandOutput } from "./commands/CheckNoNewAccessCommand";
7
+ import { CheckNoPublicAccessCommandInput, CheckNoPublicAccessCommandOutput } from "./commands/CheckNoPublicAccessCommand";
7
8
  import { CreateAccessPreviewCommandInput, CreateAccessPreviewCommandOutput } from "./commands/CreateAccessPreviewCommand";
8
9
  import { CreateAnalyzerCommandInput, CreateAnalyzerCommandOutput } from "./commands/CreateAnalyzerCommand";
9
10
  import { CreateArchiveRuleCommandInput, CreateArchiveRuleCommandOutput } from "./commands/CreateArchiveRuleCommand";
10
11
  import { DeleteAnalyzerCommandInput, DeleteAnalyzerCommandOutput } from "./commands/DeleteAnalyzerCommand";
11
12
  import { DeleteArchiveRuleCommandInput, DeleteArchiveRuleCommandOutput } from "./commands/DeleteArchiveRuleCommand";
13
+ import { GenerateFindingRecommendationCommandInput, GenerateFindingRecommendationCommandOutput } from "./commands/GenerateFindingRecommendationCommand";
12
14
  import { GetAccessPreviewCommandInput, GetAccessPreviewCommandOutput } from "./commands/GetAccessPreviewCommand";
13
15
  import { GetAnalyzedResourceCommandInput, GetAnalyzedResourceCommandOutput } from "./commands/GetAnalyzedResourceCommand";
14
16
  import { GetAnalyzerCommandInput, GetAnalyzerCommandOutput } from "./commands/GetAnalyzerCommand";
15
17
  import { GetArchiveRuleCommandInput, GetArchiveRuleCommandOutput } from "./commands/GetArchiveRuleCommand";
16
18
  import { GetFindingCommandInput, GetFindingCommandOutput } from "./commands/GetFindingCommand";
19
+ import { GetFindingRecommendationCommandInput, GetFindingRecommendationCommandOutput } from "./commands/GetFindingRecommendationCommand";
17
20
  import { GetFindingV2CommandInput, GetFindingV2CommandOutput } from "./commands/GetFindingV2Command";
18
21
  import { GetGeneratedPolicyCommandInput, GetGeneratedPolicyCommandOutput } from "./commands/GetGeneratedPolicyCommand";
19
22
  import { ListAccessPreviewFindingsCommandInput, ListAccessPreviewFindingsCommandOutput } from "./commands/ListAccessPreviewFindingsCommand";
@@ -57,6 +60,12 @@ export interface AccessAnalyzer {
57
60
  checkNoNewAccess(args: CheckNoNewAccessCommandInput, options?: __HttpHandlerOptions): Promise<CheckNoNewAccessCommandOutput>;
58
61
  checkNoNewAccess(args: CheckNoNewAccessCommandInput, cb: (err: any, data?: CheckNoNewAccessCommandOutput) => void): void;
59
62
  checkNoNewAccess(args: CheckNoNewAccessCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CheckNoNewAccessCommandOutput) => void): void;
63
+ /**
64
+ * @see {@link CheckNoPublicAccessCommand}
65
+ */
66
+ checkNoPublicAccess(args: CheckNoPublicAccessCommandInput, options?: __HttpHandlerOptions): Promise<CheckNoPublicAccessCommandOutput>;
67
+ checkNoPublicAccess(args: CheckNoPublicAccessCommandInput, cb: (err: any, data?: CheckNoPublicAccessCommandOutput) => void): void;
68
+ checkNoPublicAccess(args: CheckNoPublicAccessCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CheckNoPublicAccessCommandOutput) => void): void;
60
69
  /**
61
70
  * @see {@link CreateAccessPreviewCommand}
62
71
  */
@@ -87,6 +96,12 @@ export interface AccessAnalyzer {
87
96
  deleteArchiveRule(args: DeleteArchiveRuleCommandInput, options?: __HttpHandlerOptions): Promise<DeleteArchiveRuleCommandOutput>;
88
97
  deleteArchiveRule(args: DeleteArchiveRuleCommandInput, cb: (err: any, data?: DeleteArchiveRuleCommandOutput) => void): void;
89
98
  deleteArchiveRule(args: DeleteArchiveRuleCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteArchiveRuleCommandOutput) => void): void;
99
+ /**
100
+ * @see {@link GenerateFindingRecommendationCommand}
101
+ */
102
+ generateFindingRecommendation(args: GenerateFindingRecommendationCommandInput, options?: __HttpHandlerOptions): Promise<GenerateFindingRecommendationCommandOutput>;
103
+ generateFindingRecommendation(args: GenerateFindingRecommendationCommandInput, cb: (err: any, data?: GenerateFindingRecommendationCommandOutput) => void): void;
104
+ generateFindingRecommendation(args: GenerateFindingRecommendationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GenerateFindingRecommendationCommandOutput) => void): void;
90
105
  /**
91
106
  * @see {@link GetAccessPreviewCommand}
92
107
  */
@@ -117,6 +132,12 @@ export interface AccessAnalyzer {
117
132
  getFinding(args: GetFindingCommandInput, options?: __HttpHandlerOptions): Promise<GetFindingCommandOutput>;
118
133
  getFinding(args: GetFindingCommandInput, cb: (err: any, data?: GetFindingCommandOutput) => void): void;
119
134
  getFinding(args: GetFindingCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetFindingCommandOutput) => void): void;
135
+ /**
136
+ * @see {@link GetFindingRecommendationCommand}
137
+ */
138
+ getFindingRecommendation(args: GetFindingRecommendationCommandInput, options?: __HttpHandlerOptions): Promise<GetFindingRecommendationCommandOutput>;
139
+ getFindingRecommendation(args: GetFindingRecommendationCommandInput, cb: (err: any, data?: GetFindingRecommendationCommandOutput) => void): void;
140
+ getFindingRecommendation(args: GetFindingRecommendationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetFindingRecommendationCommandOutput) => void): void;
120
141
  /**
121
142
  * @see {@link GetFindingV2Command}
122
143
  */
@@ -11,16 +11,19 @@ import { ApplyArchiveRuleCommandInput, ApplyArchiveRuleCommandOutput } from "./c
11
11
  import { CancelPolicyGenerationCommandInput, CancelPolicyGenerationCommandOutput } from "./commands/CancelPolicyGenerationCommand";
12
12
  import { CheckAccessNotGrantedCommandInput, CheckAccessNotGrantedCommandOutput } from "./commands/CheckAccessNotGrantedCommand";
13
13
  import { CheckNoNewAccessCommandInput, CheckNoNewAccessCommandOutput } from "./commands/CheckNoNewAccessCommand";
14
+ import { CheckNoPublicAccessCommandInput, CheckNoPublicAccessCommandOutput } from "./commands/CheckNoPublicAccessCommand";
14
15
  import { CreateAccessPreviewCommandInput, CreateAccessPreviewCommandOutput } from "./commands/CreateAccessPreviewCommand";
15
16
  import { CreateAnalyzerCommandInput, CreateAnalyzerCommandOutput } from "./commands/CreateAnalyzerCommand";
16
17
  import { CreateArchiveRuleCommandInput, CreateArchiveRuleCommandOutput } from "./commands/CreateArchiveRuleCommand";
17
18
  import { DeleteAnalyzerCommandInput, DeleteAnalyzerCommandOutput } from "./commands/DeleteAnalyzerCommand";
18
19
  import { DeleteArchiveRuleCommandInput, DeleteArchiveRuleCommandOutput } from "./commands/DeleteArchiveRuleCommand";
20
+ import { GenerateFindingRecommendationCommandInput, GenerateFindingRecommendationCommandOutput } from "./commands/GenerateFindingRecommendationCommand";
19
21
  import { GetAccessPreviewCommandInput, GetAccessPreviewCommandOutput } from "./commands/GetAccessPreviewCommand";
20
22
  import { GetAnalyzedResourceCommandInput, GetAnalyzedResourceCommandOutput } from "./commands/GetAnalyzedResourceCommand";
21
23
  import { GetAnalyzerCommandInput, GetAnalyzerCommandOutput } from "./commands/GetAnalyzerCommand";
22
24
  import { GetArchiveRuleCommandInput, GetArchiveRuleCommandOutput } from "./commands/GetArchiveRuleCommand";
23
25
  import { GetFindingCommandInput, GetFindingCommandOutput } from "./commands/GetFindingCommand";
26
+ import { GetFindingRecommendationCommandInput, GetFindingRecommendationCommandOutput } from "./commands/GetFindingRecommendationCommand";
24
27
  import { GetFindingV2CommandInput, GetFindingV2CommandOutput } from "./commands/GetFindingV2Command";
25
28
  import { GetGeneratedPolicyCommandInput, GetGeneratedPolicyCommandOutput } from "./commands/GetGeneratedPolicyCommand";
26
29
  import { ListAccessPreviewFindingsCommandInput, ListAccessPreviewFindingsCommandOutput } from "./commands/ListAccessPreviewFindingsCommand";
@@ -45,11 +48,11 @@ export { __Client };
45
48
  /**
46
49
  * @public
47
50
  */
48
- export type ServiceInputTypes = ApplyArchiveRuleCommandInput | CancelPolicyGenerationCommandInput | CheckAccessNotGrantedCommandInput | CheckNoNewAccessCommandInput | CreateAccessPreviewCommandInput | CreateAnalyzerCommandInput | CreateArchiveRuleCommandInput | DeleteAnalyzerCommandInput | DeleteArchiveRuleCommandInput | GetAccessPreviewCommandInput | GetAnalyzedResourceCommandInput | GetAnalyzerCommandInput | GetArchiveRuleCommandInput | GetFindingCommandInput | GetFindingV2CommandInput | GetGeneratedPolicyCommandInput | ListAccessPreviewFindingsCommandInput | ListAccessPreviewsCommandInput | ListAnalyzedResourcesCommandInput | ListAnalyzersCommandInput | ListArchiveRulesCommandInput | ListFindingsCommandInput | ListFindingsV2CommandInput | ListPolicyGenerationsCommandInput | ListTagsForResourceCommandInput | StartPolicyGenerationCommandInput | StartResourceScanCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateArchiveRuleCommandInput | UpdateFindingsCommandInput | ValidatePolicyCommandInput;
51
+ export type ServiceInputTypes = ApplyArchiveRuleCommandInput | CancelPolicyGenerationCommandInput | CheckAccessNotGrantedCommandInput | CheckNoNewAccessCommandInput | CheckNoPublicAccessCommandInput | CreateAccessPreviewCommandInput | CreateAnalyzerCommandInput | CreateArchiveRuleCommandInput | DeleteAnalyzerCommandInput | DeleteArchiveRuleCommandInput | GenerateFindingRecommendationCommandInput | GetAccessPreviewCommandInput | GetAnalyzedResourceCommandInput | GetAnalyzerCommandInput | GetArchiveRuleCommandInput | GetFindingCommandInput | GetFindingRecommendationCommandInput | GetFindingV2CommandInput | GetGeneratedPolicyCommandInput | ListAccessPreviewFindingsCommandInput | ListAccessPreviewsCommandInput | ListAnalyzedResourcesCommandInput | ListAnalyzersCommandInput | ListArchiveRulesCommandInput | ListFindingsCommandInput | ListFindingsV2CommandInput | ListPolicyGenerationsCommandInput | ListTagsForResourceCommandInput | StartPolicyGenerationCommandInput | StartResourceScanCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateArchiveRuleCommandInput | UpdateFindingsCommandInput | ValidatePolicyCommandInput;
49
52
  /**
50
53
  * @public
51
54
  */
52
- export type ServiceOutputTypes = ApplyArchiveRuleCommandOutput | CancelPolicyGenerationCommandOutput | CheckAccessNotGrantedCommandOutput | CheckNoNewAccessCommandOutput | CreateAccessPreviewCommandOutput | CreateAnalyzerCommandOutput | CreateArchiveRuleCommandOutput | DeleteAnalyzerCommandOutput | DeleteArchiveRuleCommandOutput | GetAccessPreviewCommandOutput | GetAnalyzedResourceCommandOutput | GetAnalyzerCommandOutput | GetArchiveRuleCommandOutput | GetFindingCommandOutput | GetFindingV2CommandOutput | GetGeneratedPolicyCommandOutput | ListAccessPreviewFindingsCommandOutput | ListAccessPreviewsCommandOutput | ListAnalyzedResourcesCommandOutput | ListAnalyzersCommandOutput | ListArchiveRulesCommandOutput | ListFindingsCommandOutput | ListFindingsV2CommandOutput | ListPolicyGenerationsCommandOutput | ListTagsForResourceCommandOutput | StartPolicyGenerationCommandOutput | StartResourceScanCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateArchiveRuleCommandOutput | UpdateFindingsCommandOutput | ValidatePolicyCommandOutput;
55
+ export type ServiceOutputTypes = ApplyArchiveRuleCommandOutput | CancelPolicyGenerationCommandOutput | CheckAccessNotGrantedCommandOutput | CheckNoNewAccessCommandOutput | CheckNoPublicAccessCommandOutput | CreateAccessPreviewCommandOutput | CreateAnalyzerCommandOutput | CreateArchiveRuleCommandOutput | DeleteAnalyzerCommandOutput | DeleteArchiveRuleCommandOutput | GenerateFindingRecommendationCommandOutput | GetAccessPreviewCommandOutput | GetAnalyzedResourceCommandOutput | GetAnalyzerCommandOutput | GetArchiveRuleCommandOutput | GetFindingCommandOutput | GetFindingRecommendationCommandOutput | GetFindingV2CommandOutput | GetGeneratedPolicyCommandOutput | ListAccessPreviewFindingsCommandOutput | ListAccessPreviewsCommandOutput | ListAnalyzedResourcesCommandOutput | ListAnalyzersCommandOutput | ListArchiveRulesCommandOutput | ListFindingsCommandOutput | ListFindingsV2CommandOutput | ListPolicyGenerationsCommandOutput | ListTagsForResourceCommandOutput | StartPolicyGenerationCommandOutput | StartResourceScanCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateArchiveRuleCommandOutput | UpdateFindingsCommandOutput | ValidatePolicyCommandOutput;
53
56
  /**
54
57
  * @public
55
58
  */
@@ -38,7 +38,10 @@ declare const CheckAccessNotGrantedCommand_base: {
38
38
  * policyDocument: "STRING_VALUE", // required
39
39
  * access: [ // AccessList // required
40
40
  * { // Access
41
- * actions: [ // ActionsList // required
41
+ * actions: [ // ActionsList
42
+ * "STRING_VALUE",
43
+ * ],
44
+ * resources: [ // ResourcesList
42
45
  * "STRING_VALUE",
43
46
  * ],
44
47
  * },
@@ -89,6 +92,88 @@ declare const CheckAccessNotGrantedCommand_base: {
89
92
  * <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
90
93
  *
91
94
  * @public
95
+ * @example Passing check. Restrictive identity policy.
96
+ * ```javascript
97
+ * //
98
+ * const input = {
99
+ * "access": [
100
+ * {
101
+ * "actions": [
102
+ * "s3:PutObject"
103
+ * ]
104
+ * }
105
+ * ],
106
+ * "policyDocument": "{\"Version\":\"2012-10-17\",\"Id\":\"123\",\"Statement\":[{\"Sid\":\"AllowJohnDoe\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:user/JohnDoe\"},\"Action\":\"s3:GetObject\",\"Resource\":\"*\"}]}",
107
+ * "policyType": "RESOURCE_POLICY"
108
+ * };
109
+ * const command = new CheckAccessNotGrantedCommand(input);
110
+ * const response = await client.send(command);
111
+ * /* response ==
112
+ * {
113
+ * "message": "The policy document does not grant access to perform the listed actions or resources.",
114
+ * "result": "PASS"
115
+ * }
116
+ * *\/
117
+ * // example id: example-1
118
+ * ```
119
+ *
120
+ * @example Passing check. Restrictive S3 Bucket resource policy.
121
+ * ```javascript
122
+ * //
123
+ * const input = {
124
+ * "access": [
125
+ * {
126
+ * "resources": [
127
+ * "arn:aws:s3:::sensitive-bucket/*"
128
+ * ]
129
+ * }
130
+ * ],
131
+ * "policyDocument": "{\"Version\":\"2012-10-17\",\"Id\":\"123\",\"Statement\":[{\"Sid\":\"AllowJohnDoe\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:user/JohnDoe\"},\"Action\":\"s3:PutObject\",\"Resource\":\"arn:aws:s3:::non-sensitive-bucket/*\"}]}",
132
+ * "policyType": "RESOURCE_POLICY"
133
+ * };
134
+ * const command = new CheckAccessNotGrantedCommand(input);
135
+ * const response = await client.send(command);
136
+ * /* response ==
137
+ * {
138
+ * "message": "The policy document does not grant access to perform the listed actions or resources.",
139
+ * "result": "PASS"
140
+ * }
141
+ * *\/
142
+ * // example id: example-2
143
+ * ```
144
+ *
145
+ * @example Failing check. Permissive S3 Bucket resource policy.
146
+ * ```javascript
147
+ * //
148
+ * const input = {
149
+ * "access": [
150
+ * {
151
+ * "resources": [
152
+ * "arn:aws:s3:::my-bucket/*"
153
+ * ]
154
+ * }
155
+ * ],
156
+ * "policyDocument": "{\"Version\":\"2012-10-17\",\"Id\":\"123\",\"Statement\":[{\"Sid\":\"AllowJohnDoe\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:user/JohnDoe\"},\"Action\":\"s3:PutObject\",\"Resource\":\"arn:aws:s3:::my-bucket/*\"}]}",
157
+ * "policyType": "RESOURCE_POLICY"
158
+ * };
159
+ * const command = new CheckAccessNotGrantedCommand(input);
160
+ * const response = await client.send(command);
161
+ * /* response ==
162
+ * {
163
+ * "message": "The policy document grants access to perform one or more of the listed actions or resources.",
164
+ * "reasons": [
165
+ * {
166
+ * "description": "One or more of the listed actions or resources in the statement with sid: AllowJohnDoe.",
167
+ * "statementId": "AllowJohnDoe",
168
+ * "statementIndex": 0
169
+ * }
170
+ * ],
171
+ * "result": "FAIL"
172
+ * }
173
+ * *\/
174
+ * // example id: example-3
175
+ * ```
176
+ *
92
177
  */
93
178
  export declare class CheckAccessNotGrantedCommand extends CheckAccessNotGrantedCommand_base {
94
179
  }
@@ -0,0 +1,131 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AccessAnalyzerClient";
4
+ import { CheckNoPublicAccessRequest, CheckNoPublicAccessResponse } from "../models/models_0";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link CheckNoPublicAccessCommand}.
14
+ */
15
+ export interface CheckNoPublicAccessCommandInput extends CheckNoPublicAccessRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link CheckNoPublicAccessCommand}.
21
+ */
22
+ export interface CheckNoPublicAccessCommandOutput extends CheckNoPublicAccessResponse, __MetadataBearer {
23
+ }
24
+ declare const CheckNoPublicAccessCommand_base: {
25
+ new (input: CheckNoPublicAccessCommandInput): import("@smithy/smithy-client").CommandImpl<CheckNoPublicAccessCommandInput, CheckNoPublicAccessCommandOutput, AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: CheckNoPublicAccessCommandInput): import("@smithy/smithy-client").CommandImpl<CheckNoPublicAccessCommandInput, CheckNoPublicAccessCommandOutput, AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Checks whether a resource policy can grant public access to the specified resource
31
+ * type.</p>
32
+ * @example
33
+ * Use a bare-bones client and the command you need to make an API call.
34
+ * ```javascript
35
+ * import { AccessAnalyzerClient, CheckNoPublicAccessCommand } from "@aws-sdk/client-accessanalyzer"; // ES Modules import
36
+ * // const { AccessAnalyzerClient, CheckNoPublicAccessCommand } = require("@aws-sdk/client-accessanalyzer"); // CommonJS import
37
+ * const client = new AccessAnalyzerClient(config);
38
+ * const input = { // CheckNoPublicAccessRequest
39
+ * policyDocument: "STRING_VALUE", // required
40
+ * resourceType: "STRING_VALUE", // required
41
+ * };
42
+ * const command = new CheckNoPublicAccessCommand(input);
43
+ * const response = await client.send(command);
44
+ * // { // CheckNoPublicAccessResponse
45
+ * // result: "STRING_VALUE",
46
+ * // message: "STRING_VALUE",
47
+ * // reasons: [ // ReasonSummaryList
48
+ * // { // ReasonSummary
49
+ * // description: "STRING_VALUE",
50
+ * // statementIndex: Number("int"),
51
+ * // statementId: "STRING_VALUE",
52
+ * // },
53
+ * // ],
54
+ * // };
55
+ *
56
+ * ```
57
+ *
58
+ * @param CheckNoPublicAccessCommandInput - {@link CheckNoPublicAccessCommandInput}
59
+ * @returns {@link CheckNoPublicAccessCommandOutput}
60
+ * @see {@link CheckNoPublicAccessCommandInput} for command's `input` shape.
61
+ * @see {@link CheckNoPublicAccessCommandOutput} for command's `response` shape.
62
+ * @see {@link AccessAnalyzerClientResolvedConfig | config} for AccessAnalyzerClient's `config` shape.
63
+ *
64
+ * @throws {@link AccessDeniedException} (client fault)
65
+ * <p>You do not have sufficient access to perform this action.</p>
66
+ *
67
+ * @throws {@link InternalServerException} (server fault)
68
+ * <p>Internal server error.</p>
69
+ *
70
+ * @throws {@link InvalidParameterException} (client fault)
71
+ * <p>The specified parameter is invalid.</p>
72
+ *
73
+ * @throws {@link ThrottlingException} (client fault)
74
+ * <p>Throttling limit exceeded error.</p>
75
+ *
76
+ * @throws {@link UnprocessableEntityException} (client fault)
77
+ * <p>The specified entity could not be processed.</p>
78
+ *
79
+ * @throws {@link ValidationException} (client fault)
80
+ * <p>Validation exception error.</p>
81
+ *
82
+ * @throws {@link AccessAnalyzerServiceException}
83
+ * <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
84
+ *
85
+ * @public
86
+ * @example Passing check. S3 Bucket policy without public access.
87
+ * ```javascript
88
+ * //
89
+ * const input = {
90
+ * "policyDocument": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Bob\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::111122223333:user/JohnDoe\"},\"Action\":[\"s3:GetObject\"]}]}",
91
+ * "resourceType": "AWS::S3::Bucket"
92
+ * };
93
+ * const command = new CheckNoPublicAccessCommand(input);
94
+ * const response = await client.send(command);
95
+ * /* response ==
96
+ * {
97
+ * "message": "The resource policy does not grant public access for the given resource type.",
98
+ * "result": "PASS"
99
+ * }
100
+ * *\/
101
+ * // example id: example-1
102
+ * ```
103
+ *
104
+ * @example Failing check. S3 Bucket policy with public access.
105
+ * ```javascript
106
+ * //
107
+ * const input = {
108
+ * "policyDocument": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Bob\",\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":[\"s3:GetObject\"]}]}",
109
+ * "resourceType": "AWS::S3::Bucket"
110
+ * };
111
+ * const command = new CheckNoPublicAccessCommand(input);
112
+ * const response = await client.send(command);
113
+ * /* response ==
114
+ * {
115
+ * "message": "The resource policy grants public access for the given resource type.",
116
+ * "reasons": [
117
+ * {
118
+ * "description": "Public access granted in the following statement with sid: Bob.",
119
+ * "statementId": "Bob",
120
+ * "statementIndex": 0
121
+ * }
122
+ * ],
123
+ * "result": "FAIL"
124
+ * }
125
+ * *\/
126
+ * // example id: example-2
127
+ * ```
128
+ *
129
+ */
130
+ export declare class CheckNoPublicAccessCommand extends CheckNoPublicAccessCommand_base {
131
+ }