@aws-sdk/client-accessanalyzer 3.451.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
@@ -1,8 +1,9 @@
1
+ import { awsExpectUnion as __expectUnion } from "@aws-sdk/core";
1
2
  import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
3
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
3
4
  import { v4 as generateIdempotencyToken } from "uuid";
4
5
  import { AccessAnalyzerServiceException as __BaseException } from "../models/AccessAnalyzerServiceException";
5
- import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
+ import { AccessDeniedException, ConflictException, InternalServerException, InvalidParameterException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, UnprocessableEntityException, ValidationException, } from "../models/models_0";
6
7
  export const se_ApplyArchiveRuleCommand = async (input, context) => {
7
8
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
9
  const headers = {
@@ -41,6 +42,50 @@ export const se_CancelPolicyGenerationCommand = async (input, context) => {
41
42
  body,
42
43
  });
43
44
  };
45
+ export const se_CheckAccessNotGrantedCommand = async (input, context) => {
46
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
47
+ const headers = {
48
+ "content-type": "application/json",
49
+ };
50
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policy/check-access-not-granted";
51
+ let body;
52
+ body = JSON.stringify(take(input, {
53
+ access: (_) => _json(_),
54
+ policyDocument: [],
55
+ policyType: [],
56
+ }));
57
+ return new __HttpRequest({
58
+ protocol,
59
+ hostname,
60
+ port,
61
+ method: "POST",
62
+ headers,
63
+ path: resolvedPath,
64
+ body,
65
+ });
66
+ };
67
+ export const se_CheckNoNewAccessCommand = async (input, context) => {
68
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
69
+ const headers = {
70
+ "content-type": "application/json",
71
+ };
72
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policy/check-no-new-access";
73
+ let body;
74
+ body = JSON.stringify(take(input, {
75
+ existingPolicyDocument: [],
76
+ newPolicyDocument: [],
77
+ policyType: [],
78
+ }));
79
+ return new __HttpRequest({
80
+ protocol,
81
+ hostname,
82
+ port,
83
+ method: "POST",
84
+ headers,
85
+ path: resolvedPath,
86
+ body,
87
+ });
88
+ };
44
89
  export const se_CreateAccessPreviewCommand = async (input, context) => {
45
90
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
46
91
  const headers = {
@@ -74,6 +119,7 @@ export const se_CreateAnalyzerCommand = async (input, context) => {
74
119
  analyzerName: [],
75
120
  archiveRules: (_) => _json(_),
76
121
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
122
+ configuration: (_) => _json(_),
77
123
  tags: (_) => _json(_),
78
124
  type: [],
79
125
  }));
@@ -246,6 +292,28 @@ export const se_GetFindingCommand = async (input, context) => {
246
292
  body,
247
293
  });
248
294
  };
295
+ export const se_GetFindingV2Command = async (input, context) => {
296
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
297
+ const headers = {};
298
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findingv2/{id}";
299
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
300
+ const query = map({
301
+ analyzerArn: [, __expectNonNull(input.analyzerArn, `analyzerArn`)],
302
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
303
+ nextToken: [, input.nextToken],
304
+ });
305
+ let body;
306
+ return new __HttpRequest({
307
+ protocol,
308
+ hostname,
309
+ port,
310
+ method: "GET",
311
+ headers,
312
+ path: resolvedPath,
313
+ query,
314
+ body,
315
+ });
316
+ };
249
317
  export const se_GetGeneratedPolicyCommand = async (input, context) => {
250
318
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
251
319
  const headers = {};
@@ -407,6 +475,30 @@ export const se_ListFindingsCommand = async (input, context) => {
407
475
  body,
408
476
  });
409
477
  };
478
+ export const se_ListFindingsV2Command = async (input, context) => {
479
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
480
+ const headers = {
481
+ "content-type": "application/json",
482
+ };
483
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findingv2";
484
+ let body;
485
+ body = JSON.stringify(take(input, {
486
+ analyzerArn: [],
487
+ filter: (_) => _json(_),
488
+ maxResults: [],
489
+ nextToken: [],
490
+ sort: (_) => _json(_),
491
+ }));
492
+ return new __HttpRequest({
493
+ protocol,
494
+ hostname,
495
+ port,
496
+ method: "POST",
497
+ headers,
498
+ path: resolvedPath,
499
+ body,
500
+ });
501
+ };
410
502
  export const se_ListPolicyGenerationsCommand = async (input, context) => {
411
503
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
412
504
  const headers = {};
@@ -687,6 +779,106 @@ const de_CancelPolicyGenerationCommandError = async (output, context) => {
687
779
  });
