@aws-sdk/client-accessanalyzer 3.1023.0 → 3.1025.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 (59) hide show
  1. package/README.md +49 -0
  2. package/dist-cjs/index.js +249 -1
  3. package/dist-cjs/schemas/schemas_0.js +173 -5
  4. package/dist-es/AccessAnalyzer.js +23 -1
  5. package/dist-es/commands/CancelPolicyPreviewJobCommand.js +16 -0
  6. package/dist-es/commands/CreatePolicyPreviewConfigurationCommand.js +16 -0
  7. package/dist-es/commands/DeletePolicyPreviewConfigurationCommand.js +16 -0
  8. package/dist-es/commands/GetPolicyPreviewConfigurationCommand.js +16 -0
  9. package/dist-es/commands/GetPolicyPreviewJobCommand.js +16 -0
  10. package/dist-es/commands/ListPolicyPreviewJobsCommand.js +16 -0
  11. package/dist-es/commands/StartPolicyPreviewJobCommand.js +16 -0
  12. package/dist-es/commands/index.js +7 -0
  13. package/dist-es/index.js +1 -0
  14. package/dist-es/models/enums.js +31 -0
  15. package/dist-es/pagination/ListPolicyPreviewJobsPaginator.js +4 -0
  16. package/dist-es/pagination/index.js +1 -0
  17. package/dist-es/schemas/schemas_0.js +168 -0
  18. package/dist-es/waiters/index.js +2 -0
  19. package/dist-es/waiters/waitForPolicyPreviewConfigurationActive.js +54 -0
  20. package/dist-es/waiters/waitForPolicyPreviewJobCompleted.js +49 -0
  21. package/dist-types/AccessAnalyzer.d.ts +74 -1
  22. package/dist-types/AccessAnalyzerClient.d.ts +9 -2
  23. package/dist-types/commands/CancelPolicyPreviewJobCommand.d.ts +100 -0
  24. package/dist-types/commands/CreatePolicyPreviewConfigurationCommand.d.ts +109 -0
  25. package/dist-types/commands/DeletePolicyPreviewConfigurationCommand.d.ts +100 -0
  26. package/dist-types/commands/GetPolicyPreviewConfigurationCommand.d.ts +114 -0
  27. package/dist-types/commands/GetPolicyPreviewJobCommand.d.ts +187 -0
  28. package/dist-types/commands/ListPolicyPreviewJobsCommand.d.ts +137 -0
  29. package/dist-types/commands/StartPolicyPreviewJobCommand.d.ts +154 -0
  30. package/dist-types/commands/index.d.ts +7 -0
  31. package/dist-types/index.d.ts +1 -0
  32. package/dist-types/models/enums.d.ts +71 -0
  33. package/dist-types/models/models_0.d.ts +316 -1
  34. package/dist-types/pagination/ListPolicyPreviewJobsPaginator.d.ts +7 -0
  35. package/dist-types/pagination/index.d.ts +1 -0
  36. package/dist-types/schemas/schemas_0.d.ts +26 -0
  37. package/dist-types/ts3.4/AccessAnalyzer.d.ts +150 -0
  38. package/dist-types/ts3.4/AccessAnalyzerClient.d.ts +42 -0
  39. package/dist-types/ts3.4/commands/CancelPolicyPreviewJobCommand.d.ts +51 -0
  40. package/dist-types/ts3.4/commands/CreatePolicyPreviewConfigurationCommand.d.ts +51 -0
  41. package/dist-types/ts3.4/commands/DeletePolicyPreviewConfigurationCommand.d.ts +51 -0
  42. package/dist-types/ts3.4/commands/GetPolicyPreviewConfigurationCommand.d.ts +51 -0
  43. package/dist-types/ts3.4/commands/GetPolicyPreviewJobCommand.d.ts +51 -0
  44. package/dist-types/ts3.4/commands/ListPolicyPreviewJobsCommand.d.ts +51 -0
  45. package/dist-types/ts3.4/commands/StartPolicyPreviewJobCommand.d.ts +51 -0
  46. package/dist-types/ts3.4/commands/index.d.ts +7 -0
  47. package/dist-types/ts3.4/index.d.ts +1 -0
  48. package/dist-types/ts3.4/models/enums.d.ts +41 -0
  49. package/dist-types/ts3.4/models/models_0.d.ts +83 -0
  50. package/dist-types/ts3.4/pagination/ListPolicyPreviewJobsPaginator.d.ts +11 -0
  51. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  52. package/dist-types/ts3.4/schemas/schemas_0.d.ts +26 -0
  53. package/dist-types/ts3.4/waiters/index.d.ts +2 -0
  54. package/dist-types/ts3.4/waiters/waitForPolicyPreviewConfigurationActive.d.ts +11 -0
  55. package/dist-types/ts3.4/waiters/waitForPolicyPreviewJobCompleted.d.ts +11 -0
  56. package/dist-types/waiters/index.d.ts +2 -0
  57. package/dist-types/waiters/waitForPolicyPreviewConfigurationActive.d.ts +14 -0
  58. package/dist-types/waiters/waitForPolicyPreviewJobCompleted.d.ts +14 -0
  59. package/package.json +2 -1
