@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.
Files changed (52) hide show
  1. package/README.md +84 -37
  2. package/dist-cjs/AccessAnalyzer.js +8 -0
  3. package/dist-cjs/commands/CheckAccessNotGrantedCommand.js +52 -0
  4. package/dist-cjs/commands/CheckNoNewAccessCommand.js +52 -0
  5. package/dist-cjs/commands/GetFindingV2Command.js +51 -0
  6. package/dist-cjs/commands/ListFindingsV2Command.js +51 -0
  7. package/dist-cjs/commands/index.js +4 -0
  8. package/dist-cjs/models/models_0.js +83 -1
  9. package/dist-cjs/pagination/GetFindingV2Paginator.js +29 -0
  10. package/dist-cjs/pagination/ListFindingsV2Paginator.js +29 -0
  11. package/dist-cjs/pagination/index.js +2 -0
  12. package/dist-cjs/protocols/Aws_restJson1.js +426 -2
  13. package/dist-es/AccessAnalyzer.js +8 -0
  14. package/dist-es/commands/CheckAccessNotGrantedCommand.js +48 -0
  15. package/dist-es/commands/CheckNoNewAccessCommand.js +48 -0
  16. package/dist-es/commands/GetFindingV2Command.js +47 -0
  17. package/dist-es/commands/ListFindingsV2Command.js +47 -0
  18. package/dist-es/commands/index.js +4 -0
  19. package/dist-es/models/models_0.js +78 -0
  20. package/dist-es/pagination/GetFindingV2Paginator.js +25 -0
  21. package/dist-es/pagination/ListFindingsV2Paginator.js +25 -0
  22. package/dist-es/pagination/index.js +2 -0
  23. package/dist-es/protocols/Aws_restJson1.js +417 -1
  24. package/dist-types/AccessAnalyzer.d.ts +52 -9
  25. package/dist-types/AccessAnalyzerClient.d.ts +30 -11
  26. package/dist-types/commands/CheckAccessNotGrantedCommand.d.ts +107 -0
  27. package/dist-types/commands/CheckNoNewAccessCommand.d.ts +106 -0
  28. package/dist-types/commands/CreateAnalyzerCommand.d.ts +5 -0
  29. package/dist-types/commands/GetAnalyzerCommand.d.ts +5 -0
  30. package/dist-types/commands/GetFindingV2Command.d.ts +146 -0
  31. package/dist-types/commands/ListAnalyzersCommand.d.ts +5 -0
  32. package/dist-types/commands/ListFindingsV2Command.d.ts +123 -0
  33. package/dist-types/commands/index.d.ts +4 -0
  34. package/dist-types/index.d.ts +24 -9
  35. package/dist-types/models/models_0.d.ts +705 -11
  36. package/dist-types/pagination/GetFindingV2Paginator.d.ts +7 -0
  37. package/dist-types/pagination/ListFindingsV2Paginator.d.ts +7 -0
  38. package/dist-types/pagination/index.d.ts +2 -0
  39. package/dist-types/protocols/Aws_restJson1.d.ts +36 -0
  40. package/dist-types/ts3.4/AccessAnalyzer.d.ts +68 -0
  41. package/dist-types/ts3.4/AccessAnalyzerClient.d.ts +24 -0
  42. package/dist-types/ts3.4/commands/CheckAccessNotGrantedCommand.d.ts +42 -0
  43. package/dist-types/ts3.4/commands/CheckNoNewAccessCommand.d.ts +38 -0
  44. package/dist-types/ts3.4/commands/GetFindingV2Command.d.ts +35 -0
  45. package/dist-types/ts3.4/commands/ListFindingsV2Command.d.ts +38 -0
  46. package/dist-types/ts3.4/commands/index.d.ts +4 -0
  47. package/dist-types/ts3.4/models/models_0.d.ts +238 -1
  48. package/dist-types/ts3.4/pagination/GetFindingV2Paginator.d.ts +11 -0
  49. package/dist-types/ts3.4/pagination/ListFindingsV2Paginator.d.ts +11 -0
  50. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  51. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +48 -0
  52. package/package.json +3 -3
