@aws-sdk/client-lambda 3.45.0 → 3.47.2

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,36 +1,192 @@
1
1
  import { __assign, __awaiter, __generator } from "tslib";
2
2
  import { getRegionInfo } from "@aws-sdk/config-resolver";
3
3
  var regionHash = {
4
- "us-east-1": {
4
+ "af-south-1": {
5
5
  variants: [
6
6
  {
7
- hostname: "lambda.us-east-1.amazonaws.com",
8
- tags: [],
7
+ hostname: "lambda.af-south-1.api.aws",
8
+ tags: ["dualstack"],
9
+ },
10
+ ],
11
+ },
12
+ "ap-east-1": {
13
+ variants: [
14
+ {
15
+ hostname: "lambda.ap-east-1.api.aws",
16
+ tags: ["dualstack"],
17
+ },
18
+ ],
19
+ },
20
+ "ap-northeast-1": {
21
+ variants: [
22
+ {
23
+ hostname: "lambda.ap-northeast-1.api.aws",
24
+ tags: ["dualstack"],
25
+ },
26
+ ],
27
+ },
28
+ "ap-northeast-2": {
29
+ variants: [
30
+ {
31
+ hostname: "lambda.ap-northeast-2.api.aws",
32
+ tags: ["dualstack"],
33
+ },
34
+ ],
35
+ },
36
+ "ap-northeast-3": {
37
+ variants: [
38
+ {
39
+ hostname: "lambda.ap-northeast-3.api.aws",
40
+ tags: ["dualstack"],
41
+ },
42
+ ],
43
+ },
44
+ "ap-south-1": {
45
+ variants: [
46
+ {
47
+ hostname: "lambda.ap-south-1.api.aws",
48
+ tags: ["dualstack"],
49
+ },
50
+ ],
51
+ },
52
+ "ap-southeast-1": {
53
+ variants: [
54
+ {
55
+ hostname: "lambda.ap-southeast-1.api.aws",
56
+ tags: ["dualstack"],
57
+ },
58
+ ],
59
+ },
60
+ "ap-southeast-2": {
61
+ variants: [
62
+ {
63
+ hostname: "lambda.ap-southeast-2.api.aws",
64
+ tags: ["dualstack"],
65
+ },
66
+ ],
67
+ },
68
+ "ap-southeast-3": {
69
+ variants: [
70
+ {
71
+ hostname: "lambda.ap-southeast-3.api.aws",
72
+ tags: ["dualstack"],
73
+ },
74
+ ],
75
+ },
76
+ "ca-central-1": {
77
+ variants: [
78
+ {
79
+ hostname: "lambda.ca-central-1.api.aws",
80
+ tags: ["dualstack"],
81
+ },
82
+ ],
83
+ },
84
+ "cn-north-1": {
85
+ variants: [
86
+ {
87
+ hostname: "lambda.cn-north-1.api.amazonwebservices.com.cn",
88
+ tags: ["dualstack"],
89
+ },
90
+ ],
91
+ },
92
+ "cn-northwest-1": {
93
+ variants: [
94
+ {
95
+ hostname: "lambda.cn-northwest-1.api.amazonwebservices.com.cn",
96
+ tags: ["dualstack"],
97
+ },
98
+ ],
99
+ },
100
+ "eu-central-1": {
101
+ variants: [
102
+ {
103
+ hostname: "lambda.eu-central-1.api.aws",
104
+ tags: ["dualstack"],
105
+ },
106
+ ],
107
+ },
108
+ "eu-north-1": {
109
+ variants: [
110
+ {
111
+ hostname: "lambda.eu-north-1.api.aws",
112
+ tags: ["dualstack"],
113
+ },
114
+ ],
115
+ },
116
+ "eu-south-1": {
117
+ variants: [
118
+ {
119
+ hostname: "lambda.eu-south-1.api.aws",
120
+ tags: ["dualstack"],
121
+ },
122
+ ],
123
+ },
124
+ "eu-west-1": {
125
+ variants: [
126
+ {
127
+ hostname: "lambda.eu-west-1.api.aws",
128
+ tags: ["dualstack"],
129
+ },
130
+ ],
131
+ },
132
+ "eu-west-2": {
133
+ variants: [
134
+ {
135
+ hostname: "lambda.eu-west-2.api.aws",
136
+ tags: ["dualstack"],
137
+ },
138
+ ],
139
+ },
140
+ "eu-west-3": {
141
+ variants: [
142
+ {
143
+ hostname: "lambda.eu-west-3.api.aws",
144
+ tags: ["dualstack"],
145
+ },
146
+ ],
147
+ },
148
+ "me-south-1": {
149
+ variants: [
150
+ {
151
+ hostname: "lambda.me-south-1.api.aws",
152
+ tags: ["dualstack"],
9
153
  },
154
+ ],
155
+ },
156
+ "sa-east-1": {
157
+ variants: [
158
+ {
159
+ hostname: "lambda.sa-east-1.api.aws",
160
+ tags: ["dualstack"],
161
+ },
162
+ ],
163
+ },
164
+ "us-east-1": {
165
+ variants: [
10
166
  {
11
167
  hostname: "lambda-fips.us-east-1.amazonaws.com",
12
168
  tags: ["fips"],
13
169
  },
170
+ {
171
+ hostname: "lambda.us-east-1.api.aws",
172
+ tags: ["dualstack"],
173
+ },
14
174
  ],
15
175
  },
16
176
  "us-east-2": {
17
177
  variants: [
18
- {
19
- hostname: "lambda.us-east-2.amazonaws.com",
20
- tags: [],
21
- },
22
178
  {
23
179
  hostname: "lambda-fips.us-east-2.amazonaws.com",
24
180
  tags: ["fips"],
25
181
  },
182
+ {
183
+ hostname: "lambda.us-east-2.api.aws",
184
+ tags: ["dualstack"],
185
+ },
26
186
  ],
27
187
  },
28
188
  "us-gov-east-1": {
29
189
  variants: [
30
- {
31
- hostname: "lambda.us-gov-east-1.amazonaws.com",
32
- tags: [],
33
- },
34
190
  {
35
191
  hostname: "lambda-fips.us-gov-east-1.amazonaws.com",
36
192
  tags: ["fips"],
@@ -39,10 +195,6 @@ var regionHash = {
39
195
  },
40
196
  "us-gov-west-1": {
41
197
  variants: [
42
- {
43
- hostname: "lambda.us-gov-west-1.amazonaws.com",
44
- tags: [],
45
- },
46
198
  {
47
199
  hostname: "lambda-fips.us-gov-west-1.amazonaws.com",
48
200
  tags: ["fips"],
@@ -51,26 +203,26 @@ var regionHash = {
51
203
  },
52
204
  "us-west-1": {
53
205
  variants: [
54
- {
55
- hostname: "lambda.us-west-1.amazonaws.com",
56
- tags: [],
57
- },
58
206
  {
59
207
  hostname: "lambda-fips.us-west-1.amazonaws.com",
60
208
  tags: ["fips"],
61
209
  },
210
+ {
211
+ hostname: "lambda.us-west-1.api.aws",
212
+ tags: ["dualstack"],
213
+ },
62
214
  ],
63
215
  },
64
216
  "us-west-2": {
65
217
  variants: [
66
- {
67
- hostname: "lambda.us-west-2.amazonaws.com",
68
- tags: [],
69
- },
70
218
  {
71
219
  hostname: "lambda-fips.us-west-2.amazonaws.com",
72
220
  tags: ["fips"],
73
221
  },
222
+ {
223
+ hostname: "lambda.us-west-2.api.aws",
224
+ tags: ["dualstack"],
225
+ },
74
226
  ],
75
227
  },
76
228
  };
@@ -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,21 +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 { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
15
+ import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
16
+ import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
16
17
  export var getRuntimeConfig = function (config) {
17
18
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18
- emitWarningIfUnsupportedVersion(process.version);
19
+ var defaultsMode = resolveDefaultsModeConfig(config);
20
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
19
21
  var clientSharedValues = getSharedRuntimeConfig(config);
20
- 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 });
21
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
  /**