@@ -1,13 +1,16 @@
1
1
  export * from "./ApplyArchiveRuleCommand";
2
2
  export * from "./CancelPolicyGenerationCommand";
3
+ export * from "./CancelPolicyPreviewJobCommand";
3
4
  export * from "./CheckAccessNotGrantedCommand";
4
5
  export * from "./CheckNoNewAccessCommand";
5
6
  export * from "./CheckNoPublicAccessCommand";
6
7
  export * from "./CreateAccessPreviewCommand";
7
8
  export * from "./CreateAnalyzerCommand";
8
9
  export * from "./CreateArchiveRuleCommand";
10
+ export * from "./CreatePolicyPreviewConfigurationCommand";
9
11
  export * from "./DeleteAnalyzerCommand";
10
12
  export * from "./DeleteArchiveRuleCommand";
13
+ export * from "./DeletePolicyPreviewConfigurationCommand";
11
14
  export * from "./GenerateFindingRecommendationCommand";
12
15
  export * from "./GetAccessPreviewCommand";
13
16
  export * from "./GetAnalyzedResourceCommand";
@@ -18,6 +21,8 @@ export * from "./GetFindingRecommendationCommand";
18
21
  export * from "./GetFindingV2Command";
19
22
  export * from "./GetFindingsStatisticsCommand";
20
23
  export * from "./GetGeneratedPolicyCommand";
24
+ export * from "./GetPolicyPreviewConfigurationCommand";
25
+ export * from "./GetPolicyPreviewJobCommand";
21
26
  export * from "./ListAccessPreviewFindingsCommand";
22
27
  export * from "./ListAccessPreviewsCommand";
23
28
  export * from "./ListAnalyzedResourcesCommand";
@@ -26,8 +31,10 @@ export * from "./ListArchiveRulesCommand";
26
31
  export * from "./ListFindingsCommand";
27
32
  export * from "./ListFindingsV2Command";
28
33
  export * from "./ListPolicyGenerationsCommand";
34
+ export * from "./ListPolicyPreviewJobsCommand";
29
35
  export * from "./ListTagsForResourceCommand";
30
36
  export * from "./StartPolicyGenerationCommand";
37
+ export * from "./StartPolicyPreviewJobCommand";
31
38
  export * from "./StartResourceScanCommand";
32
39
  export * from "./TagResourceCommand";
33
40
  export * from "./UntagResourceCommand";
package/dist-es/index.js CHANGED
@@ -3,6 +3,7 @@ export * from "./AccessAnalyzer";
3
3
  export * from "./commands";
4
4
  export * from "./schemas/schemas_0";
5
5
  export * from "./pagination";
6
+ export * from "./waiters";
6
7
  export * from "./models/enums";
7
8
  export * from "./models/errors";
8
9
  export * from "./models/models_0";
@@ -111,6 +111,14 @@ export const AclPermission = {
111
111
  WRITE: "WRITE",
112
112
  WRITE_ACP: "WRITE_ACP",
113
113
  };
