@aws-sdk/client-accessanalyzer 3.315.0 → 3.319.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.
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AccessAnalyzer = void 0;
4
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
4
5
  const AccessAnalyzerClient_1 = require("./AccessAnalyzerClient");
5
6
  const ApplyArchiveRuleCommand_1 = require("./commands/ApplyArchiveRuleCommand");
6
7
  const CancelPolicyGenerationCommand_1 = require("./commands/CancelPolicyGenerationCommand");
@@ -30,398 +31,37 @@ const UntagResourceCommand_1 = require("./commands/UntagResourceCommand");
30
31
  const UpdateArchiveRuleCommand_1 = require("./commands/UpdateArchiveRuleCommand");
31
32
  const UpdateFindingsCommand_1 = require("./commands/UpdateFindingsCommand");
32
33
  const ValidatePolicyCommand_1 = require("./commands/ValidatePolicyCommand");
34
+ const commands = {
35
+ ApplyArchiveRuleCommand: ApplyArchiveRuleCommand_1.ApplyArchiveRuleCommand,
36
+ CancelPolicyGenerationCommand: CancelPolicyGenerationCommand_1.CancelPolicyGenerationCommand,
37
+ CreateAccessPreviewCommand: CreateAccessPreviewCommand_1.CreateAccessPreviewCommand,
38
+ CreateAnalyzerCommand: CreateAnalyzerCommand_1.CreateAnalyzerCommand,
39
+ CreateArchiveRuleCommand: CreateArchiveRuleCommand_1.CreateArchiveRuleCommand,
40
+ DeleteAnalyzerCommand: DeleteAnalyzerCommand_1.DeleteAnalyzerCommand,
41
+ DeleteArchiveRuleCommand: DeleteArchiveRuleCommand_1.DeleteArchiveRuleCommand,
42
+ GetAccessPreviewCommand: GetAccessPreviewCommand_1.GetAccessPreviewCommand,
43
+ GetAnalyzedResourceCommand: GetAnalyzedResourceCommand_1.GetAnalyzedResourceCommand,
44
+ GetAnalyzerCommand: GetAnalyzerCommand_1.GetAnalyzerCommand,
45
+ GetArchiveRuleCommand: GetArchiveRuleCommand_1.GetArchiveRuleCommand,
46
+ GetFindingCommand: GetFindingCommand_1.GetFindingCommand,
47
+ GetGeneratedPolicyCommand: GetGeneratedPolicyCommand_1.GetGeneratedPolicyCommand,
48
+ ListAccessPreviewFindingsCommand: ListAccessPreviewFindingsCommand_1.ListAccessPreviewFindingsCommand,
49
+ ListAccessPreviewsCommand: ListAccessPreviewsCommand_1.ListAccessPreviewsCommand,
50
+ ListAnalyzedResourcesCommand: ListAnalyzedResourcesCommand_1.ListAnalyzedResourcesCommand,
51
+ ListAnalyzersCommand: ListAnalyzersCommand_1.ListAnalyzersCommand,
52
+ ListArchiveRulesCommand: ListArchiveRulesCommand_1.ListArchiveRulesCommand,
53
+ ListFindingsCommand: ListFindingsCommand_1.ListFindingsCommand,
54
+ ListPolicyGenerationsCommand: ListPolicyGenerationsCommand_1.ListPolicyGenerationsCommand,
55
+ ListTagsForResourceCommand: ListTagsForResourceCommand_1.ListTagsForResourceCommand,
56
+ StartPolicyGenerationCommand: StartPolicyGenerationCommand_1.StartPolicyGenerationCommand,
57
+ StartResourceScanCommand: StartResourceScanCommand_1.StartResourceScanCommand,
58
+ TagResourceCommand: TagResourceCommand_1.TagResourceCommand,
59
+ UntagResourceCommand: UntagResourceCommand_1.UntagResourceCommand,
60
+ UpdateArchiveRuleCommand: UpdateArchiveRuleCommand_1.UpdateArchiveRuleCommand,
61
+ UpdateFindingsCommand: UpdateFindingsCommand_1.UpdateFindingsCommand,
62
+ ValidatePolicyCommand: ValidatePolicyCommand_1.ValidatePolicyCommand,
63
+ };
33
64
  class AccessAnalyzer extends AccessAnalyzerClient_1.AccessAnalyzerClient {
34
- applyArchiveRule(args, optionsOrCb, cb) {
35
- const command = new ApplyArchiveRuleCommand_1.ApplyArchiveRuleCommand(args);
36
- if (typeof optionsOrCb === "function") {
37
- this.send(command, optionsOrCb);
38
- }
39
- else if (typeof cb === "function") {
40
- if (typeof optionsOrCb !== "object")
41
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
42
- this.send(command, optionsOrCb || {}, cb);
43
- }
44
- else {
45
- return this.send(command, optionsOrCb);
46
- }
47
- }
48
- cancelPolicyGeneration(args, optionsOrCb, cb) {
49
- const command = new CancelPolicyGenerationCommand_1.CancelPolicyGenerationCommand(args);
50
- if (typeof optionsOrCb === "function") {
51
- this.send(command, optionsOrCb);
52
- }
53
- else if (typeof cb === "function") {
54
- if (typeof optionsOrCb !== "object")
55
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
56
- this.send(command, optionsOrCb || {}, cb);
57
- }
58
- else {
59
- return this.send(command, optionsOrCb);
60
- }
61
- }
62
- createAccessPreview(args, optionsOrCb, cb) {
63
- const command = new CreateAccessPreviewCommand_1.CreateAccessPreviewCommand(args);
64
- if (typeof optionsOrCb === "function") {
65
- this.send(command, optionsOrCb);
66
- }
67
- else if (typeof cb === "function") {
68
- if (typeof optionsOrCb !== "object")
69
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
70
- this.send(command, optionsOrCb || {}, cb);
71
- }
72
- else {
73
- return this.send(command, optionsOrCb);
74
- }
75
- }
76
- createAnalyzer(args, optionsOrCb, cb) {
77
- const command = new CreateAnalyzerCommand_1.CreateAnalyzerCommand(args);
78
- if (typeof optionsOrCb === "function") {
79
- this.send(command, optionsOrCb);
80
- }
81
- else if (typeof cb === "function") {
82
- if (typeof optionsOrCb !== "object")
83
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
84
- this.send(command, optionsOrCb || {}, cb);
85
- }
86
- else {
87
- return this.send(command, optionsOrCb);
88
- }
89
- }
90
- createArchiveRule(args, optionsOrCb, cb) {
91
- const command = new CreateArchiveRuleCommand_1.CreateArchiveRuleCommand(args);
92
- if (typeof optionsOrCb === "function") {
93
- this.send(command, optionsOrCb);
94
- }
95
- else if (typeof cb === "function") {
96
- if (typeof optionsOrCb !== "object")
97
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
98
- this.send(command, optionsOrCb || {}, cb);
99
- }
100
- else {
101
- return this.send(command, optionsOrCb);
102
- }
103
- }
104
- deleteAnalyzer(args, optionsOrCb, cb) {
105
- const command = new DeleteAnalyzerCommand_1.DeleteAnalyzerCommand(args);
106
- if (typeof optionsOrCb === "function") {
107
- this.send(command, optionsOrCb);
108
- }
109
- else if (typeof cb === "function") {
110
- if (typeof optionsOrCb !== "object")
111
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
112
- this.send(command, optionsOrCb || {}, cb);
113
- }
114
- else {
115
- return this.send(command, optionsOrCb);
116
- }
117
- }
118
- deleteArchiveRule(args, optionsOrCb, cb) {
119
- const command = new DeleteArchiveRuleCommand_1.DeleteArchiveRuleCommand(args);
120
- if (typeof optionsOrCb === "function") {
121
- this.send(command, optionsOrCb);
122
- }
123
- else if (typeof cb === "function") {
124
- if (typeof optionsOrCb !== "object")
125
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
126
- this.send(command, optionsOrCb || {}, cb);
127
- }
128
- else {
129
- return this.send(command, optionsOrCb);
130
- }
131
- }
132
- getAccessPreview(args, optionsOrCb, cb) {
133
- const command = new GetAccessPreviewCommand_1.GetAccessPreviewCommand(args);
134
- if (typeof optionsOrCb === "function") {
135
- this.send(command, optionsOrCb);
136
- }
137
- else if (typeof cb === "function") {
138
- if (typeof optionsOrCb !== "object")
139
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
140
- this.send(command, optionsOrCb || {}, cb);
141
- }
142
- else {
143
- return this.send(command, optionsOrCb);
144
- }
145
- }
146
- getAnalyzedResource(args, optionsOrCb, cb) {
147
- const command = new GetAnalyzedResourceCommand_1.GetAnalyzedResourceCommand(args);
148
- if (typeof optionsOrCb === "function") {
149
- this.send(command, optionsOrCb);
150
- }
151
- else if (typeof cb === "function") {
152
- if (typeof optionsOrCb !== "object")
153
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
154
- this.send(command, optionsOrCb || {}, cb);
155
- }
156
- else {
157
- return this.send(command, optionsOrCb);
158
- }
159
- }
160
- getAnalyzer(args, optionsOrCb, cb) {
161
- const command = new GetAnalyzerCommand_1.GetAnalyzerCommand(args);
162
- if (typeof optionsOrCb === "function") {
163
- this.send(command, optionsOrCb);
164
- }
165
- else if (typeof cb === "function") {
166
- if (typeof optionsOrCb !== "object")
167
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
168
- this.send(command, optionsOrCb || {}, cb);
169
- }
170
- else {
171
- return this.send(command, optionsOrCb);
172
- }
173
- }
174
- getArchiveRule(args, optionsOrCb, cb) {
175
- const command = new GetArchiveRuleCommand_1.GetArchiveRuleCommand(args);
176
- if (typeof optionsOrCb === "function") {
177
- this.send(command, optionsOrCb);
178
- }
179
- else if (typeof cb === "function") {
180
- if (typeof optionsOrCb !== "object")
181
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
182
- this.send(command, optionsOrCb || {}, cb);
183
- }
184
- else {
185
- return this.send(command, optionsOrCb);
186
- }
187
- }
188
- getFinding(args, optionsOrCb, cb) {
189
- const command = new GetFindingCommand_1.GetFindingCommand(args);
190
- if (typeof optionsOrCb === "function") {
191
- this.send(command, optionsOrCb);
192
- }
193
- else if (typeof cb === "function") {
194
- if (typeof optionsOrCb !== "object")
195
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
196
- this.send(command, optionsOrCb || {}, cb);
197
- }
198
- else {
199
- return this.send(command, optionsOrCb);
200
- }
201
- }
202
- getGeneratedPolicy(args, optionsOrCb, cb) {
203
- const command = new GetGeneratedPolicyCommand_1.GetGeneratedPolicyCommand(args);
204
- if (typeof optionsOrCb === "function") {
205
- this.send(command, optionsOrCb);
206
- }
207
- else if (typeof cb === "function") {
208
- if (typeof optionsOrCb !== "object")
209
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
210
- this.send(command, optionsOrCb || {}, cb);
211
- }
212
- else {
213
- return this.send(command, optionsOrCb);
214
- }
215
- }
216
- listAccessPreviewFindings(args, optionsOrCb, cb) {
217
- const command = new ListAccessPreviewFindingsCommand_1.ListAccessPreviewFindingsCommand(args);
218
- if (typeof optionsOrCb === "function") {
219
- this.send(command, optionsOrCb);
220
- }
221
- else if (typeof cb === "function") {
222
- if (typeof optionsOrCb !== "object")
223
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
224
- this.send(command, optionsOrCb || {}, cb);
225
- }
226
- else {
227
- return this.send(command, optionsOrCb);
228
- }
229
- }
230
- listAccessPreviews(args, optionsOrCb, cb) {
231
- const command = new ListAccessPreviewsCommand_1.ListAccessPreviewsCommand(args);
232
- if (typeof optionsOrCb === "function") {
233
- this.send(command, optionsOrCb);
234
- }
235
- else if (typeof cb === "function") {
236
- if (typeof optionsOrCb !== "object")
237
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
238
- this.send(command, optionsOrCb || {}, cb);
239
- }
240
- else {
241
- return this.send(command, optionsOrCb);
242
- }
243
- }
244
- listAnalyzedResources(args, optionsOrCb, cb) {
245
- const command = new ListAnalyzedResourcesCommand_1.ListAnalyzedResourcesCommand(args);
246
- if (typeof optionsOrCb === "function") {
247
- this.send(command, optionsOrCb);
248
- }
249
- else if (typeof cb === "function") {
250
- if (typeof optionsOrCb !== "object")
251
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
252
- this.send(command, optionsOrCb || {}, cb);
253
- }
254
- else {
255
- return this.send(command, optionsOrCb);
256
- }
257
- }
258
- listAnalyzers(args, optionsOrCb, cb) {
259
- const command = new ListAnalyzersCommand_1.ListAnalyzersCommand(args);
260
- if (typeof optionsOrCb === "function") {
261
- this.send(command, optionsOrCb);
262
- }
263
- else if (typeof cb === "function") {
264
- if (typeof optionsOrCb !== "object")
265
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
266
- this.send(command, optionsOrCb || {}, cb);
267
- }
268
- else {
269
- return this.send(command, optionsOrCb);
270
- }
271
- }
272
- listArchiveRules(args, optionsOrCb, cb) {
273
- const command = new ListArchiveRulesCommand_1.ListArchiveRulesCommand(args);
274
- if (typeof optionsOrCb === "function") {
275
- this.send(command, optionsOrCb);
276
- }
277
- else if (typeof cb === "function") {
278
- if (typeof optionsOrCb !== "object")
279
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
280
- this.send(command, optionsOrCb || {}, cb);
281
- }
282
- else {
283
- return this.send(command, optionsOrCb);
284
- }
285
- }
286
- listFindings(args, optionsOrCb, cb) {
287
- const command = new ListFindingsCommand_1.ListFindingsCommand(args);
288
- if (typeof optionsOrCb === "function") {
289
- this.send(command, optionsOrCb);
290
- }
291
- else if (typeof cb === "function") {
292
- if (typeof optionsOrCb !== "object")
293
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
294
- this.send(command, optionsOrCb || {}, cb);
295
- }
296
- else {
297
- return this.send(command, optionsOrCb);
298
- }
299
- }
300
- listPolicyGenerations(args, optionsOrCb, cb) {
301
- const command = new ListPolicyGenerationsCommand_1.ListPolicyGenerationsCommand(args);
302
- if (typeof optionsOrCb === "function") {
303
- this.send(command, optionsOrCb);
304
- }
305
- else if (typeof cb === "function") {
306
- if (typeof optionsOrCb !== "object")
307
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
308
- this.send(command, optionsOrCb || {}, cb);
309
- }
310
- else {
311
- return this.send(command, optionsOrCb);
312
- }
313
- }
314
- listTagsForResource(args, optionsOrCb, cb) {
315
- const command = new ListTagsForResourceCommand_1.ListTagsForResourceCommand(args);
316
- if (typeof optionsOrCb === "function") {
317
- this.send(command, optionsOrCb);
318
- }
319
- else if (typeof cb === "function") {
320
- if (typeof optionsOrCb !== "object")
321
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
322
- this.send(command, optionsOrCb || {}, cb);
323
- }
324
- else {
325
- return this.send(command, optionsOrCb);
326
- }
327
- }
328
- startPolicyGeneration(args, optionsOrCb, cb) {
329
- const command = new StartPolicyGenerationCommand_1.StartPolicyGenerationCommand(args);
330
- if (typeof optionsOrCb === "function") {
331
- this.send(command, optionsOrCb);
332
- }
333
- else if (typeof cb === "function") {
334
- if (typeof optionsOrCb !== "object")
335
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
336
- this.send(command, optionsOrCb || {}, cb);
337
- }
338
- else {
339
- return this.send(command, optionsOrCb);
340
- }
341
- }
342
- startResourceScan(args, optionsOrCb, cb) {
343
- const command = new StartResourceScanCommand_1.StartResourceScanCommand(args);
344
- if (typeof optionsOrCb === "function") {
345
- this.send(command, optionsOrCb);
346
- }
347
- else if (typeof cb === "function") {
348
- if (typeof optionsOrCb !== "object")
349
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
350
- this.send(command, optionsOrCb || {}, cb);
351
- }
352
- else {
353
- return this.send(command, optionsOrCb);
354
- }
355
- }
356
- tagResource(args, optionsOrCb, cb) {
357
- const command = new TagResourceCommand_1.TagResourceCommand(args);
358
- if (typeof optionsOrCb === "function") {
359
- this.send(command, optionsOrCb);
360
- }
361
- else if (typeof cb === "function") {
362
- if (typeof optionsOrCb !== "object")
363
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
364
- this.send(command, optionsOrCb || {}, cb);
365
- }
366
- else {
367
- return this.send(command, optionsOrCb);
368
- }
369
- }
370
- untagResource(args, optionsOrCb, cb) {
371
- const command = new UntagResourceCommand_1.UntagResourceCommand(args);
372
- if (typeof optionsOrCb === "function") {
373
- this.send(command, optionsOrCb);
374
- }
375
- else if (typeof cb === "function") {
376
- if (typeof optionsOrCb !== "object")
377
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
378
- this.send(command, optionsOrCb || {}, cb);
379
- }
380
- else {
381
- return this.send(command, optionsOrCb);
382
- }
383
- }
384
- updateArchiveRule(args, optionsOrCb, cb) {
385
- const command = new UpdateArchiveRuleCommand_1.UpdateArchiveRuleCommand(args);
386
- if (typeof optionsOrCb === "function") {
387
- this.send(command, optionsOrCb);
388
- }
389
- else if (typeof cb === "function") {
390
- if (typeof optionsOrCb !== "object")
391
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
392
- this.send(command, optionsOrCb || {}, cb);
393
- }
394
- else {
395
- return this.send(command, optionsOrCb);
396
- }
397
- }
398
- updateFindings(args, optionsOrCb, cb) {
399
- const command = new UpdateFindingsCommand_1.UpdateFindingsCommand(args);
400
- if (typeof optionsOrCb === "function") {
401
- this.send(command, optionsOrCb);
402
- }
403
- else if (typeof cb === "function") {
404
- if (typeof optionsOrCb !== "object")
405
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
406
- this.send(command, optionsOrCb || {}, cb);
407
- }
408
- else {
409
- return this.send(command, optionsOrCb);
410
- }
411
- }
412
- validatePolicy(args, optionsOrCb, cb) {
413
- const command = new ValidatePolicyCommand_1.ValidatePolicyCommand(args);
414
- if (typeof optionsOrCb === "function") {
415
- this.send(command, optionsOrCb);
416
- }
417
- else if (typeof cb === "function") {
418
- if (typeof optionsOrCb !== "object")
419
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
420
- this.send(command, optionsOrCb || {}, cb);
421
- }
422
- else {
423
- return this.send(command, optionsOrCb);
424
- }
425
- }
426
65
  }
