@aws-sdk/client-lambda 3.46.0 → 3.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,10 +3,6 @@ import { getRegionInfo } from "@aws-sdk/config-resolver";
3
3
  var regionHash = {
4
4
  "af-south-1": {
5
5
  variants: [
6
- {
7
- hostname: "lambda.af-south-1.amazonaws.com",
8
- tags: [],
9
- },
10
6
  {
11
7
  hostname: "lambda.af-south-1.api.aws",
12
8
  tags: ["dualstack"],
@@ -15,10 +11,6 @@ var regionHash = {
15
11
  },
16
12
  "ap-east-1": {
17
13
  variants: [
18
- {
19
- hostname: "lambda.ap-east-1.amazonaws.com",
20
- tags: [],
21
- },
22
14
  {
23
15
  hostname: "lambda.ap-east-1.api.aws",
24
16
  tags: ["dualstack"],
@@ -27,10 +19,6 @@ var regionHash = {
27
19
  },
28
20
  "ap-northeast-1": {
29
21
  variants: [
30
- {
31
- hostname: "lambda.ap-northeast-1.amazonaws.com",
32
- tags: [],
33
- },
34
22
  {
35
23
  hostname: "lambda.ap-northeast-1.api.aws",
36
24
  tags: ["dualstack"],
@@ -39,10 +27,6 @@ var regionHash = {
39
27
  },
40
28
  "ap-northeast-2": {
41
29
  variants: [
42
- {
43
- hostname: "lambda.ap-northeast-2.amazonaws.com",
44
- tags: [],
45
- },
46
30
  {
47
31
  hostname: "lambda.ap-northeast-2.api.aws",
48
32
  tags: ["dualstack"],
@@ -51,10 +35,6 @@ var regionHash = {
51
35
  },
52
36
  "ap-northeast-3": {
53
37
  variants: [
54
- {
55
- hostname: "lambda.ap-northeast-3.amazonaws.com",
56
- tags: [],
57
- },
58
38
  {
59
39
  hostname: "lambda.ap-northeast-3.api.aws",
60
40
  tags: ["dualstack"],
@@ -63,10 +43,6 @@ var regionHash = {
63
43
  },
64
44
  "ap-south-1": {
65
45
  variants: [
66
- {
67
- hostname: "lambda.ap-south-1.amazonaws.com",
68
- tags: [],
69
- },
70
46
  {
71
47
  hostname: "lambda.ap-south-1.api.aws",
72
48
  tags: ["dualstack"],
@@ -75,10 +51,6 @@ var regionHash = {
75
51
  },
76
52
  "ap-southeast-1": {
77
53
  variants: [
78
- {
79
- hostname: "lambda.ap-southeast-1.amazonaws.com",
80
- tags: [],
81
- },
82
54
  {
83
55
  hostname: "lambda.ap-southeast-1.api.aws",
84
56
  tags: ["dualstack"],
@@ -87,10 +59,6 @@ var regionHash = {
87
59
  },
88
60
  "ap-southeast-2": {
89
61
  variants: [
90
- {
91
- hostname: "lambda.ap-southeast-2.amazonaws.com",
92
- tags: [],
93
- },
94
62
  {
95
63
  hostname: "lambda.ap-southeast-2.api.aws",
96
64
  tags: ["dualstack"],
@@ -99,10 +67,6 @@ var regionHash = {
99
67
  },
100
68
  "ap-southeast-3": {
101
69
  variants: [
102
- {
103
- hostname: "lambda.ap-southeast-3.amazonaws.com",
104
- tags: [],
105
- },
106
70
  {
107
71
  hostname: "lambda.ap-southeast-3.api.aws",
108
72
  tags: ["dualstack"],
@@ -111,10 +75,6 @@ var regionHash = {
111
75
  },
112
76
  "ca-central-1": {
113
77
  variants: [
114
- {
115
- hostname: "lambda.ca-central-1.amazonaws.com",
116
- tags: [],
117
- },
118
78
  {
119
79
  hostname: "lambda.ca-central-1.api.aws",
120
80
  tags: ["dualstack"],
@@ -123,10 +83,6 @@ var regionHash = {
123
83
  },
124
84
  "cn-north-1": {
125
85
  variants: [
126
- {
127
- hostname: "lambda.cn-north-1.amazonaws.com.cn",
128
- tags: [],
129
- },
130
86
  {
131
87
  hostname: "lambda.cn-north-1.api.amazonwebservices.com.cn",
132
88
  tags: ["dualstack"],
@@ -135,10 +91,6 @@ var regionHash = {
135
91
  },
136
92
  "cn-northwest-1": {
137
93
  variants: [
138
- {
139
- hostname: "lambda.cn-northwest-1.amazonaws.com.cn",
140
- tags: [],
141
- },
142
94
  {
143
95
  hostname: "lambda.cn-northwest-1.api.amazonwebservices.com.cn",
144
96
  tags: ["dualstack"],
@@ -147,10 +99,6 @@ var regionHash = {
147
99
  },
148
100
  "eu-central-1": {
149
101
  variants: [
150
- {
151
- hostname: "lambda.eu-central-1.amazonaws.com",
152
- tags: [],
153
- },
154
102
  {
155
103
  hostname: "lambda.eu-central-1.api.aws",
156
104
  tags: ["dualstack"],
@@ -159,10 +107,6 @@ var regionHash = {
159
107
  },
160
108
  "eu-north-1": {
161
109
  variants: [
162
- {
163
- hostname: "lambda.eu-north-1.amazonaws.com",
164
- tags: [],
165
- },
166
110
  {
167
111
  hostname: "lambda.eu-north-1.api.aws",
168
112
  tags: ["dualstack"],
@@ -171,10 +115,6 @@ var regionHash = {
171
115
  },
172
116
  "eu-south-1": {
173
117
  variants: [
174
- {
175
- hostname: "lambda.eu-south-1.amazonaws.com",
176
- tags: [],
177
- },
178
118
  {
179
119
  hostname: "lambda.eu-south-1.api.aws",
180
120
  tags: ["dualstack"],
@@ -183,10 +123,6 @@ var regionHash = {
183
123
  },
184
124
  "eu-west-1": {
185
125
  variants: [
186
- {
187
- hostname: "lambda.eu-west-1.amazonaws.com",
188
- tags: [],
189
- },
190
126
  {
191
127
  hostname: "lambda.eu-west-1.api.aws",
192
128
  tags: ["dualstack"],
@@ -195,10 +131,6 @@ var regionHash = {
195
131
  },
196
132
  "eu-west-2": {
197
133
  variants: [
198
- {
199
- hostname: "lambda.eu-west-2.amazonaws.com",
200
- tags: [],
201
- },
202
134
  {
203
135
  hostname: "lambda.eu-west-2.api.aws",
204
136
  tags: ["dualstack"],
@@ -207,10 +139,6 @@ var regionHash = {
207
139
  },
208
140
  "eu-west-3": {
209
141
  variants: [
210
- {
211
- hostname: "lambda.eu-west-3.amazonaws.com",
212
- tags: [],
213
- },
214
142
  {
215
143
  hostname: "lambda.eu-west-3.api.aws",
216
144
  tags: ["dualstack"],
@@ -219,10 +147,6 @@ var regionHash = {
219
147
  },
220
148
  "me-south-1": {
221
149
  variants: [
222
- {
223
- hostname: "lambda.me-south-1.amazonaws.com",
224
- tags: [],
225
- },
226
150
  {
227
151
  hostname: "lambda.me-south-1.api.aws",
228
152
  tags: ["dualstack"],
@@ -231,10 +155,6 @@ var regionHash = {
231
155
  },
232
156
  "sa-east-1": {
233
157
  variants: [
234
- {
235
- hostname: "lambda.sa-east-1.amazonaws.com",
236
- tags: [],
237
- },
238
158
  {
239
159
  hostname: "lambda.sa-east-1.api.aws",
240
160
  tags: ["dualstack"],
@@ -243,10 +163,6 @@ var regionHash = {
243
163
  },
244
164
  "us-east-1": {
245
165
  variants: [
246
- {
247
- hostname: "lambda.us-east-1.amazonaws.com",
248
- tags: [],
249
- },
250
166
  {
251
167
  hostname: "lambda-fips.us-east-1.amazonaws.com",
252
168
  tags: ["fips"],
@@ -259,10 +175,6 @@ var regionHash = {
259
175
  },
260
176
  "us-east-2": {
261
177
  variants: [
262
- {
263
- hostname: "lambda.us-east-2.amazonaws.com",
264
- tags: [],
265
- },
266
178
  {
267
179
  hostname: "lambda-fips.us-east-2.amazonaws.com",
268
180
  tags: ["fips"],
@@ -275,10 +187,6 @@ var regionHash = {
275
187
  },
276
188
  "us-gov-east-1": {
277
189
  variants: [
278
- {
279
- hostname: "lambda.us-gov-east-1.amazonaws.com",
280
- tags: [],
281
- },
282
190
  {
283
191
  hostname: "lambda-fips.us-gov-east-1.amazonaws.com",
284
192
  tags: ["fips"],
@@ -287,10 +195,6 @@ var regionHash = {
287
195
  },
288
196
  "us-gov-west-1": {
289
197
  variants: [
290
- {
291
- hostname: "lambda.us-gov-west-1.amazonaws.com",
292
- tags: [],
293
- },
294
198
  {
295
199
  hostname: "lambda-fips.us-gov-west-1.amazonaws.com",
296
200
  tags: ["fips"],
@@ -299,10 +203,6 @@ var regionHash = {
299
203
  },
300
204
  "us-west-1": {
301
205
  variants: [
302
- {
303
- hostname: "lambda.us-west-1.amazonaws.com",
304
- tags: [],
305
- },
306
206
  {
307
207
  hostname: "lambda-fips.us-west-1.amazonaws.com",
308
208
  tags: ["fips"],
@@ -315,10 +215,6 @@ var regionHash = {
315
215
  },
316
216
  "us-west-2": {
317
217
  variants: [
318
- {
319
- hostname: "lambda.us-west-2.amazonaws.com",
320
- tags: [],
321
- },
322
218
  {
323
219
  hostname: "lambda-fips.us-west-2.amazonaws.com",
324
220
  tags: ["fips"],
@@ -16,30 +16,6 @@ export var AddLayerVersionPermissionResponse;
16
16
  (function (AddLayerVersionPermissionResponse) {
17
17
  AddLayerVersionPermissionResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
18
18
  })(AddLayerVersionPermissionResponse || (AddLayerVersionPermissionResponse = {}));
19
- export var InvalidParameterValueException;
20
- (function (InvalidParameterValueException) {
21
- InvalidParameterValueException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
22
- })(InvalidParameterValueException || (InvalidParameterValueException = {}));
23
- export var PolicyLengthExceededException;
24
- (function (PolicyLengthExceededException) {
25
- PolicyLengthExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
26
- })(PolicyLengthExceededException || (PolicyLengthExceededException = {}));
27
- export var PreconditionFailedException;
28
- (function (PreconditionFailedException) {
29
- PreconditionFailedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
30
- })(PreconditionFailedException || (PreconditionFailedException = {}));
31
- export var ResourceConflictException;
32
- (function (ResourceConflictException) {
33
- ResourceConflictException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
34
- })(ResourceConflictException || (ResourceConflictException = {}));
35
- export var ResourceNotFoundException;
36
- (function (ResourceNotFoundException) {
37
- ResourceNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
38
- })(ResourceNotFoundException || (ResourceNotFoundException = {}));
39
- export var ServiceException;
40
- (function (ServiceException) {
41
- ServiceException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
42
- })(ServiceException || (ServiceException = {}));
43
19
  export var ThrottleReason;
44
20
  (function (ThrottleReason) {
45
21
  ThrottleReason["CallerRateLimitExceeded"] = "CallerRateLimitExceeded";
@@ -48,10 +24,6 @@ export var ThrottleReason;
48
24
  ThrottleReason["ReservedFunctionConcurrentInvocationLimitExceeded"] = "ReservedFunctionConcurrentInvocationLimitExceeded";
49
25
  ThrottleReason["ReservedFunctionInvocationRateLimitExceeded"] = "ReservedFunctionInvocationRateLimitExceeded";
50
26
  })(ThrottleReason || (ThrottleReason = {}));
51
- export var TooManyRequestsException;
52
- (function (TooManyRequestsException) {
53
- TooManyRequestsException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
54
- })(TooManyRequestsException || (TooManyRequestsException = {}));
55
27
  export var AddPermissionRequest;
56
28
  (function (AddPermissionRequest) {
57
29
  AddPermissionRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -163,18 +135,6 @@ export var EventSourceMappingConfiguration;
163
135
  (function (EventSourceMappingConfiguration) {
164
136
  EventSourceMappingConfiguration.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
165
137
  })(EventSourceMappingConfiguration || (EventSourceMappingConfiguration = {}));
166
- export var CodeSigningConfigNotFoundException;
167
- (function (CodeSigningConfigNotFoundException) {
168
- CodeSigningConfigNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
169
- })(CodeSigningConfigNotFoundException || (CodeSigningConfigNotFoundException = {}));
170
- export var CodeStorageExceededException;
171
- (function (CodeStorageExceededException) {
172
- CodeStorageExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
173
- })(CodeStorageExceededException || (CodeStorageExceededException = {}));
174
- export var CodeVerificationFailedException;
175
- (function (CodeVerificationFailedException) {
176
- CodeVerificationFailedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
177
- })(CodeVerificationFailedException || (CodeVerificationFailedException = {}));
178
138
  export var FunctionCode;
179
139
  (function (FunctionCode) {
180
140
  FunctionCode.filterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.ZipFile && { ZipFile: SENSITIVE_STRING }))); };
@@ -321,10 +281,6 @@ export var FunctionConfiguration;
321
281
  ImageConfigResponse: ImageConfigResponse.filterSensitiveLog(obj.ImageConfigResponse),
322
282
  }))); };
323
283
  })(FunctionConfiguration || (FunctionConfiguration = {}));
324
- export var InvalidCodeSignatureException;
325
- (function (InvalidCodeSignatureException) {
326
- InvalidCodeSignatureException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
327
- })(InvalidCodeSignatureException || (InvalidCodeSignatureException = {}));
328
284
  export var DeleteAliasRequest;
329
285
  (function (DeleteAliasRequest) {
330
286
  DeleteAliasRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -341,10 +297,6 @@ export var DeleteEventSourceMappingRequest;
341
297
  (function (DeleteEventSourceMappingRequest) {
342
298
  DeleteEventSourceMappingRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
343
299
  })(DeleteEventSourceMappingRequest || (DeleteEventSourceMappingRequest = {}));
344
- export var ResourceInUseException;
345
- (function (ResourceInUseException) {
346
- ResourceInUseException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
347
- })(ResourceInUseException || (ResourceInUseException = {}));
348
300
  export var DeleteFunctionRequest;
349
301
  (function (DeleteFunctionRequest) {
350
302
  DeleteFunctionRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -483,62 +435,6 @@ export var GetProvisionedConcurrencyConfigResponse;
483
435
  (function (GetProvisionedConcurrencyConfigResponse) {
484
436
  GetProvisionedConcurrencyConfigResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
485
437
  })(GetProvisionedConcurrencyConfigResponse || (GetProvisionedConcurrencyConfigResponse = {}));
486
- export var ProvisionedConcurrencyConfigNotFoundException;
487
- (function (ProvisionedConcurrencyConfigNotFoundException) {
488
- ProvisionedConcurrencyConfigNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
489
- })(ProvisionedConcurrencyConfigNotFoundException || (ProvisionedConcurrencyConfigNotFoundException = {}));
490
- export var EC2AccessDeniedException;
491
- (function (EC2AccessDeniedException) {
492
- EC2AccessDeniedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
493
- })(EC2AccessDeniedException || (EC2AccessDeniedException = {}));
494
- export var EC2ThrottledException;
495
- (function (EC2ThrottledException) {
496
- EC2ThrottledException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
497
- })(EC2ThrottledException || (EC2ThrottledException = {}));
498
- export var EC2UnexpectedException;
499
- (function (EC2UnexpectedException) {
500
- EC2UnexpectedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
501
- })(EC2UnexpectedException || (EC2UnexpectedException = {}));
502
- export var EFSIOException;
503
- (function (EFSIOException) {
504
- EFSIOException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
505
- })(EFSIOException || (EFSIOException = {}));
506
- export var EFSMountConnectivityException;
507
- (function (EFSMountConnectivityException) {
508
- EFSMountConnectivityException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
509
- })(EFSMountConnectivityException || (EFSMountConnectivityException = {}));
510
- export var EFSMountFailureException;
511
- (function (EFSMountFailureException) {
512
- EFSMountFailureException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
513
- })(EFSMountFailureException || (EFSMountFailureException = {}));
514
- export var EFSMountTimeoutException;
515
- (function (EFSMountTimeoutException) {
516
- EFSMountTimeoutException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
517
- })(EFSMountTimeoutException || (EFSMountTimeoutException = {}));
518
- export var ENILimitReachedException;
519
- (function (ENILimitReachedException) {
520
- ENILimitReachedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
521
- })(ENILimitReachedException || (ENILimitReachedException = {}));
522
- export var InvalidRequestContentException;
523
- (function (InvalidRequestContentException) {
524
- InvalidRequestContentException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
525
- })(InvalidRequestContentException || (InvalidRequestContentException = {}));
526
- export var InvalidRuntimeException;
527
- (function (InvalidRuntimeException) {
528
- InvalidRuntimeException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
529
- })(InvalidRuntimeException || (InvalidRuntimeException = {}));
530
- export var InvalidSecurityGroupIDException;
531
- (function (InvalidSecurityGroupIDException) {
532
- InvalidSecurityGroupIDException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
533
- })(InvalidSecurityGroupIDException || (InvalidSecurityGroupIDException = {}));
534
- export var InvalidSubnetIDException;
535
- (function (InvalidSubnetIDException) {
536
- InvalidSubnetIDException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
537
- })(InvalidSubnetIDException || (InvalidSubnetIDException = {}));
538
- export var InvalidZipFileException;
539
- (function (InvalidZipFileException) {
540
- InvalidZipFileException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
541
- })(InvalidZipFileException || (InvalidZipFileException = {}));
542
438
  export var InvocationType;
543
439
  (function (InvocationType) {
544
440
  InvocationType["DryRun"] = "DryRun";
@@ -558,38 +454,6 @@ export var InvocationResponse;
558
454
  (function (InvocationResponse) {
559
455
  InvocationResponse.filterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.Payload && { Payload: SENSITIVE_STRING }))); };
560
456
  })(InvocationResponse || (InvocationResponse = {}));
561
- export var KMSAccessDeniedException;
562
- (function (KMSAccessDeniedException) {
563
- KMSAccessDeniedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
564
- })(KMSAccessDeniedException || (KMSAccessDeniedException = {}));
565
- export var KMSDisabledException;
566
- (function (KMSDisabledException) {
567
- KMSDisabledException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
568
- })(KMSDisabledException || (KMSDisabledException = {}));
569
- export var KMSInvalidStateException;
570
- (function (KMSInvalidStateException) {
571
- KMSInvalidStateException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
572
- })(KMSInvalidStateException || (KMSInvalidStateException = {}));
573
- export var KMSNotFoundException;
574
- (function (KMSNotFoundException) {
575
- KMSNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
576
- })(KMSNotFoundException || (KMSNotFoundException = {}));
577
- export var RequestTooLargeException;
578
- (function (RequestTooLargeException) {
579
- RequestTooLargeException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
580
- })(RequestTooLargeException || (RequestTooLargeException = {}));
581
- export var ResourceNotReadyException;
582
- (function (ResourceNotReadyException) {
583
- ResourceNotReadyException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
584
- })(ResourceNotReadyException || (ResourceNotReadyException = {}));
585
- export var SubnetIPAddressLimitReachedException;
586
- (function (SubnetIPAddressLimitReachedException) {
587
- SubnetIPAddressLimitReachedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
588
- })(SubnetIPAddressLimitReachedException || (SubnetIPAddressLimitReachedException = {}));
589
- export var UnsupportedMediaTypeException;
590
- (function (UnsupportedMediaTypeException) {
591
- UnsupportedMediaTypeException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
592
- })(UnsupportedMediaTypeException || (UnsupportedMediaTypeException = {}));
593
457
  export var InvokeAsyncRequest;
594
458
  (function (InvokeAsyncRequest) {
595
459
  InvokeAsyncRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -1,8 +1,8 @@
1
- import { __assign } from "tslib";
1
+ import { __assign, __awaiter, __generator } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { Sha256 } from "@aws-crypto/sha256-browser";
4
4
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
5
- import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
5
+ import { FetchHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
6
6
  import { invalidProvider } from "@aws-sdk/invalid-dependency";
7
7
  import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
8
8
  import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
@@ -10,8 +10,17 @@ import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
10
10
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
11
11
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
12
12
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
13
+ import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
14
+ import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
13
15
  export var getRuntimeConfig = function (config) {
14
16
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
17
+ var defaultsMode = resolveDefaultsModeConfig(config);
18
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
15
19
  var clientSharedValues = getSharedRuntimeConfig(config);
16
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new FetchHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return Promise.resolve(DEFAULT_RETRY_MODE); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
20
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
21
+ switch (_a.label) {
22
+ case 0: return [4, defaultConfigProvider()];
23
+ case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
24
+ }
25
+ }); }); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
17
26
  };
@@ -1,19 +1,28 @@
1
- import { __assign } from "tslib";
1
+ import { __assign, __awaiter, __generator } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
4
4
  import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
5
5
  import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
6
6
  import { Hash } from "@aws-sdk/hash-node";
7
- import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
7
+ import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@aws-sdk/middleware-retry";
8
8
  import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
9
- import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
9
+ import { NodeHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/node-http-handler";
10
10
  import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
11
11
  import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
12
12
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
13
13
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
14
14
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
15
+ import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
16
+ import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
15
17
  export var getRuntimeConfig = function (config) {
16
18
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
19
+ var defaultsMode = resolveDefaultsModeConfig(config);
20
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
17
21
  var clientSharedValues = getSharedRuntimeConfig(config);
18
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new NodeHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
22
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(__assign(__assign({}, NODE_RETRY_MODE_CONFIG_OPTIONS), { default: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
23
+ switch (_a.label) {
24
+ case 0: return [4, defaultConfigProvider()];
25
+ case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
26
+ }
27
+ }); }); } })), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
19
28
  };
@@ -4,7 +4,7 @@ import { RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry
4
4
  import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-signing";
5
5
  import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
6
6
  import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
7
- import { Client as __Client, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
7
+ import { Client as __Client, DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
8
8
  import { Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
9
9
  import { AddLayerVersionPermissionCommandInput, AddLayerVersionPermissionCommandOutput } from "./commands/AddLayerVersionPermissionCommand";
10
10
  import { AddPermissionCommandInput, AddPermissionCommandOutput } from "./commands/AddPermissionCommand";
@@ -166,6 +166,10 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
166
166
  * @internal
167
167
  */
168
168
  defaultUserAgentProvider?: Provider<__UserAgent>;
169
+ /**
170
+ * The {@link DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
171
+ */
172
+ defaultsMode?: DefaultsMode | Provider<DefaultsMode>;
169
173
  }
170
174
  declare type LambdaClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointsInputConfig & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig;
171
175
  /**