114
+ export const PolicyPreviewScope = {
115
+ GLOBAL: "GLOBAL",
116
+ };
117
+ export const PolicyPreviewStatus = {
118
+ ACTIVE: "ACTIVE",
119
+ FAILED: "FAILED",
120
+ PENDING_CREATION: "PENDING_CREATION",
121
+ };
114
122
  export const AccessPreviewStatus = {
115
123
  COMPLETED: "COMPLETED",
116
124
  CREATING: "CREATING",
@@ -173,7 +181,16 @@ export const FindingType = {
173
181
  };
174
182
  export const JobErrorCode = {
175
183
  AUTHORIZATION_ERROR: "AUTHORIZATION_ERROR",
184
+ CANCELED_JOB_ERROR: "CANCELED_JOB_ERROR",
185
+ INSUFFICIENT_PERMISSIONS_ERROR: "INSUFFICIENT_PERMISSIONS_ERROR",
186
+ INVALID_ORGANIZATION_CONFIGURATION: "INVALID_ORGANIZATION_CONFIGURATION",
187
+ INVALID_POLICY_PREVIEW_CONFIGURATION: "INVALID_POLICY_PREVIEW_CONFIGURATION",
188
+ INVALID_SERVICE_LINKED_ROLE: "INVALID_SERVICE_LINKED_ROLE",
189
+ INVALID_TARGET_ERROR: "INVALID_TARGET_ERROR",
190
+ ORGANIZATION_ACCESS_DENIED_ERROR: "ORGANIZATION_ACCESS_DENIED_ERROR",
176
191
  RESOURCE_NOT_FOUND_ERROR: "RESOURCE_NOT_FOUND_ERROR",
192
+ S3_BUCKET_NOT_FOUND_ERROR: "S3_BUCKET_NOT_FOUND_ERROR",
193
+ S3_BUCKET_PERMISSION_ERROR: "S3_BUCKET_PERMISSION_ERROR",
177
194
  SERVICE_ERROR: "SERVICE_ERROR",
178
195
  SERVICE_QUOTA_EXCEEDED_ERROR: "SERVICE_QUOTA_EXCEEDED_ERROR",
179
196
  };
@@ -183,6 +200,16 @@ export const JobStatus = {
183
200
  IN_PROGRESS: "IN_PROGRESS",
184
201
  SUCCEEDED: "SUCCEEDED",
185
202
  };
203
+ export const ImpactAnalysisJobStatus = {
204
+ CANCELED: "CANCELED",
205
+ COMPLETED: "COMPLETED",
206
+ FAILED: "FAILED",
207
+ IN_PROGRESS: "IN_PROGRESS",
208
+ SUBMITTED: "SUBMITTED",
209
+ };
210
+ export const ImpactAnalysisJobType = {
211
+ SCP: "SCP",
212
+ };
186
213
  export const FindingChangeType = {
187
214
  CHANGED: "CHANGED",
188
215
  NEW: "NEW",
@@ -192,6 +219,10 @@ export const OrderBy = {
192
219
  ASC: "ASC",
193
220
  DESC: "DESC",
194
221
  };
222
+ export const PolicyPreviewJobFilterName = {
223
+ JOB_STATUS: "jobStatus",
224
+ TARGET_ID: "targetId",
225
+ };
195
226
  export const FindingStatusUpdate = {
196
227
  ACTIVE: "ACTIVE",
197
228
  ARCHIVED: "ARCHIVED",
@@ -0,0 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
2
+ import { AccessAnalyzerClient } from "../AccessAnalyzerClient";
3
+ import { ListPolicyPreviewJobsCommand, } from "../commands/ListPolicyPreviewJobsCommand";
4
+ export const paginateListPolicyPreviewJobs = createPaginator(AccessAnalyzerClient, ListPolicyPreviewJobsCommand, "nextToken", "nextToken", "maxResults");
@@ -9,4 +9,5 @@ export * from "./ListArchiveRulesPaginator";
9
9
  export * from "./ListFindingsPaginator";
10
10
  export * from "./ListFindingsV2Paginator";
11
11
  export * from "./ListPolicyGenerationsPaginator";
12
+ export * from "./ListPolicyPreviewJobsPaginator";
12
13
  export * from "./ValidatePolicyPaginator";
@@ -46,6 +46,12 @@ const _CNPARh = "CheckNoPublicAccessResponse";
46
46
  const _CPG = "CancelPolicyGeneration";
47
47
  const _CPGR = "CancelPolicyGenerationRequest";
48
48
  const _CPGRa = "CancelPolicyGenerationResponse";
49
+ const _CPPC = "CreatePolicyPreviewConfiguration";
50
+ const _CPPCR = "CreatePolicyPreviewConfigurationRequest";
51
+ const _CPPCRr = "CreatePolicyPreviewConfigurationResponse";
52
+ const _CPPJ = "CancelPolicyPreviewJob";
53
+ const _CPPJR = "CancelPolicyPreviewJobRequest";
54
+ const _CPPJRa = "CancelPolicyPreviewJobResponse";
49
55
  const _CTD = "CloudTrailDetails";
50
56
  const _CTP = "CloudTrailProperties";
51
57
  const _Co = "Configuration";
@@ -53,6 +59,9 @@ const _DA = "DeleteAnalyzer";
53
59
  const _DAR = "DeleteAnalyzerRequest";
54
60
  const _DARR = "DeleteArchiveRuleRequest";
55
61
  const _DARe = "DeleteArchiveRule";
62
+ const _DPPC = "DeletePolicyPreviewConfiguration";
63
+ const _DPPCR = "DeletePolicyPreviewConfigurationRequest";
64
+ const _DPPCRe = "DeletePolicyPreviewConfigurationResponse";
56
65
  const _DSC = "DynamodbStreamConfiguration";
57
66
  const _DTC = "DynamodbTableConfiguration";
58
67
  const _EAD = "ExternalAccessDetails";
@@ -106,6 +115,12 @@ const _GGPRe = "GetGeneratedPolicyResponse";
106
115
  const _GP = "GeneratedPolicy";
107
116
  const _GPL = "GeneratedPolicyList";
108
117
  const _GPP = "GeneratedPolicyProperties";
118
+ const _GPPC = "GetPolicyPreviewConfiguration";
119
+ const _GPPCR = "GetPolicyPreviewConfigurationRequest";
120
+ const _GPPCRe = "GetPolicyPreviewConfigurationResponse";
121
+ const _GPPJ = "GetPolicyPreviewJob";
122
+ const _GPPJR = "GetPolicyPreviewJobRequest";
123
+ const _GPPJRe = "GetPolicyPreviewJobResponse";
109
124
  const _GPR = "GeneratedPolicyResult";
110
125
  const _IAAR = "InternalAccessAnalysisRule";
111
126
  const _IAARC = "InternalAccessAnalysisRuleCriteria";
@@ -153,16 +168,27 @@ const _LL = "LocationList";
153
168
  const _LPG = "ListPolicyGenerations";
154
169
  const _LPGR = "ListPolicyGenerationsRequest";
155
170
  const _LPGRi = "ListPolicyGenerationsResponse";
171
+ const _LPPJ = "ListPolicyPreviewJobs";
172
+ const _LPPJR = "ListPolicyPreviewJobsRequest";
173
+ const _LPPJRi = "ListPolicyPreviewJobsResponse";
156
174
  const _LTFR = "ListTagsForResource";
157
175
  const _LTFRR = "ListTagsForResourceRequest";
158
176
  const _LTFRRi = "ListTagsForResourceResponse";
159
177
  const _NOC = "NetworkOriginConfiguration";
160
178
  const _P = "Position";
179
+ const _PC = "PolicyConfiguration";
180
+ const _PCL = "PolicyConfigurationsList";
161
181
  const _PE = "PathElement";
162
182
  const _PEL = "PathElementList";
163
183
  const _PG = "PolicyGeneration";
164
184
  const _PGD = "PolicyGenerationDetails";
165
185
  const _PGL = "PolicyGenerationList";
186
+ const _PPAR = "PolicyPreviewAnalysisReport";
187
+ const _PPARo = "PolicyPreviewAnalysisReports";
188
+ const _PPC = "PolicyPreviewConfiguration";
189
+ const _PPCL = "PolicyPreviewConfigurationList";
190
+ const _PPJD = "PolicyPreviewJobDetails";
191
+ const _PPJP = "PolicyPreviewJobParameters";
166
192
  const _RA = "Retry-After";
167
193
  const _RDCSAM = "RdsDbClusterSnapshotAttributesMap";
168
194
  const _RDCSAV = "RdsDbClusterSnapshotAttributeValue";
@@ -193,6 +219,9 @@ const _SPABC = "S3PublicAccessBlockConfiguration";
193
219
  const _SPG = "StartPolicyGeneration";
194
220
  const _SPGR = "StartPolicyGenerationRequest";
195
221
  const _SPGRt = "StartPolicyGenerationResponse";
222
+ const _SPPJ = "StartPolicyPreviewJob";
223
+ const _SPPJR = "StartPolicyPreviewJobRequest";
224
+ const _SPPJRt = "StartPolicyPreviewJobResponse";
196
225
  const _SQC = "SqsQueueConfiguration";
197
226
  const _SQEE = "ServiceQuotaExceededException";
198
227
  const _SR = "StatusReason";
@@ -258,6 +287,7 @@ const _aR = "accessRole";
258
287
  const _aRl = "allRegions";
259
288
  const _aRn = "analysisRule";
260
289
  const _aRna = "analyzedResources";
290
+ const _aRnal = "analysisReports";
261
291
  const _aRr = "archiveRules";
262
292
  const _aRrc = "archiveRule";
263
293
  const _aT = "accessType";
@@ -316,6 +346,7 @@ const _fS = "findingsStatistics";
316
346
  const _fSP = "fileSystemPolicy";
317
347
  const _fT = "findingType";
318
348
  const _fi = "finding";
349
+ const _fil = "filters";
319
350
  const _fin = "findings";
320
351
  const _g = "groups";
321
352
  const _gP = "generatedPolicies";
@@ -347,6 +378,9 @@ const _ind = "index";
347
378
  const _jD = "jobDetails";
348
379
  const _jE = "jobError";
349
380
  const _jI = "jobId";
381
+ const _jP = "jobParameters";
382
+ const _jS = "jobStatus";
383
+ const _jT = "jobType";
350
384
  const _k = "key";
351
385
  const _kK = "kmsKey";
352
386
  const _kKI = "kmsKeyId";
@@ -370,14 +404,18 @@ const _nT = "nextToken";
370
404
  const _ne = "neq";
371
405
  const _o = "operations";
372
406
  const _oB = "orderBy";
407
+ const _oSU = "outputS3Uri";
373
408
  const _of = "offset";
374
409
  const _p = "principal";
375
410
  const _pA = "principalArn";
376
411
  const _pAB = "publicAccessBlock";
412
+ const _pC = "policyConfigurations";
377
413
  const _pD = "policyDocument";
414
+ const _pDL = "policyDocumentsList";
378
415
  const _pG = "policyGenerations";
379
416
  const _pGD = "policyGenerationDetails";
380
417
  const _pOA = "principalOwnerAccount";
418
+ const _pPC = "policyPreviewConfigurations";
381
419
  const _pT = "policyType";
382
420
  const _pTr = "principalType";
383
421
  const _pUA = "policyUpdatedAt";
@@ -414,6 +452,7 @@ const _res = "resource";
414
452
  const _resu = "result";
415
453
  const _s = "smithy.ts.sdk.synthetic.com.amazonaws.accessanalyzer";
416
454
  const _sA = "startedAt";
455
+ const _sAu = "submittedAt";
417
456
  const _sB = "s3Bucket";
418
457
  const _sCPR = "serviceControlPolicyRestriction";
419
458
  const _sEDB = "s3ExpressDirectoryBucket";
@@ -429,6 +468,7 @@ const _sR = "statusReason";
429
468
  const _sT = "startTime";
430
469
  const _sTn = "snsTopic";
431
470
  const _sV = "sharedVia";
471
+ const _sc = "scope";
432
472
  const _se = "server";
433
473
  const _so = "sources";
434
474
  const _sor = "sort";
@@ -443,6 +483,7 @@ const _tAE = "totalActiveErrors";
443
483
  const _tAF = "totalActiveFindings";
444
484
  const _tAFo = "totalArchivedFindings";
445
485
  const _tAP = "totalActivePublic";
486
+ const _tI = "targetId";
446
487
  const _tK = "tagKeys";
447
488
  const _tP = "trailProperties";
448
489
  const _tPa = "tablePolicy";
@@ -606,6 +647,16 @@ export var CancelPolicyGenerationResponse$ = [3, n0, _CPGRa,
606
647
  [],
607
648
  []
608
649
  ];
650
+ export var CancelPolicyPreviewJobRequest$ = [3, n0, _CPPJR,
651
+ 0,
652
+ [_jI],
653
+ [[0, 1]], 1
654
+ ];
655
+ export var CancelPolicyPreviewJobResponse$ = [3, n0, _CPPJRa,
656
+ 0,
657
+ [],
658
+ []
659
+ ];
609
660
  export var CheckAccessNotGrantedRequest$ = [3, n0, _CANGR,
610
661
  0,
611
662
  [_pD, _acc, _pT],
@@ -671,6 +722,16 @@ export var CreateArchiveRuleRequest$ = [3, n0, _CARR,
671
722
  [_aN, _rN, _f, _cTl],
672
723
  [[0, 1], 0, () => FilterCriteriaMap, [0, 4]], 3
673
724
  ];
725
+ export var CreatePolicyPreviewConfigurationRequest$ = [3, n0, _CPPCR,
726
+ 0,
727
+ [_cTl, _sc],
728
+ [[0, 4], 0]
729
+ ];
730
+ export var CreatePolicyPreviewConfigurationResponse$ = [3, n0, _CPPCRr,
731
+ 0,
732
+ [_st],
733
+ [0], 1
734
+ ];
674
735
  export var Criterion$ = [3, n0, _C,
675
736
  0,
676
737
  [_eq, _ne, _cont, _exi],
@@ -686,6 +747,16 @@ export var DeleteArchiveRuleRequest$ = [3, n0, _DARR,
686
747
  [_aN, _rN, _cTl],
687
748
  [[0, 1], [0, 1], [0, { [_hQ]: _cTl, [_iT]: 1 }]], 2
688
749
  ];
750
+ export var DeletePolicyPreviewConfigurationRequest$ = [3, n0, _DPPCR,
751
+ 0,
752
+ [_cTl],
753
+ [[0, { [_hQ]: _cTl, [_iT]: 1 }]]
754
+ ];
755
+ export var DeletePolicyPreviewConfigurationResponse$ = [3, n0, _DPPCRe,
756
+ 0,
757
+ [],
758
+ []
759
+ ];
689
760
  export var DynamodbStreamConfiguration$ = [3, n0, _DSC,
690
761
  0,
691
762
  [_sP],
@@ -861,6 +932,26 @@ export var GetGeneratedPolicyResponse$ = [3, n0, _GGPRe,
861
932
  [_jD, _gPR],
862
933
  [() => JobDetails$, () => GeneratedPolicyResult$], 2
863
934
  ];
935
+ export var GetPolicyPreviewConfigurationRequest$ = [3, n0, _GPPCR,
936
+ 0,
937
+ [],
938
+ []
939
+ ];
940
+ export var GetPolicyPreviewConfigurationResponse$ = [3, n0, _GPPCRe,
941
+ 0,
942
+ [_pPC],
943
+ [() => PolicyPreviewConfigurationList]
944
+ ];
945
+ export var GetPolicyPreviewJobRequest$ = [3, n0, _GPPJR,
946
+ 0,
947
+ [_jI],
948
+ [[0, 1]], 1
949
+ ];
950
+ export var GetPolicyPreviewJobResponse$ = [3, n0, _GPPJRe,
951
+ 0,
952
+ [_jI, _oSU, _jP, _jD],
953
+ [0, 0, () => PolicyPreviewJobParameters$, () => PolicyPreviewJobDetails$], 2
954
+ ];
864
955
  export var IamRoleConfiguration$ = [3, n0, _IRC,
865
956
  0,
866
957
  [_tPr],
@@ -1011,6 +1102,16 @@ export var ListPolicyGenerationsResponse$ = [3, n0, _LPGRi,
1011
1102
  [_pG, _nT],
1012
1103
  [() => PolicyGenerationList, 0], 1
1013
1104
  ];
1105
+ export var ListPolicyPreviewJobsRequest$ = [3, n0, _LPPJR,
1106
+ 0,
1107
+ [_fil, _mR, _nT],
1108
+ [[128 | 0, 64], [1, { [_hQ]: _mR }], [0, { [_hQ]: _nT }]]
1109
+ ];
1110
+ export var ListPolicyPreviewJobsResponse$ = [3, n0, _LPPJRi,
1111
+ 0,
1112
+ [_aRnal, _nT],
1113
+ [() => PolicyPreviewAnalysisReports, 0], 1
1114
+ ];
1014
1115
  export var ListTagsForResourceRequest$ = [3, n0, _LTFRR,
1015
1116
  0,
1016
1117
  [_rA],
@@ -1026,6 +1127,11 @@ export var Location$ = [3, n0, _L,
1026
1127
  [_pa, _sp],
1027
1128
  [() => PathElementList, () => Span$], 2
1028
1129
  ];
1130
+ export var PolicyConfiguration$ = [3, n0, _PC,
1131
+ 0,
1132
+ [_jT, _tI, _pDL],
1133
+ [0, 0, 64 | 0], 3
1134
+ ];
1029
1135
  export var PolicyGeneration$ = [3, n0, _PG,
1030
1136
  0,
1031
1137
  [_jI, _pA, _st, _sO, _cO],
@@ -1036,6 +1142,26 @@ export var PolicyGenerationDetails$ = [3, n0, _PGD,
1036
1142
  [_pA],
1037
1143
  [0], 1
1038
1144
  ];
1145
+ export var PolicyPreviewAnalysisReport$ = [3, n0, _PPAR,
1146
+ 0,
1147
+ [_jI, _st, _sAu, _oSU, _sA, _cAo],
1148
+ [0, 0, 5, 0, 5, 5], 4
1149
+ ];
1150
+ export var PolicyPreviewConfiguration$ = [3, n0, _PPC,
1151
+ 0,
1152
+ [_sc, _st, _cA, _uA],
1153
+ [0, 0, 5, 5], 3
1154
+ ];
1155
+ export var PolicyPreviewJobDetails$ = [3, n0, _PPJD,
1156
+ 0,
1157
+ [_jS, _sAu, _sA, _cAo, _jE],
1158
+ [0, 5, 5, 5, () => JobError$], 2
1159
+ ];
1160
+ export var PolicyPreviewJobParameters$ = [3, n0, _PPJP,
1161
+ 0,
1162
+ [_sT, _eT, _pC],
1163
+ [5, 5, () => PolicyConfigurationsList], 3
1164
+ ];
1039
1165
  export var Position$ = [3, n0, _P,
1040
1166
  0,
1041
1167
  [_l, _col, _of],
@@ -1131,6 +1257,16 @@ export var StartPolicyGenerationResponse$ = [3, n0, _SPGRt,
1131
1257
  [_jI],
1132
1258
  [0], 1
1133
1259
  ];
1260
+ export var StartPolicyPreviewJobRequest$ = [3, n0, _SPPJR,
1261
+ 0,
1262
+ [_pC, _sT, _oSU, _eT, _cTl],
1263
+ [() => PolicyConfigurationsList, 5, 0, 5, [0, 4]], 3
1264
+ ];
1265
+ export var StartPolicyPreviewJobResponse$ = [3, n0, _SPPJRt,
1266
+ 0,
1267
+ [_jI],
1268
+ [0], 1
1269
+ ];
1134
1270
  export var StartResourceScanRequest$ = [3, n0, _SRSR,
1135
1271
  0,
1136
1272
  [_aA, _rA, _rOA],
@@ -1331,9 +1467,19 @@ var LocationList = [1, n0, _LL,
1331
1467
  var PathElementList = [1, n0, _PEL,
1332
1468
  0, () => PathElement$
1333
1469
  ];
1470
+ var PolicyConfigurationsList = [1, n0, _PCL,
1471
+ 0, () => PolicyConfiguration$
1472
+ ];
1473
+ var PolicyDocumentList = 64 | 0;
1334
1474
  var PolicyGenerationList = [1, n0, _PGL,
1335
1475
  0, () => PolicyGeneration$
1336
1476
  ];
1477
+ var PolicyPreviewAnalysisReports = [1, n0, _PPARo,
1478
+ 0, () => PolicyPreviewAnalysisReport$
1479
+ ];
1480
+ var PolicyPreviewConfigurationList = [1, n0, _PPCL,
1481
+ 0, () => PolicyPreviewConfiguration$
1482
+ ];
1337
1483
  var RdsDbClusterSnapshotAccountIdsList = 64 | 0;
1338
1484
  var RdsDbSnapshotAccountIdsList = 64 | 0;
1339
1485
  var ReasonSummaryList = [1, n0, _RSL,
@@ -1386,6 +1532,7 @@ var InternalAccessResourceTypeStatisticsMap = [2, n0, _IARTSM,
1386
1532
  ];
1387
1533
  var KmsConstraintsMap = 128 | 0;
1388
1534
  var KmsKeyPoliciesMap = 128 | 0;
1535
+ var PolicyPreviewJobFiltersMap = 128 | 0;
1389
1536
  var PrincipalMap = 128 | 0;
1390
1537
  var RdsDbClusterSnapshotAttributesMap = [2, n0, _RDCSAM,
1391
1538
  0, 0, () => RdsDbClusterSnapshotAttributeValue$
@@ -1459,6 +1606,9 @@ export var ApplyArchiveRule$ = [9, n0, _AAR,
1459
1606
  export var CancelPolicyGeneration$ = [9, n0, _CPG,
1460
1607
  { [_h]: ["PUT", "/policy/generation/{jobId}", 200] }, () => CancelPolicyGenerationRequest$, () => CancelPolicyGenerationResponse$
1461
1608
  ];
1609
+ export var CancelPolicyPreviewJob$ = [9, n0, _CPPJ,
1610
+ { [_h]: ["PUT", "/policy/preview/{jobId}", 200] }, () => CancelPolicyPreviewJobRequest$, () => CancelPolicyPreviewJobResponse$
1611
+ ];
1462
1612
  export var CheckAccessNotGranted$ = [9, n0, _CANG,
1463
1613
  { [_h]: ["POST", "/policy/check-access-not-granted", 200] }, () => CheckAccessNotGrantedRequest$, () => CheckAccessNotGrantedResponse$
1464
1614
  ];
@@ -1477,12 +1627,18 @@ export var CreateAnalyzer$ = [9, n0, _CA,
1477
1627
  export var CreateArchiveRule$ = [9, n0, _CARre,
1478
1628
  { [_h]: ["PUT", "/analyzer/{analyzerName}/archive-rule", 200] }, () => CreateArchiveRuleRequest$, () => __Unit
1479
1629
  ];
1630
+ export var CreatePolicyPreviewConfiguration$ = [9, n0, _CPPC,
1631
+ { [_h]: ["PUT", "/policy/preview-configuration", 200] }, () => CreatePolicyPreviewConfigurationRequest$, () => CreatePolicyPreviewConfigurationResponse$
1632
+ ];
1480
1633
  export var DeleteAnalyzer$ = [9, n0, _DA,
1481
1634
  { [_h]: ["DELETE", "/analyzer/{analyzerName}", 200] }, () => DeleteAnalyzerRequest$, () => __Unit
1482
1635
  ];
1483
1636
  export var DeleteArchiveRule$ = [9, n0, _DARe,
1484
1637
  { [_h]: ["DELETE", "/analyzer/{analyzerName}/archive-rule/{ruleName}", 200] }, () => DeleteArchiveRuleRequest$, () => __Unit
1485
1638
  ];
1639
+ export var DeletePolicyPreviewConfiguration$ = [9, n0, _DPPC,
1640
+ { [_h]: ["DELETE", "/policy/preview-configuration", 200] }, () => DeletePolicyPreviewConfigurationRequest$, () => DeletePolicyPreviewConfigurationResponse$
1641
+ ];
1486
1642
  export var GenerateFindingRecommendation$ = [9, n0, _GFRen,
1487
1643
  { [_h]: ["POST", "/recommendation/{id}", 200] }, () => GenerateFindingRecommendationRequest$, () => __Unit
1488
1644
  ];
@@ -1513,6 +1669,12 @@ export var GetFindingV2$ = [9, n0, _GFV,
1513
1669
  export var GetGeneratedPolicy$ = [9, n0, _GGP,
1514
1670
  { [_h]: ["GET", "/policy/generation/{jobId}", 200] }, () => GetGeneratedPolicyRequest$, () => GetGeneratedPolicyResponse$
1515
1671
  ];
1672
+ export var GetPolicyPreviewConfiguration$ = [9, n0, _GPPC,
1673
+ { [_h]: ["GET", "/policy/preview-configuration", 200] }, () => GetPolicyPreviewConfigurationRequest$, () => GetPolicyPreviewConfigurationResponse$
1674
+ ];
1675
+ export var GetPolicyPreviewJob$ = [9, n0, _GPPJ,
1676
+ { [_h]: ["GET", "/policy/preview/{jobId}", 200] }, () => GetPolicyPreviewJobRequest$, () => GetPolicyPreviewJobResponse$
1677
+ ];
1516
1678
  export var ListAccessPreviewFindings$ = [9, n0, _LAPF,
1517
1679
  { [_h]: ["POST", "/access-preview/{accessPreviewId}", 200] }, () => ListAccessPreviewFindingsRequest$, () => ListAccessPreviewFindingsResponse$
1518
1680
  ];
@@ -1537,12 +1699,18 @@ export var ListFindingsV2$ = [9, n0, _LFV,
1537
1699
  export var ListPolicyGenerations$ = [9, n0, _LPG,
1538
1700
  { [_h]: ["GET", "/policy/generation", 200] }, () => ListPolicyGenerationsRequest$, () => ListPolicyGenerationsResponse$
1539
1701
  ];
1702
+ export var ListPolicyPreviewJobs$ = [9, n0, _LPPJ,
1703
+ { [_h]: ["GET", "/policy/preview", 200] }, () => ListPolicyPreviewJobsRequest$, () => ListPolicyPreviewJobsResponse$
1704
+ ];
1540
1705
  export var ListTagsForResource$ = [9, n0, _LTFR,
1541
1706
  { [_h]: ["GET", "/tags/{resourceArn}", 200] }, () => ListTagsForResourceRequest$, () => ListTagsForResourceResponse$
1542
1707
  ];
1543
1708
  export var StartPolicyGeneration$ = [9, n0, _SPG,
1544
1709
  { [_h]: ["PUT", "/policy/generation", 200] }, () => StartPolicyGenerationRequest$, () => StartPolicyGenerationResponse$
1545
1710
  ];
1711
+ export var StartPolicyPreviewJob$ = [9, n0, _SPPJ,
1712
+ { [_h]: ["PUT", "/policy/preview", 200] }, () => StartPolicyPreviewJobRequest$, () => StartPolicyPreviewJobResponse$
1713
+ ];
1546
1714
  export var StartResourceScan$ = [9, n0, _SRS,
1547
1715
  { [_h]: ["POST", "/resource/scan", 200] }, () => StartResourceScanRequest$, () => __Unit
1548
1716
  ];
@@ -0,0 +1,2 @@
1
+ export * from "./waitForPolicyPreviewConfigurationActive";
2
+ export * from "./waitForPolicyPreviewJobCompleted";
@@ -0,0 +1,54 @@
1
+ import { checkExceptions, createWaiter, WaiterState, } from "@smithy/util-waiter";
2
+ import { GetPolicyPreviewConfigurationCommand, } from "../commands/GetPolicyPreviewConfigurationCommand";
3
+ const checkState = async (client, input) => {
4
+ let reason;
5
+ try {
6
+ let result = await client.send(new GetPolicyPreviewConfigurationCommand(input));
7
+ reason = result;
8
+ try {
9
+ const returnComparator = () => {
10
+ let flat_1 = [].concat(...result.policyPreviewConfigurations);
11
+ let projection_3 = flat_1.map((element_2) => {
12
+ return element_2.status;
13
+ });
14
+ return projection_3;
15
+ };
16
+ let allStringEq_5 = (returnComparator().length > 0);
17
+ for (let element_4 of returnComparator()) {
18
+ allStringEq_5 = allStringEq_5 && (element_4 == "ACTIVE");
19
+ }
20
+ if (allStringEq_5) {
21
+ return { state: WaiterState.SUCCESS, reason };
22
+ }
23
+ }
24
+ catch (e) { }
25
+ try {
26
+ const returnComparator = () => {
27
+ let flat_1 = [].concat(...result.policyPreviewConfigurations);
28
+ let projection_3 = flat_1.map((element_2) => {
29
+ return element_2.status;
30
+ });
31
+ return projection_3;
32
+ };
33
+ for (let anyStringEq_4 of returnComparator()) {
34
+ if (anyStringEq_4 == "FAILED") {
35
+ return { state: WaiterState.FAILURE, reason };
36
+ }
37
+ }
38
+ }
39
+ catch (e) { }
40
+ }
41
+ catch (exception) {
42
+ reason = exception;
43
+ }
44
+ return { state: WaiterState.RETRY, reason };
45
+ };
46
+ export const waitForPolicyPreviewConfigurationActive = async (params, input) => {
47
+ const serviceDefaults = { minDelay: 5, maxDelay: 120 };
48
+ return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
49
+ };
50
+ export const waitUntilPolicyPreviewConfigurationActive = async (params, input) => {
51
+ const serviceDefaults = { minDelay: 5, maxDelay: 120 };
52
+ const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
53
+ return checkExceptions(result);
54
+ };
@@ -0,0 +1,49 @@
1
+ import { checkExceptions, createWaiter, WaiterState, } from "@smithy/util-waiter";
2
+ import { GetPolicyPreviewJobCommand, } from "../commands/GetPolicyPreviewJobCommand";
3
+ const checkState = async (client, input) => {
4
+ let reason;
5
+ try {
6
+ let result = await client.send(new GetPolicyPreviewJobCommand(input));
7
+ reason = result;
8
+ try {
9
+ const returnComparator = () => {
10
+ return result.jobDetails.jobStatus;
11
+ };
12
+ if (returnComparator() === "COMPLETED") {
13
+ return { state: WaiterState.SUCCESS, reason };
14
+ }
15
+ }
16
+ catch (e) { }
17
+ try {
18
+ const returnComparator = () => {
19
+ return result.jobDetails.jobStatus;
20
+ };
21
+ if (returnComparator() === "FAILED") {
22
+ return { state: WaiterState.FAILURE, reason };
23
+ }
24
+ }
25
+ catch (e) { }
26
+ try {
27
+ const returnComparator = () => {
28
+ return result.jobDetails.jobStatus;
29
+ };
30
+ if (returnComparator() === "CANCELED") {
31
+ return { state: WaiterState.FAILURE, reason };
32
+ }
33
+ }
34
+ catch (e) { }
35
+ }
36
+ catch (exception) {
37
+ reason = exception;
38
+ }
39
+ return { state: WaiterState.RETRY, reason };
40
+ };
41
+ export const waitForPolicyPreviewJobCompleted = async (params, input) => {
42
+ const serviceDefaults = { minDelay: 30, maxDelay: 120 };
43
+ return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
44
+ };
45
+ export const waitUntilPolicyPreviewJobCompleted = async (params, input) => {
46
+ const serviceDefaults = { minDelay: 30, maxDelay: 120 };
47
+ const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
48
+ return checkExceptions(result);
49
+ };