688
780
  }
689
781
  };
782
+ export const de_CheckAccessNotGrantedCommand = async (output, context) => {
783
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
784
+ return de_CheckAccessNotGrantedCommandError(output, context);
785
+ }
786
+ const contents = map({
787
+ $metadata: deserializeMetadata(output),
788
+ });
789
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
790
+ const doc = take(data, {
791
+ message: __expectString,
792
+ reasons: _json,
793
+ result: __expectString,
794
+ });
795
+ Object.assign(contents, doc);
796
+ return contents;
797
+ };
798
+ const de_CheckAccessNotGrantedCommandError = async (output, context) => {
799
+ const parsedOutput = {
800
+ ...output,
801
+ body: await parseErrorBody(output.body, context),
802
+ };
803
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
804
+ switch (errorCode) {
805
+ case "AccessDeniedException":
806
+ case "com.amazonaws.accessanalyzer#AccessDeniedException":
807
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
808
+ case "InternalServerException":
809
+ case "com.amazonaws.accessanalyzer#InternalServerException":
810
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
811
+ case "InvalidParameterException":
812
+ case "com.amazonaws.accessanalyzer#InvalidParameterException":
813
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
814
+ case "ThrottlingException":
815
+ case "com.amazonaws.accessanalyzer#ThrottlingException":
816
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
817
+ case "UnprocessableEntityException":
818
+ case "com.amazonaws.accessanalyzer#UnprocessableEntityException":
819
+ throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
820
+ case "ValidationException":
821
+ case "com.amazonaws.accessanalyzer#ValidationException":
822
+ throw await de_ValidationExceptionRes(parsedOutput, context);
823
+ default:
824
+ const parsedBody = parsedOutput.body;
825
+ return throwDefaultError({
826
+ output,
827
+ parsedBody,
828
+ errorCode,
829
+ });
830
+ }
831
+ };
832
+ export const de_CheckNoNewAccessCommand = async (output, context) => {
833
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
834
+ return de_CheckNoNewAccessCommandError(output, context);
835
+ }
836
+ const contents = map({
837
+ $metadata: deserializeMetadata(output),
838
+ });
839
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
840
+ const doc = take(data, {
841
+ message: __expectString,
842
+ reasons: _json,
843
+ result: __expectString,
844
+ });
845
+ Object.assign(contents, doc);
846
+ return contents;
847
+ };
848
+ const de_CheckNoNewAccessCommandError = async (output, context) => {
849
+ const parsedOutput = {
850
+ ...output,
851
+ body: await parseErrorBody(output.body, context),
852
+ };
853
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
854
+ switch (errorCode) {
855
+ case "AccessDeniedException":
856
+ case "com.amazonaws.accessanalyzer#AccessDeniedException":
857
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
858
+ case "InternalServerException":
859
+ case "com.amazonaws.accessanalyzer#InternalServerException":
860
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
861
+ case "InvalidParameterException":
862
+ case "com.amazonaws.accessanalyzer#InvalidParameterException":
863
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
864
+ case "ThrottlingException":
865
+ case "com.amazonaws.accessanalyzer#ThrottlingException":
866
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
867
+ case "UnprocessableEntityException":
868
+ case "com.amazonaws.accessanalyzer#UnprocessableEntityException":
869
+ throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
870
+ case "ValidationException":
871
+ case "com.amazonaws.accessanalyzer#ValidationException":
872
+ throw await de_ValidationExceptionRes(parsedOutput, context);
873
+ default:
874
+ const parsedBody = parsedOutput.body;
875
+ return throwDefaultError({
876
+ output,
877
+ parsedBody,
878
+ errorCode,
879
+ });
880
+ }
881
+ };
690
882
  export const de_CreateAccessPreviewCommand = async (output, context) => {
691
883
  if (output.statusCode !== 200 && output.statusCode >= 300) {
692
884
  return de_CreateAccessPreviewCommandError(output, context);
@@ -1140,6 +1332,62 @@ const de_GetFindingCommandError = async (output, context) => {
1140
1332
  });
1141
1333
  }
1142
1334
  };