@@ -0,0 +1,47 @@
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 { de_GetFindingV2Command, se_GetFindingV2Command } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class GetFindingV2Command extends $Command {
8
+ static getEndpointParameterInstructions() {
9
+ return {
10
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
11
+ Endpoint: { type: "builtInParams", name: "endpoint" },
12
+ Region: { type: "builtInParams", name: "region" },
13
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
14
+ };
15
+ }
16
+ constructor(input) {
17
+ super();
18
+ this.input = input;
19
+ }
20
+ resolveMiddleware(clientStack, configuration, options) {
21
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
+ this.middlewareStack.use(getEndpointPlugin(configuration, GetFindingV2Command.getEndpointParameterInstructions()));
23
+ const stack = clientStack.concat(this.middlewareStack);
24
+ const { logger } = configuration;
25
+ const clientName = "AccessAnalyzerClient";
26
+ const commandName = "GetFindingV2Command";
27
+ const handlerExecutionContext = {
28
+ logger,
29
+ clientName,
30
+ commandName,
31
+ inputFilterSensitiveLog: (_) => _,
32
+ outputFilterSensitiveLog: (_) => _,
33
+ [SMITHY_CONTEXT_KEY]: {
34
+ service: "AccessAnalyzer",
35
+ operation: "GetFindingV2",
36
+ },
37
+ };
38
+ const { requestHandler } = configuration;
39
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
40
+ }
41
+ serialize(input, context) {
42
+ return se_GetFindingV2Command(input, context);
43
+ }
44
+ deserialize(output, context) {
45
+ return de_GetFindingV2Command(output, context);
46
+ }
47
+ }
@@ -0,0 +1,47 @@
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 { de_ListFindingsV2Command, se_ListFindingsV2Command } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class ListFindingsV2Command extends $Command {
8
+ static getEndpointParameterInstructions() {
9
+ return {
10
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
11
+ Endpoint: { type: "builtInParams", name: "endpoint" },
12
+ Region: { type: "builtInParams", name: "region" },
13
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
14
+ };
15
+ }
16
+ constructor(input) {
17
+ super();
18
+ this.input = input;
19
+ }
20
+ resolveMiddleware(clientStack, configuration, options) {
21
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
+ this.middlewareStack.use(getEndpointPlugin(configuration, ListFindingsV2Command.getEndpointParameterInstructions()));
23
+ const stack = clientStack.concat(this.middlewareStack);
24
+ const { logger } = configuration;
25
+ const clientName = "AccessAnalyzerClient";
26
+ const commandName = "ListFindingsV2Command";
27
+ const handlerExecutionContext = {
28
+ logger,
29
+ clientName,
30
+ commandName,
31
+ inputFilterSensitiveLog: (_) => _,
32
+ outputFilterSensitiveLog: (_) => _,
33
+ [SMITHY_CONTEXT_KEY]: {
34
+ service: "AccessAnalyzer",
35
+ operation: "ListFindingsV2",
36
+ },
37
+ };
38
+ const { requestHandler } = configuration;
39
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
40
+ }
41
+ serialize(input, context) {
42
+ return se_ListFindingsV2Command(input, context);
43
+ }
44
+ deserialize(output, context) {
45
+ return de_ListFindingsV2Command(output, context);
46
+ }
47
+ }
@@ -1,5 +1,7 @@
1
1
  export * from "./ApplyArchiveRuleCommand";
2
2
  export * from "./CancelPolicyGenerationCommand";
3
+ export * from "./CheckAccessNotGrantedCommand";
4
+ export * from "./CheckNoNewAccessCommand";
3
5
  export * from "./CreateAccessPreviewCommand";
4
6
  export * from "./CreateAnalyzerCommand";
5
7
  export * from "./CreateArchiveRuleCommand";
@@ -10,6 +12,7 @@ export * from "./GetAnalyzedResourceCommand";
10
12
  export * from "./GetAnalyzerCommand";
11
13
  export * from "./GetArchiveRuleCommand";
12
14
  export * from "./GetFindingCommand";
15
+ export * from "./GetFindingV2Command";
13
16
  export * from "./GetGeneratedPolicyCommand";
14
17
  export * from "./ListAccessPreviewFindingsCommand";
15
18
  export * from "./ListAccessPreviewsCommand";
@@ -17,6 +20,7 @@ export * from "./ListAnalyzedResourcesCommand";
17
20
  export * from "./ListAnalyzersCommand";
18
21
  export * from "./ListArchiveRulesCommand";
