@aws-sdk/client-accessanalyzer 3.312.0 → 3.316.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,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);