1335
+ export const de_GetFindingV2Command = async (output, context) => {
1336
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1337
+ return de_GetFindingV2CommandError(output, context);
1338
+ }
1339
+ const contents = map({
1340
+ $metadata: deserializeMetadata(output),
1341
+ });
1342
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1343
+ const doc = take(data, {
1344
+ analyzedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1345
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1346
+ error: __expectString,
1347
+ findingDetails: (_) => de_FindingDetailsList(_, context),
1348
+ findingType: __expectString,
1349
+ id: __expectString,
1350
+ nextToken: __expectString,
1351
+ resource: __expectString,
1352
+ resourceOwnerAccount: __expectString,
1353
+ resourceType: __expectString,
1354
+ status: __expectString,
1355
+ updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1356
+ });
1357
+ Object.assign(contents, doc);
1358
+ return contents;
1359
+ };
1360
+ const de_GetFindingV2CommandError = async (output, context) => {
1361
+ const parsedOutput = {
1362
+ ...output,
1363
+ body: await parseErrorBody(output.body, context),
1364
+ };
1365
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1366
+ switch (errorCode) {
1367
+ case "AccessDeniedException":
1368
+ case "com.amazonaws.accessanalyzer#AccessDeniedException":
1369
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1370
+ case "InternalServerException":
1371
+ case "com.amazonaws.accessanalyzer#InternalServerException":
1372
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1373
+ case "ResourceNotFoundException":
1374
+ case "com.amazonaws.accessanalyzer#ResourceNotFoundException":
1375
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1376
+ case "ThrottlingException":
1377
+ case "com.amazonaws.accessanalyzer#ThrottlingException":
1378
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1379
+ case "ValidationException":
1380
+ case "com.amazonaws.accessanalyzer#ValidationException":
1381
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1382
+ default:
1383
+ const parsedBody = parsedOutput.body;
1384
+ return throwDefaultError({
1385
+ output,
1386
+ parsedBody,
1387
+ errorCode,
1388
+ });
1389
+ }
1390
+ };
1143
1391
  export const de_GetGeneratedPolicyCommand = async (output, context) => {
1144
1392
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1145
1393
  return de_GetGeneratedPolicyCommandError(output, context);
@@ -1456,6 +1704,52 @@ const de_ListFindingsCommandError = async (output, context) => {
1456
1704
  });
1457
1705
  }
1458
1706
  };
1707
+ export const de_ListFindingsV2Command = async (output, context) => {
1708
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1709
+ return de_ListFindingsV2CommandError(output, context);
1710
+ }
1711
+ const contents = map({
1712
+ $metadata: deserializeMetadata(output),
1713
+ });
1714
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1715
+ const doc = take(data, {
1716
+ findings: (_) => de_FindingsListV2(_, context),
1717
+ nextToken: __expectString,
1718
+ });
1719
+ Object.assign(contents, doc);
1720
+ return contents;
1721
+ };
1722
+ const de_ListFindingsV2CommandError = async (output, context) => {
1723
+ const parsedOutput = {
1724
+ ...output,
1725
+ body: await parseErrorBody(output.body, context),
1726
+ };
1727
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1728
+ switch (errorCode) {
1729
+ case "AccessDeniedException":
1730
+ case "com.amazonaws.accessanalyzer#AccessDeniedException":
1731
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1732
+ case "InternalServerException":
1733
+ case "com.amazonaws.accessanalyzer#InternalServerException":
1734
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1735
+ case "ResourceNotFoundException":
1736
+ case "com.amazonaws.accessanalyzer#ResourceNotFoundException":
1737
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1738
+ case "ThrottlingException":
1739
+ case "com.amazonaws.accessanalyzer#ThrottlingException":
1740
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1741
+ case "ValidationException":
1742
+ case "com.amazonaws.accessanalyzer#ValidationException":
1743
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1744
+ default:
1745
+ const parsedBody = parsedOutput.body;
1746
+ return throwDefaultError({
1747
+ output,
1748
+ parsedBody,
1749
+ errorCode,
1750
+ });
1751
+ }
1752
+ };
1459
1753
  export const de_ListPolicyGenerationsCommand = async (output, context) => {
1460
1754
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1461
1755
  return de_ListPolicyGenerationsCommandError(output, context);
@@ -1887,6 +2181,19 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1887
2181
  });
