@digipair/skill-s3 0.114.3 → 0.114.6

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,3677 +0,0 @@
1
- import { v as resolveAwsSdkSigV4Config, w as normalizeProvider, x as getSmithyContext, y as EndpointCache, z as resolveEndpoint, A as awsEndpointFunctions, B as customEndpointFunctions, D as toUtf8, F as fromUtf8, n as parseUrl, G as NoOpLogger, J as AwsSdkSigV4Signer, K as toBase64, L as fromBase64, M as emitWarningIfUnsupportedVersion, O as resolveDefaultsModeConfig, Q as emitWarningIfUnsupportedVersion$1, o as loadConfig, R as NODE_APP_ID_CONFIG_OPTIONS, S as NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, T as NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, U as streamCollector, V as Hash, N as NodeHttpHandler, W as NODE_REGION_CONFIG_OPTIONS, X as NODE_MAX_ATTEMPT_CONFIG_OPTIONS, Y as createDefaultUserAgentProvider, Z as calculateBodyLength, _ as NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, $ as loadConfigsForDefaultMode, a0 as NODE_RETRY_MODE_CONFIG_OPTIONS, a2 as DEFAULT_RETRY_MODE, a1 as NODE_REGION_CONFIG_FILE_OPTIONS, a3 as getAwsRegionExtensionConfiguration, a4 as getDefaultExtensionConfiguration, a5 as getHttpHandlerExtensionConfiguration, a6 as resolveAwsRegionExtensionConfiguration, a7 as resolveDefaultRuntimeConfig, a8 as resolveHttpHandlerRuntimeConfig, a9 as resolveUserAgentConfig, aa as resolveRetryConfig, ab as resolveRegionConfig, ac as resolveEndpointConfig, ad as resolveHostHeaderConfig, ae as getUserAgentPlugin, af as getRetryPlugin, ag as getContentLengthPlugin, ah as getHostHeaderPlugin, ai as getLoggerPlugin, aj as getRecursionDetectionPlugin, ak as getHttpAuthSchemeEndpointRuleSetPlugin, al as getHttpSigningPlugin, am as Client, an as DefaultIdentityProviderConfig, ao as ServiceException, ap as SENSITIVE_STRING, aD as parseXmlBody, aE as strictParseInt32, ax as expectString, at as expectNonNull, aF as parseRfc3339DateTimeWithOffset, aG as extendedEncodeURIComponent, H as HttpRequest, aw as withBaseException, aH as parseXmlErrorBody, ay as decorateServiceException, az as Command, aA as getSerdePlugin, aB as getEndpointPlugin, s as setCredentialFeature } from './index.esm3.js';
2
- import { p as packageInfo, c as createAggregatedClient } from './package.esm.js';
3
- import { N as NoAuthSigner } from './noAuth.esm.js';
4
- import 'buffer';
5
- import 'path';
6
- import 'os';
7
- import 'fs';
8
- import 'stream';
9
- import 'crypto';
10
- import 'http';
11
- import 'https';
12
- import 'process';
13
- import 'node:fs';
14
- import 'async_hooks';
15
- import 'zlib';
16
- import 'node:stream';
17
-
18
- function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
19
- try {
20
- var info = gen[key](arg);
21
- var value = info.value;
22
- } catch (error) {
23
- reject(error);
24
- return;
25
- }
26
- if (info.done) {
27
- resolve(value);
28
- } else {
29
- Promise.resolve(value).then(_next, _throw);
30
- }
31
- }
32
- function _async_to_generator$5(fn) {
33
- return function() {
34
- var self = this, args = arguments;
35
- return new Promise(function(resolve, reject) {
36
- var gen = fn.apply(self, args);
37
- function _next(value) {
38
- asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "next", value);
39
- }
40
- function _throw(err) {
41
- asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "throw", err);
42
- }
43
- _next(undefined);
44
- });
45
- };
46
- }
47
- function _ts_generator$5(thisArg, body) {
48
- var f, y, t, g, _ = {
49
- label: 0,
50
- sent: function() {
51
- if (t[0] & 1) throw t[1];
52
- return t[1];
53
- },
54
- trys: [],
55
- ops: []
56
- };
57
- return g = {
58
- next: verb(0),
59
- "throw": verb(1),
60
- "return": verb(2)
61
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
62
- return this;
63
- }), g;
64
- function verb(n) {
65
- return function(v) {
66
- return step([
67
- n,
68
- v
69
- ]);
70
- };
71
- }
72
- function step(op) {
73
- if (f) throw new TypeError("Generator is already executing.");
74
- while(_)try {
75
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
76
- if (y = 0, t) op = [
77
- op[0] & 2,
78
- t.value
79
- ];
80
- switch(op[0]){
81
- case 0:
82
- case 1:
83
- t = op;
84
- break;
85
- case 4:
86
- _.label++;
87
- return {
88
- value: op[1],
89
- done: false
90
- };
91
- case 5:
92
- _.label++;
93
- y = op[1];
94
- op = [
95
- 0
96
- ];
97
- continue;
98
- case 7:
99
- op = _.ops.pop();
100
- _.trys.pop();
101
- continue;
102
- default:
103
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
104
- _ = 0;
105
- continue;
106
- }
107
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
108
- _.label = op[1];
109
- break;
110
- }
111
- if (op[0] === 6 && _.label < t[1]) {
112
- _.label = t[1];
113
- t = op;
114
- break;
115
- }
116
- if (t && _.label < t[2]) {
117
- _.label = t[2];
118
- _.ops.push(op);
119
- break;
120
- }
121
- if (t[2]) _.ops.pop();
122
- _.trys.pop();
123
- continue;
124
- }
125
- op = body.call(thisArg, _);
126
- } catch (e) {
127
- op = [
128
- 6,
129
- e
130
- ];
131
- y = 0;
132
- } finally{
133
- f = t = 0;
134
- }
135
- if (op[0] & 5) throw op[1];
136
- return {
137
- value: op[0] ? op[1] : void 0,
138
- done: true
139
- };
140
- }
141
- }
142
- var defaultSTSHttpAuthSchemeParametersProvider = function() {
143
- var _ref = _async_to_generator$5(function(config, context, input) {
144
- var _tmp;
145
- return _ts_generator$5(this, function(_state) {
146
- switch(_state.label){
147
- case 0:
148
- _tmp = {
149
- operation: getSmithyContext(context).operation
150
- };
151
- return [
152
- 4,
153
- normalizeProvider(config.region)()
154
- ];
155
- case 1:
156
- return [
157
- 2,
158
- (_tmp.region = _state.sent() || function() {
159
- throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
160
- }(), _tmp)
161
- ];
162
- }
163
- });
164
- });
165
- return function defaultSTSHttpAuthSchemeParametersProvider(config, context, input) {
166
- return _ref.apply(this, arguments);
167
- };
168
- }();
169
- function createAwsAuthSigv4HttpAuthOption(authParameters) {
170
- return {
171
- schemeId: "aws.auth#sigv4",
172
- signingProperties: {
173
- name: "sts",
174
- region: authParameters.region
175
- },
176
- propertiesExtractor: function(config, context) {
177
- return {
178
- signingProperties: {
179
- config: config,
180
- context: context
181
- }
182
- };
183
- }
184
- };
185
- }
186
- function createSmithyApiNoAuthHttpAuthOption(authParameters) {
187
- return {
188
- schemeId: "smithy.api#noAuth"
189
- };
190
- }
191
- var defaultSTSHttpAuthSchemeProvider = function(authParameters) {
192
- var options = [];
193
- switch(authParameters.operation){
194
- case "AssumeRoleWithWebIdentity":
195
- {
196
- options.push(createSmithyApiNoAuthHttpAuthOption());
197
- break;
198
- }
199
- default:
200
- {
201
- options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
202
- }
203
- }
204
- return options;
205
- };
206
- var resolveStsAuthConfig = function(input) {
207
- return Object.assign(input, {
208
- stsClientCtor: STSClient
209
- });
210
- };
211
- var resolveHttpAuthSchemeConfig = function(config) {
212
- var config_0 = resolveStsAuthConfig(config);
213
- var config_1 = resolveAwsSdkSigV4Config(config_0);
214
- var _config_authSchemePreference;
215
- return Object.assign(config_1, {
216
- authSchemePreference: normalizeProvider((_config_authSchemePreference = config.authSchemePreference) !== null && _config_authSchemePreference !== void 0 ? _config_authSchemePreference : [])
217
- });
218
- };
219
-
220
- var resolveClientEndpointParameters = function(options) {
221
- var _options_useDualstackEndpoint, _options_useFipsEndpoint, _options_useGlobalEndpoint;
222
- return Object.assign(options, {
223
- useDualstackEndpoint: (_options_useDualstackEndpoint = options.useDualstackEndpoint) !== null && _options_useDualstackEndpoint !== void 0 ? _options_useDualstackEndpoint : false,
224
- useFipsEndpoint: (_options_useFipsEndpoint = options.useFipsEndpoint) !== null && _options_useFipsEndpoint !== void 0 ? _options_useFipsEndpoint : false,
225
- useGlobalEndpoint: (_options_useGlobalEndpoint = options.useGlobalEndpoint) !== null && _options_useGlobalEndpoint !== void 0 ? _options_useGlobalEndpoint : false,
226
- defaultSigningName: "sts"
227
- });
228
- };
229
- var commonParams = {
230
- UseGlobalEndpoint: {
231
- type: "builtInParams",
232
- name: "useGlobalEndpoint"
233
- },
234
- UseFIPS: {
235
- type: "builtInParams",
236
- name: "useFipsEndpoint"
237
- },
238
- Endpoint: {
239
- type: "builtInParams",
240
- name: "endpoint"
241
- },
242
- Region: {
243
- type: "builtInParams",
244
- name: "region"
245
- },
246
- UseDualStack: {
247
- type: "builtInParams",
248
- name: "useDualstackEndpoint"
249
- }
250
- };
251
-
252
- function _define_property$6(obj, key, value) {
253
- if (key in obj) {
254
- Object.defineProperty(obj, key, {
255
- value: value,
256
- enumerable: true,
257
- configurable: true,
258
- writable: true
259
- });
260
- } else {
261
- obj[key] = value;
262
- }
263
- return obj;
264
- }
265
- var F = "required", G = "type", H = "fn", I = "argv", J = "ref";
266
- var _obj, _obj1, _obj2, _obj3, _obj4, _obj5, _obj6, _obj7, _obj8, _obj9, _obj10, _obj11;
267
- var a = false, b = true, c = "booleanEquals", d = "stringEquals", e = "sigv4", f = "sts", g = "us-east-1", h = "endpoint", i = "https://sts.{Region}.{PartitionResult#dnsSuffix}", j = "tree", k = "error", l = "getAttr", m = (_obj = {}, _define_property$6(_obj, F, false), _define_property$6(_obj, G, "String"), _obj), n = (_obj1 = {}, _define_property$6(_obj1, F, true), _define_property$6(_obj1, "default", false), _define_property$6(_obj1, G, "Boolean"), _obj1), o = _define_property$6({}, J, "Endpoint"), p = (_obj2 = {}, _define_property$6(_obj2, H, "isSet"), _define_property$6(_obj2, I, [
268
- _define_property$6({}, J, "Region")
269
- ]), _obj2), q = _define_property$6({}, J, "Region"), r = (_obj3 = {}, _define_property$6(_obj3, H, "aws.partition"), _define_property$6(_obj3, I, [
270
- q
271
- ]), _define_property$6(_obj3, "assign", "PartitionResult"), _obj3), s = _define_property$6({}, J, "UseFIPS"), t = _define_property$6({}, J, "UseDualStack"), u = {
272
- "url": "https://sts.amazonaws.com",
273
- "properties": {
274
- "authSchemes": [
275
- {
276
- "name": e,
277
- "signingName": f,
278
- "signingRegion": g
279
- }
280
- ]
281
- },
282
- "headers": {}
283
- }, v = {}, w = (_obj5 = {
284
- "conditions": [
285
- (_obj4 = {}, _define_property$6(_obj4, H, d), _define_property$6(_obj4, I, [
286
- q,
287
- "aws-global"
288
- ]), _obj4)
289
- ]
290
- }, _define_property$6(_obj5, h, u), _define_property$6(_obj5, G, h), _obj5), x = (_obj6 = {}, _define_property$6(_obj6, H, c), _define_property$6(_obj6, I, [
291
- s,
292
- true
293
- ]), _obj6), y = (_obj7 = {}, _define_property$6(_obj7, H, c), _define_property$6(_obj7, I, [
294
- t,
295
- true
296
- ]), _obj7), z = (_obj8 = {}, _define_property$6(_obj8, H, l), _define_property$6(_obj8, I, [
297
- _define_property$6({}, J, "PartitionResult"),
298
- "supportsFIPS"
299
- ]), _obj8), A = _define_property$6({}, J, "PartitionResult"), B = (_obj10 = {}, _define_property$6(_obj10, H, c), _define_property$6(_obj10, I, [
300
- true,
301
- (_obj9 = {}, _define_property$6(_obj9, H, l), _define_property$6(_obj9, I, [
302
- A,
303
- "supportsDualStack"
304
- ]), _obj9)
305
- ]), _obj10), C = [
306
- (_obj11 = {}, _define_property$6(_obj11, H, "isSet"), _define_property$6(_obj11, I, [
307
- o
308
- ]), _obj11)
309
- ], D = [
310
- x
311
- ], E = [
312
- y
313
- ];
314
- var _obj12, _obj13, _obj14, _obj15, _obj16, _obj17, _obj18, _obj19, _obj20, _obj21, _obj22, _obj23, _obj24, _obj25, _obj26, _obj27, _obj28, _obj29, _obj30, _obj31, _obj32, _obj33, _obj34;
315
- var _data = {
316
- parameters: {
317
- Region: m,
318
- UseDualStack: n,
319
- UseFIPS: n,
320
- Endpoint: m,
321
- UseGlobalEndpoint: n
322
- },
323
- rules: [
324
- _define_property$6({
325
- conditions: [
326
- (_obj12 = {}, _define_property$6(_obj12, H, c), _define_property$6(_obj12, I, [
327
- _define_property$6({}, J, "UseGlobalEndpoint"),
328
- b
329
- ]), _obj12),
330
- (_obj13 = {}, _define_property$6(_obj13, H, "not"), _define_property$6(_obj13, I, C), _obj13),
331
- p,
332
- r,
333
- (_obj14 = {}, _define_property$6(_obj14, H, c), _define_property$6(_obj14, I, [
334
- s,
335
- a
336
- ]), _obj14),
337
- (_obj15 = {}, _define_property$6(_obj15, H, c), _define_property$6(_obj15, I, [
338
- t,
339
- a
340
- ]), _obj15)
341
- ],
342
- rules: [
343
- _define_property$6({
344
- conditions: [
345
- (_obj16 = {}, _define_property$6(_obj16, H, d), _define_property$6(_obj16, I, [
346
- q,
347
- "ap-northeast-1"
348
- ]), _obj16)
349
- ],
350
- endpoint: u
351
- }, G, h),
352
- _define_property$6({
353
- conditions: [
354
- (_obj17 = {}, _define_property$6(_obj17, H, d), _define_property$6(_obj17, I, [
355
- q,
356
- "ap-south-1"
357
- ]), _obj17)
358
- ],
359
- endpoint: u
360
- }, G, h),
361
- _define_property$6({
362
- conditions: [
363
- (_obj18 = {}, _define_property$6(_obj18, H, d), _define_property$6(_obj18, I, [
364
- q,
365
- "ap-southeast-1"
366
- ]), _obj18)
367
- ],
368
- endpoint: u
369
- }, G, h),
370
- _define_property$6({
371
- conditions: [
372
- (_obj19 = {}, _define_property$6(_obj19, H, d), _define_property$6(_obj19, I, [
373
- q,
374
- "ap-southeast-2"
375
- ]), _obj19)
376
- ],
377
- endpoint: u
378
- }, G, h),
379
- w,
380
- _define_property$6({
381
- conditions: [
382
- (_obj20 = {}, _define_property$6(_obj20, H, d), _define_property$6(_obj20, I, [
383
- q,
384
- "ca-central-1"
385
- ]), _obj20)
386
- ],
387
- endpoint: u
388
- }, G, h),
389
- _define_property$6({
390
- conditions: [
391
- (_obj21 = {}, _define_property$6(_obj21, H, d), _define_property$6(_obj21, I, [
392
- q,
393
- "eu-central-1"
394
- ]), _obj21)
395
- ],
396
- endpoint: u
397
- }, G, h),
398
- _define_property$6({
399
- conditions: [
400
- (_obj22 = {}, _define_property$6(_obj22, H, d), _define_property$6(_obj22, I, [
401
- q,
402
- "eu-north-1"
403
- ]), _obj22)
404
- ],
405
- endpoint: u
406
- }, G, h),
407
- _define_property$6({
408
- conditions: [
409
- (_obj23 = {}, _define_property$6(_obj23, H, d), _define_property$6(_obj23, I, [
410
- q,
411
- "eu-west-1"
412
- ]), _obj23)
413
- ],
414
- endpoint: u
415
- }, G, h),
416
- _define_property$6({
417
- conditions: [
418
- (_obj24 = {}, _define_property$6(_obj24, H, d), _define_property$6(_obj24, I, [
419
- q,
420
- "eu-west-2"
421
- ]), _obj24)
422
- ],
423
- endpoint: u
424
- }, G, h),
425
- _define_property$6({
426
- conditions: [
427
- (_obj25 = {}, _define_property$6(_obj25, H, d), _define_property$6(_obj25, I, [
428
- q,
429
- "eu-west-3"
430
- ]), _obj25)
431
- ],
432
- endpoint: u
433
- }, G, h),
434
- _define_property$6({
435
- conditions: [
436
- (_obj26 = {}, _define_property$6(_obj26, H, d), _define_property$6(_obj26, I, [
437
- q,
438
- "sa-east-1"
439
- ]), _obj26)
440
- ],
441
- endpoint: u
442
- }, G, h),
443
- _define_property$6({
444
- conditions: [
445
- (_obj27 = {}, _define_property$6(_obj27, H, d), _define_property$6(_obj27, I, [
446
- q,
447
- g
448
- ]), _obj27)
449
- ],
450
- endpoint: u
451
- }, G, h),
452
- _define_property$6({
453
- conditions: [
454
- (_obj28 = {}, _define_property$6(_obj28, H, d), _define_property$6(_obj28, I, [
455
- q,
456
- "us-east-2"
457
- ]), _obj28)
458
- ],
459
- endpoint: u
460
- }, G, h),
461
- _define_property$6({
462
- conditions: [
463
- (_obj29 = {}, _define_property$6(_obj29, H, d), _define_property$6(_obj29, I, [
464
- q,
465
- "us-west-1"
466
- ]), _obj29)
467
- ],
468
- endpoint: u
469
- }, G, h),
470
- _define_property$6({
471
- conditions: [
472
- (_obj30 = {}, _define_property$6(_obj30, H, d), _define_property$6(_obj30, I, [
473
- q,
474
- "us-west-2"
475
- ]), _obj30)
476
- ],
477
- endpoint: u
478
- }, G, h),
479
- _define_property$6({
480
- endpoint: {
481
- url: i,
482
- properties: {
483
- authSchemes: [
484
- {
485
- name: e,
486
- signingName: f,
487
- signingRegion: "{Region}"
488
- }
489
- ]
490
- },
491
- headers: v
492
- }
493
- }, G, h)
494
- ]
495
- }, G, j),
496
- _define_property$6({
497
- conditions: C,
498
- rules: [
499
- _define_property$6({
500
- conditions: D,
501
- error: "Invalid Configuration: FIPS and custom endpoint are not supported"
502
- }, G, k),
503
- _define_property$6({
504
- conditions: E,
505
- error: "Invalid Configuration: Dualstack and custom endpoint are not supported"
506
- }, G, k),
507
- _define_property$6({
508
- endpoint: {
509
- url: o,
510
- properties: v,
511
- headers: v
512
- }
513
- }, G, h)
514
- ]
515
- }, G, j),
516
- _define_property$6({
517
- conditions: [
518
- p
519
- ],
520
- rules: [
521
- _define_property$6({
522
- conditions: [
523
- r
524
- ],
525
- rules: [
526
- _define_property$6({
527
- conditions: [
528
- x,
529
- y
530
- ],
531
- rules: [
532
- _define_property$6({
533
- conditions: [
534
- (_obj31 = {}, _define_property$6(_obj31, H, c), _define_property$6(_obj31, I, [
535
- b,
536
- z
537
- ]), _obj31),
538
- B
539
- ],
540
- rules: [
541
- _define_property$6({
542
- endpoint: {
543
- url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
544
- properties: v,
545
- headers: v
546
- }
547
- }, G, h)
548
- ]
549
- }, G, j),
550
- _define_property$6({
551
- error: "FIPS and DualStack are enabled, but this partition does not support one or both"
552
- }, G, k)
553
- ]
554
- }, G, j),
555
- _define_property$6({
556
- conditions: D,
557
- rules: [
558
- _define_property$6({
559
- conditions: [
560
- (_obj32 = {}, _define_property$6(_obj32, H, c), _define_property$6(_obj32, I, [
561
- z,
562
- b
563
- ]), _obj32)
564
- ],
565
- rules: [
566
- _define_property$6({
567
- conditions: [
568
- (_obj34 = {}, _define_property$6(_obj34, H, d), _define_property$6(_obj34, I, [
569
- (_obj33 = {}, _define_property$6(_obj33, H, l), _define_property$6(_obj33, I, [
570
- A,
571
- "name"
572
- ]), _obj33),
573
- "aws-us-gov"
574
- ]), _obj34)
575
- ],
576
- endpoint: {
577
- url: "https://sts.{Region}.amazonaws.com",
578
- properties: v,
579
- headers: v
580
- }
581
- }, G, h),
582
- _define_property$6({
583
- endpoint: {
584
- url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",
585
- properties: v,
586
- headers: v
587
- }
588
- }, G, h)
589
- ]
590
- }, G, j),
591
- _define_property$6({
592
- error: "FIPS is enabled but this partition does not support FIPS"
593
- }, G, k)
594
- ]
595
- }, G, j),
596
- _define_property$6({
597
- conditions: E,
598
- rules: [
599
- _define_property$6({
600
- conditions: [
601
- B
602
- ],
603
- rules: [
604
- _define_property$6({
605
- endpoint: {
606
- url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",
607
- properties: v,
608
- headers: v
609
- }
610
- }, G, h)
611
- ]
612
- }, G, j),
613
- _define_property$6({
614
- error: "DualStack is enabled but this partition does not support DualStack"
615
- }, G, k)
616
- ]
617
- }, G, j),
618
- w,
619
- _define_property$6({
620
- endpoint: {
621
- url: i,
622
- properties: v,
623
- headers: v
624
- }
625
- }, G, h)
626
- ]
627
- }, G, j)
628
- ]
629
- }, G, j),
630
- _define_property$6({
631
- error: "Invalid Configuration: Missing Region"
632
- }, G, k)
633
- ]
634
- };
635
- var ruleSet = _data;
636
-
637
- var cache = new EndpointCache({
638
- size: 50,
639
- params: [
640
- "Endpoint",
641
- "Region",
642
- "UseDualStack",
643
- "UseFIPS",
644
- "UseGlobalEndpoint"
645
- ]
646
- });
647
- var defaultEndpointResolver = function(endpointParams) {
648
- var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
649
- return cache.get(endpointParams, function() {
650
- return resolveEndpoint(ruleSet, {
651
- endpointParams: endpointParams,
652
- logger: context.logger
653
- });
654
- });
655
- };
656
- customEndpointFunctions.aws = awsEndpointFunctions;
657
-
658
- function asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, key, arg) {
659
- try {
660
- var info = gen[key](arg);
661
- var value = info.value;
662
- } catch (error) {
663
- reject(error);
664
- return;
665
- }
666
- if (info.done) {
667
- resolve(value);
668
- } else {
669
- Promise.resolve(value).then(_next, _throw);
670
- }
671
- }
672
- function _async_to_generator$4(fn) {
673
- return function() {
674
- var self = this, args = arguments;
675
- return new Promise(function(resolve, reject) {
676
- var gen = fn.apply(self, args);
677
- function _next(value) {
678
- asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, "next", value);
679
- }
680
- function _throw(err) {
681
- asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, "throw", err);
682
- }
683
- _next(undefined);
684
- });
685
- };
686
- }
687
- function _ts_generator$4(thisArg, body) {
688
- var f, y, t, g, _ = {
689
- label: 0,
690
- sent: function() {
691
- if (t[0] & 1) throw t[1];
692
- return t[1];
693
- },
694
- trys: [],
695
- ops: []
696
- };
697
- return g = {
698
- next: verb(0),
699
- "throw": verb(1),
700
- "return": verb(2)
701
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
702
- return this;
703
- }), g;
704
- function verb(n) {
705
- return function(v) {
706
- return step([
707
- n,
708
- v
709
- ]);
710
- };
711
- }
712
- function step(op) {
713
- if (f) throw new TypeError("Generator is already executing.");
714
- while(_)try {
715
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
716
- if (y = 0, t) op = [
717
- op[0] & 2,
718
- t.value
719
- ];
720
- switch(op[0]){
721
- case 0:
722
- case 1:
723
- t = op;
724
- break;
725
- case 4:
726
- _.label++;
727
- return {
728
- value: op[1],
729
- done: false
730
- };
731
- case 5:
732
- _.label++;
733
- y = op[1];
734
- op = [
735
- 0
736
- ];
737
- continue;
738
- case 7:
739
- op = _.ops.pop();
740
- _.trys.pop();
741
- continue;
742
- default:
743
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
744
- _ = 0;
745
- continue;
746
- }
747
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
748
- _.label = op[1];
749
- break;
750
- }
751
- if (op[0] === 6 && _.label < t[1]) {
752
- _.label = t[1];
753
- t = op;
754
- break;
755
- }
756
- if (t && _.label < t[2]) {
757
- _.label = t[2];
758
- _.ops.push(op);
759
- break;
760
- }
761
- if (t[2]) _.ops.pop();
762
- _.trys.pop();
763
- continue;
764
- }
765
- op = body.call(thisArg, _);
766
- } catch (e) {
767
- op = [
768
- 6,
769
- e
770
- ];
771
- y = 0;
772
- } finally{
773
- f = t = 0;
774
- }
775
- if (op[0] & 5) throw op[1];
776
- return {
777
- value: op[0] ? op[1] : void 0,
778
- done: true
779
- };
780
- }
781
- }
782
- var getRuntimeConfig$1 = function(config) {
783
- var _config_base64Decoder, _config_base64Encoder, _config_disableHostPrefix, _config_endpointProvider, _config_extensions, _config_httpAuthSchemeProvider, _config_httpAuthSchemes, _config_logger, _config_serviceId, _config_urlParser, _config_utf8Decoder, _config_utf8Encoder;
784
- return {
785
- apiVersion: "2011-06-15",
786
- base64Decoder: (_config_base64Decoder = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _config_base64Decoder !== void 0 ? _config_base64Decoder : fromBase64,
787
- base64Encoder: (_config_base64Encoder = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _config_base64Encoder !== void 0 ? _config_base64Encoder : toBase64,
788
- disableHostPrefix: (_config_disableHostPrefix = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _config_disableHostPrefix !== void 0 ? _config_disableHostPrefix : false,
789
- endpointProvider: (_config_endpointProvider = config === null || config === void 0 ? void 0 : config.endpointProvider) !== null && _config_endpointProvider !== void 0 ? _config_endpointProvider : defaultEndpointResolver,
790
- extensions: (_config_extensions = config === null || config === void 0 ? void 0 : config.extensions) !== null && _config_extensions !== void 0 ? _config_extensions : [],
791
- httpAuthSchemeProvider: (_config_httpAuthSchemeProvider = config === null || config === void 0 ? void 0 : config.httpAuthSchemeProvider) !== null && _config_httpAuthSchemeProvider !== void 0 ? _config_httpAuthSchemeProvider : defaultSTSHttpAuthSchemeProvider,
792
- httpAuthSchemes: (_config_httpAuthSchemes = config === null || config === void 0 ? void 0 : config.httpAuthSchemes) !== null && _config_httpAuthSchemes !== void 0 ? _config_httpAuthSchemes : [
793
- {
794
- schemeId: "aws.auth#sigv4",
795
- identityProvider: function(ipc) {
796
- return ipc.getIdentityProvider("aws.auth#sigv4");
797
- },
798
- signer: new AwsSdkSigV4Signer()
799
- },
800
- {
801
- schemeId: "smithy.api#noAuth",
802
- identityProvider: function(ipc) {
803
- return ipc.getIdentityProvider("smithy.api#noAuth") || /*#__PURE__*/ _async_to_generator$4(function() {
804
- return _ts_generator$4(this, function(_state) {
805
- return [
806
- 2,
807
- {}
808
- ];
809
- });
810
- });
811
- },
812
- signer: new NoAuthSigner()
813
- }
814
- ],
815
- logger: (_config_logger = config === null || config === void 0 ? void 0 : config.logger) !== null && _config_logger !== void 0 ? _config_logger : new NoOpLogger(),
816
- serviceId: (_config_serviceId = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _config_serviceId !== void 0 ? _config_serviceId : "STS",
817
- urlParser: (_config_urlParser = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _config_urlParser !== void 0 ? _config_urlParser : parseUrl,
818
- utf8Decoder: (_config_utf8Decoder = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _config_utf8Decoder !== void 0 ? _config_utf8Decoder : fromUtf8,
819
- utf8Encoder: (_config_utf8Encoder = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _config_utf8Encoder !== void 0 ? _config_utf8Encoder : toUtf8
820
- };
821
- };
822
-
823
- function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
824
- try {
825
- var info = gen[key](arg);
826
- var value = info.value;
827
- } catch (error) {
828
- reject(error);
829
- return;
830
- }
831
- if (info.done) {
832
- resolve(value);
833
- } else {
834
- Promise.resolve(value).then(_next, _throw);
835
- }
836
- }
837
- function _async_to_generator$3(fn) {
838
- return function() {
839
- var self = this, args = arguments;
840
- return new Promise(function(resolve, reject) {
841
- var gen = fn.apply(self, args);
842
- function _next(value) {
843
- asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "next", value);
844
- }
845
- function _throw(err) {
846
- asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "throw", err);
847
- }
848
- _next(undefined);
849
- });
850
- };
851
- }
852
- function _define_property$5(obj, key, value) {
853
- if (key in obj) {
854
- Object.defineProperty(obj, key, {
855
- value: value,
856
- enumerable: true,
857
- configurable: true,
858
- writable: true
859
- });
860
- } else {
861
- obj[key] = value;
862
- }
863
- return obj;
864
- }
865
- function _object_spread$4(target) {
866
- for(var i = 1; i < arguments.length; i++){
867
- var source = arguments[i] != null ? arguments[i] : {};
868
- var ownKeys = Object.keys(source);
869
- if (typeof Object.getOwnPropertySymbols === "function") {
870
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
871
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
872
- }));
873
- }
874
- ownKeys.forEach(function(key) {
875
- _define_property$5(target, key, source[key]);
876
- });
877
- }
878
- return target;
879
- }
880
- function ownKeys$1(object, enumerableOnly) {
881
- var keys = Object.keys(object);
882
- if (Object.getOwnPropertySymbols) {
883
- var symbols = Object.getOwnPropertySymbols(object);
884
- keys.push.apply(keys, symbols);
885
- }
886
- return keys;
887
- }
888
- function _object_spread_props$1(target, source) {
889
- source = source != null ? source : {};
890
- if (Object.getOwnPropertyDescriptors) {
891
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
892
- } else {
893
- ownKeys$1(Object(source)).forEach(function(key) {
894
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
895
- });
896
- }
897
- return target;
898
- }
899
- function _ts_generator$3(thisArg, body) {
900
- var f, y, t, g, _ = {
901
- label: 0,
902
- sent: function() {
903
- if (t[0] & 1) throw t[1];
904
- return t[1];
905
- },
906
- trys: [],
907
- ops: []
908
- };
909
- return g = {
910
- next: verb(0),
911
- "throw": verb(1),
912
- "return": verb(2)
913
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
914
- return this;
915
- }), g;
916
- function verb(n) {
917
- return function(v) {
918
- return step([
919
- n,
920
- v
921
- ]);
922
- };
923
- }
924
- function step(op) {
925
- if (f) throw new TypeError("Generator is already executing.");
926
- while(_)try {
927
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
928
- if (y = 0, t) op = [
929
- op[0] & 2,
930
- t.value
931
- ];
932
- switch(op[0]){
933
- case 0:
934
- case 1:
935
- t = op;
936
- break;
937
- case 4:
938
- _.label++;
939
- return {
940
- value: op[1],
941
- done: false
942
- };
943
- case 5:
944
- _.label++;
945
- y = op[1];
946
- op = [
947
- 0
948
- ];
949
- continue;
950
- case 7:
951
- op = _.ops.pop();
952
- _.trys.pop();
953
- continue;
954
- default:
955
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
956
- _ = 0;
957
- continue;
958
- }
959
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
960
- _.label = op[1];
961
- break;
962
- }
963
- if (op[0] === 6 && _.label < t[1]) {
964
- _.label = t[1];
965
- t = op;
966
- break;
967
- }
968
- if (t && _.label < t[2]) {
969
- _.label = t[2];
970
- _.ops.push(op);
971
- break;
972
- }
973
- if (t[2]) _.ops.pop();
974
- _.trys.pop();
975
- continue;
976
- }
977
- op = body.call(thisArg, _);
978
- } catch (e) {
979
- op = [
980
- 6,
981
- e
982
- ];
983
- y = 0;
984
- } finally{
985
- f = t = 0;
986
- }
987
- if (op[0] & 5) throw op[1];
988
- return {
989
- value: op[0] ? op[1] : void 0,
990
- done: true
991
- };
992
- }
993
- }
994
- var getRuntimeConfig = function(config) {
995
- emitWarningIfUnsupportedVersion(process.version);
996
- var defaultsMode = resolveDefaultsModeConfig(config);
997
- var defaultConfigProvider = function() {
998
- return defaultsMode().then(loadConfigsForDefaultMode);
999
- };
1000
- var clientSharedValues = getRuntimeConfig$1(config);
1001
- emitWarningIfUnsupportedVersion$1(process.version);
1002
- var loaderConfig = {
1003
- profile: config === null || config === void 0 ? void 0 : config.profile,
1004
- logger: clientSharedValues.logger
1005
- };
1006
- var _config_authSchemePreference, _config_bodyLengthChecker, _config_defaultUserAgentProvider, _config_httpAuthSchemes, _config_maxAttempts, _config_region, _config_requestHandler, _config_retryMode, _config_sha256, _config_streamCollector, _config_useDualstackEndpoint, _config_useFipsEndpoint, _config_userAgentAppId;
1007
- return _object_spread_props$1(_object_spread$4({}, clientSharedValues, config), {
1008
- runtime: "node",
1009
- defaultsMode: defaultsMode,
1010
- authSchemePreference: (_config_authSchemePreference = config === null || config === void 0 ? void 0 : config.authSchemePreference) !== null && _config_authSchemePreference !== void 0 ? _config_authSchemePreference : loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
1011
- bodyLengthChecker: (_config_bodyLengthChecker = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _config_bodyLengthChecker !== void 0 ? _config_bodyLengthChecker : calculateBodyLength,
1012
- defaultUserAgentProvider: (_config_defaultUserAgentProvider = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _config_defaultUserAgentProvider !== void 0 ? _config_defaultUserAgentProvider : createDefaultUserAgentProvider({
1013
- serviceId: clientSharedValues.serviceId,
1014
- clientVersion: packageInfo.version
1015
- }),
1016
- httpAuthSchemes: (_config_httpAuthSchemes = config === null || config === void 0 ? void 0 : config.httpAuthSchemes) !== null && _config_httpAuthSchemes !== void 0 ? _config_httpAuthSchemes : [
1017
- {
1018
- schemeId: "aws.auth#sigv4",
1019
- identityProvider: function(ipc) {
1020
- return ipc.getIdentityProvider("aws.auth#sigv4") || function() {
1021
- var _ref = _async_to_generator$3(function(idProps) {
1022
- return _ts_generator$3(this, function(_state) {
1023
- switch(_state.label){
1024
- case 0:
1025
- return [
1026
- 4,
1027
- config.credentialDefaultProvider((idProps === null || idProps === void 0 ? void 0 : idProps.__config) || {})()
1028
- ];
1029
- case 1:
1030
- return [
1031
- 2,
1032
- _state.sent()
1033
- ];
1034
- }
1035
- });
1036
- });
1037
- return function(idProps) {
1038
- return _ref.apply(this, arguments);
1039
- };
1040
- }();
1041
- },
1042
- signer: new AwsSdkSigV4Signer()
1043
- },
1044
- {
1045
- schemeId: "smithy.api#noAuth",
1046
- identityProvider: function(ipc) {
1047
- return ipc.getIdentityProvider("smithy.api#noAuth") || /*#__PURE__*/ _async_to_generator$3(function() {
1048
- return _ts_generator$3(this, function(_state) {
1049
- return [
1050
- 2,
1051
- {}
1052
- ];
1053
- });
1054
- });
1055
- },
1056
- signer: new NoAuthSigner()
1057
- }
1058
- ],
1059
- maxAttempts: (_config_maxAttempts = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _config_maxAttempts !== void 0 ? _config_maxAttempts : loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
1060
- region: (_config_region = config === null || config === void 0 ? void 0 : config.region) !== null && _config_region !== void 0 ? _config_region : loadConfig(NODE_REGION_CONFIG_OPTIONS, _object_spread$4({}, NODE_REGION_CONFIG_FILE_OPTIONS, loaderConfig)),
1061
- requestHandler: NodeHttpHandler.create((_config_requestHandler = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _config_requestHandler !== void 0 ? _config_requestHandler : defaultConfigProvider),
1062
- retryMode: (_config_retryMode = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _config_retryMode !== void 0 ? _config_retryMode : loadConfig(_object_spread_props$1(_object_spread$4({}, NODE_RETRY_MODE_CONFIG_OPTIONS), {
1063
- default: /*#__PURE__*/ _async_to_generator$3(function() {
1064
- return _ts_generator$3(this, function(_state) {
1065
- switch(_state.label){
1066
- case 0:
1067
- return [
1068
- 4,
1069
- defaultConfigProvider()
1070
- ];
1071
- case 1:
1072
- return [
1073
- 2,
1074
- _state.sent().retryMode || DEFAULT_RETRY_MODE
1075
- ];
1076
- }
1077
- });
1078
- })
1079
- }), config),
1080
- sha256: (_config_sha256 = config === null || config === void 0 ? void 0 : config.sha256) !== null && _config_sha256 !== void 0 ? _config_sha256 : Hash.bind(null, "sha256"),
1081
- streamCollector: (_config_streamCollector = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _config_streamCollector !== void 0 ? _config_streamCollector : streamCollector,
1082
- useDualstackEndpoint: (_config_useDualstackEndpoint = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _config_useDualstackEndpoint !== void 0 ? _config_useDualstackEndpoint : loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
1083
- useFipsEndpoint: (_config_useFipsEndpoint = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _config_useFipsEndpoint !== void 0 ? _config_useFipsEndpoint : loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
1084
- userAgentAppId: (_config_userAgentAppId = config === null || config === void 0 ? void 0 : config.userAgentAppId) !== null && _config_userAgentAppId !== void 0 ? _config_userAgentAppId : loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
1085
- });
1086
- };
1087
-
1088
- var getHttpAuthExtensionConfiguration = function(runtimeConfig) {
1089
- var _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
1090
- var _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
1091
- var _credentials = runtimeConfig.credentials;
1092
- return {
1093
- setHttpAuthScheme: function setHttpAuthScheme(httpAuthScheme) {
1094
- var index = _httpAuthSchemes.findIndex(function(scheme) {
1095
- return scheme.schemeId === httpAuthScheme.schemeId;
1096
- });
1097
- if (index === -1) {
1098
- _httpAuthSchemes.push(httpAuthScheme);
1099
- } else {
1100
- _httpAuthSchemes.splice(index, 1, httpAuthScheme);
1101
- }
1102
- },
1103
- httpAuthSchemes: function httpAuthSchemes() {
1104
- return _httpAuthSchemes;
1105
- },
1106
- setHttpAuthSchemeProvider: function setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
1107
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
1108
- },
1109
- httpAuthSchemeProvider: function httpAuthSchemeProvider() {
1110
- return _httpAuthSchemeProvider;
1111
- },
1112
- setCredentials: function setCredentials(credentials) {
1113
- _credentials = credentials;
1114
- },
1115
- credentials: function credentials() {
1116
- return _credentials;
1117
- }
1118
- };
1119
- };
1120
- var resolveHttpAuthRuntimeConfig = function(config) {
1121
- return {
1122
- httpAuthSchemes: config.httpAuthSchemes(),
1123
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
1124
- credentials: config.credentials()
1125
- };
1126
- };
1127
-
1128
- var resolveRuntimeExtensions = function(runtimeConfig, extensions) {
1129
- var extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
1130
- extensions.forEach(function(extension) {
1131
- return extension.configure(extensionConfiguration);
1132
- });
1133
- return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
1134
- };
1135
-
1136
- function _array_like_to_array$1(arr, len) {
1137
- if (len == null || len > arr.length) len = arr.length;
1138
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1139
- return arr2;
1140
- }
1141
- function _array_with_holes$1(arr) {
1142
- if (Array.isArray(arr)) return arr;
1143
- }
1144
- function _assert_this_initialized$6(self) {
1145
- if (self === void 0) {
1146
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1147
- }
1148
- return self;
1149
- }
1150
- function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
1151
- try {
1152
- var info = gen[key](arg);
1153
- var value = info.value;
1154
- } catch (error) {
1155
- reject(error);
1156
- return;
1157
- }
1158
- if (info.done) {
1159
- resolve(value);
1160
- } else {
1161
- Promise.resolve(value).then(_next, _throw);
1162
- }
1163
- }
1164
- function _async_to_generator$2(fn) {
1165
- return function() {
1166
- var self = this, args = arguments;
1167
- return new Promise(function(resolve, reject) {
1168
- var gen = fn.apply(self, args);
1169
- function _next(value) {
1170
- asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, "next", value);
1171
- }
1172
- function _throw(err) {
1173
- asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, "throw", err);
1174
- }
1175
- _next(undefined);
1176
- });
1177
- };
1178
- }
1179
- function _class_call_check$6(instance, Constructor) {
1180
- if (!(instance instanceof Constructor)) {
1181
- throw new TypeError("Cannot call a class as a function");
1182
- }
1183
- }
1184
- function _defineProperties(target, props) {
1185
- for(var i = 0; i < props.length; i++){
1186
- var descriptor = props[i];
1187
- descriptor.enumerable = descriptor.enumerable || false;
1188
- descriptor.configurable = true;
1189
- if ("value" in descriptor) descriptor.writable = true;
1190
- Object.defineProperty(target, descriptor.key, descriptor);
1191
- }
1192
- }
1193
- function _create_class(Constructor, protoProps, staticProps) {
1194
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1195
- return Constructor;
1196
- }
1197
- function _define_property$4(obj, key, value) {
1198
- if (key in obj) {
1199
- Object.defineProperty(obj, key, {
1200
- value: value,
1201
- enumerable: true,
1202
- configurable: true,
1203
- writable: true
1204
- });
1205
- } else {
1206
- obj[key] = value;
1207
- }
1208
- return obj;
1209
- }
1210
- function _get(target, property, receiver) {
1211
- if (typeof Reflect !== "undefined" && Reflect.get) {
1212
- _get = Reflect.get;
1213
- } else {
1214
- _get = function get(target, property, receiver) {
1215
- var base = _super_prop_base(target, property);
1216
- if (!base) return;
1217
- var desc = Object.getOwnPropertyDescriptor(base, property);
1218
- if (desc.get) {
1219
- return desc.get.call(receiver || target);
1220
- }
1221
- return desc.value;
1222
- };
1223
- }
1224
- return _get(target, property, receiver || target);
1225
- }
1226
- function _get_prototype_of$6(o) {
1227
- _get_prototype_of$6 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
1228
- return o.__proto__ || Object.getPrototypeOf(o);
1229
- };
1230
- return _get_prototype_of$6(o);
1231
- }
1232
- function _inherits$6(subClass, superClass) {
1233
- if (typeof superClass !== "function" && superClass !== null) {
1234
- throw new TypeError("Super expression must either be null or a function");
1235
- }
1236
- subClass.prototype = Object.create(superClass && superClass.prototype, {
1237
- constructor: {
1238
- value: subClass,
1239
- writable: true,
1240
- configurable: true
1241
- }
1242
- });
1243
- if (superClass) _set_prototype_of$6(subClass, superClass);
1244
- }
1245
- function _iterable_to_array_limit$1(arr, i) {
1246
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1247
- if (_i == null) return;
1248
- var _arr = [];
1249
- var _n = true;
1250
- var _d = false;
1251
- var _s, _e;
1252
- try {
1253
- for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
1254
- _arr.push(_s.value);
1255
- if (i && _arr.length === i) break;
1256
- }
1257
- } catch (err) {
1258
- _d = true;
1259
- _e = err;
1260
- } finally{
1261
- try {
1262
- if (!_n && _i["return"] != null) _i["return"]();
1263
- } finally{
1264
- if (_d) throw _e;
1265
- }
1266
- }
1267
- return _arr;
1268
- }
1269
- function _non_iterable_rest$1() {
1270
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1271
- }
1272
- function _possible_constructor_return$6(self, call) {
1273
- if (call && (_type_of$6(call) === "object" || typeof call === "function")) {
1274
- return call;
1275
- }
1276
- return _assert_this_initialized$6(self);
1277
- }
1278
- function _set_prototype_of$6(o, p) {
1279
- _set_prototype_of$6 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1280
- o.__proto__ = p;
1281
- return o;
1282
- };
1283
- return _set_prototype_of$6(o, p);
1284
- }
1285
- function _sliced_to_array$1(arr, i) {
1286
- return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest$1();
1287
- }
1288
- function _super_prop_base(object, property) {
1289
- while(!Object.prototype.hasOwnProperty.call(object, property)){
1290
- object = _get_prototype_of$6(object);
1291
- if (object === null) break;
1292
- }
1293
- return object;
1294
- }
1295
- function _type_of$6(obj) {
1296
- "@swc/helpers - typeof";
1297
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1298
- }
1299
- function _unsupported_iterable_to_array$1(o, minLen) {
1300
- if (!o) return;
1301
- if (typeof o === "string") return _array_like_to_array$1(o, minLen);
1302
- var n = Object.prototype.toString.call(o).slice(8, -1);
1303
- if (n === "Object" && o.constructor) n = o.constructor.name;
1304
- if (n === "Map" || n === "Set") return Array.from(n);
1305
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
1306
- }
1307
- function _is_native_reflect_construct$6() {
1308
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
1309
- if (Reflect.construct.sham) return false;
1310
- if (typeof Proxy === "function") return true;
1311
- try {
1312
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
1313
- return true;
1314
- } catch (e) {
1315
- return false;
1316
- }
1317
- }
1318
- function _create_super$6(Derived) {
1319
- var hasNativeReflectConstruct = _is_native_reflect_construct$6();
1320
- return function _createSuperInternal() {
1321
- var Super = _get_prototype_of$6(Derived), result;
1322
- if (hasNativeReflectConstruct) {
1323
- var NewTarget = _get_prototype_of$6(this).constructor;
1324
- result = Reflect.construct(Super, arguments, NewTarget);
1325
- } else {
1326
- result = Super.apply(this, arguments);
1327
- }
1328
- return _possible_constructor_return$6(this, result);
1329
- };
1330
- }
1331
- function _ts_generator$2(thisArg, body) {
1332
- var f, y, t, g, _ = {
1333
- label: 0,
1334
- sent: function() {
1335
- if (t[0] & 1) throw t[1];
1336
- return t[1];
1337
- },
1338
- trys: [],
1339
- ops: []
1340
- };
1341
- return g = {
1342
- next: verb(0),
1343
- "throw": verb(1),
1344
- "return": verb(2)
1345
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
1346
- return this;
1347
- }), g;
1348
- function verb(n) {
1349
- return function(v) {
1350
- return step([
1351
- n,
1352
- v
1353
- ]);
1354
- };
1355
- }
1356
- function step(op) {
1357
- if (f) throw new TypeError("Generator is already executing.");
1358
- while(_)try {
1359
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
1360
- if (y = 0, t) op = [
1361
- op[0] & 2,
1362
- t.value
1363
- ];
1364
- switch(op[0]){
1365
- case 0:
1366
- case 1:
1367
- t = op;
1368
- break;
1369
- case 4:
1370
- _.label++;
1371
- return {
1372
- value: op[1],
1373
- done: false
1374
- };
1375
- case 5:
1376
- _.label++;
1377
- y = op[1];
1378
- op = [
1379
- 0
1380
- ];
1381
- continue;
1382
- case 7:
1383
- op = _.ops.pop();
1384
- _.trys.pop();
1385
- continue;
1386
- default:
1387
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
1388
- _ = 0;
1389
- continue;
1390
- }
1391
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
1392
- _.label = op[1];
1393
- break;
1394
- }
1395
- if (op[0] === 6 && _.label < t[1]) {
1396
- _.label = t[1];
1397
- t = op;
1398
- break;
1399
- }
1400
- if (t && _.label < t[2]) {
1401
- _.label = t[2];
1402
- _.ops.push(op);
1403
- break;
1404
- }
1405
- if (t[2]) _.ops.pop();
1406
- _.trys.pop();
1407
- continue;
1408
- }
1409
- op = body.call(thisArg, _);
1410
- } catch (e) {
1411
- op = [
1412
- 6,
1413
- e
1414
- ];
1415
- y = 0;
1416
- } finally{
1417
- f = t = 0;
1418
- }
1419
- if (op[0] & 5) throw op[1];
1420
- return {
1421
- value: op[0] ? op[1] : void 0,
1422
- done: true
1423
- };
1424
- }
1425
- }
1426
- var STSClient = /*#__PURE__*/ function(__Client) {
1427
- _inherits$6(STSClient, __Client);
1428
- var _super = _create_super$6(STSClient);
1429
- function STSClient() {
1430
- for(var _len = arguments.length, _tmp = new Array(_len), _key = 0; _key < _len; _key++){
1431
- _tmp[_key] = arguments[_key];
1432
- }
1433
- var _tmp1 = _sliced_to_array$1(_tmp, 1), configuration = _tmp1[0];
1434
- _class_call_check$6(this, STSClient);
1435
- var _this;
1436
- var _config_0 = getRuntimeConfig(configuration || {});
1437
- _this = _super.call(this, _config_0);
1438
- _define_property$4(_assert_this_initialized$6(_this), "config", void 0);
1439
- _this.initConfig = _config_0;
1440
- var _config_1 = resolveClientEndpointParameters(_config_0);
1441
- var _config_2 = resolveUserAgentConfig(_config_1);
1442
- var _config_3 = resolveRetryConfig(_config_2);
1443
- var _config_4 = resolveRegionConfig(_config_3);
1444
- var _config_5 = resolveHostHeaderConfig(_config_4);
1445
- var _config_6 = resolveEndpointConfig(_config_5);
1446
- var _config_7 = resolveHttpAuthSchemeConfig(_config_6);
1447
- var _config_8 = resolveRuntimeExtensions(_config_7, (configuration === null || configuration === void 0 ? void 0 : configuration.extensions) || []);
1448
- _this.config = _config_8;
1449
- _this.middlewareStack.use(getUserAgentPlugin(_this.config));
1450
- _this.middlewareStack.use(getRetryPlugin(_this.config));
1451
- _this.middlewareStack.use(getContentLengthPlugin(_this.config));
1452
- _this.middlewareStack.use(getHostHeaderPlugin(_this.config));
1453
- _this.middlewareStack.use(getLoggerPlugin(_this.config));
1454
- _this.middlewareStack.use(getRecursionDetectionPlugin(_this.config));
1455
- _this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(_this.config, {
1456
- httpAuthSchemeParametersProvider: defaultSTSHttpAuthSchemeParametersProvider,
1457
- identityProviderConfigProvider: function() {
1458
- var _ref = _async_to_generator$2(function(config) {
1459
- return _ts_generator$2(this, function(_state) {
1460
- return [
1461
- 2,
1462
- new DefaultIdentityProviderConfig({
1463
- "aws.auth#sigv4": config.credentials
1464
- })
1465
- ];
1466
- });
1467
- });
1468
- return function(config) {
1469
- return _ref.apply(this, arguments);
1470
- };
1471
- }()
1472
- }));
1473
- _this.middlewareStack.use(getHttpSigningPlugin(_this.config));
1474
- return _this;
1475
- }
1476
- _create_class(STSClient, [
1477
- {
1478
- key: "destroy",
1479
- value: function destroy() {
1480
- _get(_get_prototype_of$6(STSClient.prototype), "destroy", this).call(this);
1481
- }
1482
- }
1483
- ]);
1484
- return STSClient;
1485
- }(Client);
1486
-
1487
- function _assert_this_initialized$5(self) {
1488
- if (self === void 0) {
1489
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1490
- }
1491
- return self;
1492
- }
1493
- function _class_call_check$5(instance, Constructor) {
1494
- if (!(instance instanceof Constructor)) {
1495
- throw new TypeError("Cannot call a class as a function");
1496
- }
1497
- }
1498
- function _get_prototype_of$5(o) {
1499
- _get_prototype_of$5 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
1500
- return o.__proto__ || Object.getPrototypeOf(o);
1501
- };
1502
- return _get_prototype_of$5(o);
1503
- }
1504
- function _inherits$5(subClass, superClass) {
1505
- if (typeof superClass !== "function" && superClass !== null) {
1506
- throw new TypeError("Super expression must either be null or a function");
1507
- }
1508
- subClass.prototype = Object.create(superClass && superClass.prototype, {
1509
- constructor: {
1510
- value: subClass,
1511
- writable: true,
1512
- configurable: true
1513
- }
1514
- });
1515
- if (superClass) _set_prototype_of$5(subClass, superClass);
1516
- }
1517
- function _possible_constructor_return$5(self, call) {
1518
- if (call && (_type_of$5(call) === "object" || typeof call === "function")) {
1519
- return call;
1520
- }
1521
- return _assert_this_initialized$5(self);
1522
- }
1523
- function _set_prototype_of$5(o, p) {
1524
- _set_prototype_of$5 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1525
- o.__proto__ = p;
1526
- return o;
1527
- };
1528
- return _set_prototype_of$5(o, p);
1529
- }
1530
- function _type_of$5(obj) {
1531
- "@swc/helpers - typeof";
1532
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1533
- }
1534
- function _is_native_reflect_construct$5() {
1535
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
1536
- if (Reflect.construct.sham) return false;
1537
- if (typeof Proxy === "function") return true;
1538
- try {
1539
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
1540
- return true;
1541
- } catch (e) {
1542
- return false;
1543
- }
1544
- }
1545
- function _create_super$5(Derived) {
1546
- var hasNativeReflectConstruct = _is_native_reflect_construct$5();
1547
- return function _createSuperInternal() {
1548
- var Super = _get_prototype_of$5(Derived), result;
1549
- if (hasNativeReflectConstruct) {
1550
- var NewTarget = _get_prototype_of$5(this).constructor;
1551
- result = Reflect.construct(Super, arguments, NewTarget);
1552
- } else {
1553
- result = Super.apply(this, arguments);
1554
- }
1555
- return _possible_constructor_return$5(this, result);
1556
- };
1557
- }
1558
- var STSServiceException = /*#__PURE__*/ function(__ServiceException) {
1559
- _inherits$5(STSServiceException, __ServiceException);
1560
- var _super = _create_super$5(STSServiceException);
1561
- function STSServiceException(options) {
1562
- _class_call_check$5(this, STSServiceException);
1563
- var _this;
1564
- _this = _super.call(this, options);
1565
- Object.setPrototypeOf(_assert_this_initialized$5(_this), STSServiceException.prototype);
1566
- return _this;
1567
- }
1568
- return STSServiceException;
1569
- }(ServiceException);
1570
-
1571
- function _assert_this_initialized$4(self) {
1572
- if (self === void 0) {
1573
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1574
- }
1575
- return self;
1576
- }
1577
- function _class_call_check$4(instance, Constructor) {
1578
- if (!(instance instanceof Constructor)) {
1579
- throw new TypeError("Cannot call a class as a function");
1580
- }
1581
- }
1582
- function _define_property$3(obj, key, value) {
1583
- if (key in obj) {
1584
- Object.defineProperty(obj, key, {
1585
- value: value,
1586
- enumerable: true,
1587
- configurable: true,
1588
- writable: true
1589
- });
1590
- } else {
1591
- obj[key] = value;
1592
- }
1593
- return obj;
1594
- }
1595
- function _get_prototype_of$4(o) {
1596
- _get_prototype_of$4 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
1597
- return o.__proto__ || Object.getPrototypeOf(o);
1598
- };
1599
- return _get_prototype_of$4(o);
1600
- }
1601
- function _inherits$4(subClass, superClass) {
1602
- if (typeof superClass !== "function" && superClass !== null) {
1603
- throw new TypeError("Super expression must either be null or a function");
1604
- }
1605
- subClass.prototype = Object.create(superClass && superClass.prototype, {
1606
- constructor: {
1607
- value: subClass,
1608
- writable: true,
1609
- configurable: true
1610
- }
1611
- });
1612
- if (superClass) _set_prototype_of$4(subClass, superClass);
1613
- }
1614
- function _object_spread$3(target) {
1615
- for(var i = 1; i < arguments.length; i++){
1616
- var source = arguments[i] != null ? arguments[i] : {};
1617
- var ownKeys = Object.keys(source);
1618
- if (typeof Object.getOwnPropertySymbols === "function") {
1619
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1620
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1621
- }));
1622
- }
1623
- ownKeys.forEach(function(key) {
1624
- _define_property$3(target, key, source[key]);
1625
- });
1626
- }
1627
- return target;
1628
- }
1629
- function _possible_constructor_return$4(self, call) {
1630
- if (call && (_type_of$4(call) === "object" || typeof call === "function")) {
1631
- return call;
1632
- }
1633
- return _assert_this_initialized$4(self);
1634
- }
1635
- function _set_prototype_of$4(o, p) {
1636
- _set_prototype_of$4 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1637
- o.__proto__ = p;
1638
- return o;
1639
- };
1640
- return _set_prototype_of$4(o, p);
1641
- }
1642
- function _type_of$4(obj) {
1643
- "@swc/helpers - typeof";
1644
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1645
- }
1646
- function _is_native_reflect_construct$4() {
1647
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
1648
- if (Reflect.construct.sham) return false;
1649
- if (typeof Proxy === "function") return true;
1650
- try {
1651
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
1652
- return true;
1653
- } catch (e) {
1654
- return false;
1655
- }
1656
- }
1657
- function _create_super$4(Derived) {
1658
- var hasNativeReflectConstruct = _is_native_reflect_construct$4();
1659
- return function _createSuperInternal() {
1660
- var Super = _get_prototype_of$4(Derived), result;
1661
- if (hasNativeReflectConstruct) {
1662
- var NewTarget = _get_prototype_of$4(this).constructor;
1663
- result = Reflect.construct(Super, arguments, NewTarget);
1664
- } else {
1665
- result = Super.apply(this, arguments);
1666
- }
1667
- return _possible_constructor_return$4(this, result);
1668
- };
1669
- }
1670
- var CredentialsFilterSensitiveLog = function(obj) {
1671
- return _object_spread$3({}, obj, obj.SecretAccessKey && {
1672
- SecretAccessKey: SENSITIVE_STRING
1673
- });
1674
- };
1675
- var AssumeRoleResponseFilterSensitiveLog = function(obj) {
1676
- return _object_spread$3({}, obj, obj.Credentials && {
1677
- Credentials: CredentialsFilterSensitiveLog(obj.Credentials)
1678
- });
1679
- };
1680
- var ExpiredTokenException = /*#__PURE__*/ function(__BaseException) {
1681
- _inherits$4(ExpiredTokenException, __BaseException);
1682
- var _super = _create_super$4(ExpiredTokenException);
1683
- function ExpiredTokenException(opts) {
1684
- _class_call_check$4(this, ExpiredTokenException);
1685
- var _this;
1686
- _this = _super.call(this, _object_spread$3({
1687
- name: "ExpiredTokenException",
1688
- $fault: "client"
1689
- }, opts));
1690
- _define_property$3(_assert_this_initialized$4(_this), "name", "ExpiredTokenException");
1691
- _define_property$3(_assert_this_initialized$4(_this), "$fault", "client");
1692
- Object.setPrototypeOf(_assert_this_initialized$4(_this), ExpiredTokenException.prototype);
1693
- return _this;
1694
- }
1695
- return ExpiredTokenException;
1696
- }(STSServiceException);
1697
- var MalformedPolicyDocumentException = /*#__PURE__*/ function(__BaseException) {
1698
- _inherits$4(MalformedPolicyDocumentException, __BaseException);
1699
- var _super = _create_super$4(MalformedPolicyDocumentException);
1700
- function MalformedPolicyDocumentException(opts) {
1701
- _class_call_check$4(this, MalformedPolicyDocumentException);
1702
- var _this;
1703
- _this = _super.call(this, _object_spread$3({
1704
- name: "MalformedPolicyDocumentException",
1705
- $fault: "client"
1706
- }, opts));
1707
- _define_property$3(_assert_this_initialized$4(_this), "name", "MalformedPolicyDocumentException");
1708
- _define_property$3(_assert_this_initialized$4(_this), "$fault", "client");
1709
- Object.setPrototypeOf(_assert_this_initialized$4(_this), MalformedPolicyDocumentException.prototype);
1710
- return _this;
1711
- }
1712
- return MalformedPolicyDocumentException;
1713
- }(STSServiceException);
1714
- var PackedPolicyTooLargeException = /*#__PURE__*/ function(__BaseException) {
1715
- _inherits$4(PackedPolicyTooLargeException, __BaseException);
1716
- var _super = _create_super$4(PackedPolicyTooLargeException);
1717
- function PackedPolicyTooLargeException(opts) {
1718
- _class_call_check$4(this, PackedPolicyTooLargeException);
1719
- var _this;
1720
- _this = _super.call(this, _object_spread$3({
1721
- name: "PackedPolicyTooLargeException",
1722
- $fault: "client"
1723
- }, opts));
1724
- _define_property$3(_assert_this_initialized$4(_this), "name", "PackedPolicyTooLargeException");
1725
- _define_property$3(_assert_this_initialized$4(_this), "$fault", "client");
1726
- Object.setPrototypeOf(_assert_this_initialized$4(_this), PackedPolicyTooLargeException.prototype);
1727
- return _this;
1728
- }
1729
- return PackedPolicyTooLargeException;
1730
- }(STSServiceException);
1731
- var RegionDisabledException = /*#__PURE__*/ function(__BaseException) {
1732
- _inherits$4(RegionDisabledException, __BaseException);
1733
- var _super = _create_super$4(RegionDisabledException);
1734
- function RegionDisabledException(opts) {
1735
- _class_call_check$4(this, RegionDisabledException);
1736
- var _this;
1737
- _this = _super.call(this, _object_spread$3({
1738
- name: "RegionDisabledException",
1739
- $fault: "client"
1740
- }, opts));
1741
- _define_property$3(_assert_this_initialized$4(_this), "name", "RegionDisabledException");
1742
- _define_property$3(_assert_this_initialized$4(_this), "$fault", "client");
1743
- Object.setPrototypeOf(_assert_this_initialized$4(_this), RegionDisabledException.prototype);
1744
- return _this;
1745
- }
1746
- return RegionDisabledException;
1747
- }(STSServiceException);
1748
- var IDPRejectedClaimException = /*#__PURE__*/ function(__BaseException) {
1749
- _inherits$4(IDPRejectedClaimException, __BaseException);
1750
- var _super = _create_super$4(IDPRejectedClaimException);
1751
- function IDPRejectedClaimException(opts) {
1752
- _class_call_check$4(this, IDPRejectedClaimException);
1753
- var _this;
1754
- _this = _super.call(this, _object_spread$3({
1755
- name: "IDPRejectedClaimException",
1756
- $fault: "client"
1757
- }, opts));
1758
- _define_property$3(_assert_this_initialized$4(_this), "name", "IDPRejectedClaimException");
1759
- _define_property$3(_assert_this_initialized$4(_this), "$fault", "client");
1760
- Object.setPrototypeOf(_assert_this_initialized$4(_this), IDPRejectedClaimException.prototype);
1761
- return _this;
1762
- }
1763
- return IDPRejectedClaimException;
1764
- }(STSServiceException);
1765
- var InvalidIdentityTokenException = /*#__PURE__*/ function(__BaseException) {
1766
- _inherits$4(InvalidIdentityTokenException, __BaseException);
1767
- var _super = _create_super$4(InvalidIdentityTokenException);
1768
- function InvalidIdentityTokenException(opts) {
1769
- _class_call_check$4(this, InvalidIdentityTokenException);
1770
- var _this;
1771
- _this = _super.call(this, _object_spread$3({
1772
- name: "InvalidIdentityTokenException",
1773
- $fault: "client"
1774
- }, opts));
1775
- _define_property$3(_assert_this_initialized$4(_this), "name", "InvalidIdentityTokenException");
1776
- _define_property$3(_assert_this_initialized$4(_this), "$fault", "client");
1777
- Object.setPrototypeOf(_assert_this_initialized$4(_this), InvalidIdentityTokenException.prototype);
1778
- return _this;
1779
- }
1780
- return InvalidIdentityTokenException;
1781
- }(STSServiceException);
1782
- var AssumeRoleWithWebIdentityRequestFilterSensitiveLog = function(obj) {
1783
- return _object_spread$3({}, obj, obj.WebIdentityToken && {
1784
- WebIdentityToken: SENSITIVE_STRING
1785
- });
1786
- };
1787
- var AssumeRoleWithWebIdentityResponseFilterSensitiveLog = function(obj) {
1788
- return _object_spread$3({}, obj, obj.Credentials && {
1789
- Credentials: CredentialsFilterSensitiveLog(obj.Credentials)
1790
- });
1791
- };
1792
- var IDPCommunicationErrorException = /*#__PURE__*/ function(__BaseException) {
1793
- _inherits$4(IDPCommunicationErrorException, __BaseException);
1794
- var _super = _create_super$4(IDPCommunicationErrorException);
1795
- function IDPCommunicationErrorException(opts) {
1796
- _class_call_check$4(this, IDPCommunicationErrorException);
1797
- var _this;
1798
- _this = _super.call(this, _object_spread$3({
1799
- name: "IDPCommunicationErrorException",
1800
- $fault: "client"
1801
- }, opts));
1802
- _define_property$3(_assert_this_initialized$4(_this), "name", "IDPCommunicationErrorException");
1803
- _define_property$3(_assert_this_initialized$4(_this), "$fault", "client");
1804
- Object.setPrototypeOf(_assert_this_initialized$4(_this), IDPCommunicationErrorException.prototype);
1805
- return _this;
1806
- }
1807
- return IDPCommunicationErrorException;
1808
- }(STSServiceException);
1809
-
1810
- function _array_like_to_array(arr, len) {
1811
- if (len == null || len > arr.length) len = arr.length;
1812
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1813
- return arr2;
1814
- }
1815
- function _array_with_holes(arr) {
1816
- if (Array.isArray(arr)) return arr;
1817
- }
1818
- function asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, key, arg) {
1819
- try {
1820
- var info = gen[key](arg);
1821
- var value = info.value;
1822
- } catch (error) {
1823
- reject(error);
1824
- return;
1825
- }
1826
- if (info.done) {
1827
- resolve(value);
1828
- } else {
1829
- Promise.resolve(value).then(_next, _throw);
1830
- }
1831
- }
1832
- function _async_to_generator$1(fn) {
1833
- return function() {
1834
- var self = this, args = arguments;
1835
- return new Promise(function(resolve, reject) {
1836
- var gen = fn.apply(self, args);
1837
- function _next(value) {
1838
- asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "next", value);
1839
- }
1840
- function _throw(err) {
1841
- asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "throw", err);
1842
- }
1843
- _next(undefined);
1844
- });
1845
- };
1846
- }
1847
- function _define_property$2(obj, key, value) {
1848
- if (key in obj) {
1849
- Object.defineProperty(obj, key, {
1850
- value: value,
1851
- enumerable: true,
1852
- configurable: true,
1853
- writable: true
1854
- });
1855
- } else {
1856
- obj[key] = value;
1857
- }
1858
- return obj;
1859
- }
1860
- function _iterable_to_array_limit(arr, i) {
1861
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1862
- if (_i == null) return;
1863
- var _arr = [];
1864
- var _n = true;
1865
- var _d = false;
1866
- var _s, _e;
1867
- try {
1868
- for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
1869
- _arr.push(_s.value);
1870
- if (i && _arr.length === i) break;
1871
- }
1872
- } catch (err) {
1873
- _d = true;
1874
- _e = err;
1875
- } finally{
1876
- try {
1877
- if (!_n && _i["return"] != null) _i["return"]();
1878
- } finally{
1879
- if (_d) throw _e;
1880
- }
1881
- }
1882
- return _arr;
1883
- }
1884
- function _non_iterable_rest() {
1885
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1886
- }
1887
- function _object_spread$2(target) {
1888
- for(var i = 1; i < arguments.length; i++){
1889
- var source = arguments[i] != null ? arguments[i] : {};
1890
- var ownKeys = Object.keys(source);
1891
- if (typeof Object.getOwnPropertySymbols === "function") {
1892
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1893
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1894
- }));
1895
- }
1896
- ownKeys.forEach(function(key) {
1897
- _define_property$2(target, key, source[key]);
1898
- });
1899
- }
1900
- return target;
1901
- }
1902
- function ownKeys(object, enumerableOnly) {
1903
- var keys = Object.keys(object);
1904
- if (Object.getOwnPropertySymbols) {
1905
- var symbols = Object.getOwnPropertySymbols(object);
1906
- keys.push.apply(keys, symbols);
1907
- }
1908
- return keys;
1909
- }
1910
- function _object_spread_props(target, source) {
1911
- source = source != null ? source : {};
1912
- if (Object.getOwnPropertyDescriptors) {
1913
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1914
- } else {
1915
- ownKeys(Object(source)).forEach(function(key) {
1916
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1917
- });
1918
- }
1919
- return target;
1920
- }
1921
- function _sliced_to_array(arr, i) {
1922
- return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
1923
- }
1924
- function _unsupported_iterable_to_array(o, minLen) {
1925
- if (!o) return;
1926
- if (typeof o === "string") return _array_like_to_array(o, minLen);
1927
- var n = Object.prototype.toString.call(o).slice(8, -1);
1928
- if (n === "Object" && o.constructor) n = o.constructor.name;
1929
- if (n === "Map" || n === "Set") return Array.from(n);
1930
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
1931
- }
1932
- function _ts_generator$1(thisArg, body) {
1933
- var f, y, t, g, _ = {
1934
- label: 0,
1935
- sent: function() {
1936
- if (t[0] & 1) throw t[1];
1937
- return t[1];
1938
- },
1939
- trys: [],
1940
- ops: []
1941
- };
1942
- return g = {
1943
- next: verb(0),
1944
- "throw": verb(1),
1945
- "return": verb(2)
1946
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
1947
- return this;
1948
- }), g;
1949
- function verb(n) {
1950
- return function(v) {
1951
- return step([
1952
- n,
1953
- v
1954
- ]);
1955
- };
1956
- }
1957
- function step(op) {
1958
- if (f) throw new TypeError("Generator is already executing.");
1959
- while(_)try {
1960
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
1961
- if (y = 0, t) op = [
1962
- op[0] & 2,
1963
- t.value
1964
- ];
1965
- switch(op[0]){
1966
- case 0:
1967
- case 1:
1968
- t = op;
1969
- break;
1970
- case 4:
1971
- _.label++;
1972
- return {
1973
- value: op[1],
1974
- done: false
1975
- };
1976
- case 5:
1977
- _.label++;
1978
- y = op[1];
1979
- op = [
1980
- 0
1981
- ];
1982
- continue;
1983
- case 7:
1984
- op = _.ops.pop();
1985
- _.trys.pop();
1986
- continue;
1987
- default:
1988
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
1989
- _ = 0;
1990
- continue;
1991
- }
1992
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
1993
- _.label = op[1];
1994
- break;
1995
- }
1996
- if (op[0] === 6 && _.label < t[1]) {
1997
- _.label = t[1];
1998
- t = op;
1999
- break;
2000
- }
2001
- if (t && _.label < t[2]) {
2002
- _.label = t[2];
2003
- _.ops.push(op);
2004
- break;
2005
- }
2006
- if (t[2]) _.ops.pop();
2007
- _.trys.pop();
2008
- continue;
2009
- }
2010
- op = body.call(thisArg, _);
2011
- } catch (e) {
2012
- op = [
2013
- 6,
2014
- e
2015
- ];
2016
- y = 0;
2017
- } finally{
2018
- f = t = 0;
2019
- }
2020
- if (op[0] & 5) throw op[1];
2021
- return {
2022
- value: op[0] ? op[1] : void 0,
2023
- done: true
2024
- };
2025
- }
2026
- }
2027
- var se_AssumeRoleCommand = function() {
2028
- var _ref = _async_to_generator$1(function(input, context) {
2029
- var headers, body, _obj;
2030
- return _ts_generator$1(this, function(_state) {
2031
- headers = SHARED_HEADERS;
2032
- body = buildFormUrlencodedString(_object_spread_props(_object_spread$2({}, se_AssumeRoleRequest(input, context)), (_obj = {}, _define_property$2(_obj, _A, _AR), _define_property$2(_obj, _V, _), _obj)));
2033
- return [
2034
- 2,
2035
- buildHttpRpcRequest(context, headers, "/", undefined, body)
2036
- ];
2037
- });
2038
- });
2039
- return function se_AssumeRoleCommand(input, context) {
2040
- return _ref.apply(this, arguments);
2041
- };
2042
- }();
2043
- var se_AssumeRoleWithWebIdentityCommand = function() {
2044
- var _ref = _async_to_generator$1(function(input, context) {
2045
- var headers, body, _obj;
2046
- return _ts_generator$1(this, function(_state) {
2047
- headers = SHARED_HEADERS;
2048
- body = buildFormUrlencodedString(_object_spread_props(_object_spread$2({}, se_AssumeRoleWithWebIdentityRequest(input, context)), (_obj = {}, _define_property$2(_obj, _A, _ARWWI), _define_property$2(_obj, _V, _), _obj)));
2049
- return [
2050
- 2,
2051
- buildHttpRpcRequest(context, headers, "/", undefined, body)
2052
- ];
2053
- });
2054
- });
2055
- return function se_AssumeRoleWithWebIdentityCommand(input, context) {
2056
- return _ref.apply(this, arguments);
2057
- };
2058
- }();
2059
- var de_AssumeRoleCommand = function() {
2060
- var _ref = _async_to_generator$1(function(output, context) {
2061
- var data, contents, response;
2062
- return _ts_generator$1(this, function(_state) {
2063
- switch(_state.label){
2064
- case 0:
2065
- if (output.statusCode >= 300) {
2066
- return [
2067
- 2,
2068
- de_CommandError(output, context)
2069
- ];
2070
- }
2071
- return [
2072
- 4,
2073
- parseXmlBody(output.body, context)
2074
- ];
2075
- case 1:
2076
- data = _state.sent();
2077
- contents = {};
2078
- contents = de_AssumeRoleResponse(data.AssumeRoleResult);
2079
- response = _object_spread$2({
2080
- $metadata: deserializeMetadata(output)
2081
- }, contents);
2082
- return [
2083
- 2,
2084
- response
2085
- ];
2086
- }
2087
- });
2088
- });
2089
- return function de_AssumeRoleCommand(output, context) {
2090
- return _ref.apply(this, arguments);
2091
- };
2092
- }();
2093
- var de_AssumeRoleWithWebIdentityCommand = function() {
2094
- var _ref = _async_to_generator$1(function(output, context) {
2095
- var data, contents, response;
2096
- return _ts_generator$1(this, function(_state) {
2097
- switch(_state.label){
2098
- case 0:
2099
- if (output.statusCode >= 300) {
2100
- return [
2101
- 2,
2102
- de_CommandError(output, context)
2103
- ];
2104
- }
2105
- return [
2106
- 4,
2107
- parseXmlBody(output.body, context)
2108
- ];
2109
- case 1:
2110
- data = _state.sent();
2111
- contents = {};
2112
- contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult);
2113
- response = _object_spread$2({
2114
- $metadata: deserializeMetadata(output)
2115
- }, contents);
2116
- return [
2117
- 2,
2118
- response
2119
- ];
2120
- }
2121
- });
2122
- });
2123
- return function de_AssumeRoleWithWebIdentityCommand(output, context) {
2124
- return _ref.apply(this, arguments);
2125
- };
2126
- }();
2127
- var de_CommandError = function() {
2128
- var _ref = _async_to_generator$1(function(output, context) {
2129
- var parsedOutput, _tmp, _tmp1, errorCode, parsedBody;
2130
- return _ts_generator$1(this, function(_state) {
2131
- switch(_state.label){
2132
- case 0:
2133
- _tmp = [
2134
- _object_spread$2({}, output)
2135
- ];
2136
- _tmp1 = {};
2137
- return [
2138
- 4,
2139
- parseXmlErrorBody(output.body, context)
2140
- ];
2141
- case 1:
2142
- parsedOutput = _object_spread_props.apply(void 0, _tmp.concat([
2143
- (_tmp1.body = _state.sent(), _tmp1)
2144
- ]));
2145
- errorCode = loadQueryErrorCode(output, parsedOutput.body);
2146
- switch(errorCode){
2147
- case "ExpiredTokenException":
2148
- return [
2149
- 3,
2150
- 2
2151
- ];
2152
- case "com.amazonaws.sts#ExpiredTokenException":
2153
- return [
2154
- 3,
2155
- 2
2156
- ];
2157
- case "MalformedPolicyDocument":
2158
- return [
2159
- 3,
2160
- 4
2161
- ];
2162
- case "com.amazonaws.sts#MalformedPolicyDocumentException":
2163
- return [
2164
- 3,
2165
- 4
2166
- ];
2167
- case "PackedPolicyTooLarge":
2168
- return [
2169
- 3,
2170
- 6
2171
- ];
2172
- case "com.amazonaws.sts#PackedPolicyTooLargeException":
2173
- return [
2174
- 3,
2175
- 6
2176
- ];
2177
- case "RegionDisabledException":
2178
- return [
2179
- 3,
2180
- 8
2181
- ];
2182
- case "com.amazonaws.sts#RegionDisabledException":
2183
- return [
2184
- 3,
2185
- 8
2186
- ];
2187
- case "IDPCommunicationError":
2188
- return [
2189
- 3,
2190
- 10
2191
- ];
2192
- case "com.amazonaws.sts#IDPCommunicationErrorException":
2193
- return [
2194
- 3,
2195
- 10
2196
- ];
2197
- case "IDPRejectedClaim":
2198
- return [
2199
- 3,
2200
- 12
2201
- ];
2202
- case "com.amazonaws.sts#IDPRejectedClaimException":
2203
- return [
2204
- 3,
2205
- 12
2206
- ];
2207
- case "InvalidIdentityToken":
2208
- return [
2209
- 3,
2210
- 14
2211
- ];
2212
- case "com.amazonaws.sts#InvalidIdentityTokenException":
2213
- return [
2214
- 3,
2215
- 14
2216
- ];
2217
- }
2218
- return [
2219
- 3,
2220
- 16
2221
- ];
2222
- case 2:
2223
- return [
2224
- 4,
2225
- de_ExpiredTokenExceptionRes(parsedOutput, context)
2226
- ];
2227
- case 3:
2228
- throw _state.sent();
2229
- case 4:
2230
- return [
2231
- 4,
2232
- de_MalformedPolicyDocumentExceptionRes(parsedOutput, context)
2233
- ];
2234
- case 5:
2235
- throw _state.sent();
2236
- case 6:
2237
- return [
2238
- 4,
2239
- de_PackedPolicyTooLargeExceptionRes(parsedOutput, context)
2240
- ];
2241
- case 7:
2242
- throw _state.sent();
2243
- case 8:
2244
- return [
2245
- 4,
2246
- de_RegionDisabledExceptionRes(parsedOutput, context)
2247
- ];
2248
- case 9:
2249
- throw _state.sent();
2250
- case 10:
2251
- return [
2252
- 4,
2253
- de_IDPCommunicationErrorExceptionRes(parsedOutput, context)
2254
- ];
2255
- case 11:
2256
- throw _state.sent();
2257
- case 12:
2258
- return [
2259
- 4,
2260
- de_IDPRejectedClaimExceptionRes(parsedOutput, context)
2261
- ];
2262
- case 13:
2263
- throw _state.sent();
2264
- case 14:
2265
- return [
2266
- 4,
2267
- de_InvalidIdentityTokenExceptionRes(parsedOutput, context)
2268
- ];
2269
- case 15:
2270
- throw _state.sent();
2271
- case 16:
2272
- parsedBody = parsedOutput.body;
2273
- return [
2274
- 2,
2275
- throwDefaultError({
2276
- output: output,
2277
- parsedBody: parsedBody.Error,
2278
- errorCode: errorCode
2279
- })
2280
- ];
2281
- case 17:
2282
- return [
2283
- 2
2284
- ];
2285
- }
2286
- });
2287
- });
2288
- return function de_CommandError(output, context) {
2289
- return _ref.apply(this, arguments);
2290
- };
2291
- }();
2292
- var de_ExpiredTokenExceptionRes = function() {
2293
- var _ref = _async_to_generator$1(function(parsedOutput, context) {
2294
- var body, deserialized, exception;
2295
- return _ts_generator$1(this, function(_state) {
2296
- body = parsedOutput.body;
2297
- deserialized = de_ExpiredTokenException(body.Error);
2298
- exception = new ExpiredTokenException(_object_spread$2({
2299
- $metadata: deserializeMetadata(parsedOutput)
2300
- }, deserialized));
2301
- return [
2302
- 2,
2303
- decorateServiceException(exception, body)
2304
- ];
2305
- });
2306
- });
2307
- return function de_ExpiredTokenExceptionRes(parsedOutput, context) {
2308
- return _ref.apply(this, arguments);
2309
- };
2310
- }();
2311
- var de_IDPCommunicationErrorExceptionRes = function() {
2312
- var _ref = _async_to_generator$1(function(parsedOutput, context) {
2313
- var body, deserialized, exception;
2314
- return _ts_generator$1(this, function(_state) {
2315
- body = parsedOutput.body;
2316
- deserialized = de_IDPCommunicationErrorException(body.Error);
2317
- exception = new IDPCommunicationErrorException(_object_spread$2({
2318
- $metadata: deserializeMetadata(parsedOutput)
2319
- }, deserialized));
2320
- return [
2321
- 2,
2322
- decorateServiceException(exception, body)
2323
- ];
2324
- });
2325
- });
2326
- return function de_IDPCommunicationErrorExceptionRes(parsedOutput, context) {
2327
- return _ref.apply(this, arguments);
2328
- };
2329
- }();
2330
- var de_IDPRejectedClaimExceptionRes = function() {
2331
- var _ref = _async_to_generator$1(function(parsedOutput, context) {
2332
- var body, deserialized, exception;
2333
- return _ts_generator$1(this, function(_state) {
2334
- body = parsedOutput.body;
2335
- deserialized = de_IDPRejectedClaimException(body.Error);
2336
- exception = new IDPRejectedClaimException(_object_spread$2({
2337
- $metadata: deserializeMetadata(parsedOutput)
2338
- }, deserialized));
2339
- return [
2340
- 2,
2341
- decorateServiceException(exception, body)
2342
- ];
2343
- });
2344
- });
2345
- return function de_IDPRejectedClaimExceptionRes(parsedOutput, context) {
2346
- return _ref.apply(this, arguments);
2347
- };
2348
- }();
2349
- var de_InvalidIdentityTokenExceptionRes = function() {
2350
- var _ref = _async_to_generator$1(function(parsedOutput, context) {
2351
- var body, deserialized, exception;
2352
- return _ts_generator$1(this, function(_state) {
2353
- body = parsedOutput.body;
2354
- deserialized = de_InvalidIdentityTokenException(body.Error);
2355
- exception = new InvalidIdentityTokenException(_object_spread$2({
2356
- $metadata: deserializeMetadata(parsedOutput)
2357
- }, deserialized));
2358
- return [
2359
- 2,
2360
- decorateServiceException(exception, body)
2361
- ];
2362
- });
2363
- });
2364
- return function de_InvalidIdentityTokenExceptionRes(parsedOutput, context) {
2365
- return _ref.apply(this, arguments);
2366
- };
2367
- }();
2368
- var de_MalformedPolicyDocumentExceptionRes = function() {
2369
- var _ref = _async_to_generator$1(function(parsedOutput, context) {
2370
- var body, deserialized, exception;
2371
- return _ts_generator$1(this, function(_state) {
2372
- body = parsedOutput.body;
2373
- deserialized = de_MalformedPolicyDocumentException(body.Error);
2374
- exception = new MalformedPolicyDocumentException(_object_spread$2({
2375
- $metadata: deserializeMetadata(parsedOutput)
2376
- }, deserialized));
2377
- return [
2378
- 2,
2379
- decorateServiceException(exception, body)
2380
- ];
2381
- });
2382
- });
2383
- return function de_MalformedPolicyDocumentExceptionRes(parsedOutput, context) {
2384
- return _ref.apply(this, arguments);
2385
- };
2386
- }();
2387
- var de_PackedPolicyTooLargeExceptionRes = function() {
2388
- var _ref = _async_to_generator$1(function(parsedOutput, context) {
2389
- var body, deserialized, exception;
2390
- return _ts_generator$1(this, function(_state) {
2391
- body = parsedOutput.body;
2392
- deserialized = de_PackedPolicyTooLargeException(body.Error);
2393
- exception = new PackedPolicyTooLargeException(_object_spread$2({
2394
- $metadata: deserializeMetadata(parsedOutput)
2395
- }, deserialized));
2396
- return [
2397
- 2,
2398
- decorateServiceException(exception, body)
2399
- ];
2400
- });
2401
- });
2402
- return function de_PackedPolicyTooLargeExceptionRes(parsedOutput, context) {
2403
- return _ref.apply(this, arguments);
2404
- };
2405
- }();
2406
- var de_RegionDisabledExceptionRes = function() {
2407
- var _ref = _async_to_generator$1(function(parsedOutput, context) {
2408
- var body, deserialized, exception;
2409
- return _ts_generator$1(this, function(_state) {
2410
- body = parsedOutput.body;
2411
- deserialized = de_RegionDisabledException(body.Error);
2412
- exception = new RegionDisabledException(_object_spread$2({
2413
- $metadata: deserializeMetadata(parsedOutput)
2414
- }, deserialized));
2415
- return [
2416
- 2,
2417
- decorateServiceException(exception, body)
2418
- ];
2419
- });
2420
- });
2421
- return function de_RegionDisabledExceptionRes(parsedOutput, context) {
2422
- return _ref.apply(this, arguments);
2423
- };
2424
- }();
2425
- var se_AssumeRoleRequest = function(input, context) {
2426
- var entries = {};
2427
- if (input[_RA] != null) {
2428
- entries[_RA] = input[_RA];
2429
- }
2430
- if (input[_RSN] != null) {
2431
- entries[_RSN] = input[_RSN];
2432
- }
2433
- if (input[_PA] != null) {
2434
- var _input__PA;
2435
- var memberEntries = se_policyDescriptorListType(input[_PA], context);
2436
- if (((_input__PA = input[_PA]) === null || _input__PA === void 0 ? void 0 : _input__PA.length) === 0) {
2437
- entries.PolicyArns = [];
2438
- }
2439
- Object.entries(memberEntries).forEach(function(param) {
2440
- var _param = _sliced_to_array(param, 2), key = _param[0], value = _param[1];
2441
- var loc = "PolicyArns.".concat(key);
2442
- entries[loc] = value;
2443
- });
2444
- }
2445
- if (input[_P] != null) {
2446
- entries[_P] = input[_P];
2447
- }
2448
- if (input[_DS] != null) {
2449
- entries[_DS] = input[_DS];
2450
- }
2451
- if (input[_T] != null) {
2452
- var _input__T;
2453
- var memberEntries1 = se_tagListType(input[_T], context);
2454
- if (((_input__T = input[_T]) === null || _input__T === void 0 ? void 0 : _input__T.length) === 0) {
2455
- entries.Tags = [];
2456
- }
2457
- Object.entries(memberEntries1).forEach(function(param) {
2458
- var _param = _sliced_to_array(param, 2), key = _param[0], value = _param[1];
2459
- var loc = "Tags.".concat(key);
2460
- entries[loc] = value;
2461
- });
2462
- }
2463
- if (input[_TTK] != null) {
2464
- var _input__TTK;
2465
- var memberEntries2 = se_tagKeyListType(input[_TTK]);
2466
- if (((_input__TTK = input[_TTK]) === null || _input__TTK === void 0 ? void 0 : _input__TTK.length) === 0) {
2467
- entries.TransitiveTagKeys = [];
2468
- }
2469
- Object.entries(memberEntries2).forEach(function(param) {
2470
- var _param = _sliced_to_array(param, 2), key = _param[0], value = _param[1];
2471
- var loc = "TransitiveTagKeys.".concat(key);
2472
- entries[loc] = value;
2473
- });
2474
- }
2475
- if (input[_EI] != null) {
2476
- entries[_EI] = input[_EI];
2477
- }
2478
- if (input[_SN] != null) {
2479
- entries[_SN] = input[_SN];
2480
- }
2481
- if (input[_TC] != null) {
2482
- entries[_TC] = input[_TC];
2483
- }
2484
- if (input[_SI] != null) {
2485
- entries[_SI] = input[_SI];
2486
- }
2487
- if (input[_PC] != null) {
2488
- var _input__PC;
2489
- var memberEntries3 = se_ProvidedContextsListType(input[_PC], context);
2490
- if (((_input__PC = input[_PC]) === null || _input__PC === void 0 ? void 0 : _input__PC.length) === 0) {
2491
- entries.ProvidedContexts = [];
2492
- }
2493
- Object.entries(memberEntries3).forEach(function(param) {
2494
- var _param = _sliced_to_array(param, 2), key = _param[0], value = _param[1];
2495
- var loc = "ProvidedContexts.".concat(key);
2496
- entries[loc] = value;
2497
- });
2498
- }
2499
- return entries;
2500
- };
2501
- var se_AssumeRoleWithWebIdentityRequest = function(input, context) {
2502
- var entries = {};
2503
- if (input[_RA] != null) {
2504
- entries[_RA] = input[_RA];
2505
- }
2506
- if (input[_RSN] != null) {
2507
- entries[_RSN] = input[_RSN];
2508
- }
2509
- if (input[_WIT] != null) {
2510
- entries[_WIT] = input[_WIT];
2511
- }
2512
- if (input[_PI] != null) {
2513
- entries[_PI] = input[_PI];
2514
- }
2515
- if (input[_PA] != null) {
2516
- var _input__PA;
2517
- var memberEntries = se_policyDescriptorListType(input[_PA], context);
2518
- if (((_input__PA = input[_PA]) === null || _input__PA === void 0 ? void 0 : _input__PA.length) === 0) {
2519
- entries.PolicyArns = [];
2520
- }
2521
- Object.entries(memberEntries).forEach(function(param) {
2522
- var _param = _sliced_to_array(param, 2), key = _param[0], value = _param[1];
2523
- var loc = "PolicyArns.".concat(key);
2524
- entries[loc] = value;
2525
- });
2526
- }
2527
- if (input[_P] != null) {
2528
- entries[_P] = input[_P];
2529
- }
2530
- if (input[_DS] != null) {
2531
- entries[_DS] = input[_DS];
2532
- }
2533
- return entries;
2534
- };
2535
- var se_policyDescriptorListType = function(input, context) {
2536
- var entries = {};
2537
- var counter = 1;
2538
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
2539
- try {
2540
- for(var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
2541
- var entry = _step.value;
2542
- if (entry === null) {
2543
- continue;
2544
- }
2545
- var memberEntries = se_PolicyDescriptorType(entry, context);
2546
- Object.entries(memberEntries).forEach(function(param) {
2547
- var _param = _sliced_to_array(param, 2), key = _param[0], value = _param[1];
2548
- entries["member.".concat(counter, ".").concat(key)] = value;
2549
- });
2550
- counter++;
2551
- }
2552
- } catch (err) {
2553
- _didIteratorError = true;
2554
- _iteratorError = err;
2555
- } finally{
2556
- try {
2557
- if (!_iteratorNormalCompletion && _iterator.return != null) {
2558
- _iterator.return();
2559
- }
2560
- } finally{
2561
- if (_didIteratorError) {
2562
- throw _iteratorError;
2563
- }
2564
- }
2565
- }
2566
- return entries;
2567
- };
2568
- var se_PolicyDescriptorType = function(input, context) {
2569
- var entries = {};
2570
- if (input[_a] != null) {
2571
- entries[_a] = input[_a];
2572
- }
2573
- return entries;
2574
- };
2575
- var se_ProvidedContext = function(input, context) {
2576
- var entries = {};
2577
- if (input[_PAr] != null) {
2578
- entries[_PAr] = input[_PAr];
2579
- }
2580
- if (input[_CA] != null) {
2581
- entries[_CA] = input[_CA];
2582
- }
2583
- return entries;
2584
- };
2585
- var se_ProvidedContextsListType = function(input, context) {
2586
- var entries = {};
2587
- var counter = 1;
2588
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
2589
- try {
2590
- for(var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
2591
- var entry = _step.value;
2592
- if (entry === null) {
2593
- continue;
2594
- }
2595
- var memberEntries = se_ProvidedContext(entry, context);
2596
- Object.entries(memberEntries).forEach(function(param) {
2597
- var _param = _sliced_to_array(param, 2), key = _param[0], value = _param[1];
2598
- entries["member.".concat(counter, ".").concat(key)] = value;
2599
- });
2600
- counter++;
2601
- }
2602
- } catch (err) {
2603
- _didIteratorError = true;
2604
- _iteratorError = err;
2605
- } finally{
2606
- try {
2607
- if (!_iteratorNormalCompletion && _iterator.return != null) {
2608
- _iterator.return();
2609
- }
2610
- } finally{
2611
- if (_didIteratorError) {
2612
- throw _iteratorError;
2613
- }
2614
- }
2615
- }
2616
- return entries;
2617
- };
2618
- var se_Tag = function(input, context) {
2619
- var entries = {};
2620
- if (input[_K] != null) {
2621
- entries[_K] = input[_K];
2622
- }
2623
- if (input[_Va] != null) {
2624
- entries[_Va] = input[_Va];
2625
- }
2626
- return entries;
2627
- };
2628
- var se_tagKeyListType = function(input, context) {
2629
- var entries = {};
2630
- var counter = 1;
2631
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
2632
- try {
2633
- for(var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
2634
- var entry = _step.value;
2635
- if (entry === null) {
2636
- continue;
2637
- }
2638
- entries["member.".concat(counter)] = entry;
2639
- counter++;
2640
- }
2641
- } catch (err) {
2642
- _didIteratorError = true;
2643
- _iteratorError = err;
2644
- } finally{
2645
- try {
2646
- if (!_iteratorNormalCompletion && _iterator.return != null) {
2647
- _iterator.return();
2648
- }
2649
- } finally{
2650
- if (_didIteratorError) {
2651
- throw _iteratorError;
2652
- }
2653
- }
2654
- }
2655
- return entries;
2656
- };
2657
- var se_tagListType = function(input, context) {
2658
- var entries = {};
2659
- var counter = 1;
2660
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
2661
- try {
2662
- for(var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
2663
- var entry = _step.value;
2664
- if (entry === null) {
2665
- continue;
2666
- }
2667
- var memberEntries = se_Tag(entry, context);
2668
- Object.entries(memberEntries).forEach(function(param) {
2669
- var _param = _sliced_to_array(param, 2), key = _param[0], value = _param[1];
2670
- entries["member.".concat(counter, ".").concat(key)] = value;
2671
- });
2672
- counter++;
2673
- }
2674
- } catch (err) {
2675
- _didIteratorError = true;
2676
- _iteratorError = err;
2677
- } finally{
2678
- try {
2679
- if (!_iteratorNormalCompletion && _iterator.return != null) {
2680
- _iterator.return();
2681
- }
2682
- } finally{
2683
- if (_didIteratorError) {
2684
- throw _iteratorError;
2685
- }
2686
- }
2687
- }
2688
- return entries;
2689
- };
2690
- var de_AssumedRoleUser = function(output, context) {
2691
- var contents = {};
2692
- if (output[_ARI] != null) {
2693
- contents[_ARI] = expectString(output[_ARI]);
2694
- }
2695
- if (output[_Ar] != null) {
2696
- contents[_Ar] = expectString(output[_Ar]);
2697
- }
2698
- return contents;
2699
- };
2700
- var de_AssumeRoleResponse = function(output, context) {
2701
- var contents = {};
2702
- if (output[_C] != null) {
2703
- contents[_C] = de_Credentials(output[_C]);
2704
- }
2705
- if (output[_ARU] != null) {
2706
- contents[_ARU] = de_AssumedRoleUser(output[_ARU]);
2707
- }
2708
- if (output[_PPS] != null) {
2709
- contents[_PPS] = strictParseInt32(output[_PPS]);
2710
- }
2711
- if (output[_SI] != null) {
2712
- contents[_SI] = expectString(output[_SI]);
2713
- }
2714
- return contents;
2715
- };
2716
- var de_AssumeRoleWithWebIdentityResponse = function(output, context) {
2717
- var contents = {};
2718
- if (output[_C] != null) {
2719
- contents[_C] = de_Credentials(output[_C]);
2720
- }
2721
- if (output[_SFWIT] != null) {
2722
- contents[_SFWIT] = expectString(output[_SFWIT]);
2723
- }
2724
- if (output[_ARU] != null) {
2725
- contents[_ARU] = de_AssumedRoleUser(output[_ARU]);
2726
- }
2727
- if (output[_PPS] != null) {
2728
- contents[_PPS] = strictParseInt32(output[_PPS]);
2729
- }
2730
- if (output[_Pr] != null) {
2731
- contents[_Pr] = expectString(output[_Pr]);
2732
- }
2733
- if (output[_Au] != null) {
2734
- contents[_Au] = expectString(output[_Au]);
2735
- }
2736
- if (output[_SI] != null) {
2737
- contents[_SI] = expectString(output[_SI]);
2738
- }
2739
- return contents;
2740
- };
2741
- var de_Credentials = function(output, context) {
2742
- var contents = {};
2743
- if (output[_AKI] != null) {
2744
- contents[_AKI] = expectString(output[_AKI]);
2745
- }
2746
- if (output[_SAK] != null) {
2747
- contents[_SAK] = expectString(output[_SAK]);
2748
- }
2749
- if (output[_ST] != null) {
2750
- contents[_ST] = expectString(output[_ST]);
2751
- }
2752
- if (output[_E] != null) {
2753
- contents[_E] = expectNonNull(parseRfc3339DateTimeWithOffset(output[_E]));
2754
- }
2755
- return contents;
2756
- };
2757
- var de_ExpiredTokenException = function(output, context) {
2758
- var contents = {};
2759
- if (output[_m] != null) {
2760
- contents[_m] = expectString(output[_m]);
2761
- }
2762
- return contents;
2763
- };
2764
- var de_IDPCommunicationErrorException = function(output, context) {
2765
- var contents = {};
2766
- if (output[_m] != null) {
2767
- contents[_m] = expectString(output[_m]);
2768
- }
2769
- return contents;
2770
- };
2771
- var de_IDPRejectedClaimException = function(output, context) {
2772
- var contents = {};
2773
- if (output[_m] != null) {
2774
- contents[_m] = expectString(output[_m]);
2775
- }
2776
- return contents;
2777
- };
2778
- var de_InvalidIdentityTokenException = function(output, context) {
2779
- var contents = {};
2780
- if (output[_m] != null) {
2781
- contents[_m] = expectString(output[_m]);
2782
- }
2783
- return contents;
2784
- };
2785
- var de_MalformedPolicyDocumentException = function(output, context) {
2786
- var contents = {};
2787
- if (output[_m] != null) {
2788
- contents[_m] = expectString(output[_m]);
2789
- }
2790
- return contents;
2791
- };
2792
- var de_PackedPolicyTooLargeException = function(output, context) {
2793
- var contents = {};
2794
- if (output[_m] != null) {
2795
- contents[_m] = expectString(output[_m]);
2796
- }
2797
- return contents;
2798
- };
2799
- var de_RegionDisabledException = function(output, context) {
2800
- var contents = {};
2801
- if (output[_m] != null) {
2802
- contents[_m] = expectString(output[_m]);
2803
- }
2804
- return contents;
2805
- };
2806
- var deserializeMetadata = function(output) {
2807
- var _output_headers_xamznrequestid, _ref;
2808
- return {
2809
- httpStatusCode: output.statusCode,
2810
- requestId: (_ref = (_output_headers_xamznrequestid = output.headers["x-amzn-requestid"]) !== null && _output_headers_xamznrequestid !== void 0 ? _output_headers_xamznrequestid : output.headers["x-amzn-request-id"]) !== null && _ref !== void 0 ? _ref : output.headers["x-amz-request-id"],
2811
- extendedRequestId: output.headers["x-amz-id-2"],
2812
- cfId: output.headers["x-amz-cf-id"]
2813
- };
2814
- };
2815
- var throwDefaultError = withBaseException(STSServiceException);
2816
- var buildHttpRpcRequest = function() {
2817
- var _ref = _async_to_generator$1(function(context, headers, path, resolvedHostname, body) {
2818
- var _ref, hostname, _ref_protocol, protocol, port, basePath, contents;
2819
- return _ts_generator$1(this, function(_state) {
2820
- switch(_state.label){
2821
- case 0:
2822
- return [
2823
- 4,
2824
- context.endpoint()
2825
- ];
2826
- case 1:
2827
- _ref = _state.sent(), hostname = _ref.hostname, _ref_protocol = _ref.protocol, protocol = _ref_protocol === void 0 ? "https" : _ref_protocol, port = _ref.port, basePath = _ref.path;
2828
- contents = {
2829
- protocol: protocol,
2830
- hostname: hostname,
2831
- port: port,
2832
- method: "POST",
2833
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2834
- headers: headers
2835
- };
2836
- if (resolvedHostname !== undefined) {
2837
- contents.hostname = resolvedHostname;
2838
- }
2839
- if (body !== undefined) {
2840
- contents.body = body;
2841
- }
2842
- return [
2843
- 2,
2844
- new HttpRequest(contents)
2845
- ];
2846
- }
2847
- });
2848
- });
2849
- return function buildHttpRpcRequest(context, headers, path, resolvedHostname, body) {
2850
- return _ref.apply(this, arguments);
2851
- };
2852
- }();
2853
- var SHARED_HEADERS = {
2854
- "content-type": "application/x-www-form-urlencoded"
2855
- };
2856
- var _ = "2011-06-15";
2857
- var _A = "Action";
2858
- var _AKI = "AccessKeyId";
2859
- var _AR = "AssumeRole";
2860
- var _ARI = "AssumedRoleId";
2861
- var _ARU = "AssumedRoleUser";
2862
- var _ARWWI = "AssumeRoleWithWebIdentity";
2863
- var _Ar = "Arn";
2864
- var _Au = "Audience";
2865
- var _C = "Credentials";
2866
- var _CA = "ContextAssertion";
2867
- var _DS = "DurationSeconds";
2868
- var _E = "Expiration";
2869
- var _EI = "ExternalId";
2870
- var _K = "Key";
2871
- var _P = "Policy";
2872
- var _PA = "PolicyArns";
2873
- var _PAr = "ProviderArn";
2874
- var _PC = "ProvidedContexts";
2875
- var _PI = "ProviderId";
2876
- var _PPS = "PackedPolicySize";
2877
- var _Pr = "Provider";
2878
- var _RA = "RoleArn";
2879
- var _RSN = "RoleSessionName";
2880
- var _SAK = "SecretAccessKey";
2881
- var _SFWIT = "SubjectFromWebIdentityToken";
2882
- var _SI = "SourceIdentity";
2883
- var _SN = "SerialNumber";
2884
- var _ST = "SessionToken";
2885
- var _T = "Tags";
2886
- var _TC = "TokenCode";
2887
- var _TTK = "TransitiveTagKeys";
2888
- var _V = "Version";
2889
- var _Va = "Value";
2890
- var _WIT = "WebIdentityToken";
2891
- var _a = "arn";
2892
- var _m = "message";
2893
- var buildFormUrlencodedString = function(formEntries) {
2894
- return Object.entries(formEntries).map(function(param) {
2895
- var _param = _sliced_to_array(param, 2), key = _param[0], value = _param[1];
2896
- return extendedEncodeURIComponent(key) + "=" + extendedEncodeURIComponent(value);
2897
- }).join("&");
2898
- };
2899
- var loadQueryErrorCode = function(output, data) {
2900
- var _data_Error;
2901
- if (((_data_Error = data.Error) === null || _data_Error === void 0 ? void 0 : _data_Error.Code) !== undefined) {
2902
- return data.Error.Code;
2903
- }
2904
- if (output.statusCode == 404) {
2905
- return "NotFound";
2906
- }
2907
- };
2908
-
2909
- function _assert_this_initialized$3(self) {
2910
- if (self === void 0) {
2911
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2912
- }
2913
- return self;
2914
- }
2915
- function _class_call_check$3(instance, Constructor) {
2916
- if (!(instance instanceof Constructor)) {
2917
- throw new TypeError("Cannot call a class as a function");
2918
- }
2919
- }
2920
- function _get_prototype_of$3(o) {
2921
- _get_prototype_of$3 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
2922
- return o.__proto__ || Object.getPrototypeOf(o);
2923
- };
2924
- return _get_prototype_of$3(o);
2925
- }
2926
- function _inherits$3(subClass, superClass) {
2927
- if (typeof superClass !== "function" && superClass !== null) {
2928
- throw new TypeError("Super expression must either be null or a function");
2929
- }
2930
- subClass.prototype = Object.create(superClass && superClass.prototype, {
2931
- constructor: {
2932
- value: subClass,
2933
- writable: true,
2934
- configurable: true
2935
- }
2936
- });
2937
- if (superClass) _set_prototype_of$3(subClass, superClass);
2938
- }
2939
- function _possible_constructor_return$3(self, call) {
2940
- if (call && (_type_of$3(call) === "object" || typeof call === "function")) {
2941
- return call;
2942
- }
2943
- return _assert_this_initialized$3(self);
2944
- }
2945
- function _set_prototype_of$3(o, p) {
2946
- _set_prototype_of$3 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
2947
- o.__proto__ = p;
2948
- return o;
2949
- };
2950
- return _set_prototype_of$3(o, p);
2951
- }
2952
- function _type_of$3(obj) {
2953
- "@swc/helpers - typeof";
2954
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
2955
- }
2956
- function _is_native_reflect_construct$3() {
2957
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
2958
- if (Reflect.construct.sham) return false;
2959
- if (typeof Proxy === "function") return true;
2960
- try {
2961
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
2962
- return true;
2963
- } catch (e) {
2964
- return false;
2965
- }
2966
- }
2967
- function _create_super$3(Derived) {
2968
- var hasNativeReflectConstruct = _is_native_reflect_construct$3();
2969
- return function _createSuperInternal() {
2970
- var Super = _get_prototype_of$3(Derived), result;
2971
- if (hasNativeReflectConstruct) {
2972
- var NewTarget = _get_prototype_of$3(this).constructor;
2973
- result = Reflect.construct(Super, arguments, NewTarget);
2974
- } else {
2975
- result = Super.apply(this, arguments);
2976
- }
2977
- return _possible_constructor_return$3(this, result);
2978
- };
2979
- }
2980
- var AssumeRoleCommand = /*#__PURE__*/ function(_$Command_classBuilder_ep_m_s_n_f_ser_de_build) {
2981
- _inherits$3(AssumeRoleCommand, _$Command_classBuilder_ep_m_s_n_f_ser_de_build);
2982
- var _super = _create_super$3(AssumeRoleCommand);
2983
- function AssumeRoleCommand() {
2984
- _class_call_check$3(this, AssumeRoleCommand);
2985
- return _super.apply(this, arguments);
2986
- }
2987
- return AssumeRoleCommand;
2988
- }(Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
2989
- return [
2990
- getSerdePlugin(config, this.serialize, this.deserialize),
2991
- getEndpointPlugin(config, Command.getEndpointParameterInstructions())
2992
- ];
2993
- }).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").f(void 0, AssumeRoleResponseFilterSensitiveLog).ser(se_AssumeRoleCommand).de(de_AssumeRoleCommand).build());
2994
-
2995
- function _assert_this_initialized$2(self) {
2996
- if (self === void 0) {
2997
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2998
- }
2999
- return self;
3000
- }
3001
- function _class_call_check$2(instance, Constructor) {
3002
- if (!(instance instanceof Constructor)) {
3003
- throw new TypeError("Cannot call a class as a function");
3004
- }
3005
- }
3006
- function _get_prototype_of$2(o) {
3007
- _get_prototype_of$2 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
3008
- return o.__proto__ || Object.getPrototypeOf(o);
3009
- };
3010
- return _get_prototype_of$2(o);
3011
- }
3012
- function _inherits$2(subClass, superClass) {
3013
- if (typeof superClass !== "function" && superClass !== null) {
3014
- throw new TypeError("Super expression must either be null or a function");
3015
- }
3016
- subClass.prototype = Object.create(superClass && superClass.prototype, {
3017
- constructor: {
3018
- value: subClass,
3019
- writable: true,
3020
- configurable: true
3021
- }
3022
- });
3023
- if (superClass) _set_prototype_of$2(subClass, superClass);
3024
- }
3025
- function _possible_constructor_return$2(self, call) {
3026
- if (call && (_type_of$2(call) === "object" || typeof call === "function")) {
3027
- return call;
3028
- }
3029
- return _assert_this_initialized$2(self);
3030
- }
3031
- function _set_prototype_of$2(o, p) {
3032
- _set_prototype_of$2 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3033
- o.__proto__ = p;
3034
- return o;
3035
- };
3036
- return _set_prototype_of$2(o, p);
3037
- }
3038
- function _type_of$2(obj) {
3039
- "@swc/helpers - typeof";
3040
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
3041
- }
3042
- function _is_native_reflect_construct$2() {
3043
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
3044
- if (Reflect.construct.sham) return false;
3045
- if (typeof Proxy === "function") return true;
3046
- try {
3047
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
3048
- return true;
3049
- } catch (e) {
3050
- return false;
3051
- }
3052
- }
3053
- function _create_super$2(Derived) {
3054
- var hasNativeReflectConstruct = _is_native_reflect_construct$2();
3055
- return function _createSuperInternal() {
3056
- var Super = _get_prototype_of$2(Derived), result;
3057
- if (hasNativeReflectConstruct) {
3058
- var NewTarget = _get_prototype_of$2(this).constructor;
3059
- result = Reflect.construct(Super, arguments, NewTarget);
3060
- } else {
3061
- result = Super.apply(this, arguments);
3062
- }
3063
- return _possible_constructor_return$2(this, result);
3064
- };
3065
- }
3066
- var AssumeRoleWithWebIdentityCommand = /*#__PURE__*/ function(_$Command_classBuilder_ep_m_s_n_f_ser_de_build) {
3067
- _inherits$2(AssumeRoleWithWebIdentityCommand, _$Command_classBuilder_ep_m_s_n_f_ser_de_build);
3068
- var _super = _create_super$2(AssumeRoleWithWebIdentityCommand);
3069
- function AssumeRoleWithWebIdentityCommand() {
3070
- _class_call_check$2(this, AssumeRoleWithWebIdentityCommand);
3071
- return _super.apply(this, arguments);
3072
- }
3073
- return AssumeRoleWithWebIdentityCommand;
3074
- }(Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
3075
- return [
3076
- getSerdePlugin(config, this.serialize, this.deserialize),
3077
- getEndpointPlugin(config, Command.getEndpointParameterInstructions())
3078
- ];
3079
- }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").f(AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog).ser(se_AssumeRoleWithWebIdentityCommand).de(de_AssumeRoleWithWebIdentityCommand).build());
3080
-
3081
- function _assert_this_initialized$1(self) {
3082
- if (self === void 0) {
3083
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
3084
- }
3085
- return self;
3086
- }
3087
- function _class_call_check$1(instance, Constructor) {
3088
- if (!(instance instanceof Constructor)) {
3089
- throw new TypeError("Cannot call a class as a function");
3090
- }
3091
- }
3092
- function _get_prototype_of$1(o) {
3093
- _get_prototype_of$1 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
3094
- return o.__proto__ || Object.getPrototypeOf(o);
3095
- };
3096
- return _get_prototype_of$1(o);
3097
- }
3098
- function _inherits$1(subClass, superClass) {
3099
- if (typeof superClass !== "function" && superClass !== null) {
3100
- throw new TypeError("Super expression must either be null or a function");
3101
- }
3102
- subClass.prototype = Object.create(superClass && superClass.prototype, {
3103
- constructor: {
3104
- value: subClass,
3105
- writable: true,
3106
- configurable: true
3107
- }
3108
- });
3109
- if (superClass) _set_prototype_of$1(subClass, superClass);
3110
- }
3111
- function _possible_constructor_return$1(self, call) {
3112
- if (call && (_type_of$1(call) === "object" || typeof call === "function")) {
3113
- return call;
3114
- }
3115
- return _assert_this_initialized$1(self);
3116
- }
3117
- function _set_prototype_of$1(o, p) {
3118
- _set_prototype_of$1 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3119
- o.__proto__ = p;
3120
- return o;
3121
- };
3122
- return _set_prototype_of$1(o, p);
3123
- }
3124
- function _type_of$1(obj) {
3125
- "@swc/helpers - typeof";
3126
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
3127
- }
3128
- function _is_native_reflect_construct$1() {
3129
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
3130
- if (Reflect.construct.sham) return false;
3131
- if (typeof Proxy === "function") return true;
3132
- try {
3133
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
3134
- return true;
3135
- } catch (e) {
3136
- return false;
3137
- }
3138
- }
3139
- function _create_super$1(Derived) {
3140
- var hasNativeReflectConstruct = _is_native_reflect_construct$1();
3141
- return function _createSuperInternal() {
3142
- var Super = _get_prototype_of$1(Derived), result;
3143
- if (hasNativeReflectConstruct) {
3144
- var NewTarget = _get_prototype_of$1(this).constructor;
3145
- result = Reflect.construct(Super, arguments, NewTarget);
3146
- } else {
3147
- result = Super.apply(this, arguments);
3148
- }
3149
- return _possible_constructor_return$1(this, result);
3150
- };
3151
- }
3152
- var commands = {
3153
- AssumeRoleCommand: AssumeRoleCommand,
3154
- AssumeRoleWithWebIdentityCommand: AssumeRoleWithWebIdentityCommand
3155
- };
3156
- var STS = /*#__PURE__*/ function(STSClient) {
3157
- _inherits$1(STS, STSClient);
3158
- var _super = _create_super$1(STS);
3159
- function STS() {
3160
- _class_call_check$1(this, STS);
3161
- return _super.apply(this, arguments);
3162
- }
3163
- return STS;
3164
- }(STSClient);
3165
- createAggregatedClient(commands, STS);
3166
-
3167
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
3168
- try {
3169
- var info = gen[key](arg);
3170
- var value = info.value;
3171
- } catch (error) {
3172
- reject(error);
3173
- return;
3174
- }
3175
- if (info.done) {
3176
- resolve(value);
3177
- } else {
3178
- Promise.resolve(value).then(_next, _throw);
3179
- }
3180
- }
3181
- function _async_to_generator(fn) {
3182
- return function() {
3183
- var self = this, args = arguments;
3184
- return new Promise(function(resolve, reject) {
3185
- var gen = fn.apply(self, args);
3186
- function _next(value) {
3187
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
3188
- }
3189
- function _throw(err) {
3190
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
3191
- }
3192
- _next(undefined);
3193
- });
3194
- };
3195
- }
3196
- function _define_property$1(obj, key, value) {
3197
- if (key in obj) {
3198
- Object.defineProperty(obj, key, {
3199
- value: value,
3200
- enumerable: true,
3201
- configurable: true,
3202
- writable: true
3203
- });
3204
- } else {
3205
- obj[key] = value;
3206
- }
3207
- return obj;
3208
- }
3209
- function _object_spread$1(target) {
3210
- for(var i = 1; i < arguments.length; i++){
3211
- var source = arguments[i] != null ? arguments[i] : {};
3212
- var ownKeys = Object.keys(source);
3213
- if (typeof Object.getOwnPropertySymbols === "function") {
3214
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
3215
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
3216
- }));
3217
- }
3218
- ownKeys.forEach(function(key) {
3219
- _define_property$1(target, key, source[key]);
3220
- });
3221
- }
3222
- return target;
3223
- }
3224
- function _ts_generator(thisArg, body) {
3225
- var f, y, t, g, _ = {
3226
- label: 0,
3227
- sent: function() {
3228
- if (t[0] & 1) throw t[1];
3229
- return t[1];
3230
- },
3231
- trys: [],
3232
- ops: []
3233
- };
3234
- return g = {
3235
- next: verb(0),
3236
- "throw": verb(1),
3237
- "return": verb(2)
3238
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
3239
- return this;
3240
- }), g;
3241
- function verb(n) {
3242
- return function(v) {
3243
- return step([
3244
- n,
3245
- v
3246
- ]);
3247
- };
3248
- }
3249
- function step(op) {
3250
- if (f) throw new TypeError("Generator is already executing.");
3251
- while(_)try {
3252
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
3253
- if (y = 0, t) op = [
3254
- op[0] & 2,
3255
- t.value
3256
- ];
3257
- switch(op[0]){
3258
- case 0:
3259
- case 1:
3260
- t = op;
3261
- break;
3262
- case 4:
3263
- _.label++;
3264
- return {
3265
- value: op[1],
3266
- done: false
3267
- };
3268
- case 5:
3269
- _.label++;
3270
- y = op[1];
3271
- op = [
3272
- 0
3273
- ];
3274
- continue;
3275
- case 7:
3276
- op = _.ops.pop();
3277
- _.trys.pop();
3278
- continue;
3279
- default:
3280
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
3281
- _ = 0;
3282
- continue;
3283
- }
3284
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
3285
- _.label = op[1];
3286
- break;
3287
- }
3288
- if (op[0] === 6 && _.label < t[1]) {
3289
- _.label = t[1];
3290
- t = op;
3291
- break;
3292
- }
3293
- if (t && _.label < t[2]) {
3294
- _.label = t[2];
3295
- _.ops.push(op);
3296
- break;
3297
- }
3298
- if (t[2]) _.ops.pop();
3299
- _.trys.pop();
3300
- continue;
3301
- }
3302
- op = body.call(thisArg, _);
3303
- } catch (e) {
3304
- op = [
3305
- 6,
3306
- e
3307
- ];
3308
- y = 0;
3309
- } finally{
3310
- f = t = 0;
3311
- }
3312
- if (op[0] & 5) throw op[1];
3313
- return {
3314
- value: op[0] ? op[1] : void 0,
3315
- done: true
3316
- };
3317
- }
3318
- }
3319
- var ASSUME_ROLE_DEFAULT_REGION = "us-east-1";
3320
- var getAccountIdFromAssumedRoleUser = function(assumedRoleUser) {
3321
- if (typeof (assumedRoleUser === null || assumedRoleUser === void 0 ? void 0 : assumedRoleUser.Arn) === "string") {
3322
- var arnComponents = assumedRoleUser.Arn.split(":");
3323
- if (arnComponents.length > 4 && arnComponents[4] !== "") {
3324
- return arnComponents[4];
3325
- }
3326
- }
3327
- return undefined;
3328
- };
3329
- var resolveRegion = function() {
3330
- var _ref = _async_to_generator(function(_region, _parentRegion, credentialProviderLogger) {
3331
- var _credentialProviderLogger_debug, region, _tmp, parentRegion, _tmp1, _ref;
3332
- return _ts_generator(this, function(_state) {
3333
- switch(_state.label){
3334
- case 0:
3335
- if (!(typeof _region === "function")) return [
3336
- 3,
3337
- 2
3338
- ];
3339
- return [
3340
- 4,
3341
- _region()
3342
- ];
3343
- case 1:
3344
- _tmp = _state.sent();
3345
- return [
3346
- 3,
3347
- 3
3348
- ];
3349
- case 2:
3350
- _tmp = _region;
3351
- _state.label = 3;
3352
- case 3:
3353
- region = _tmp;
3354
- if (!(typeof _parentRegion === "function")) return [
3355
- 3,
3356
- 5
3357
- ];
3358
- return [
3359
- 4,
3360
- _parentRegion()
3361
- ];
3362
- case 4:
3363
- _tmp1 = _state.sent();
3364
- return [
3365
- 3,
3366
- 6
3367
- ];
3368
- case 5:
3369
- _tmp1 = _parentRegion;
3370
- _state.label = 6;
3371
- case 6:
3372
- parentRegion = _tmp1;
3373
- credentialProviderLogger === null || credentialProviderLogger === void 0 ? void 0 : (_credentialProviderLogger_debug = credentialProviderLogger.debug) === null || _credentialProviderLogger_debug === void 0 ? void 0 : _credentialProviderLogger_debug.call(credentialProviderLogger, "@aws-sdk/client-sts::resolveRegion", "accepting first of:", "".concat(region, " (provider)"), "".concat(parentRegion, " (parent client)"), "".concat(ASSUME_ROLE_DEFAULT_REGION, " (STS default)"));
3374
- return [
3375
- 2,
3376
- (_ref = region !== null && region !== void 0 ? region : parentRegion) !== null && _ref !== void 0 ? _ref : ASSUME_ROLE_DEFAULT_REGION
3377
- ];
3378
- }
3379
- });
3380
- });
3381
- return function resolveRegion(_region, _parentRegion, credentialProviderLogger) {
3382
- return _ref.apply(this, arguments);
3383
- };
3384
- }();
3385
- var getDefaultRoleAssumer$1 = function(stsOptions, STSClient) {
3386
- var stsClient;
3387
- var closureSourceCreds;
3388
- return function() {
3389
- var _ref = _async_to_generator(function(sourceCreds, params) {
3390
- var _stsOptions_parentClientConfig, _stsOptions_parentClientConfig1, _stsOptions_parentClientConfig2, _stsOptions_parentClientConfig3, _stsOptions_logger, logger, region, _stsOptions_requestHandler, requestHandler, credentialProviderLogger, resolvedRegion, isCompatibleRequestHandler, _ref, Credentials, AssumedRoleUser, accountId, credentials;
3391
- return _ts_generator(this, function(_state) {
3392
- switch(_state.label){
3393
- case 0:
3394
- closureSourceCreds = sourceCreds;
3395
- if (!!stsClient) return [
3396
- 3,
3397
- 2
3398
- ];
3399
- _stsOptions_logger = stsOptions.logger, logger = _stsOptions_logger === void 0 ? stsOptions === null || stsOptions === void 0 ? void 0 : (_stsOptions_parentClientConfig = stsOptions.parentClientConfig) === null || _stsOptions_parentClientConfig === void 0 ? void 0 : _stsOptions_parentClientConfig.logger : _stsOptions_logger, region = stsOptions.region, _stsOptions_requestHandler = stsOptions.requestHandler, requestHandler = _stsOptions_requestHandler === void 0 ? stsOptions === null || stsOptions === void 0 ? void 0 : (_stsOptions_parentClientConfig1 = stsOptions.parentClientConfig) === null || _stsOptions_parentClientConfig1 === void 0 ? void 0 : _stsOptions_parentClientConfig1.requestHandler : _stsOptions_requestHandler, credentialProviderLogger = stsOptions.credentialProviderLogger;
3400
- return [
3401
- 4,
3402
- resolveRegion(region, stsOptions === null || stsOptions === void 0 ? void 0 : (_stsOptions_parentClientConfig2 = stsOptions.parentClientConfig) === null || _stsOptions_parentClientConfig2 === void 0 ? void 0 : _stsOptions_parentClientConfig2.region, credentialProviderLogger)
3403
- ];
3404
- case 1:
3405
- resolvedRegion = _state.sent();
3406
- isCompatibleRequestHandler = !isH2(requestHandler);
3407
- stsClient = new STSClient({
3408
- profile: stsOptions === null || stsOptions === void 0 ? void 0 : (_stsOptions_parentClientConfig3 = stsOptions.parentClientConfig) === null || _stsOptions_parentClientConfig3 === void 0 ? void 0 : _stsOptions_parentClientConfig3.profile,
3409
- credentialDefaultProvider: function() {
3410
- return /*#__PURE__*/ _async_to_generator(function() {
3411
- return _ts_generator(this, function(_state) {
3412
- return [
3413
- 2,
3414
- closureSourceCreds
3415
- ];
3416
- });
3417
- });
3418
- },
3419
- region: resolvedRegion,
3420
- requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,
3421
- logger: logger
3422
- });
3423
- _state.label = 2;
3424
- case 2:
3425
- return [
3426
- 4,
3427
- stsClient.send(new AssumeRoleCommand(params))
3428
- ];
3429
- case 3:
3430
- _ref = _state.sent(), Credentials = _ref.Credentials, AssumedRoleUser = _ref.AssumedRoleUser;
3431
- if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
3432
- throw new Error("Invalid response from STS.assumeRole call with role ".concat(params.RoleArn));
3433
- }
3434
- accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
3435
- credentials = _object_spread$1({
3436
- accessKeyId: Credentials.AccessKeyId,
3437
- secretAccessKey: Credentials.SecretAccessKey,
3438
- sessionToken: Credentials.SessionToken,
3439
- expiration: Credentials.Expiration
3440
- }, Credentials.CredentialScope && {
3441
- credentialScope: Credentials.CredentialScope
3442
- }, accountId && {
3443
- accountId: accountId
3444
- });
3445
- setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
3446
- return [
3447
- 2,
3448
- credentials
3449
- ];
3450
- }
3451
- });
3452
- });
3453
- return function(sourceCreds, params) {
3454
- return _ref.apply(this, arguments);
3455
- };
3456
- }();
3457
- };
3458
- var getDefaultRoleAssumerWithWebIdentity$1 = function(stsOptions, STSClient) {
3459
- var stsClient;
3460
- return function() {
3461
- var _ref = _async_to_generator(function(params) {
3462
- var _stsOptions_parentClientConfig, _stsOptions_parentClientConfig1, _stsOptions_parentClientConfig2, _stsOptions_parentClientConfig3, _stsOptions_logger, logger, region, _stsOptions_requestHandler, requestHandler, credentialProviderLogger, resolvedRegion, isCompatibleRequestHandler, _ref, Credentials, AssumedRoleUser, accountId, credentials;
3463
- return _ts_generator(this, function(_state) {
3464
- switch(_state.label){
3465
- case 0:
3466
- if (!!stsClient) return [
3467
- 3,
3468
- 2
3469
- ];
3470
- _stsOptions_logger = stsOptions.logger, logger = _stsOptions_logger === void 0 ? stsOptions === null || stsOptions === void 0 ? void 0 : (_stsOptions_parentClientConfig = stsOptions.parentClientConfig) === null || _stsOptions_parentClientConfig === void 0 ? void 0 : _stsOptions_parentClientConfig.logger : _stsOptions_logger, region = stsOptions.region, _stsOptions_requestHandler = stsOptions.requestHandler, requestHandler = _stsOptions_requestHandler === void 0 ? stsOptions === null || stsOptions === void 0 ? void 0 : (_stsOptions_parentClientConfig1 = stsOptions.parentClientConfig) === null || _stsOptions_parentClientConfig1 === void 0 ? void 0 : _stsOptions_parentClientConfig1.requestHandler : _stsOptions_requestHandler, credentialProviderLogger = stsOptions.credentialProviderLogger;
3471
- return [
3472
- 4,
3473
- resolveRegion(region, stsOptions === null || stsOptions === void 0 ? void 0 : (_stsOptions_parentClientConfig2 = stsOptions.parentClientConfig) === null || _stsOptions_parentClientConfig2 === void 0 ? void 0 : _stsOptions_parentClientConfig2.region, credentialProviderLogger)
3474
- ];
3475
- case 1:
3476
- resolvedRegion = _state.sent();
3477
- isCompatibleRequestHandler = !isH2(requestHandler);
3478
- stsClient = new STSClient({
3479
- profile: stsOptions === null || stsOptions === void 0 ? void 0 : (_stsOptions_parentClientConfig3 = stsOptions.parentClientConfig) === null || _stsOptions_parentClientConfig3 === void 0 ? void 0 : _stsOptions_parentClientConfig3.profile,
3480
- region: resolvedRegion,
3481
- requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,
3482
- logger: logger
3483
- });
3484
- _state.label = 2;
3485
- case 2:
3486
- return [
3487
- 4,
3488
- stsClient.send(new AssumeRoleWithWebIdentityCommand(params))
3489
- ];
3490
- case 3:
3491
- _ref = _state.sent(), Credentials = _ref.Credentials, AssumedRoleUser = _ref.AssumedRoleUser;
3492
- if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
3493
- throw new Error("Invalid response from STS.assumeRoleWithWebIdentity call with role ".concat(params.RoleArn));
3494
- }
3495
- accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
3496
- credentials = _object_spread$1({
3497
- accessKeyId: Credentials.AccessKeyId,
3498
- secretAccessKey: Credentials.SecretAccessKey,
3499
- sessionToken: Credentials.SessionToken,
3500
- expiration: Credentials.Expiration
3501
- }, Credentials.CredentialScope && {
3502
- credentialScope: Credentials.CredentialScope
3503
- }, accountId && {
3504
- accountId: accountId
3505
- });
3506
- if (accountId) {
3507
- setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T");
3508
- }
3509
- setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
3510
- return [
3511
- 2,
3512
- credentials
3513
- ];
3514
- }
3515
- });
3516
- });
3517
- return function(params) {
3518
- return _ref.apply(this, arguments);
3519
- };
3520
- }();
3521
- };
3522
- var isH2 = function(requestHandler) {
3523
- var _requestHandler_metadata;
3524
- return (requestHandler === null || requestHandler === void 0 ? void 0 : (_requestHandler_metadata = requestHandler.metadata) === null || _requestHandler_metadata === void 0 ? void 0 : _requestHandler_metadata.handlerProtocol) === "h2";
3525
- };
3526
-
3527
- function _assert_this_initialized(self) {
3528
- if (self === void 0) {
3529
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
3530
- }
3531
- return self;
3532
- }
3533
- function _class_call_check(instance, Constructor) {
3534
- if (!(instance instanceof Constructor)) {
3535
- throw new TypeError("Cannot call a class as a function");
3536
- }
3537
- }
3538
- function _define_property(obj, key, value) {
3539
- if (key in obj) {
3540
- Object.defineProperty(obj, key, {
3541
- value: value,
3542
- enumerable: true,
3543
- configurable: true,
3544
- writable: true
3545
- });
3546
- } else {
3547
- obj[key] = value;
3548
- }
3549
- return obj;
3550
- }
3551
- function _get_prototype_of(o) {
3552
- _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
3553
- return o.__proto__ || Object.getPrototypeOf(o);
3554
- };
3555
- return _get_prototype_of(o);
3556
- }
3557
- function _inherits(subClass, superClass) {
3558
- if (typeof superClass !== "function" && superClass !== null) {
3559
- throw new TypeError("Super expression must either be null or a function");
3560
- }
3561
- subClass.prototype = Object.create(superClass && superClass.prototype, {
3562
- constructor: {
3563
- value: subClass,
3564
- writable: true,
3565
- configurable: true
3566
- }
3567
- });
3568
- if (superClass) _set_prototype_of(subClass, superClass);
3569
- }
3570
- function _object_spread(target) {
3571
- for(var i = 1; i < arguments.length; i++){
3572
- var source = arguments[i] != null ? arguments[i] : {};
3573
- var ownKeys = Object.keys(source);
3574
- if (typeof Object.getOwnPropertySymbols === "function") {
3575
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
3576
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
3577
- }));
3578
- }
3579
- ownKeys.forEach(function(key) {
3580
- _define_property(target, key, source[key]);
3581
- });
3582
- }
3583
- return target;
3584
- }
3585
- function _possible_constructor_return(self, call) {
3586
- if (call && (_type_of(call) === "object" || typeof call === "function")) {
3587
- return call;
3588
- }
3589
- return _assert_this_initialized(self);
3590
- }
3591
- function _set_prototype_of(o, p) {
3592
- _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3593
- o.__proto__ = p;
3594
- return o;
3595
- };
3596
- return _set_prototype_of(o, p);
3597
- }
3598
- function _type_of(obj) {
3599
- "@swc/helpers - typeof";
3600
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
3601
- }
3602
- function _is_native_reflect_construct() {
3603
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
3604
- if (Reflect.construct.sham) return false;
3605
- if (typeof Proxy === "function") return true;
3606
- try {
3607
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
3608
- return true;
3609
- } catch (e) {
3610
- return false;
3611
- }
3612
- }
3613
- function _create_super(Derived) {
3614
- var hasNativeReflectConstruct = _is_native_reflect_construct();
3615
- return function _createSuperInternal() {
3616
- var Super = _get_prototype_of(Derived), result;
3617
- if (hasNativeReflectConstruct) {
3618
- var NewTarget = _get_prototype_of(this).constructor;
3619
- result = Reflect.construct(Super, arguments, NewTarget);
3620
- } else {
3621
- result = Super.apply(this, arguments);
3622
- }
3623
- return _possible_constructor_return(this, result);
3624
- };
3625
- }
3626
- var getCustomizableStsClientCtor = function(baseCtor, customizations) {
3627
- if (!customizations) return baseCtor;
3628
- else return /*#__PURE__*/ function(baseCtor) {
3629
- _inherits(CustomizableSTSClient, baseCtor);
3630
- var _super = _create_super(CustomizableSTSClient);
3631
- function CustomizableSTSClient(config) {
3632
- _class_call_check(this, CustomizableSTSClient);
3633
- var _this;
3634
- _this = _super.call(this, config);
3635
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
3636
- try {
3637
- for(var _iterator = customizations[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
3638
- var customization = _step.value;
3639
- _this.middlewareStack.use(customization);
3640
- }
3641
- } catch (err) {
3642
- _didIteratorError = true;
3643
- _iteratorError = err;
3644
- } finally{
3645
- try {
3646
- if (!_iteratorNormalCompletion && _iterator.return != null) {
3647
- _iterator.return();
3648
- }
3649
- } finally{
3650
- if (_didIteratorError) {
3651
- throw _iteratorError;
3652
- }
3653
- }
3654
- }
3655
- return _this;
3656
- }
3657
- return CustomizableSTSClient;
3658
- }(baseCtor);
3659
- };
3660
- var getDefaultRoleAssumer = function() {
3661
- var stsOptions = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, stsPlugins = arguments.length > 1 ? arguments[1] : void 0;
3662
- return getDefaultRoleAssumer$1(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
3663
- };
3664
- var getDefaultRoleAssumerWithWebIdentity = function() {
3665
- var stsOptions = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, stsPlugins = arguments.length > 1 ? arguments[1] : void 0;
3666
- return getDefaultRoleAssumerWithWebIdentity$1(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
3667
- };
3668
- var decorateDefaultCredentialProvider = function(provider) {
3669
- return function(input) {
3670
- return provider(_object_spread({
3671
- roleAssumer: getDefaultRoleAssumer(input),
3672
- roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(input)
3673
- }, input));
3674
- };
3675
- };
3676
-
3677
- export { Command as $Command, AssumeRoleCommand, AssumeRoleResponseFilterSensitiveLog, AssumeRoleWithWebIdentityCommand, AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog, CredentialsFilterSensitiveLog, ExpiredTokenException, IDPCommunicationErrorException, IDPRejectedClaimException, InvalidIdentityTokenException, MalformedPolicyDocumentException, PackedPolicyTooLargeException, RegionDisabledException, STS, STSClient, STSServiceException, Client as __Client, decorateDefaultCredentialProvider, getDefaultRoleAssumer, getDefaultRoleAssumerWithWebIdentity };