@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.
- package/README.md +49 -0
- package/dist-cjs/index.js +249 -1
- package/dist-cjs/schemas/schemas_0.js +173 -5
- package/dist-es/AccessAnalyzer.js +23 -1
- package/dist-es/commands/CancelPolicyPreviewJobCommand.js +16 -0
- package/dist-es/commands/CreatePolicyPreviewConfigurationCommand.js +16 -0
- package/dist-es/commands/DeletePolicyPreviewConfigurationCommand.js +16 -0
- package/dist-es/commands/GetPolicyPreviewConfigurationCommand.js +16 -0
- package/dist-es/commands/GetPolicyPreviewJobCommand.js +16 -0
- package/dist-es/commands/ListPolicyPreviewJobsCommand.js +16 -0
- package/dist-es/commands/StartPolicyPreviewJobCommand.js +16 -0
- package/dist-es/commands/index.js +7 -0
- package/dist-es/index.js +1 -0
- package/dist-es/models/enums.js +31 -0
- package/dist-es/pagination/ListPolicyPreviewJobsPaginator.js +4 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/schemas/schemas_0.js +168 -0
- package/dist-es/waiters/index.js +2 -0
- package/dist-es/waiters/waitForPolicyPreviewConfigurationActive.js +54 -0
- package/dist-es/waiters/waitForPolicyPreviewJobCompleted.js +49 -0
- package/dist-types/AccessAnalyzer.d.ts +74 -1
- package/dist-types/AccessAnalyzerClient.d.ts +9 -2
- package/dist-types/commands/CancelPolicyPreviewJobCommand.d.ts +100 -0
- package/dist-types/commands/CreatePolicyPreviewConfigurationCommand.d.ts +109 -0
- package/dist-types/commands/DeletePolicyPreviewConfigurationCommand.d.ts +100 -0
- package/dist-types/commands/GetPolicyPreviewConfigurationCommand.d.ts +114 -0
- package/dist-types/commands/GetPolicyPreviewJobCommand.d.ts +187 -0
- package/dist-types/commands/ListPolicyPreviewJobsCommand.d.ts +137 -0
- package/dist-types/commands/StartPolicyPreviewJobCommand.d.ts +154 -0
- package/dist-types/commands/index.d.ts +7 -0
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/enums.d.ts +71 -0
- package/dist-types/models/models_0.d.ts +316 -1
- package/dist-types/pagination/ListPolicyPreviewJobsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +26 -0
- package/dist-types/ts3.4/AccessAnalyzer.d.ts +150 -0
- package/dist-types/ts3.4/AccessAnalyzerClient.d.ts +42 -0
- package/dist-types/ts3.4/commands/CancelPolicyPreviewJobCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/CreatePolicyPreviewConfigurationCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/DeletePolicyPreviewConfigurationCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetPolicyPreviewConfigurationCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetPolicyPreviewJobCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ListPolicyPreviewJobsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/StartPolicyPreviewJobCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +7 -0
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/enums.d.ts +41 -0
- package/dist-types/ts3.4/models/models_0.d.ts +83 -0
- package/dist-types/ts3.4/pagination/ListPolicyPreviewJobsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +26 -0
- package/dist-types/ts3.4/waiters/index.d.ts +2 -0
- package/dist-types/ts3.4/waiters/waitForPolicyPreviewConfigurationActive.d.ts +11 -0
- package/dist-types/ts3.4/waiters/waitForPolicyPreviewJobCompleted.d.ts +11 -0
- package/dist-types/waiters/index.d.ts +2 -0
- package/dist-types/waiters/waitForPolicyPreviewConfigurationActive.d.ts +14 -0
- package/dist-types/waiters/waitForPolicyPreviewJobCompleted.d.ts +14 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -195,6 +195,13 @@ CancelPolicyGeneration
|
|
|
195
195
|
</details>
|
|
196
196
|
<details>
|
|
197
197
|
<summary>
|
|
198
|
+
CancelPolicyPreviewJob
|
|
199
|
+
</summary>
|
|
200
|
+
|
|
201
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/accessanalyzer/command/CancelPolicyPreviewJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-accessanalyzer/Interface/CancelPolicyPreviewJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-accessanalyzer/Interface/CancelPolicyPreviewJobCommandOutput/)
|
|
202
|
+
</details>
|
|
203
|
+
<details>
|
|
204
|
+
<summary>
|
|
198
205
|
CheckAccessNotGranted
|
|
199
206
|
</summary>
|
|
200
207
|
|
|
@@ -237,6 +244,13 @@ CreateArchiveRule
|
|
|
237
244
|
</details>
|
|
238
245
|
<details>
|
|
239
246
|
<summary>
|
|
247
|
+
CreatePolicyPreviewConfiguration
|
|
248
|
+
</summary>
|
|
249
|
+
|
|
250
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/accessanalyzer/command/CreatePolicyPreviewConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-accessanalyzer/Interface/CreatePolicyPreviewConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-accessanalyzer/Interface/CreatePolicyPreviewConfigurationCommandOutput/)
|
|
251
|
+
</details>
|
|
252
|
+
<details>
|
|
253
|
+
<summary>
|
|
240
254
|
DeleteAnalyzer
|
|
241
255
|
</summary>
|
|
242
256
|
|
|
@@ -251,6 +265,13 @@ DeleteArchiveRule
|
|
|
251
265
|
</details>
|
|
252
266
|
<details>
|
|
253
267
|
<summary>
|
|
268
|
+
DeletePolicyPreviewConfiguration
|
|
269
|
+
</summary>
|
|
270
|
+
|
|
271
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/accessanalyzer/command/DeletePolicyPreviewConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-accessanalyzer/Interface/DeletePolicyPreviewConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-accessanalyzer/Interface/DeletePolicyPreviewConfigurationCommandOutput/)
|
|
272
|
+
</details>
|
|
273
|
+
<details>
|
|
274
|
+
<summary>
|
|
254
275
|
GenerateFindingRecommendation
|
|
255
276
|
</summary>
|
|
256
277
|
|
|
@@ -321,6 +342,20 @@ GetGeneratedPolicy
|
|
|
321
342
|
</details>
|
|
322
343
|
<details>
|
|
323
344
|
<summary>
|
|
345
|
+
GetPolicyPreviewConfiguration
|
|
346
|
+
</summary>
|
|
347
|
+
|
|
348
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/accessanalyzer/command/GetPolicyPreviewConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-accessanalyzer/Interface/GetPolicyPreviewConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-accessanalyzer/Interface/GetPolicyPreviewConfigurationCommandOutput/)
|
|
349
|
+
</details>
|
|
350
|
+
<details>
|
|
351
|
+
<summary>
|
|
352
|
+
GetPolicyPreviewJob
|
|
353
|
+
</summary>
|
|
354
|
+
|
|
355
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/accessanalyzer/command/GetPolicyPreviewJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-accessanalyzer/Interface/GetPolicyPreviewJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-accessanalyzer/Interface/GetPolicyPreviewJobCommandOutput/)
|
|
356
|
+
</details>
|
|
357
|
+
<details>
|
|
358
|
+
<summary>
|
|
324
359
|
ListAccessPreviewFindings
|
|
325
360
|
</summary>
|
|
326
361
|
|
|
@@ -377,6 +412,13 @@ ListPolicyGenerations
|
|
|
377
412
|
</details>
|
|
378
413
|
<details>
|
|
379
414
|
<summary>
|
|
415
|
+
ListPolicyPreviewJobs
|
|
416
|
+
</summary>
|
|
417
|
+
|
|
418
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/accessanalyzer/command/ListPolicyPreviewJobsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-accessanalyzer/Interface/ListPolicyPreviewJobsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-accessanalyzer/Interface/ListPolicyPreviewJobsCommandOutput/)
|
|
419
|
+
</details>
|
|
420
|
+
<details>
|
|
421
|
+
<summary>
|
|
380
422
|
ListTagsForResource
|
|
381
423
|
</summary>
|
|
382
424
|
|
|
@@ -391,6 +433,13 @@ StartPolicyGeneration
|
|
|
391
433
|
</details>
|
|
392
434
|
<details>
|
|
393
435
|
<summary>
|
|
436
|
+
StartPolicyPreviewJob
|
|
437
|
+
</summary>
|
|
438
|
+
|
|
439
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/accessanalyzer/command/StartPolicyPreviewJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-accessanalyzer/Interface/StartPolicyPreviewJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-accessanalyzer/Interface/StartPolicyPreviewJobCommandOutput/)
|
|
440
|
+
</details>
|
|
441
|
+
<details>
|
|
442
|
+
<summary>
|
|
394
443
|
StartResourceScan
|
|
395
444
|
</summary>
|
|
396
445
|
|
package/dist-cjs/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var runtimeConfig = require('./runtimeConfig');
|
|
|
16
16
|
var regionConfigResolver = require('@aws-sdk/region-config-resolver');
|
|
17
17
|
var protocolHttp = require('@smithy/protocol-http');
|
|
18
18
|
var schemas_0 = require('./schemas/schemas_0');
|
|
19
|
+
var utilWaiter = require('@smithy/util-waiter');
|
|
19
20
|
var errors = require('./models/errors');
|
|
20
21
|
var AccessAnalyzerServiceException = require('./models/AccessAnalyzerServiceException');
|
|
21
22
|
|
|
@@ -137,6 +138,18 @@ class CancelPolicyGenerationCommand extends smithyClient.Command
|
|
|
137
138
|
.build() {
|
|
138
139
|
}
|
|
139
140
|
|
|
141
|
+
class CancelPolicyPreviewJobCommand extends smithyClient.Command
|
|
142
|
+
.classBuilder()
|
|
143
|
+
.ep(commonParams)
|
|
144
|
+
.m(function (Command, cs, config, o) {
|
|
145
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
146
|
+
})
|
|
147
|
+
.s("AccessAnalyzer", "CancelPolicyPreviewJob", {})
|
|
148
|
+
.n("AccessAnalyzerClient", "CancelPolicyPreviewJobCommand")
|
|
149
|
+
.sc(schemas_0.CancelPolicyPreviewJob$)
|
|
150
|
+
.build() {
|
|
151
|
+
}
|
|
152
|
+
|
|
140
153
|
class CheckAccessNotGrantedCommand extends smithyClient.Command
|
|
141
154
|
.classBuilder()
|
|
142
155
|
.ep(commonParams)
|
|
@@ -209,6 +222,18 @@ class CreateArchiveRuleCommand extends smithyClient.Command
|
|
|
209
222
|
.build() {
|
|
210
223
|
}
|
|
211
224
|
|
|
225
|
+
class CreatePolicyPreviewConfigurationCommand extends smithyClient.Command
|
|
226
|
+
.classBuilder()
|
|
227
|
+
.ep(commonParams)
|
|
228
|
+
.m(function (Command, cs, config, o) {
|
|
229
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
230
|
+
})
|
|
231
|
+
.s("AccessAnalyzer", "CreatePolicyPreviewConfiguration", {})
|
|
232
|
+
.n("AccessAnalyzerClient", "CreatePolicyPreviewConfigurationCommand")
|
|
233
|
+
.sc(schemas_0.CreatePolicyPreviewConfiguration$)
|
|
234
|
+
.build() {
|
|
235
|
+
}
|
|
236
|
+
|
|
212
237
|
class DeleteAnalyzerCommand extends smithyClient.Command
|
|
213
238
|
.classBuilder()
|
|
214
239
|
.ep(commonParams)
|
|
@@ -233,6 +258,18 @@ class DeleteArchiveRuleCommand extends smithyClient.Command
|
|
|
233
258
|
.build() {
|
|
234
259
|
}
|
|
235
260
|
|
|
261
|
+
class DeletePolicyPreviewConfigurationCommand extends smithyClient.Command
|
|
262
|
+
.classBuilder()
|
|
263
|
+
.ep(commonParams)
|
|
264
|
+
.m(function (Command, cs, config, o) {
|
|
265
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
266
|
+
})
|
|
267
|
+
.s("AccessAnalyzer", "DeletePolicyPreviewConfiguration", {})
|
|
268
|
+
.n("AccessAnalyzerClient", "DeletePolicyPreviewConfigurationCommand")
|
|
269
|
+
.sc(schemas_0.DeletePolicyPreviewConfiguration$)
|
|
270
|
+
.build() {
|
|
271
|
+
}
|
|
272
|
+
|
|
236
273
|
class GenerateFindingRecommendationCommand extends smithyClient.Command
|
|
237
274
|
.classBuilder()
|
|
238
275
|
.ep(commonParams)
|
|
@@ -353,6 +390,30 @@ class GetGeneratedPolicyCommand extends smithyClient.Command
|
|
|
353
390
|
.build() {
|
|
354
391
|
}
|
|
355
392
|
|
|
393
|
+
class GetPolicyPreviewConfigurationCommand extends smithyClient.Command
|
|
394
|
+
.classBuilder()
|
|
395
|
+
.ep(commonParams)
|
|
396
|
+
.m(function (Command, cs, config, o) {
|
|
397
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
398
|
+
})
|
|
399
|
+
.s("AccessAnalyzer", "GetPolicyPreviewConfiguration", {})
|
|
400
|
+
.n("AccessAnalyzerClient", "GetPolicyPreviewConfigurationCommand")
|
|
401
|
+
.sc(schemas_0.GetPolicyPreviewConfiguration$)
|
|
402
|
+
.build() {
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
class GetPolicyPreviewJobCommand extends smithyClient.Command
|
|
406
|
+
.classBuilder()
|
|
407
|
+
.ep(commonParams)
|
|
408
|
+
.m(function (Command, cs, config, o) {
|
|
409
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
410
|
+
})
|
|
411
|
+
.s("AccessAnalyzer", "GetPolicyPreviewJob", {})
|
|
412
|
+
.n("AccessAnalyzerClient", "GetPolicyPreviewJobCommand")
|
|
413
|
+
.sc(schemas_0.GetPolicyPreviewJob$)
|
|
414
|
+
.build() {
|
|
415
|
+
}
|
|
416
|
+
|
|
356
417
|
class ListAccessPreviewFindingsCommand extends smithyClient.Command
|
|
357
418
|
.classBuilder()
|
|
358
419
|
.ep(commonParams)
|
|
@@ -449,6 +510,18 @@ class ListPolicyGenerationsCommand extends smithyClient.Command
|
|
|
449
510
|
.build() {
|
|
450
511
|
}
|
|
451
512
|
|
|
513
|
+
class ListPolicyPreviewJobsCommand extends smithyClient.Command
|
|
514
|
+
.classBuilder()
|
|
515
|
+
.ep(commonParams)
|
|
516
|
+
.m(function (Command, cs, config, o) {
|
|
517
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
518
|
+
})
|
|
519
|
+
.s("AccessAnalyzer", "ListPolicyPreviewJobs", {})
|
|
520
|
+
.n("AccessAnalyzerClient", "ListPolicyPreviewJobsCommand")
|
|
521
|
+
.sc(schemas_0.ListPolicyPreviewJobs$)
|
|
522
|
+
.build() {
|
|
523
|
+
}
|
|
524
|
+
|
|
452
525
|
class ListTagsForResourceCommand extends smithyClient.Command
|
|
453
526
|
.classBuilder()
|
|
454
527
|
.ep(commonParams)
|
|
@@ -473,6 +546,18 @@ class StartPolicyGenerationCommand extends smithyClient.Command
|
|
|
473
546
|
.build() {
|
|
474
547
|
}
|
|
475
548
|
|
|
549
|
+
class StartPolicyPreviewJobCommand extends smithyClient.Command
|
|
550
|
+
.classBuilder()
|
|
551
|
+
.ep(commonParams)
|
|
552
|
+
.m(function (Command, cs, config, o) {
|
|
553
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
554
|
+
})
|
|
555
|
+
.s("AccessAnalyzer", "StartPolicyPreviewJob", {})
|
|
556
|
+
.n("AccessAnalyzerClient", "StartPolicyPreviewJobCommand")
|
|
557
|
+
.sc(schemas_0.StartPolicyPreviewJob$)
|
|
558
|
+
.build() {
|
|
559
|
+
}
|
|
560
|
+
|
|
476
561
|
class StartResourceScanCommand extends smithyClient.Command
|
|
477
562
|
.classBuilder()
|
|
478
563
|
.ep(commonParams)
|
|
@@ -577,19 +662,125 @@ const paginateListFindingsV2 = core.createPaginator(AccessAnalyzerClient, ListFi
|
|
|
577
662
|
|
|
578
663
|
const paginateListPolicyGenerations = core.createPaginator(AccessAnalyzerClient, ListPolicyGenerationsCommand, "nextToken", "nextToken", "maxResults");
|
|
579
664
|
|
|
665
|
+
const paginateListPolicyPreviewJobs = core.createPaginator(AccessAnalyzerClient, ListPolicyPreviewJobsCommand, "nextToken", "nextToken", "maxResults");
|
|
666
|
+
|
|
580
667
|
const paginateValidatePolicy = core.createPaginator(AccessAnalyzerClient, ValidatePolicyCommand, "nextToken", "nextToken", "maxResults");
|
|
581
668
|
|
|
669
|
+
const checkState$1 = async (client, input) => {
|
|
670
|
+
let reason;
|
|
671
|
+
try {
|
|
672
|
+
let result = await client.send(new GetPolicyPreviewConfigurationCommand(input));
|
|
673
|
+
reason = result;
|
|
674
|
+
try {
|
|
675
|
+
const returnComparator = () => {
|
|
676
|
+
let flat_1 = [].concat(...result.policyPreviewConfigurations);
|
|
677
|
+
let projection_3 = flat_1.map((element_2) => {
|
|
678
|
+
return element_2.status;
|
|
679
|
+
});
|
|
680
|
+
return projection_3;
|
|
681
|
+
};
|
|
682
|
+
let allStringEq_5 = (returnComparator().length > 0);
|
|
683
|
+
for (let element_4 of returnComparator()) {
|
|
684
|
+
allStringEq_5 = allStringEq_5 && (element_4 == "ACTIVE");
|
|
685
|
+
}
|
|
686
|
+
if (allStringEq_5) {
|
|
687
|
+
return { state: utilWaiter.WaiterState.SUCCESS, reason };
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
catch (e) { }
|
|
691
|
+
try {
|
|
692
|
+
const returnComparator = () => {
|
|
693
|
+
let flat_1 = [].concat(...result.policyPreviewConfigurations);
|
|
694
|
+
let projection_3 = flat_1.map((element_2) => {
|
|
695
|
+
return element_2.status;
|
|
696
|
+
});
|
|
697
|
+
return projection_3;
|
|
698
|
+
};
|
|
699
|
+
for (let anyStringEq_4 of returnComparator()) {
|
|
700
|
+
if (anyStringEq_4 == "FAILED") {
|
|
701
|
+
return { state: utilWaiter.WaiterState.FAILURE, reason };
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
catch (e) { }
|
|
706
|
+
}
|
|
707
|
+
catch (exception) {
|
|
708
|
+
reason = exception;
|
|
709
|
+
}
|
|
710
|
+
return { state: utilWaiter.WaiterState.RETRY, reason };
|
|
711
|
+
};
|
|
712
|
+
const waitForPolicyPreviewConfigurationActive = async (params, input) => {
|
|
713
|
+
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
|
714
|
+
return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$1);
|
|
715
|
+
};
|
|
716
|
+
const waitUntilPolicyPreviewConfigurationActive = async (params, input) => {
|
|
717
|
+
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
|
718
|
+
const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$1);
|
|
719
|
+
return utilWaiter.checkExceptions(result);
|
|
720
|
+
};
|
|
721
|
+
|
|
722
|
+
const checkState = async (client, input) => {
|
|
723
|
+
let reason;
|
|
724
|
+
try {
|
|
725
|
+
let result = await client.send(new GetPolicyPreviewJobCommand(input));
|
|
726
|
+
reason = result;
|
|
727
|
+
try {
|
|
728
|
+
const returnComparator = () => {
|
|
729
|
+
return result.jobDetails.jobStatus;
|
|
730
|
+
};
|
|
731
|
+
if (returnComparator() === "COMPLETED") {
|
|
732
|
+
return { state: utilWaiter.WaiterState.SUCCESS, reason };
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
catch (e) { }
|
|
736
|
+
try {
|
|
737
|
+
const returnComparator = () => {
|
|
738
|
+
return result.jobDetails.jobStatus;
|
|
739
|
+
};
|
|
740
|
+
if (returnComparator() === "FAILED") {
|
|
741
|
+
return { state: utilWaiter.WaiterState.FAILURE, reason };
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
catch (e) { }
|
|
745
|
+
try {
|
|
746
|
+
const returnComparator = () => {
|
|
747
|
+
return result.jobDetails.jobStatus;
|
|
748
|
+
};
|
|
749
|
+
if (returnComparator() === "CANCELED") {
|
|
750
|
+
return { state: utilWaiter.WaiterState.FAILURE, reason };
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
catch (e) { }
|
|
754
|
+
}
|
|
755
|
+
catch (exception) {
|
|
756
|
+
reason = exception;
|
|
757
|
+
}
|
|
758
|
+
return { state: utilWaiter.WaiterState.RETRY, reason };
|
|
759
|
+
};
|
|
760
|
+
const waitForPolicyPreviewJobCompleted = async (params, input) => {
|
|
761
|
+
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
|
|
762
|
+
return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
763
|
+
};
|
|
764
|
+
const waitUntilPolicyPreviewJobCompleted = async (params, input) => {
|
|
765
|
+
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
|
|
766
|
+
const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
767
|
+
return utilWaiter.checkExceptions(result);
|
|
768
|
+
};
|
|
769
|
+
|
|
582
770
|
const commands = {
|
|
583
771
|
ApplyArchiveRuleCommand,
|
|
584
772
|
CancelPolicyGenerationCommand,
|
|
773
|
+
CancelPolicyPreviewJobCommand,
|
|
585
774
|
CheckAccessNotGrantedCommand,
|
|
586
775
|
CheckNoNewAccessCommand,
|
|
587
776
|
CheckNoPublicAccessCommand,
|
|
588
777
|
CreateAccessPreviewCommand,
|
|
589
778
|
CreateAnalyzerCommand,
|
|
590
779
|
CreateArchiveRuleCommand,
|
|
780
|
+
CreatePolicyPreviewConfigurationCommand,
|
|
591
781
|
DeleteAnalyzerCommand,
|
|
592
782
|
DeleteArchiveRuleCommand,
|
|
783
|
+
DeletePolicyPreviewConfigurationCommand,
|
|
593
784
|
GenerateFindingRecommendationCommand,
|
|
594
785
|
GetAccessPreviewCommand,
|
|
595
786
|
GetAnalyzedResourceCommand,
|
|
@@ -600,6 +791,8 @@ const commands = {
|
|
|
600
791
|
GetFindingsStatisticsCommand,
|
|
601
792
|
GetFindingV2Command,
|
|
602
793
|
GetGeneratedPolicyCommand,
|
|
794
|
+
GetPolicyPreviewConfigurationCommand,
|
|
795
|
+
GetPolicyPreviewJobCommand,
|
|
603
796
|
ListAccessPreviewFindingsCommand,
|
|
604
797
|
ListAccessPreviewsCommand,
|
|
605
798
|
ListAnalyzedResourcesCommand,
|
|
@@ -608,8 +801,10 @@ const commands = {
|
|
|
608
801
|
ListFindingsCommand,
|
|
609
802
|
ListFindingsV2Command,
|
|
610
803
|
ListPolicyGenerationsCommand,
|
|
804
|
+
ListPolicyPreviewJobsCommand,
|
|
611
805
|
ListTagsForResourceCommand,
|
|
612
806
|
StartPolicyGenerationCommand,
|
|
807
|
+
StartPolicyPreviewJobCommand,
|
|
613
808
|
StartResourceScanCommand,
|
|
614
809
|
TagResourceCommand,
|
|
615
810
|
UntagResourceCommand,
|
|
@@ -629,11 +824,16 @@ const paginators = {
|
|
|
629
824
|
paginateListFindings,
|
|
630
825
|
paginateListFindingsV2,
|
|
631
826
|
paginateListPolicyGenerations,
|
|
827
|
+
paginateListPolicyPreviewJobs,
|
|
632
828
|
paginateValidatePolicy,
|
|
633
829
|
};
|
|
830
|
+
const waiters = {
|
|
831
|
+
waitUntilPolicyPreviewConfigurationActive,
|
|
832
|
+
waitUntilPolicyPreviewJobCompleted,
|
|
833
|
+
};
|
|
634
834
|
class AccessAnalyzer extends AccessAnalyzerClient {
|
|
635
835
|
}
|
|
636
|
-
smithyClient.createAggregatedClient(commands, AccessAnalyzer, { paginators });
|
|
836
|
+
smithyClient.createAggregatedClient(commands, AccessAnalyzer, { paginators, waiters });
|
|
637
837
|
|
|
638
838
|
const ValidationExceptionReason = {
|
|
639
839
|
CANNOT_PARSE: "cannotParse",
|
|
@@ -748,6 +948,14 @@ const AclPermission = {
|
|
|
748
948
|
WRITE: "WRITE",
|
|
749
949
|
WRITE_ACP: "WRITE_ACP",
|
|
750
950
|
};
|
|
951
|
+
const PolicyPreviewScope = {
|
|
952
|
+
GLOBAL: "GLOBAL",
|
|
953
|
+
};
|
|
954
|
+
const PolicyPreviewStatus = {
|
|
955
|
+
ACTIVE: "ACTIVE",
|
|
956
|
+
FAILED: "FAILED",
|
|
957
|
+
PENDING_CREATION: "PENDING_CREATION",
|
|
958
|
+
};
|
|
751
959
|
const AccessPreviewStatus = {
|
|
752
960
|
COMPLETED: "COMPLETED",
|
|
753
961
|
CREATING: "CREATING",
|
|
@@ -810,7 +1018,16 @@ const FindingType = {
|
|
|
810
1018
|
};
|
|
811
1019
|
const JobErrorCode = {
|
|
812
1020
|
AUTHORIZATION_ERROR: "AUTHORIZATION_ERROR",
|
|
1021
|
+
CANCELED_JOB_ERROR: "CANCELED_JOB_ERROR",
|
|
1022
|
+
INSUFFICIENT_PERMISSIONS_ERROR: "INSUFFICIENT_PERMISSIONS_ERROR",
|
|
1023
|
+
INVALID_ORGANIZATION_CONFIGURATION: "INVALID_ORGANIZATION_CONFIGURATION",
|
|
1024
|
+
INVALID_POLICY_PREVIEW_CONFIGURATION: "INVALID_POLICY_PREVIEW_CONFIGURATION",
|
|
1025
|
+
INVALID_SERVICE_LINKED_ROLE: "INVALID_SERVICE_LINKED_ROLE",
|
|
1026
|
+
INVALID_TARGET_ERROR: "INVALID_TARGET_ERROR",
|
|
1027
|
+
ORGANIZATION_ACCESS_DENIED_ERROR: "ORGANIZATION_ACCESS_DENIED_ERROR",
|
|
813
1028
|
RESOURCE_NOT_FOUND_ERROR: "RESOURCE_NOT_FOUND_ERROR",
|
|
1029
|
+
S3_BUCKET_NOT_FOUND_ERROR: "S3_BUCKET_NOT_FOUND_ERROR",
|
|
1030
|
+
S3_BUCKET_PERMISSION_ERROR: "S3_BUCKET_PERMISSION_ERROR",
|
|
814
1031
|
SERVICE_ERROR: "SERVICE_ERROR",
|
|
815
1032
|
SERVICE_QUOTA_EXCEEDED_ERROR: "SERVICE_QUOTA_EXCEEDED_ERROR",
|
|
816
1033
|
};
|
|
@@ -820,6 +1037,16 @@ const JobStatus = {
|
|
|
820
1037
|
IN_PROGRESS: "IN_PROGRESS",
|
|
821
1038
|
SUCCEEDED: "SUCCEEDED",
|
|
822
1039
|
};
|
|
1040
|
+
const ImpactAnalysisJobStatus = {
|
|
1041
|
+
CANCELED: "CANCELED",
|
|
1042
|
+
COMPLETED: "COMPLETED",
|
|
1043
|
+
FAILED: "FAILED",
|
|
1044
|
+
IN_PROGRESS: "IN_PROGRESS",
|
|
1045
|
+
SUBMITTED: "SUBMITTED",
|
|
1046
|
+
};
|
|
1047
|
+
const ImpactAnalysisJobType = {
|
|
1048
|
+
SCP: "SCP",
|
|
1049
|
+
};
|
|
823
1050
|
const FindingChangeType = {
|
|
824
1051
|
CHANGED: "CHANGED",
|
|
825
1052
|
NEW: "NEW",
|
|
@@ -829,6 +1056,10 @@ const OrderBy = {
|
|
|
829
1056
|
ASC: "ASC",
|
|
830
1057
|
DESC: "DESC",
|
|
831
1058
|
};
|
|
1059
|
+
const PolicyPreviewJobFilterName = {
|
|
1060
|
+
JOB_STATUS: "jobStatus",
|
|
1061
|
+
TARGET_ID: "targetId",
|
|
1062
|
+
};
|
|
832
1063
|
const FindingStatusUpdate = {
|
|
833
1064
|
ACTIVE: "ACTIVE",
|
|
834
1065
|
ARCHIVED: "ARCHIVED",
|
|
@@ -879,6 +1110,7 @@ exports.AclPermission = AclPermission;
|
|
|
879
1110
|
exports.AnalyzerStatus = AnalyzerStatus;
|
|
880
1111
|
exports.ApplyArchiveRuleCommand = ApplyArchiveRuleCommand;
|
|
881
1112
|
exports.CancelPolicyGenerationCommand = CancelPolicyGenerationCommand;
|
|
1113
|
+
exports.CancelPolicyPreviewJobCommand = CancelPolicyPreviewJobCommand;
|
|
882
1114
|
exports.CheckAccessNotGrantedCommand = CheckAccessNotGrantedCommand;
|
|
883
1115
|
exports.CheckAccessNotGrantedResult = CheckAccessNotGrantedResult;
|
|
884
1116
|
exports.CheckNoNewAccessCommand = CheckNoNewAccessCommand;
|
|
@@ -888,8 +1120,10 @@ exports.CheckNoPublicAccessResult = CheckNoPublicAccessResult;
|
|
|
888
1120
|
exports.CreateAccessPreviewCommand = CreateAccessPreviewCommand;
|
|
889
1121
|
exports.CreateAnalyzerCommand = CreateAnalyzerCommand;
|
|
890
1122
|
exports.CreateArchiveRuleCommand = CreateArchiveRuleCommand;
|
|
1123
|
+
exports.CreatePolicyPreviewConfigurationCommand = CreatePolicyPreviewConfigurationCommand;
|
|
891
1124
|
exports.DeleteAnalyzerCommand = DeleteAnalyzerCommand;
|
|
892
1125
|
exports.DeleteArchiveRuleCommand = DeleteArchiveRuleCommand;
|
|
1126
|
+
exports.DeletePolicyPreviewConfigurationCommand = DeletePolicyPreviewConfigurationCommand;
|
|
893
1127
|
exports.FindingChangeType = FindingChangeType;
|
|
894
1128
|
exports.FindingSourceType = FindingSourceType;
|
|
895
1129
|
exports.FindingStatus = FindingStatus;
|
|
@@ -905,6 +1139,10 @@ exports.GetFindingRecommendationCommand = GetFindingRecommendationCommand;
|
|
|
905
1139
|
exports.GetFindingV2Command = GetFindingV2Command;
|
|
906
1140
|
exports.GetFindingsStatisticsCommand = GetFindingsStatisticsCommand;
|
|
907
1141
|
exports.GetGeneratedPolicyCommand = GetGeneratedPolicyCommand;
|
|
1142
|
+
exports.GetPolicyPreviewConfigurationCommand = GetPolicyPreviewConfigurationCommand;
|
|
1143
|
+
exports.GetPolicyPreviewJobCommand = GetPolicyPreviewJobCommand;
|
|
1144
|
+
exports.ImpactAnalysisJobStatus = ImpactAnalysisJobStatus;
|
|
1145
|
+
exports.ImpactAnalysisJobType = ImpactAnalysisJobType;
|
|
908
1146
|
exports.InternalAccessType = InternalAccessType;
|
|
909
1147
|
exports.JobErrorCode = JobErrorCode;
|
|
910
1148
|
exports.JobStatus = JobStatus;
|
|
@@ -917,9 +1155,13 @@ exports.ListArchiveRulesCommand = ListArchiveRulesCommand;
|
|
|
917
1155
|
exports.ListFindingsCommand = ListFindingsCommand;
|
|
918
1156
|
exports.ListFindingsV2Command = ListFindingsV2Command;
|
|
919
1157
|
exports.ListPolicyGenerationsCommand = ListPolicyGenerationsCommand;
|
|
1158
|
+
exports.ListPolicyPreviewJobsCommand = ListPolicyPreviewJobsCommand;
|
|
920
1159
|
exports.ListTagsForResourceCommand = ListTagsForResourceCommand;
|
|
921
1160
|
exports.Locale = Locale;
|
|
922
1161
|
exports.OrderBy = OrderBy;
|
|
1162
|
+
exports.PolicyPreviewJobFilterName = PolicyPreviewJobFilterName;
|
|
1163
|
+
exports.PolicyPreviewScope = PolicyPreviewScope;
|
|
1164
|
+
exports.PolicyPreviewStatus = PolicyPreviewStatus;
|
|
923
1165
|
exports.PolicyType = PolicyType;
|
|
924
1166
|
exports.PrincipalType = PrincipalType;
|
|
925
1167
|
exports.ReasonCode = ReasonCode;
|
|
@@ -929,6 +1171,7 @@ exports.ResourceControlPolicyRestriction = ResourceControlPolicyRestriction;
|
|
|
929
1171
|
exports.ResourceType = ResourceType;
|
|
930
1172
|
exports.ServiceControlPolicyRestriction = ServiceControlPolicyRestriction;
|
|
931
1173
|
exports.StartPolicyGenerationCommand = StartPolicyGenerationCommand;
|
|
1174
|
+
exports.StartPolicyPreviewJobCommand = StartPolicyPreviewJobCommand;
|
|
932
1175
|
exports.StartResourceScanCommand = StartResourceScanCommand;
|
|
933
1176
|
exports.Status = Status;
|
|
934
1177
|
exports.TagResourceCommand = TagResourceCommand;
|
|
@@ -951,7 +1194,12 @@ exports.paginateListArchiveRules = paginateListArchiveRules;
|
|
|
951
1194
|
exports.paginateListFindings = paginateListFindings;
|
|
952
1195
|
exports.paginateListFindingsV2 = paginateListFindingsV2;
|
|
953
1196
|
exports.paginateListPolicyGenerations = paginateListPolicyGenerations;
|
|
1197
|
+
exports.paginateListPolicyPreviewJobs = paginateListPolicyPreviewJobs;
|
|
954
1198
|
exports.paginateValidatePolicy = paginateValidatePolicy;
|
|
1199
|
+
exports.waitForPolicyPreviewConfigurationActive = waitForPolicyPreviewConfigurationActive;
|
|
1200
|
+
exports.waitForPolicyPreviewJobCompleted = waitForPolicyPreviewJobCompleted;
|
|
1201
|
+
exports.waitUntilPolicyPreviewConfigurationActive = waitUntilPolicyPreviewConfigurationActive;
|
|
1202
|
+
exports.waitUntilPolicyPreviewJobCompleted = waitUntilPolicyPreviewJobCompleted;
|
|
955
1203
|
Object.prototype.hasOwnProperty.call(schemas_0, '__proto__') &&
|
|
956
1204
|
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
957
1205
|
Object.defineProperty(exports, '__proto__', {
|