1888
2182
  return __decorateServiceException(exception, parsedOutput.body);
1889
2183
  };
2184
+ const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
2185
+ const contents = map({});
2186
+ const data = parsedOutput.body;
2187
+ const doc = take(data, {
2188
+ message: __expectString,
2189
+ });
2190
+ Object.assign(contents, doc);
2191
+ const exception = new InvalidParameterException({
2192
+ $metadata: deserializeMetadata(parsedOutput),
2193
+ ...contents,
2194
+ });
2195
+ return __decorateServiceException(exception, parsedOutput.body);
2196
+ };
1890
2197
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1891
2198
  const contents = map({});
1892
2199
  const data = parsedOutput.body;
@@ -1935,6 +2242,19 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1935
2242
  });
1936
2243
  return __decorateServiceException(exception, parsedOutput.body);
1937
2244
  };
2245
+ const de_UnprocessableEntityExceptionRes = async (parsedOutput, context) => {
2246
+ const contents = map({});
2247
+ const data = parsedOutput.body;
2248
+ const doc = take(data, {
2249
+ message: __expectString,
2250
+ });
2251
+ Object.assign(contents, doc);
2252
+ const exception = new UnprocessableEntityException({
2253
+ $metadata: deserializeMetadata(parsedOutput),
2254
+ ...contents,
2255
+ });
2256
+ return __decorateServiceException(exception, parsedOutput.body);
2257
+ };
1938
2258
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
1939
2259
  const contents = map({});
1940
2260
  const data = parsedOutput.body;