19
22
  export * from "./ListFindingsCommand";
23
+ export * from "./ListFindingsV2Command";
20
24
  export * from "./ListPolicyGenerationsCommand";
21
25
  export * from "./ListTagsForResourceCommand";
22
26
  export * from "./StartPolicyGenerationCommand";
@@ -1,3 +1,4 @@
1
+ import { SENSITIVE_STRING } from "@smithy/smithy-client";
1
2
  import { AccessAnalyzerServiceException as __BaseException } from "./AccessAnalyzerServiceException";
2
3
  export class AccessDeniedException extends __BaseException {
3
4
  constructor(opts) {
@@ -103,6 +104,51 @@ export class ValidationException extends __BaseException {
103
104
  this.fieldList = opts.fieldList;
104
105
  }
105
106
  }
107
+ export var AnalyzerConfiguration;
108
+ (function (AnalyzerConfiguration) {
109
+ AnalyzerConfiguration.visit = (value, visitor) => {
110
+ if (value.unusedAccess !== undefined)
111
+ return visitor.unusedAccess(value.unusedAccess);
112
+ return visitor._(value.$unknown[0], value.$unknown[1]);
113
+ };
114
+ })(AnalyzerConfiguration || (AnalyzerConfiguration = {}));
115
+ export const AccessCheckPolicyType = {
116
+ IDENTITY_POLICY: "IDENTITY_POLICY",
117
+ RESOURCE_POLICY: "RESOURCE_POLICY",
118
+ };
119
+ export const CheckAccessNotGrantedResult = {
120
+ FAIL: "FAIL",
121
+ PASS: "PASS",
122
+ };
123
+ export class InvalidParameterException extends __BaseException {
124
+ constructor(opts) {
125
+ super({
126
+ name: "InvalidParameterException",
127
+ $fault: "client",
128
+ ...opts,
129
+ });
130
+ this.name = "InvalidParameterException";
131
+ this.$fault = "client";
132
+ Object.setPrototypeOf(this, InvalidParameterException.prototype);
133
+ }
134
+ }
135
+ export class UnprocessableEntityException extends __BaseException {
136
+ constructor(opts) {
137
+ super({
138
+ name: "UnprocessableEntityException",
139
+ $fault: "client",
140
+ ...opts,
141
+ });
142
+ this.name = "UnprocessableEntityException";
143
+ this.$fault = "client";
144
+ this.$retryable = {};
145
+ Object.setPrototypeOf(this, UnprocessableEntityException.prototype);
146
+ }
147
+ }
148
+ export const CheckNoNewAccessResult = {
149
+ FAIL: "FAIL",
150
+ PASS: "PASS",
151
+ };
106
152
  export const KmsGrantOperation = {
107
153
  CREATE_GRANT: "CreateGrant",
108
154
  DECRYPT: "Decrypt",
@@ -199,6 +245,29 @@ export const AccessPreviewStatusReasonCode = {
199
245
  INTERNAL_ERROR: "INTERNAL_ERROR",
200
246
  INVALID_CONFIGURATION: "INVALID_CONFIGURATION",
201
247
  };
248
+ export var FindingDetails;
249
+ (function (FindingDetails) {
250
+ FindingDetails.visit = (value, visitor) => {
251
+ if (value.externalAccessDetails !== undefined)
252
+ return visitor.externalAccessDetails(value.externalAccessDetails);
253
+ if (value.unusedPermissionDetails !== undefined)
254
+ return visitor.unusedPermissionDetails(value.unusedPermissionDetails);
255
+ if (value.unusedIamUserAccessKeyDetails !== undefined)
256
+ return visitor.unusedIamUserAccessKeyDetails(value.unusedIamUserAccessKeyDetails);
257
+ if (value.unusedIamRoleDetails !== undefined)
258
+ return visitor.unusedIamRoleDetails(value.unusedIamRoleDetails);
259
+ if (value.unusedIamUserPasswordDetails !== undefined)
260
+ return visitor.unusedIamUserPasswordDetails(value.unusedIamUserPasswordDetails);
261
+ return visitor._(value.$unknown[0], value.$unknown[1]);
262
+ };
263
+ })(FindingDetails || (FindingDetails = {}));
264
+ export const FindingType = {
265
+ EXTERNAL_ACCESS: "ExternalAccess",
266
+ UNUSED_IAM_ROLE: "UnusedIAMRole",
267
+ UNUSED_IAM_USER_ACCESS_KEY: "UnusedIAMUserAccessKey",
268
+ UNUSED_IAM_USER_PASSWORD: "UnusedIAMUserPassword",
269
+ UNUSED_PERMISSION: "UnusedPermission",
270
+ };
202
271
  export const JobErrorCode = {
203
272
  AUTHORIZATION_ERROR: "AUTHORIZATION_ERROR",
204
273
  RESOURCE_NOT_FOUND_ERROR: "RESOURCE_NOT_FOUND_ERROR",
@@ -260,3 +329,12 @@ export var PathElement;
260
329
  return visitor._(value.$unknown[0], value.$unknown[1]);
261
330
  };
262
331
  })(PathElement || (PathElement = {}));