427
66
  exports.AccessAnalyzer = AccessAnalyzer;
67
+ (0, smithy_client_1.createAggregatedClient)(commands, AccessAnalyzer);
@@ -16,7 +16,7 @@ const se_ApplyArchiveRuleCommand = async (input, context) => {
16
16
  let body;
17
17
  body = JSON.stringify((0, smithy_client_1.take)(input, {
18
18
  analyzerArn: [],
19
- clientToken: (_) => _ ?? (0, uuid_1.v4)(),
19
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
20
20
  ruleName: [],
21
21
  }));
22
22
  return new protocol_http_1.HttpRequest({
@@ -56,7 +56,7 @@ const se_CreateAccessPreviewCommand = async (input, context) => {
56
56
  let body;
57
57
  body = JSON.stringify((0, smithy_client_1.take)(input, {
58
58
  analyzerArn: [],
59
- clientToken: (_) => _ ?? (0, uuid_1.v4)(),
59
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
60
60
  configurations: (_) => (0, smithy_client_1._json)(_),
61
61
  }));
62
62
  return new protocol_http_1.HttpRequest({
@@ -80,7 +80,7 @@ const se_CreateAnalyzerCommand = async (input, context) => {
80
80
  body = JSON.stringify((0, smithy_client_1.take)(input, {
81
81
  analyzerName: [],
82
82
  archiveRules: (_) => (0, smithy_client_1._json)(_),
83
- clientToken: (_) => _ ?? (0, uuid_1.v4)(),
83
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
84
84
  tags: (_) => (0, smithy_client_1._json)(_),
85
85
  type: [],
86
86
  }));
@@ -104,7 +104,7 @@ const se_CreateArchiveRuleCommand = async (input, context) => {
104
104
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "analyzerName", () => input.analyzerName, "{analyzerName}", false);
105
105
  let body;
106
106
  body = JSON.stringify((0, smithy_client_1.take)(input, {
107
- clientToken: (_) => _ ?? (0, uuid_1.v4)(),
107
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
108
108
  filter: (_) => (0, smithy_client_1._json)(_),
109
109
  ruleName: [],
110
110
  }));
@@ -477,7 +477,7 @@ const se_StartPolicyGenerationCommand = async (input, context) => {
477
477
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policy/generation";
478
478
  let body;
479
479
  body = JSON.stringify((0, smithy_client_1.take)(input, {
480
- clientToken: (_) => _ ?? (0, uuid_1.v4)(),
480
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
481
481
  cloudTrailDetails: (_) => se_CloudTrailDetails(_, context),
482
482
  policyGenerationDetails: (_) => (0, smithy_client_1._json)(_),
483
483
  }));
@@ -572,7 +572,7 @@ const se_UpdateArchiveRuleCommand = async (input, context) => {
572
572
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ruleName", () => input.ruleName, "{ruleName}", false);
573
573
  let body;
574
574
  body = JSON.stringify((0, smithy_client_1.take)(input, {
575
- clientToken: (_) => _ ?? (0, uuid_1.v4)(),
575
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
576
576
  filter: (_) => (0, smithy_client_1._json)(_),
577
577
  }));
578
578
  return new protocol_http_1.HttpRequest({
@@ -595,7 +595,7 @@ const se_UpdateFindingsCommand = async (input, context) => {
595
595
  let body;
596
596
  body = JSON.stringify((0, smithy_client_1.take)(input, {
597
597
  analyzerArn: [],
598
- clientToken: (_) => _ ?? (0, uuid_1.v4)(),
598
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
599
599
  ids: (_) => (0, smithy_client_1._json)(_),
600
600
  resourceArn: [],
601
601
  status: [],
@@ -1,3 +1,4 @@
1
+ import { createAggregatedClient } from "@aws-sdk/smithy-client";
1
2
  import { AccessAnalyzerClient } from "./AccessAnalyzerClient";
2
3
  import { ApplyArchiveRuleCommand, } from "./commands/ApplyArchiveRuleCommand";
3
4
  import { CancelPolicyGenerationCommand, } from "./commands/CancelPolicyGenerationCommand";
@@ -27,397 +28,36 @@ import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
27
28
  import { UpdateArchiveRuleCommand, } from "./commands/UpdateArchiveRuleCommand";
28
29
  import { UpdateFindingsCommand, } from "./commands/UpdateFindingsCommand";
29
30
  import { ValidatePolicyCommand, } from "./commands/ValidatePolicyCommand";
31
+ const commands = {
32
+ ApplyArchiveRuleCommand,
33
+ CancelPolicyGenerationCommand,
34
+ CreateAccessPreviewCommand,
35
+ CreateAnalyzerCommand,
36
+ CreateArchiveRuleCommand,
37
+ DeleteAnalyzerCommand,
38
+ DeleteArchiveRuleCommand,
39
+ GetAccessPreviewCommand,
40
+ GetAnalyzedResourceCommand,
41
+ GetAnalyzerCommand,
42
+ GetArchiveRuleCommand,
43
+ GetFindingCommand,
44
+ GetGeneratedPolicyCommand,
45
+ ListAccessPreviewFindingsCommand,
46
+ ListAccessPreviewsCommand,
47
+ ListAnalyzedResourcesCommand,
48
+ ListAnalyzersCommand,
49
+ ListArchiveRulesCommand,
50
+ ListFindingsCommand,
51
+ ListPolicyGenerationsCommand,
52
+ ListTagsForResourceCommand,
53
+ StartPolicyGenerationCommand,
54
+ StartResourceScanCommand,
55
+ TagResourceCommand,
56
+ UntagResourceCommand,
57
+ UpdateArchiveRuleCommand,
58
+ UpdateFindingsCommand,
59
+ ValidatePolicyCommand,
60
+ };
30
61
  export class AccessAnalyzer extends AccessAnalyzerClient {
31
- applyArchiveRule(args, optionsOrCb, cb) {
32
- const command = new ApplyArchiveRuleCommand(args);
33
- if (typeof optionsOrCb === "function") {
34
- this.send(command, optionsOrCb);
35
- }
36
- else if (typeof cb === "function") {
37
- if (typeof optionsOrCb !== "object")
38
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
39
- this.send(command, optionsOrCb || {}, cb);
40
- }
41
- else {
42
- return this.send(command, optionsOrCb);
43
- }
44
- }
45
- cancelPolicyGeneration(args, optionsOrCb, cb) {
46
- const command = new CancelPolicyGenerationCommand(args);
47
- if (typeof optionsOrCb === "function") {
48
- this.send(command, optionsOrCb);
49
- }
50
- else if (typeof cb === "function") {
51
- if (typeof optionsOrCb !== "object")
52
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
53
- this.send(command, optionsOrCb || {}, cb);
54
- }
55
- else {
56
- return this.send(command, optionsOrCb);
57
- }
58
- }
59
- createAccessPreview(args, optionsOrCb, cb) {
60
- const command = new CreateAccessPreviewCommand(args);
61
- if (typeof optionsOrCb === "function") {
62
- this.send(command, optionsOrCb);
63
- }
64
- else if (typeof cb === "function") {
65
- if (typeof optionsOrCb !== "object")
66
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
67
- this.send(command, optionsOrCb || {}, cb);
68
- }
69
- else {
70
- return this.send(command, optionsOrCb);
71
- }
72
- }
73
- createAnalyzer(args, optionsOrCb, cb) {
74
- const command = new CreateAnalyzerCommand(args);
75
- if (typeof optionsOrCb === "function") {
76
- this.send(command, optionsOrCb);
77
- }
78
- else if (typeof cb === "function") {
79
- if (typeof optionsOrCb !== "object")
80
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
81
- this.send(command, optionsOrCb || {}, cb);
82
- }
83
- else {
84
- return this.send(command, optionsOrCb);
85
- }
86
- }
87
- createArchiveRule(args, optionsOrCb, cb) {
88
- const command = new CreateArchiveRuleCommand(args);
89
- if (typeof optionsOrCb === "function") {
90
- this.send(command, optionsOrCb);
91
- }
92
- else if (typeof cb === "function") {
93
- if (typeof optionsOrCb !== "object")
94
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
95
- this.send(command, optionsOrCb || {}, cb);
96
- }
97
- else {
98
- return this.send(command, optionsOrCb);
99
- }
100
- }
101
- deleteAnalyzer(args, optionsOrCb, cb) {
102
- const command = new DeleteAnalyzerCommand(args);
103
- if (typeof optionsOrCb === "function") {
104
- this.send(command, optionsOrCb);
105
- }
106
- else if (typeof cb === "function") {
107
- if (typeof optionsOrCb !== "object")
108
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
109
- this.send(command, optionsOrCb || {}, cb);
110
- }
111
- else {
112
- return this.send(command, optionsOrCb);
113
- }
114
- }
115
- deleteArchiveRule(args, optionsOrCb, cb) {
116
- const command = new DeleteArchiveRuleCommand(args);
117
- if (typeof optionsOrCb === "function") {
118
- this.send(command, optionsOrCb);
119
- }
120
- else if (typeof cb === "function") {
121
- if (typeof optionsOrCb !== "object")
122
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
123
- this.send(command, optionsOrCb || {}, cb);
124
- }
125
- else {
126
- return this.send(command, optionsOrCb);
127
- }
128
- }
129
- getAccessPreview(args, optionsOrCb, cb) {
130
- const command = new GetAccessPreviewCommand(args);
131
- if (typeof optionsOrCb === "function") {
132
- this.send(command, optionsOrCb);
133
- }
134
- else if (typeof cb === "function") {
135
- if (typeof optionsOrCb !== "object")
136
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
137
- this.send(command, optionsOrCb || {}, cb);
138
- }
139
- else {
140
- return this.send(command, optionsOrCb);
141
- }
142
- }
143
- getAnalyzedResource(args, optionsOrCb, cb) {
144
- const command = new GetAnalyzedResourceCommand(args);
145
- if (typeof optionsOrCb === "function") {
146
- this.send(command, optionsOrCb);
147
- }
148
- else if (typeof cb === "function") {
149
- if (typeof optionsOrCb !== "object")
150
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
151
- this.send(command, optionsOrCb || {}, cb);
152
- }
153
- else {
154
- return this.send(command, optionsOrCb);
155
- }
156
- }
157
- getAnalyzer(args, optionsOrCb, cb) {
158
- const command = new GetAnalyzerCommand(args);
159
- if (typeof optionsOrCb === "function") {
160
- this.send(command, optionsOrCb);
161
- }
162
- else if (typeof cb === "function") {
163
- if (typeof optionsOrCb !== "object")
164
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
165
- this.send(command, optionsOrCb || {}, cb);
166
- }
167
- else {
168
- return this.send(command, optionsOrCb);
169
- }
170
- }
171
- getArchiveRule(args, optionsOrCb, cb) {
172
- const command = new GetArchiveRuleCommand(args);
173
- if (typeof optionsOrCb === "function") {
174
- this.send(command, optionsOrCb);
175
- }
176
- else if (typeof cb === "function") {
177
- if (typeof optionsOrCb !== "object")
178
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
179
- this.send(command, optionsOrCb || {}, cb);
180
- }
181
- else {
182
- return this.send(command, optionsOrCb);
183
- }
184
- }
185
- getFinding(args, optionsOrCb, cb) {
186
- const command = new GetFindingCommand(args);
187
- if (typeof optionsOrCb === "function") {
188
- this.send(command, optionsOrCb);
189
- }
190
- else if (typeof cb === "function") {
191
- if (typeof optionsOrCb !== "object")
192
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
193
- this.send(command, optionsOrCb || {}, cb);
194
- }
195
- else {
196
- return this.send(command, optionsOrCb);
197
- }
198
- }
199
- getGeneratedPolicy(args, optionsOrCb, cb) {
200
- const command = new GetGeneratedPolicyCommand(args);
201
- if (typeof optionsOrCb === "function") {
202
- this.send(command, optionsOrCb);
203
- }
204
- else if (typeof cb === "function") {
205
- if (typeof optionsOrCb !== "object")
206
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
207
- this.send(command, optionsOrCb || {}, cb);
208
- }
209
- else {
210
- return this.send(command, optionsOrCb);
211
- }
212
- }
213
- listAccessPreviewFindings(args, optionsOrCb, cb) {
214
- const command = new ListAccessPreviewFindingsCommand(args);
215
- if (typeof optionsOrCb === "function") {
216
- this.send(command, optionsOrCb);
217
- }
218
- else if (typeof cb === "function") {
219
- if (typeof optionsOrCb !== "object")
220
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
221
- this.send(command, optionsOrCb || {}, cb);
222
- }
223
- else {
224
- return this.send(command, optionsOrCb);
225
- }
226
- }
227
- listAccessPreviews(args, optionsOrCb, cb) {
228
- const command = new ListAccessPreviewsCommand(args);
229
- if (typeof optionsOrCb === "function") {
230
- this.send(command, optionsOrCb);
231
- }
232
- else if (typeof cb === "function") {
233
- if (typeof optionsOrCb !== "object")
234
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
235
- this.send(command, optionsOrCb || {}, cb);
236
- }
237
- else {
238
- return this.send(command, optionsOrCb);
239
- }
240
- }
241
- listAnalyzedResources(args, optionsOrCb, cb) {
242
- const command = new ListAnalyzedResourcesCommand(args);
243
- if (typeof optionsOrCb === "function") {
244
- this.send(command, optionsOrCb);
245
- }
246
- else if (typeof cb === "function") {
247
- if (typeof optionsOrCb !== "object")
248
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
249
- this.send(command, optionsOrCb || {}, cb);
250
- }
251
- else {
252
- return this.send(command, optionsOrCb);
253
- }
254
- }
255
- listAnalyzers(args, optionsOrCb, cb) {
256
- const command = new ListAnalyzersCommand(args);
257
- if (typeof optionsOrCb === "function") {
258
- this.send(command, optionsOrCb);
259
- }
260
- else if (typeof cb === "function") {
261
- if (typeof optionsOrCb !== "object")
262
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
263
- this.send(command, optionsOrCb || {}, cb);
264
- }
265
- else {
266
- return this.send(command, optionsOrCb);
267
- }
268
- }
269
- listArchiveRules(args, optionsOrCb, cb) {
270
- const command = new ListArchiveRulesCommand(args);
271
- if (typeof optionsOrCb === "function") {
272
- this.send(command, optionsOrCb);
273
- }
274
- else if (typeof cb === "function") {
275
- if (typeof optionsOrCb !== "object")
276
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
277
- this.send(command, optionsOrCb || {}, cb);
278
- }
279
- else {
280
- return this.send(command, optionsOrCb);
281
- }
282
- }
283
- listFindings(args, optionsOrCb, cb) {
284
- const command = new ListFindingsCommand(args);
285
- if (typeof optionsOrCb === "function") {
286
- this.send(command, optionsOrCb);
287
- }
288
- else if (typeof cb === "function") {
289
- if (typeof optionsOrCb !== "object")
290
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
291
- this.send(command, optionsOrCb || {}, cb);
292
- }
293
- else {
294
- return this.send(command, optionsOrCb);
295
- }
296
- }
297
- listPolicyGenerations(args, optionsOrCb, cb) {
298
- const command = new ListPolicyGenerationsCommand(args);
299
- if (typeof optionsOrCb === "function") {
300
- this.send(command, optionsOrCb);
301
- }
302
- else if (typeof cb === "function") {
303
- if (typeof optionsOrCb !== "object")
304
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
305
- this.send(command, optionsOrCb || {}, cb);
306
- }
307
- else {
308
- return this.send(command, optionsOrCb);
309
- }
310
- }
311
- listTagsForResource(args, optionsOrCb, cb) {
312
- const command = new ListTagsForResourceCommand(args);
313
- if (typeof optionsOrCb === "function") {
314
- this.send(command, optionsOrCb);
315
- }
316
- else if (typeof cb === "function") {
317
- if (typeof optionsOrCb !== "object")
318
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
319
- this.send(command, optionsOrCb || {}, cb);
320
- }
321
- else {
322
- return this.send(command, optionsOrCb);
323
- }
324
- }
325
- startPolicyGeneration(args, optionsOrCb, cb) {
326
- const command = new StartPolicyGenerationCommand(args);
327
- if (typeof optionsOrCb === "function") {
328
- this.send(command, optionsOrCb);
329
- }
330
- else if (typeof cb === "function") {
331
- if (typeof optionsOrCb !== "object")
332
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
333
- this.send(command, optionsOrCb || {}, cb);
334
- }
335
- else {
336
- return this.send(command, optionsOrCb);
337
- }
338
- }
339
- startResourceScan(args, optionsOrCb, cb) {
340
- const command = new StartResourceScanCommand(args);
341
- if (typeof optionsOrCb === "function") {
342
- this.send(command, optionsOrCb);
343
- }
344
- else if (typeof cb === "function") {
345
- if (typeof optionsOrCb !== "object")
346
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
347
- this.send(command, optionsOrCb || {}, cb);
348
- }
349
- else {
350
- return this.send(command, optionsOrCb);
351
- }
352
- }
353
- tagResource(args, optionsOrCb, cb) {
354
- const command = new TagResourceCommand(args);
355
- if (typeof optionsOrCb === "function") {
356
- this.send(command, optionsOrCb);
357
- }
358
- else if (typeof cb === "function") {
359
- if (typeof optionsOrCb !== "object")
360
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
361
- this.send(command, optionsOrCb || {}, cb);
362
- }
363
- else {
364
- return this.send(command, optionsOrCb);
365
- }
366
- }
367
- untagResource(args, optionsOrCb, cb) {
368
- const command = new UntagResourceCommand(args);
369
- if (typeof optionsOrCb === "function") {
370
- this.send(command, optionsOrCb);
371
- }
372
- else if (typeof cb === "function") {
373
- if (typeof optionsOrCb !== "object")
374
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
375
- this.send(command, optionsOrCb || {}, cb);
376
- }
377
- else {
378
- return this.send(command, optionsOrCb);
379
- }
380
- }
381
- updateArchiveRule(args, optionsOrCb, cb) {
382
- const command = new UpdateArchiveRuleCommand(args);
383
- if (typeof optionsOrCb === "function") {
384
- this.send(command, optionsOrCb);
385
- }
386
- else if (typeof cb === "function") {
387
- if (typeof optionsOrCb !== "object")
388
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
389
- this.send(command, optionsOrCb || {}, cb);
390
- }
391
- else {
392
- return this.send(command, optionsOrCb);
393
- }
394
- }
395
- updateFindings(args, optionsOrCb, cb) {
396
- const command = new UpdateFindingsCommand(args);
397
- if (typeof optionsOrCb === "function") {
398
- this.send(command, optionsOrCb);
399
- }
400
- else if (typeof cb === "function") {
401
- if (typeof optionsOrCb !== "object")
402
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
403
- this.send(command, optionsOrCb || {}, cb);
404
- }
405
- else {
406
- return this.send(command, optionsOrCb);
407
- }
408
- }
409
- validatePolicy(args, optionsOrCb, cb) {
410
- const command = new ValidatePolicyCommand(args);
411
- if (typeof optionsOrCb === "function") {
412
- this.send(command, optionsOrCb);
413
- }
414
- else if (typeof cb === "function") {
415
- if (typeof optionsOrCb !== "object")
416
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
417
- this.send(command, optionsOrCb || {}, cb);
418
- }
419
- else {
420
- return this.send(command, optionsOrCb);
421
- }
422
- }
423
62
  }
63
+ createAggregatedClient(commands, AccessAnalyzer);
@@ -12,7 +12,7 @@ export const se_ApplyArchiveRuleCommand = async (input, context) => {
12
12
  let body;
13
13
  body = JSON.stringify(take(input, {
14
14
  analyzerArn: [],
15
- clientToken: (_) => _ ?? generateIdempotencyToken(),
15
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
16
16
  ruleName: [],
17
17
  }));
18
18
  return new __HttpRequest({
@@ -50,7 +50,7 @@ export const se_CreateAccessPreviewCommand = async (input, context) => {
50
50
  let body;
51
51
  body = JSON.stringify(take(input, {
52
52
  analyzerArn: [],
53
- clientToken: (_) => _ ?? generateIdempotencyToken(),
53
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
54
54
  configurations: (_) => _json(_),
55
55
  }));
56
56
  return new __HttpRequest({
@@ -73,7 +73,7 @@ export const se_CreateAnalyzerCommand = async (input, context) => {
73
73
  body = JSON.stringify(take(input, {
74
74
  analyzerName: [],
75
75
  archiveRules: (_) => _json(_),
76
- clientToken: (_) => _ ?? generateIdempotencyToken(),
76
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
77
77
  tags: (_) => _json(_),
78
78
  type: [],
79
79
  }));
@@ -96,7 +96,7 @@ export const se_CreateArchiveRuleCommand = async (input, context) => {
96
96
  resolvedPath = __resolvedPath(resolvedPath, input, "analyzerName", () => input.analyzerName, "{analyzerName}", false);
97
97
  let body;
98
98
  body = JSON.stringify(take(input, {
99
- clientToken: (_) => _ ?? generateIdempotencyToken(),
99
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
100
100
  filter: (_) => _json(_),
101
101
  ruleName: [],
102
102
  }));
@@ -452,7 +452,7 @@ export const se_StartPolicyGenerationCommand = async (input, context) => {
452
452
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policy/generation";
453
453
  let body;
454
454
  body = JSON.stringify(take(input, {
455
- clientToken: (_) => _ ?? generateIdempotencyToken(),
455
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
456
456
  cloudTrailDetails: (_) => se_CloudTrailDetails(_, context),
457
457
  policyGenerationDetails: (_) => _json(_),
458
458
  }));
@@ -543,7 +543,7 @@ export const se_UpdateArchiveRuleCommand = async (input, context) => {
543
543
  resolvedPath = __resolvedPath(resolvedPath, input, "ruleName", () => input.ruleName, "{ruleName}", false);
544
544
  let body;
545
545
  body = JSON.stringify(take(input, {
546
- clientToken: (_) => _ ?? generateIdempotencyToken(),
546
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
547
547
  filter: (_) => _json(_),
548
548
  }));
549
549
  return new __HttpRequest({
@@ -565,7 +565,7 @@ export const se_UpdateFindingsCommand = async (input, context) => {
565
565
  let body;
566
566
  body = JSON.stringify(take(input, {
567
567
  analyzerArn: [],
568
- clientToken: (_) => _ ?? generateIdempotencyToken(),
568
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
569
569
  ids: (_) => _json(_),
570
570
  resourceArn: [],
571
571
  status: [],
@@ -28,226 +28,187 @@ import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./command
28
28
  import { UpdateArchiveRuleCommandInput, UpdateArchiveRuleCommandOutput } from "./commands/UpdateArchiveRuleCommand";
29
29
  import { UpdateFindingsCommandInput, UpdateFindingsCommandOutput } from "./commands/UpdateFindingsCommand";
30
30
  import { ValidatePolicyCommandInput, ValidatePolicyCommandOutput } from "./commands/ValidatePolicyCommand";
31
- /**
32
- * @public
33
- * <p>Identity and Access Management Access Analyzer helps identify potential resource-access risks by enabling you to
34
- * identify any policies that grant access to an external principal. It does this by using
35
- * logic-based reasoning to analyze resource-based policies in your Amazon Web Services environment. An
36
- * external principal can be another Amazon Web Services account, a root user, an IAM user or role, a
37
- * federated user, an Amazon Web Services service, or an anonymous user. You can also use IAM Access Analyzer to
38
- * preview and validate public and cross-account access to your resources before deploying
39
- * permissions changes. This guide describes the Identity and Access Management Access Analyzer operations that you can
40
- * 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>
41
- * <p>To start using IAM Access Analyzer, you first need to create an analyzer.</p>
42
- */
43
- export declare class AccessAnalyzer extends AccessAnalyzerClient {
31
+ export interface AccessAnalyzer {
44
32
  /**
45
- * @public
46
- * <p>Retroactively applies the archive rule to existing findings that meet the archive rule
47
- * criteria.</p>
33
+ * @see {@link ApplyArchiveRuleCommand}
48
34
  */
49
35
  applyArchiveRule(args: ApplyArchiveRuleCommandInput, options?: __HttpHandlerOptions): Promise<ApplyArchiveRuleCommandOutput>;
50
36
  applyArchiveRule(args: ApplyArchiveRuleCommandInput, cb: (err: any, data?: ApplyArchiveRuleCommandOutput) => void): void;
51
37
  applyArchiveRule(args: ApplyArchiveRuleCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ApplyArchiveRuleCommandOutput) => void): void;
52
38
  /**
53
- * @public
54
- * <p>Cancels the requested policy generation.</p>
39
+ * @see {@link CancelPolicyGenerationCommand}
55
40
  */
56
41
  cancelPolicyGeneration(args: CancelPolicyGenerationCommandInput, options?: __HttpHandlerOptions): Promise<CancelPolicyGenerationCommandOutput>;
57
42
  cancelPolicyGeneration(args: CancelPolicyGenerationCommandInput, cb: (err: any, data?: CancelPolicyGenerationCommandOutput) => void): void;
58
43
  cancelPolicyGeneration(args: CancelPolicyGenerationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CancelPolicyGenerationCommandOutput) => void): void;
59
44
  /**
60
- * @public
61
- * <p>Creates an access preview that allows you to preview IAM Access Analyzer findings for your
62
- * resource before deploying resource permissions.</p>
45
+ * @see {@link CreateAccessPreviewCommand}
63
46
  */
64
47
  createAccessPreview(args: CreateAccessPreviewCommandInput, options?: __HttpHandlerOptions): Promise<CreateAccessPreviewCommandOutput>;
65
48
  createAccessPreview(args: CreateAccessPreviewCommandInput, cb: (err: any, data?: CreateAccessPreviewCommandOutput) => void): void;
66
49
  createAccessPreview(args: CreateAccessPreviewCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateAccessPreviewCommandOutput) => void): void;
67
50
  /**
68
- * @public
69
- * <p>Creates an analyzer for your account.</p>
51
+ * @see {@link CreateAnalyzerCommand}
70
52
  */
71
53
  createAnalyzer(args: CreateAnalyzerCommandInput, options?: __HttpHandlerOptions): Promise<CreateAnalyzerCommandOutput>;
72
54
  createAnalyzer(args: CreateAnalyzerCommandInput, cb: (err: any, data?: CreateAnalyzerCommandOutput) => void): void;
73
55
  createAnalyzer(args: CreateAnalyzerCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateAnalyzerCommandOutput) => void): void;
74
56
  /**
75
- * @public
76
- * <p>Creates an archive rule for the specified analyzer. Archive rules automatically archive
77
- * new findings that meet the criteria you define when you create the rule.</p>
78
- * <p>To learn about filter keys that you can use to create an archive rule, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-reference-filter-keys.html">IAM Access Analyzer filter keys</a> in the <b>IAM User Guide</b>.</p>
57
+ * @see {@link CreateArchiveRuleCommand}
79
58
  */
80
59
  createArchiveRule(args: CreateArchiveRuleCommandInput, options?: __HttpHandlerOptions): Promise<CreateArchiveRuleCommandOutput>;
81
60
  createArchiveRule(args: CreateArchiveRuleCommandInput, cb: (err: any, data?: CreateArchiveRuleCommandOutput) => void): void;
82
61
  createArchiveRule(args: CreateArchiveRuleCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateArchiveRuleCommandOutput) => void): void;
83
62
  /**
84
- * @public
85
- * <p>Deletes the specified analyzer. When you delete an analyzer, IAM Access Analyzer is disabled
86
- * for the account or organization in the current or specific Region. All findings that were
87
- * generated by the analyzer are deleted. You cannot undo this action.</p>
63
+ * @see {@link DeleteAnalyzerCommand}
88
64
  */
89
65
  deleteAnalyzer(args: DeleteAnalyzerCommandInput, options?: __HttpHandlerOptions): Promise<DeleteAnalyzerCommandOutput>;
90
66
  deleteAnalyzer(args: DeleteAnalyzerCommandInput, cb: (err: any, data?: DeleteAnalyzerCommandOutput) => void): void;
91
67
  deleteAnalyzer(args: DeleteAnalyzerCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteAnalyzerCommandOutput) => void): void;
92
68
  /**
93
- * @public
94
- * <p>Deletes the specified archive rule.</p>
69
+ * @see {@link DeleteArchiveRuleCommand}
95
70
  */
96
71
  deleteArchiveRule(args: DeleteArchiveRuleCommandInput, options?: __HttpHandlerOptions): Promise<DeleteArchiveRuleCommandOutput>;
97
72
  deleteArchiveRule(args: DeleteArchiveRuleCommandInput, cb: (err: any, data?: DeleteArchiveRuleCommandOutput) => void): void;
98
73
  deleteArchiveRule(args: DeleteArchiveRuleCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteArchiveRuleCommandOutput) => void): void;
99
74
  /**
100
- * @public
101
- * <p>Retrieves information about an access preview for the specified analyzer.</p>
75
+ * @see {@link GetAccessPreviewCommand}
102
76
  */
103
77
  getAccessPreview(args: GetAccessPreviewCommandInput, options?: __HttpHandlerOptions): Promise<GetAccessPreviewCommandOutput>;
104
78
  getAccessPreview(args: GetAccessPreviewCommandInput, cb: (err: any, data?: GetAccessPreviewCommandOutput) => void): void;
105
79
  getAccessPreview(args: GetAccessPreviewCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetAccessPreviewCommandOutput) => void): void;
106
80
  /**
107
- * @public
108
- * <p>Retrieves information about a resource that was analyzed.</p>
81
+ * @see {@link GetAnalyzedResourceCommand}
109
82
  */
110
83
  getAnalyzedResource(args: GetAnalyzedResourceCommandInput, options?: __HttpHandlerOptions): Promise<GetAnalyzedResourceCommandOutput>;
111
84
  getAnalyzedResource(args: GetAnalyzedResourceCommandInput, cb: (err: any, data?: GetAnalyzedResourceCommandOutput) => void): void;
112
85
  getAnalyzedResource(args: GetAnalyzedResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetAnalyzedResourceCommandOutput) => void): void;
113
86
  /**
114
- * @public
115
- * <p>Retrieves information about the specified analyzer.</p>
87
+ * @see {@link GetAnalyzerCommand}
116
88
  */
117
89
  getAnalyzer(args: GetAnalyzerCommandInput, options?: __HttpHandlerOptions): Promise<GetAnalyzerCommandOutput>;
118
90
  getAnalyzer(args: GetAnalyzerCommandInput, cb: (err: any, data?: GetAnalyzerCommandOutput) => void): void;
119
91
  getAnalyzer(args: GetAnalyzerCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetAnalyzerCommandOutput) => void): void;
120
92
  /**
121
- * @public
122
- * <p>Retrieves information about an archive rule.</p>
123
- * <p>To learn about filter keys that you can use to create an archive rule, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-reference-filter-keys.html">IAM Access Analyzer filter keys</a> in the <b>IAM User Guide</b>.</p>
93
+ * @see {@link GetArchiveRuleCommand}
124
94
  */
125
95
  getArchiveRule(args: GetArchiveRuleCommandInput, options?: __HttpHandlerOptions): Promise<GetArchiveRuleCommandOutput>;
126
96
  getArchiveRule(args: GetArchiveRuleCommandInput, cb: (err: any, data?: GetArchiveRuleCommandOutput) => void): void;
127
97
  getArchiveRule(args: GetArchiveRuleCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetArchiveRuleCommandOutput) => void): void;
128
98
  /**
129
- * @public
130
- * <p>Retrieves information about the specified finding.</p>
99
+ * @see {@link GetFindingCommand}
131
100
  */
132
101
  getFinding(args: GetFindingCommandInput, options?: __HttpHandlerOptions): Promise<GetFindingCommandOutput>;
133
102
  getFinding(args: GetFindingCommandInput, cb: (err: any, data?: GetFindingCommandOutput) => void): void;
134
103
  getFinding(args: GetFindingCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetFindingCommandOutput) => void): void;
135
104
  /**
136
- * @public
137
- * <p>Retrieves the policy that was generated using <code>StartPolicyGeneration</code>.
138
- * </p>
105
+ * @see {@link GetGeneratedPolicyCommand}
139
106
  */
140
107
  getGeneratedPolicy(args: GetGeneratedPolicyCommandInput, options?: __HttpHandlerOptions): Promise<GetGeneratedPolicyCommandOutput>;
141
108
  getGeneratedPolicy(args: GetGeneratedPolicyCommandInput, cb: (err: any, data?: GetGeneratedPolicyCommandOutput) => void): void;
142
109
  getGeneratedPolicy(args: GetGeneratedPolicyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetGeneratedPolicyCommandOutput) => void): void;
143
110
  /**
144
- * @public
145
- * <p>Retrieves a list of access preview findings generated by the specified access
146
- * preview.</p>
111
+ * @see {@link ListAccessPreviewFindingsCommand}
147
112
  */
148
113
  listAccessPreviewFindings(args: ListAccessPreviewFindingsCommandInput, options?: __HttpHandlerOptions): Promise<ListAccessPreviewFindingsCommandOutput>;
149
114
  listAccessPreviewFindings(args: ListAccessPreviewFindingsCommandInput, cb: (err: any, data?: ListAccessPreviewFindingsCommandOutput) => void): void;
150
115
  listAccessPreviewFindings(args: ListAccessPreviewFindingsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAccessPreviewFindingsCommandOutput) => void): void;
151
116
  /**
152
- * @public
153
- * <p>Retrieves a list of access previews for the specified analyzer.</p>
117
+ * @see {@link ListAccessPreviewsCommand}
154
118
  */
155
119
  listAccessPreviews(args: ListAccessPreviewsCommandInput, options?: __HttpHandlerOptions): Promise<ListAccessPreviewsCommandOutput>;
156
120
  listAccessPreviews(args: ListAccessPreviewsCommandInput, cb: (err: any, data?: ListAccessPreviewsCommandOutput) => void): void;
157
121
  listAccessPreviews(args: ListAccessPreviewsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAccessPreviewsCommandOutput) => void): void;
158
122
  /**
159
- * @public
160
- * <p>Retrieves a list of resources of the specified type that have been analyzed by the
161
- * specified analyzer..</p>
123
+ * @see {@link ListAnalyzedResourcesCommand}
162
124
  */
163
125
  listAnalyzedResources(args: ListAnalyzedResourcesCommandInput, options?: __HttpHandlerOptions): Promise<ListAnalyzedResourcesCommandOutput>;
164
126
  listAnalyzedResources(args: ListAnalyzedResourcesCommandInput, cb: (err: any, data?: ListAnalyzedResourcesCommandOutput) => void): void;
165
127
  listAnalyzedResources(args: ListAnalyzedResourcesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAnalyzedResourcesCommandOutput) => void): void;
166
128
  /**
167
- * @public
168
- * <p>Retrieves a list of analyzers.</p>
129
+ * @see {@link ListAnalyzersCommand}
169
130
  */
170
131
  listAnalyzers(args: ListAnalyzersCommandInput, options?: __HttpHandlerOptions): Promise<ListAnalyzersCommandOutput>;
171
132
  listAnalyzers(args: ListAnalyzersCommandInput, cb: (err: any, data?: ListAnalyzersCommandOutput) => void): void;
172
133
  listAnalyzers(args: ListAnalyzersCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAnalyzersCommandOutput) => void): void;
173
134
  /**
174
- * @public
175
- * <p>Retrieves a list of archive rules created for the specified analyzer.</p>
135
+ * @see {@link ListArchiveRulesCommand}
176
136
  */
177
137
  listArchiveRules(args: ListArchiveRulesCommandInput, options?: __HttpHandlerOptions): Promise<ListArchiveRulesCommandOutput>;
178
138
  listArchiveRules(args: ListArchiveRulesCommandInput, cb: (err: any, data?: ListArchiveRulesCommandOutput) => void): void;
179
139
  listArchiveRules(args: ListArchiveRulesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListArchiveRulesCommandOutput) => void): void;
180
140
  /**
181
- * @public
182
- * <p>Retrieves a list of findings generated by the specified analyzer.</p>
183
- * <p>To learn about filter keys that you can use to retrieve a list of findings, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-reference-filter-keys.html">IAM Access Analyzer filter keys</a> in the <b>IAM User Guide</b>.</p>
141
+ * @see {@link ListFindingsCommand}
184
142
  */
185
143
  listFindings(args: ListFindingsCommandInput, options?: __HttpHandlerOptions): Promise<ListFindingsCommandOutput>;
186
144
  listFindings(args: ListFindingsCommandInput, cb: (err: any, data?: ListFindingsCommandOutput) => void): void;
187
145
  listFindings(args: ListFindingsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListFindingsCommandOutput) => void): void;
188
146
  /**
189
- * @public
190
- * <p>Lists all of the policy generations requested in the last seven days.</p>
147
+ * @see {@link ListPolicyGenerationsCommand}
191
148
  */
192
149
  listPolicyGenerations(args: ListPolicyGenerationsCommandInput, options?: __HttpHandlerOptions): Promise<ListPolicyGenerationsCommandOutput>;
193
150
  listPolicyGenerations(args: ListPolicyGenerationsCommandInput, cb: (err: any, data?: ListPolicyGenerationsCommandOutput) => void): void;
194
151
  listPolicyGenerations(args: ListPolicyGenerationsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListPolicyGenerationsCommandOutput) => void): void;
195
152
  /**
196
- * @public
197
- * <p>Retrieves a list of tags applied to the specified resource.</p>
153
+ * @see {@link ListTagsForResourceCommand}
198
154
  */
199
155
  listTagsForResource(args: ListTagsForResourceCommandInput, options?: __HttpHandlerOptions): Promise<ListTagsForResourceCommandOutput>;
200
156
  listTagsForResource(args: ListTagsForResourceCommandInput, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
201
157
  listTagsForResource(args: ListTagsForResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
202
158
  /**
203
- * @public
204
- * <p>Starts the policy generation request.</p>
159
+ * @see {@link StartPolicyGenerationCommand}
205
160
  */
206
161
  startPolicyGeneration(args: StartPolicyGenerationCommandInput, options?: __HttpHandlerOptions): Promise<StartPolicyGenerationCommandOutput>;
207
162
  startPolicyGeneration(args: StartPolicyGenerationCommandInput, cb: (err: any, data?: StartPolicyGenerationCommandOutput) => void): void;
208
163
  startPolicyGeneration(args: StartPolicyGenerationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StartPolicyGenerationCommandOutput) => void): void;
209
164
  /**
210
- * @public
211
- * <p>Immediately starts a scan of the policies applied to the specified resource.</p>
165
+ * @see {@link StartResourceScanCommand}
212
166
  */
213
167
  startResourceScan(args: StartResourceScanCommandInput, options?: __HttpHandlerOptions): Promise<StartResourceScanCommandOutput>;
214
168
  startResourceScan(args: StartResourceScanCommandInput, cb: (err: any, data?: StartResourceScanCommandOutput) => void): void;
215
169
  startResourceScan(args: StartResourceScanCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StartResourceScanCommandOutput) => void): void;
216
170
  /**
217
- * @public
218
- * <p>Adds a tag to the specified resource.</p>
171
+ * @see {@link TagResourceCommand}
219
172
  */
220
173
  tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise<TagResourceCommandOutput>;
221
174
  tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
222
175
  tagResource(args: TagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
223
176
  /**
224
- * @public
225
- * <p>Removes a tag from the specified resource.</p>
177
+ * @see {@link UntagResourceCommand}
226
178
  */
227
179
  untagResource(args: UntagResourceCommandInput, options?: __HttpHandlerOptions): Promise<UntagResourceCommandOutput>;
228
180
  untagResource(args: UntagResourceCommandInput, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
229
181
  untagResource(args: UntagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
230
182
  /**
231
- * @public
232
- * <p>Updates the criteria and values for the specified archive rule.</p>
183
+ * @see {@link UpdateArchiveRuleCommand}
233
184
  */
234
185
  updateArchiveRule(args: UpdateArchiveRuleCommandInput, options?: __HttpHandlerOptions): Promise<UpdateArchiveRuleCommandOutput>;
235
186
  updateArchiveRule(args: UpdateArchiveRuleCommandInput, cb: (err: any, data?: UpdateArchiveRuleCommandOutput) => void): void;
236
187
  updateArchiveRule(args: UpdateArchiveRuleCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateArchiveRuleCommandOutput) => void): void;
237
188
  /**
238
- * @public
239
- * <p>Updates the status for the specified findings.</p>
189
+ * @see {@link UpdateFindingsCommand}
240
190
  */
241
191
  updateFindings(args: UpdateFindingsCommandInput, options?: __HttpHandlerOptions): Promise<UpdateFindingsCommandOutput>;
242
192
  updateFindings(args: UpdateFindingsCommandInput, cb: (err: any, data?: UpdateFindingsCommandOutput) => void): void;
243
193
  updateFindings(args: UpdateFindingsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateFindingsCommandOutput) => void): void;
244
194
  /**
245
- * @public
246
- * <p>Requests the validation of a policy and returns a list of findings. The findings help
247
- * you identify issues and provide actionable recommendations to resolve the issue and enable
248
- * you to author functional policies that meet security best practices. </p>
195
+ * @see {@link ValidatePolicyCommand}
249
196
  */
250
197
  validatePolicy(args: ValidatePolicyCommandInput, options?: __HttpHandlerOptions): Promise<ValidatePolicyCommandOutput>;
251
198
  validatePolicy(args: ValidatePolicyCommandInput, cb: (err: any, data?: ValidatePolicyCommandOutput) => void): void;
252
199
  validatePolicy(args: ValidatePolicyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ValidatePolicyCommandOutput) => void): void;
253
200
  }
201
+ /**
202
+ * @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>
212
+ */
213
+ export declare class AccessAnalyzer extends AccessAnalyzerClient implements AccessAnalyzer {
214
+ }
@@ -112,7 +112,7 @@ import {
112
112
  ValidatePolicyCommandInput,
113
113
  ValidatePolicyCommandOutput,
114
114
  } from "./commands/ValidatePolicyCommand";
115
- export declare class AccessAnalyzer extends AccessAnalyzerClient {
115
+ export interface AccessAnalyzer {
116
116
  applyArchiveRule(
117
117
  args: ApplyArchiveRuleCommandInput,
118
118
  options?: __HttpHandlerOptions
@@ -478,3 +478,6 @@ export declare class AccessAnalyzer extends AccessAnalyzerClient {
478
478
  cb: (err: any, data?: ValidatePolicyCommandOutput) => void
479
479
  ): void;
480
480
  }
481
+ export declare class AccessAnalyzer
482
+ extends AccessAnalyzerClient
483
+ implements AccessAnalyzer {}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-accessanalyzer",
3
3
  "description": "AWS SDK for JavaScript Accessanalyzer Client for Node.js, Browser and React Native",
4
- "version": "3.315.0",
4
+ "version": "3.319.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -21,9 +21,9 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "3.0.0",
23
23
  "@aws-crypto/sha256-js": "3.0.0",
24
- "@aws-sdk/client-sts": "3.315.0",
24
+ "@aws-sdk/client-sts": "3.319.0",
25
25
  "@aws-sdk/config-resolver": "3.310.0",
26
- "@aws-sdk/credential-provider-node": "3.315.0",
26
+ "@aws-sdk/credential-provider-node": "3.319.0",
27
27
  "@aws-sdk/fetch-http-handler": "3.310.0",
28
28
  "@aws-sdk/hash-node": "3.310.0",
29
29
  "@aws-sdk/invalid-dependency": "3.310.0",
@@ -36,19 +36,19 @@
36
36
  "@aws-sdk/middleware-serde": "3.310.0",
37
37
  "@aws-sdk/middleware-signing": "3.310.0",
38
38
  "@aws-sdk/middleware-stack": "3.310.0",
39
- "@aws-sdk/middleware-user-agent": "3.310.0",
39
+ "@aws-sdk/middleware-user-agent": "3.319.0",
40
40
  "@aws-sdk/node-config-provider": "3.310.0",
41
41
  "@aws-sdk/node-http-handler": "3.310.0",
42
42
  "@aws-sdk/protocol-http": "3.310.0",
43
- "@aws-sdk/smithy-client": "3.315.0",
43
+ "@aws-sdk/smithy-client": "3.316.0",
44
44
  "@aws-sdk/types": "3.310.0",
45
45
  "@aws-sdk/url-parser": "3.310.0",
46
46
  "@aws-sdk/util-base64": "3.310.0",
47
47
  "@aws-sdk/util-body-length-browser": "3.310.0",
48
48
  "@aws-sdk/util-body-length-node": "3.310.0",
49
- "@aws-sdk/util-defaults-mode-browser": "3.315.0",
50
- "@aws-sdk/util-defaults-mode-node": "3.315.0",
51
- "@aws-sdk/util-endpoints": "3.310.0",
49
+ "@aws-sdk/util-defaults-mode-browser": "3.316.0",
50
+ "@aws-sdk/util-defaults-mode-node": "3.316.0",
51
+ "@aws-sdk/util-endpoints": "3.319.0",
52
52
  "@aws-sdk/util-retry": "3.310.0",
53
53
  "@aws-sdk/util-user-agent-browser": "3.310.0",
54
54
  "@aws-sdk/util-user-agent-node": "3.310.0",