@@ -2038,6 +2358,7 @@ const de_AnalyzersList = (output, context) => {
2038
2358
  const de_AnalyzerSummary = (output, context) => {
2039
2359
  return take(output, {
2040
2360
  arn: __expectString,
2361
+ configuration: (_) => _json(__expectUnion(_)),
2041
2362
  createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2042
2363
  lastResourceAnalyzed: __expectString,
2043
2364
  lastResourceAnalyzedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
@@ -2089,6 +2410,42 @@ const de_Finding = (output, context) => {
2089
2410
  updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2090
2411
  });
2091
2412
  };
2413
+ const de_FindingDetails = (output, context) => {
2414
+ if (output.externalAccessDetails != null) {
2415
+ return {
2416
+ externalAccessDetails: _json(output.externalAccessDetails),
2417
+ };
2418
+ }
2419
+ if (output.unusedIamRoleDetails != null) {
2420
+ return {
2421
+ unusedIamRoleDetails: de_UnusedIamRoleDetails(output.unusedIamRoleDetails, context),
2422
+ };
2423
+ }
2424
+ if (output.unusedIamUserAccessKeyDetails != null) {
2425
+ return {
2426
+ unusedIamUserAccessKeyDetails: de_UnusedIamUserAccessKeyDetails(output.unusedIamUserAccessKeyDetails, context),
2427
+ };
2428
+ }
2429
+ if (output.unusedIamUserPasswordDetails != null) {
2430
+ return {
2431
+ unusedIamUserPasswordDetails: de_UnusedIamUserPasswordDetails(output.unusedIamUserPasswordDetails, context),
2432
+ };
2433
+ }
2434
+ if (output.unusedPermissionDetails != null) {
2435
+ return {
2436
+ unusedPermissionDetails: de_UnusedPermissionDetails(output.unusedPermissionDetails, context),
2437
+ };
2438
+ }
2439
+ return { $unknown: Object.entries(output)[0] };
2440
+ };
2441
+ const de_FindingDetailsList = (output, context) => {
2442
+ const retVal = (output || [])
2443
+ .filter((e) => e != null)
2444
+ .map((entry) => {
2445
+ return de_FindingDetails(__expectUnion(entry), context);
2446
+ });
2447
+ return retVal;
2448
+ };
2092
2449
  const de_FindingsList = (output, context) => {
2093
2450
  const retVal = (output || [])
2094
2451
  .filter((e) => e != null)
@@ -2097,6 +2454,14 @@ const de_FindingsList = (output, context) => {
2097
2454
  });
2098
2455
  return retVal;
2099
2456
  };
2457
+ const de_FindingsListV2 = (output, context) => {
2458
+ const retVal = (output || [])
2459
+ .filter((e) => e != null)
2460
+ .map((entry) => {
2461
+ return de_FindingSummaryV2(entry, context);
2462
+ });
2463
+ return retVal;
2464
+ };
2100
2465
  const de_FindingSummary = (output, context) => {
2101
2466
  return take(output, {
2102
2467
  action: _json,
@@ -2115,6 +2480,20 @@ const de_FindingSummary = (output, context) => {
2115
2480
  updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2116
2481
  });
2117
2482
  };
2483
+ const de_FindingSummaryV2 = (output, context) => {
2484
+ return take(output, {
2485
+ analyzedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2486
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2487
+ error: __expectString,
2488
+ findingType: __expectString,
2489
+ id: __expectString,
2490
+ resource: __expectString,
2491
+ resourceOwnerAccount: __expectString,
2492
+ resourceType: __expectString,
2493
+ status: __expectString,
2494
+ updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2495
+ });
2496
+ };
2118
2497
  const de_GeneratedPolicyProperties = (output, context) => {
2119
2498
  return take(output, {
2120
2499
  cloudTrailProperties: (_) => de_CloudTrailProperties(_, context),
@@ -2154,6 +2533,43 @@ const de_PolicyGenerationList = (output, context) => {
2154
2533
  });
2155
2534
  return retVal;
2156
2535
  };
2536
+ const de_UnusedAction = (output, context) => {
2537
+ return take(output, {
2538
+ action: __expectString,
2539
+ lastAccessed: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2540
+ });
2541
+ };
2542
+ const de_UnusedActionList = (output, context) => {
2543
+ const retVal = (output || [])
2544
+ .filter((e) => e != null)
2545
+ .map((entry) => {
2546
+ return de_UnusedAction(entry, context);
2547
+ });
2548
+ return retVal;
2549
+ };
2550
+ const de_UnusedIamRoleDetails = (output, context) => {
2551
+ return take(output, {
2552
+ lastAccessed: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2553
+ });
2554
+ };
2555
+ const de_UnusedIamUserAccessKeyDetails = (output, context) => {
2556
+ return take(output, {
2557
+ accessKeyId: __expectString,
2558
+ lastAccessed: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2559
+ });
2560
+ };
2561
+ const de_UnusedIamUserPasswordDetails = (output, context) => {
2562
+ return take(output, {
2563
+ lastAccessed: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2564
+ });
2565
+ };
2566
+ const de_UnusedPermissionDetails = (output, context) => {
2567
+ return take(output, {
2568
+ actions: (_) => de_UnusedActionList(_, context),
2569
+ lastAccessed: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2570
+ serviceNamespace: __expectString,
2571
+ });
2572
+ };
2157
2573
  const deserializeMetadata = (output) => ({
2158
2574
  httpStatusCode: output.statusCode,
2159
2575
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -2,6 +2,8 @@ import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
2
2
  import { AccessAnalyzerClient } from "./AccessAnalyzerClient";
3
3
  import { ApplyArchiveRuleCommandInput, ApplyArchiveRuleCommandOutput } from "./commands/ApplyArchiveRuleCommand";
4
4
  import { CancelPolicyGenerationCommandInput, CancelPolicyGenerationCommandOutput } from "./commands/CancelPolicyGenerationCommand";
5
+ import { CheckAccessNotGrantedCommandInput, CheckAccessNotGrantedCommandOutput } from "./commands/CheckAccessNotGrantedCommand";
6
+ import { CheckNoNewAccessCommandInput, CheckNoNewAccessCommandOutput } from "./commands/CheckNoNewAccessCommand";
5
7
  import { CreateAccessPreviewCommandInput, CreateAccessPreviewCommandOutput } from "./commands/CreateAccessPreviewCommand";
6
8
  import { CreateAnalyzerCommandInput, CreateAnalyzerCommandOutput } from "./commands/CreateAnalyzerCommand";
7
9
  import { CreateArchiveRuleCommandInput, CreateArchiveRuleCommandOutput } from "./commands/CreateArchiveRuleCommand";
@@ -12,6 +14,7 @@ import { GetAnalyzedResourceCommandInput, GetAnalyzedResourceCommandOutput } fro
12
14
  import { GetAnalyzerCommandInput, GetAnalyzerCommandOutput } from "./commands/GetAnalyzerCommand";
13
15
  import { GetArchiveRuleCommandInput, GetArchiveRuleCommandOutput } from "./commands/GetArchiveRuleCommand";
14
16
  import { GetFindingCommandInput, GetFindingCommandOutput } from "./commands/GetFindingCommand";
17
+ import { GetFindingV2CommandInput, GetFindingV2CommandOutput } from "./commands/GetFindingV2Command";
15
18
  import { GetGeneratedPolicyCommandInput, GetGeneratedPolicyCommandOutput } from "./commands/GetGeneratedPolicyCommand";
16
19
  import { ListAccessPreviewFindingsCommandInput, ListAccessPreviewFindingsCommandOutput } from "./commands/ListAccessPreviewFindingsCommand";
17
20
  import { ListAccessPreviewsCommandInput, ListAccessPreviewsCommandOutput } from "./commands/ListAccessPreviewsCommand";
@@ -19,6 +22,7 @@ import { ListAnalyzedResourcesCommandInput, ListAnalyzedResourcesCommandOutput }
19
22
  import { ListAnalyzersCommandInput, ListAnalyzersCommandOutput } from "./commands/ListAnalyzersCommand";
20
23
  import { ListArchiveRulesCommandInput, ListArchiveRulesCommandOutput } from "./commands/ListArchiveRulesCommand";
21
24
  import { ListFindingsCommandInput, ListFindingsCommandOutput } from "./commands/ListFindingsCommand";
25
+ import { ListFindingsV2CommandInput, ListFindingsV2CommandOutput } from "./commands/ListFindingsV2Command";
22
26
  import { ListPolicyGenerationsCommandInput, ListPolicyGenerationsCommandOutput } from "./commands/ListPolicyGenerationsCommand";
23
27
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
24
28
  import { StartPolicyGenerationCommandInput, StartPolicyGenerationCommandOutput } from "./commands/StartPolicyGenerationCommand";
@@ -41,6 +45,18 @@ export interface AccessAnalyzer {
41
45
  cancelPolicyGeneration(args: CancelPolicyGenerationCommandInput, options?: __HttpHandlerOptions): Promise<CancelPolicyGenerationCommandOutput>;
42
46
  cancelPolicyGeneration(args: CancelPolicyGenerationCommandInput, cb: (err: any, data?: CancelPolicyGenerationCommandOutput) => void): void;
43
47
  cancelPolicyGeneration(args: CancelPolicyGenerationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CancelPolicyGenerationCommandOutput) => void): void;
48
+ /**
49
+ * @see {@link CheckAccessNotGrantedCommand}
50
+ */
51
+ checkAccessNotGranted(args: CheckAccessNotGrantedCommandInput, options?: __HttpHandlerOptions): Promise<CheckAccessNotGrantedCommandOutput>;
52
+ checkAccessNotGranted(args: CheckAccessNotGrantedCommandInput, cb: (err: any, data?: CheckAccessNotGrantedCommandOutput) => void): void;
53
+ checkAccessNotGranted(args: CheckAccessNotGrantedCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CheckAccessNotGrantedCommandOutput) => void): void;
54
+ /**
55
+ * @see {@link CheckNoNewAccessCommand}
56
+ */
57
+ checkNoNewAccess(args: CheckNoNewAccessCommandInput, options?: __HttpHandlerOptions): Promise<CheckNoNewAccessCommandOutput>;
58
+ checkNoNewAccess(args: CheckNoNewAccessCommandInput, cb: (err: any, data?: CheckNoNewAccessCommandOutput) => void): void;
59
+ checkNoNewAccess(args: CheckNoNewAccessCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CheckNoNewAccessCommandOutput) => void): void;
44
60
  /**
45
61
  * @see {@link CreateAccessPreviewCommand}
46
62
  */
@@ -101,6 +117,12 @@ export interface AccessAnalyzer {
101
117
  getFinding(args: GetFindingCommandInput, options?: __HttpHandlerOptions): Promise<GetFindingCommandOutput>;
102
118
  getFinding(args: GetFindingCommandInput, cb: (err: any, data?: GetFindingCommandOutput) => void): void;
103
119
  getFinding(args: GetFindingCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetFindingCommandOutput) => void): void;
120
+ /**
121
+ * @see {@link GetFindingV2Command}
122
+ */
123
+ getFindingV2(args: GetFindingV2CommandInput, options?: __HttpHandlerOptions): Promise<GetFindingV2CommandOutput>;
124
+ getFindingV2(args: GetFindingV2CommandInput, cb: (err: any, data?: GetFindingV2CommandOutput) => void): void;
125
+ getFindingV2(args: GetFindingV2CommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetFindingV2CommandOutput) => void): void;
104
126
  /**
105
127
  * @see {@link GetGeneratedPolicyCommand}
106
128
  */
@@ -143,6 +165,12 @@ export interface AccessAnalyzer {
143
165
  listFindings(args: ListFindingsCommandInput, options?: __HttpHandlerOptions): Promise<ListFindingsCommandOutput>;
144
166
  listFindings(args: ListFindingsCommandInput, cb: (err: any, data?: ListFindingsCommandOutput) => void): void;
145
167
  listFindings(args: ListFindingsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListFindingsCommandOutput) => void): void;
168
+ /**
169
+ * @see {@link ListFindingsV2Command}
170
+ */
171
+ listFindingsV2(args: ListFindingsV2CommandInput, options?: __HttpHandlerOptions): Promise<ListFindingsV2CommandOutput>;
172
+ listFindingsV2(args: ListFindingsV2CommandInput, cb: (err: any, data?: ListFindingsV2CommandOutput) => void): void;
173
+ listFindingsV2(args: ListFindingsV2CommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListFindingsV2CommandOutput) => void): void;
146
174
  /**
147
175
  * @see {@link ListPolicyGenerationsCommand}
148
176
  */
@@ -200,15 +228,30 @@ export interface AccessAnalyzer {
200
228
  }
201
229
  /**
202
230
  * @public
203
- * <p>Identity and Access Management Access Analyzer helps identify potential resource-access risks by enabling you to
204
- * identify any policies that grant access to an external principal. It does this by using
205
- * logic-based reasoning to analyze resource-based policies in your Amazon Web Services environment. An
206
- * external principal can be another Amazon Web Services account, a root user, an IAM user or role, a
207
- * federated user, an Amazon Web Services service, or an anonymous user. You can also use IAM Access Analyzer to
208
- * preview and validate public and cross-account access to your resources before deploying
209
- * permissions changes. This guide describes the Identity and Access Management Access Analyzer operations that you can
210
- * call programmatically. For general information about IAM Access Analyzer, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/what-is-access-analyzer.html">Identity and Access Management Access Analyzer</a> in the <b>IAM User Guide</b>.</p>
211
- * <p>To start using IAM Access Analyzer, you first need to create an analyzer.</p>
231
+ * <p>Identity and Access Management Access Analyzer helps you to set, verify, and refine your IAM policies by providing
232
+ * a suite of capabilities. Its features include findings for external and unused access,
233
+ * basic and custom policy checks for validating policies, and policy generation to generate
234
+ * fine-grained policies. To start using IAM Access Analyzer to identify external or unused access,
235
+ * you first need to create an analyzer.</p>
236
+ * <p>
237
+ * <b>External access analyzers</b> help identify potential risks
238
+ * of accessing resources by enabling you to identify any resource policies that grant access
239
+ * to an external principal. It does this by using logic-based reasoning to analyze
240
+ * resource-based policies in your Amazon Web Services environment. An external principal can be another
241
+ * Amazon Web Services account, a root user, an IAM user or role, a federated user, an Amazon Web Services service, or an
242
+ * anonymous user. You can also use IAM Access Analyzer to preview public and cross-account access
243
+ * to your resources before deploying permissions changes.</p>
244
+ * <p>
245
+ * <b>Unused access analyzers</b> help identify potential
246
+ * identity access risks by enabling you to identify unused IAM roles, unused access keys,
247
+ * unused console passwords, and IAM principals with unused service and action-level
248
+ * permissions.</p>
249
+ * <p>Beyond findings, IAM Access Analyzer provides basic and custom policy checks to validate IAM
250
+ * policies before deploying permissions changes. You can use policy generation to refine
251
+ * permissions by attaching a policy generated using access activity logged in CloudTrail logs. </p>
252
+ * <p>This guide describes the IAM Access Analyzer operations that you can call programmatically.
253
+ * For general information about IAM Access Analyzer, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/what-is-access-analyzer.html">Identity and Access Management Access Analyzer</a> in the
254
+ * <b>IAM User Guide</b>.</p>
212
255
  */
213
256
  export declare class AccessAnalyzer extends AccessAnalyzerClient implements AccessAnalyzer {
214
257
  }