332
+ export const CheckAccessNotGrantedRequestFilterSensitiveLog = (obj) => ({
333
+ ...obj,
334
+ ...(obj.policyDocument && { policyDocument: SENSITIVE_STRING }),
335
+ });
336
+ export const CheckNoNewAccessRequestFilterSensitiveLog = (obj) => ({
337
+ ...obj,
338
+ ...(obj.newPolicyDocument && { newPolicyDocument: SENSITIVE_STRING }),
339
+ ...(obj.existingPolicyDocument && { existingPolicyDocument: SENSITIVE_STRING }),
340
+ });
@@ -0,0 +1,25 @@
1
+ import { AccessAnalyzerClient } from "../AccessAnalyzerClient";
2
+ import { GetFindingV2Command, } from "../commands/GetFindingV2Command";
3
+ const makePagedClientRequest = async (client, input, ...args) => {
4
+ return await client.send(new GetFindingV2Command(input), ...args);
5
+ };
6
+ export async function* paginateGetFindingV2(config, input, ...additionalArguments) {
7
+ let token = config.startingToken || undefined;
8
+ let hasNext = true;
9
+ let page;
10
+ while (hasNext) {
11
+ input.nextToken = token;
12
+ input["maxResults"] = config.pageSize;
13
+ if (config.client instanceof AccessAnalyzerClient) {
14
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
+ }
16
+ else {
17
+ throw new Error("Invalid client, expected AccessAnalyzer | AccessAnalyzerClient");
18
+ }
19
+ yield page;
20
+ const prevToken = token;
21
+ token = page.nextToken;
22
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
+ }
24
+ return undefined;
25
+ }
@@ -0,0 +1,25 @@
1
+ import { AccessAnalyzerClient } from "../AccessAnalyzerClient";
2
+ import { ListFindingsV2Command, } from "../commands/ListFindingsV2Command";
3
+ const makePagedClientRequest = async (client, input, ...args) => {
4
+ return await client.send(new ListFindingsV2Command(input), ...args);
5
+ };
6
+ export async function* paginateListFindingsV2(config, input, ...additionalArguments) {
7
+ let token = config.startingToken || undefined;
8
+ let hasNext = true;
9
+ let page;
10
+ while (hasNext) {
11
+ input.nextToken = token;
12
+ input["maxResults"] = config.pageSize;
13
+ if (config.client instanceof AccessAnalyzerClient) {
14
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
+ }
16
+ else {
17
+ throw new Error("Invalid client, expected AccessAnalyzer | AccessAnalyzerClient");
18
+ }
19
+ yield page;
20
+ const prevToken = token;
21
+ token = page.nextToken;
22
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
+ }
24
+ return undefined;
25
+ }
@@ -1,3 +1,4 @@
1
+ export * from "./GetFindingV2Paginator";
1
2
  export * from "./Interfaces";
2
3
  export * from "./ListAccessPreviewFindingsPaginator";
3
4
  export * from "./ListAccessPreviewsPaginator";
@@ -5,5 +6,6 @@ export * from "./ListAnalyzedResourcesPaginator";
5
6
  export * from "./ListAnalyzersPaginator";
6
7
  export * from "./ListArchiveRulesPaginator";
7
8
  export * from "./ListFindingsPaginator";
9
+ export * from "./ListFindingsV2Paginator";
8
10
  export * from "./ListPolicyGenerationsPaginator";
9
11
  export * from "./ValidatePolicyPaginator";