@aws-sdk/client-kms 3.36.1 → 3.40.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.
@@ -17,7 +17,7 @@ const util_utf8_node_1 = require("@aws-sdk/util-utf8-node");
17
17
  const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
18
18
  const smithy_client_1 = require("@aws-sdk/smithy-client");
19
19
  const getRuntimeConfig = (config) => {
20
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
20
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
21
21
  smithy_client_1.emitWarningIfUnsupportedVersion(process.version);
22
22
  const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
23
23
  return {
@@ -35,8 +35,10 @@ const getRuntimeConfig = (config) => {
35
35
  retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig(middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS),
36
36
  sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"),
37
37
  streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector,
38
- utf8Decoder: (_m = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _m !== void 0 ? _m : util_utf8_node_1.fromUtf8,
39
- utf8Encoder: (_o = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _o !== void 0 ? _o : util_utf8_node_1.toUtf8,
38
+ useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
39
+ useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
40
+ utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : util_utf8_node_1.fromUtf8,
41
+ utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : util_utf8_node_1.toUtf8,
40
42
  };
41
43
  };
42
44
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,48 @@
1
+ export * from "./CancelKeyDeletionCommand";
2
+ export * from "./ConnectCustomKeyStoreCommand";
3
+ export * from "./CreateAliasCommand";
4
+ export * from "./CreateCustomKeyStoreCommand";
5
+ export * from "./CreateGrantCommand";
6
+ export * from "./CreateKeyCommand";
7
+ export * from "./DecryptCommand";
8
+ export * from "./DeleteAliasCommand";
9
+ export * from "./DeleteCustomKeyStoreCommand";
10
+ export * from "./DeleteImportedKeyMaterialCommand";
11
+ export * from "./DescribeCustomKeyStoresCommand";
12
+ export * from "./DescribeKeyCommand";
13
+ export * from "./DisableKeyCommand";
14
+ export * from "./DisableKeyRotationCommand";
15
+ export * from "./DisconnectCustomKeyStoreCommand";
16
+ export * from "./EnableKeyCommand";
17
+ export * from "./EnableKeyRotationCommand";
18
+ export * from "./EncryptCommand";
19
+ export * from "./GenerateDataKeyCommand";
20
+ export * from "./GenerateDataKeyPairCommand";
21
+ export * from "./GenerateDataKeyPairWithoutPlaintextCommand";
22
+ export * from "./GenerateDataKeyWithoutPlaintextCommand";
23
+ export * from "./GenerateRandomCommand";
24
+ export * from "./GetKeyPolicyCommand";
25
+ export * from "./GetKeyRotationStatusCommand";
26
+ export * from "./GetParametersForImportCommand";
27
+ export * from "./GetPublicKeyCommand";
28
+ export * from "./ImportKeyMaterialCommand";
29
+ export * from "./ListAliasesCommand";
30
+ export * from "./ListGrantsCommand";
31
+ export * from "./ListKeyPoliciesCommand";
32
+ export * from "./ListKeysCommand";
33
+ export * from "./ListResourceTagsCommand";
34
+ export * from "./ListRetirableGrantsCommand";
35
+ export * from "./PutKeyPolicyCommand";
36
+ export * from "./ReEncryptCommand";
37
+ export * from "./ReplicateKeyCommand";
38
+ export * from "./RetireGrantCommand";
39
+ export * from "./RevokeGrantCommand";
40
+ export * from "./ScheduleKeyDeletionCommand";
41
+ export * from "./SignCommand";
42
+ export * from "./TagResourceCommand";
43
+ export * from "./UntagResourceCommand";
44
+ export * from "./UpdateAliasCommand";
45
+ export * from "./UpdateCustomKeyStoreCommand";
46
+ export * from "./UpdateKeyDescriptionCommand";
47
+ export * from "./UpdatePrimaryRegionCommand";
48
+ export * from "./VerifyCommand";
@@ -1,53 +1,448 @@
1
1
  import { __assign, __awaiter, __generator } from "tslib";
2
2
  import { getRegionInfo } from "@aws-sdk/config-resolver";
3
3
  var regionHash = {
4
- ProdFips: {
5
- hostname: "kms-fips.us-gov-west-1.amazonaws.com",
6
- signingRegion: "us-gov-west-1",
4
+ "af-south-1": {
5
+ variants: [
6
+ {
7
+ hostname: "kms.af-south-1.amazonaws.com",
8
+ tags: [],
9
+ },
10
+ {
11
+ hostname: "kms-fips.af-south-1.amazonaws.com",
12
+ tags: ["fips"],
13
+ },
14
+ ],
15
+ },
16
+ "ap-east-1": {
17
+ variants: [
18
+ {
19
+ hostname: "kms.ap-east-1.amazonaws.com",
20
+ tags: [],
21
+ },
22
+ {
23
+ hostname: "kms-fips.ap-east-1.amazonaws.com",
24
+ tags: ["fips"],
25
+ },
26
+ ],
27
+ },
28
+ "ap-northeast-1": {
29
+ variants: [
30
+ {
31
+ hostname: "kms.ap-northeast-1.amazonaws.com",
32
+ tags: [],
33
+ },
34
+ {
35
+ hostname: "kms-fips.ap-northeast-1.amazonaws.com",
36
+ tags: ["fips"],
37
+ },
38
+ ],
39
+ },
40
+ "ap-northeast-2": {
41
+ variants: [
42
+ {
43
+ hostname: "kms.ap-northeast-2.amazonaws.com",
44
+ tags: [],
45
+ },
46
+ {
47
+ hostname: "kms-fips.ap-northeast-2.amazonaws.com",
48
+ tags: ["fips"],
49
+ },
50
+ ],
51
+ },
52
+ "ap-northeast-3": {
53
+ variants: [
54
+ {
55
+ hostname: "kms.ap-northeast-3.amazonaws.com",
56
+ tags: [],
57
+ },
58
+ {
59
+ hostname: "kms-fips.ap-northeast-3.amazonaws.com",
60
+ tags: ["fips"],
61
+ },
62
+ ],
63
+ },
64
+ "ap-south-1": {
65
+ variants: [
66
+ {
67
+ hostname: "kms.ap-south-1.amazonaws.com",
68
+ tags: [],
69
+ },
70
+ {
71
+ hostname: "kms-fips.ap-south-1.amazonaws.com",
72
+ tags: ["fips"],
73
+ },
74
+ ],
75
+ },
76
+ "ap-southeast-1": {
77
+ variants: [
78
+ {
79
+ hostname: "kms.ap-southeast-1.amazonaws.com",
80
+ tags: [],
81
+ },
82
+ {
83
+ hostname: "kms-fips.ap-southeast-1.amazonaws.com",
84
+ tags: ["fips"],
85
+ },
86
+ ],
87
+ },
88
+ "ap-southeast-2": {
89
+ variants: [
90
+ {
91
+ hostname: "kms.ap-southeast-2.amazonaws.com",
92
+ tags: [],
93
+ },
94
+ {
95
+ hostname: "kms-fips.ap-southeast-2.amazonaws.com",
96
+ tags: ["fips"],
97
+ },
98
+ ],
99
+ },
100
+ "ca-central-1": {
101
+ variants: [
102
+ {
103
+ hostname: "kms.ca-central-1.amazonaws.com",
104
+ tags: [],
105
+ },
106
+ {
107
+ hostname: "kms-fips.ca-central-1.amazonaws.com",
108
+ tags: ["fips"],
109
+ },
110
+ ],
111
+ },
112
+ "eu-central-1": {
113
+ variants: [
114
+ {
115
+ hostname: "kms.eu-central-1.amazonaws.com",
116
+ tags: [],
117
+ },
118
+ {
119
+ hostname: "kms-fips.eu-central-1.amazonaws.com",
120
+ tags: ["fips"],
121
+ },
122
+ ],
123
+ },
124
+ "eu-north-1": {
125
+ variants: [
126
+ {
127
+ hostname: "kms.eu-north-1.amazonaws.com",
128
+ tags: [],
129
+ },
130
+ {
131
+ hostname: "kms-fips.eu-north-1.amazonaws.com",
132
+ tags: ["fips"],
133
+ },
134
+ ],
135
+ },
136
+ "eu-south-1": {
137
+ variants: [
138
+ {
139
+ hostname: "kms.eu-south-1.amazonaws.com",
140
+ tags: [],
141
+ },
142
+ {
143
+ hostname: "kms-fips.eu-south-1.amazonaws.com",
144
+ tags: ["fips"],
145
+ },
146
+ ],
147
+ },
148
+ "eu-west-1": {
149
+ variants: [
150
+ {
151
+ hostname: "kms.eu-west-1.amazonaws.com",
152
+ tags: [],
153
+ },
154
+ {
155
+ hostname: "kms-fips.eu-west-1.amazonaws.com",
156
+ tags: ["fips"],
157
+ },
158
+ ],
159
+ },
160
+ "eu-west-2": {
161
+ variants: [
162
+ {
163
+ hostname: "kms.eu-west-2.amazonaws.com",
164
+ tags: [],
165
+ },
166
+ {
167
+ hostname: "kms-fips.eu-west-2.amazonaws.com",
168
+ tags: ["fips"],
169
+ },
170
+ ],
171
+ },
172
+ "eu-west-3": {
173
+ variants: [
174
+ {
175
+ hostname: "kms.eu-west-3.amazonaws.com",
176
+ tags: [],
177
+ },
178
+ {
179
+ hostname: "kms-fips.eu-west-3.amazonaws.com",
180
+ tags: ["fips"],
181
+ },
182
+ ],
183
+ },
184
+ "me-south-1": {
185
+ variants: [
186
+ {
187
+ hostname: "kms.me-south-1.amazonaws.com",
188
+ tags: [],
189
+ },
190
+ {
191
+ hostname: "kms-fips.me-south-1.amazonaws.com",
192
+ tags: ["fips"],
193
+ },
194
+ ],
195
+ },
196
+ "sa-east-1": {
197
+ variants: [
198
+ {
199
+ hostname: "kms.sa-east-1.amazonaws.com",
200
+ tags: [],
201
+ },
202
+ {
203
+ hostname: "kms-fips.sa-east-1.amazonaws.com",
204
+ tags: ["fips"],
205
+ },
206
+ ],
207
+ },
208
+ "us-east-1": {
209
+ variants: [
210
+ {
211
+ hostname: "kms.us-east-1.amazonaws.com",
212
+ tags: [],
213
+ },
214
+ {
215
+ hostname: "kms-fips.us-east-1.amazonaws.com",
216
+ tags: ["fips"],
217
+ },
218
+ ],
219
+ },
220
+ "us-east-2": {
221
+ variants: [
222
+ {
223
+ hostname: "kms.us-east-2.amazonaws.com",
224
+ tags: [],
225
+ },
226
+ {
227
+ hostname: "kms-fips.us-east-2.amazonaws.com",
228
+ tags: ["fips"],
229
+ },
230
+ ],
231
+ },
232
+ "us-gov-east-1": {
233
+ variants: [
234
+ {
235
+ hostname: "kms.us-gov-east-1.amazonaws.com",
236
+ tags: [],
237
+ },
238
+ {
239
+ hostname: "kms-fips.us-gov-east-1.amazonaws.com",
240
+ tags: ["fips"],
241
+ },
242
+ ],
243
+ },
244
+ "us-gov-west-1": {
245
+ variants: [
246
+ {
247
+ hostname: "kms.us-gov-west-1.amazonaws.com",
248
+ tags: [],
249
+ },
250
+ {
251
+ hostname: "kms-fips.us-gov-west-1.amazonaws.com",
252
+ tags: ["fips"],
253
+ },
254
+ ],
255
+ },
256
+ "us-iso-east-1": {
257
+ variants: [
258
+ {
259
+ hostname: "kms.us-iso-east-1.c2s.ic.gov",
260
+ tags: [],
261
+ },
262
+ {
263
+ hostname: "kms-fips.us-iso-east-1.c2s.ic.gov",
264
+ tags: ["fips"],
265
+ },
266
+ ],
267
+ },
268
+ "us-iso-west-1": {
269
+ variants: [
270
+ {
271
+ hostname: "kms.us-iso-west-1.c2s.ic.gov",
272
+ tags: [],
273
+ },
274
+ {
275
+ hostname: "kms-fips.us-iso-west-1.c2s.ic.gov",
276
+ tags: ["fips"],
277
+ },
278
+ ],
279
+ },
280
+ "us-isob-east-1": {
281
+ variants: [
282
+ {
283
+ hostname: "kms.us-isob-east-1.sc2s.sgov.gov",
284
+ tags: [],
285
+ },
286
+ {
287
+ hostname: "kms-fips.us-isob-east-1.sc2s.sgov.gov",
288
+ tags: ["fips"],
289
+ },
290
+ ],
291
+ },
292
+ "us-west-1": {
293
+ variants: [
294
+ {
295
+ hostname: "kms.us-west-1.amazonaws.com",
296
+ tags: [],
297
+ },
298
+ {
299
+ hostname: "kms-fips.us-west-1.amazonaws.com",
300
+ tags: ["fips"],
301
+ },
302
+ ],
303
+ },
304
+ "us-west-2": {
305
+ variants: [
306
+ {
307
+ hostname: "kms.us-west-2.amazonaws.com",
308
+ tags: [],
309
+ },
310
+ {
311
+ hostname: "kms-fips.us-west-2.amazonaws.com",
312
+ tags: ["fips"],
313
+ },
314
+ ],
7
315
  },
8
316
  };
9
317
  var partitionHash = {
10
318
  aws: {
11
319
  regions: [
12
320
  "af-south-1",
321
+ "af-south-1-fips",
13
322
  "ap-east-1",
323
+ "ap-east-1-fips",
14
324
  "ap-northeast-1",
325
+ "ap-northeast-1-fips",
15
326
  "ap-northeast-2",
327
+ "ap-northeast-2-fips",
16
328
  "ap-northeast-3",
329
+ "ap-northeast-3-fips",
17
330
  "ap-south-1",
331
+ "ap-south-1-fips",
18
332
  "ap-southeast-1",
333
+ "ap-southeast-1-fips",
19
334
  "ap-southeast-2",
335
+ "ap-southeast-2-fips",
20
336
  "ca-central-1",
337
+ "ca-central-1-fips",
21
338
  "eu-central-1",
339
+ "eu-central-1-fips",
22
340
  "eu-north-1",
341
+ "eu-north-1-fips",
23
342
  "eu-south-1",
343
+ "eu-south-1-fips",
24
344
  "eu-west-1",
345
+ "eu-west-1-fips",
25
346
  "eu-west-2",
347
+ "eu-west-2-fips",
26
348
  "eu-west-3",
349
+ "eu-west-3-fips",
27
350
  "me-south-1",
351
+ "me-south-1-fips",
28
352
  "sa-east-1",
353
+ "sa-east-1-fips",
29
354
  "us-east-1",
355
+ "us-east-1-fips",
30
356
  "us-east-2",
357
+ "us-east-2-fips",
31
358
  "us-west-1",
359
+ "us-west-1-fips",
32
360
  "us-west-2",
361
+ "us-west-2-fips",
362
+ ],
363
+ regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
364
+ variants: [
365
+ {
366
+ hostname: "kms.{region}.amazonaws.com",
367
+ tags: [],
368
+ },
369
+ {
370
+ hostname: "kms-fips.{region}.amazonaws.com",
371
+ tags: ["fips"],
372
+ },
373
+ {
374
+ hostname: "kms-fips.{region}.api.aws",
375
+ tags: ["dualstack", "fips"],
376
+ },
377
+ {
378
+ hostname: "kms.{region}.api.aws",
379
+ tags: ["dualstack"],
380
+ },
33
381
  ],
34
- hostname: "kms.{region}.amazonaws.com",
35
382
  },
36
383
  "aws-cn": {
37
384
  regions: ["cn-north-1", "cn-northwest-1"],
38
- hostname: "kms.{region}.amazonaws.com.cn",
385
+ regionRegex: "^cn\\-\\w+\\-\\d+$",
386
+ variants: [
387
+ {
388
+ hostname: "kms.{region}.amazonaws.com.cn",
389
+ tags: [],
390
+ },
391
+ {
392
+ hostname: "kms-fips.{region}.amazonaws.com.cn",
393
+ tags: ["fips"],
394
+ },
395
+ {
396
+ hostname: "kms-fips.{region}.api.amazonwebservices.com.cn",
397
+ tags: ["dualstack", "fips"],
398
+ },
399
+ {
400
+ hostname: "kms.{region}.api.amazonwebservices.com.cn",
401
+ tags: ["dualstack"],
402
+ },
403
+ ],
39
404
  },
40
405
  "aws-iso": {
41
- regions: ["ProdFips", "us-iso-east-1"],
42
- hostname: "kms.{region}.c2s.ic.gov",
406
+ regions: ["ProdFips", "us-iso-east-1", "us-iso-east-1-fips", "us-iso-west-1", "us-iso-west-1-fips"],
407
+ regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
408
+ variants: [
409
+ {
410
+ hostname: "kms.{region}.c2s.ic.gov",
411
+ tags: [],
412
+ },
413
+ ],
43
414
  },
44
415
  "aws-iso-b": {
45
- regions: ["ProdFips", "us-isob-east-1"],
46
- hostname: "kms.{region}.sc2s.sgov.gov",
416
+ regions: ["ProdFips", "us-isob-east-1", "us-isob-east-1-fips"],
417
+ regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
418
+ variants: [
419
+ {
420
+ hostname: "kms.{region}.sc2s.sgov.gov",
421
+ tags: [],
422
+ },
423
+ ],
47
424
  },
48
425
  "aws-us-gov": {
49
- regions: ["ProdFips", "us-gov-east-1", "us-gov-west-1"],
50
- hostname: "kms.{region}.amazonaws.com",
426
+ regions: ["ProdFips", "us-gov-east-1", "us-gov-east-1-fips", "us-gov-west-1", "us-gov-west-1-fips"],
427
+ regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
428
+ variants: [
429
+ {
430
+ hostname: "kms.{region}.amazonaws.com",
431
+ tags: [],
432
+ },
433
+ {
434
+ hostname: "kms-fips.{region}.amazonaws.com",
435
+ tags: ["fips"],
436
+ },
437
+ {
438
+ hostname: "kms-fips.{region}.api.aws",
439
+ tags: ["dualstack", "fips"],
440
+ },
441
+ {
442
+ hostname: "kms.{region}.api.aws",
443
+ tags: ["dualstack"],
444
+ },
445
+ ],
51
446
  },
52
447
  };
53
448
  export var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
package/dist-es/index.js CHANGED
@@ -1,56 +1,5 @@
1
- export * from "./KMSClient";
2
1
  export * from "./KMS";
3
- export * from "./commands/CancelKeyDeletionCommand";
4
- export * from "./commands/ConnectCustomKeyStoreCommand";
5
- export * from "./commands/CreateAliasCommand";
6
- export * from "./commands/CreateCustomKeyStoreCommand";
7
- export * from "./commands/CreateGrantCommand";
8
- export * from "./commands/CreateKeyCommand";
9
- export * from "./commands/DecryptCommand";
10
- export * from "./commands/DeleteAliasCommand";
11
- export * from "./commands/DeleteCustomKeyStoreCommand";
12
- export * from "./commands/DeleteImportedKeyMaterialCommand";
13
- export * from "./commands/DescribeCustomKeyStoresCommand";
14
- export * from "./commands/DescribeKeyCommand";
15
- export * from "./commands/DisableKeyCommand";
16
- export * from "./commands/DisableKeyRotationCommand";
17
- export * from "./commands/DisconnectCustomKeyStoreCommand";
18
- export * from "./commands/EnableKeyCommand";
19
- export * from "./commands/EnableKeyRotationCommand";
20
- export * from "./commands/EncryptCommand";
21
- export * from "./commands/GenerateDataKeyCommand";
22
- export * from "./commands/GenerateDataKeyPairCommand";
23
- export * from "./commands/GenerateDataKeyPairWithoutPlaintextCommand";
24
- export * from "./commands/GenerateDataKeyWithoutPlaintextCommand";
25
- export * from "./commands/GenerateRandomCommand";
26
- export * from "./commands/GetKeyPolicyCommand";
27
- export * from "./commands/GetKeyRotationStatusCommand";
28
- export * from "./commands/GetParametersForImportCommand";
29
- export * from "./commands/GetPublicKeyCommand";
30
- export * from "./commands/ImportKeyMaterialCommand";
31
- export * from "./commands/ListAliasesCommand";
32
- export * from "./pagination/ListAliasesPaginator";
33
- export * from "./commands/ListGrantsCommand";
34
- export * from "./pagination/ListGrantsPaginator";
35
- export * from "./commands/ListKeyPoliciesCommand";
36
- export * from "./pagination/ListKeyPoliciesPaginator";
37
- export * from "./commands/ListKeysCommand";
38
- export * from "./pagination/ListKeysPaginator";
39
- export * from "./commands/ListResourceTagsCommand";
40
- export * from "./commands/ListRetirableGrantsCommand";
41
- export * from "./commands/PutKeyPolicyCommand";
42
- export * from "./commands/ReEncryptCommand";
43
- export * from "./commands/ReplicateKeyCommand";
44
- export * from "./commands/RetireGrantCommand";
45
- export * from "./commands/RevokeGrantCommand";
46
- export * from "./commands/ScheduleKeyDeletionCommand";
47
- export * from "./commands/SignCommand";
48
- export * from "./commands/TagResourceCommand";
49
- export * from "./commands/UntagResourceCommand";
50
- export * from "./commands/UpdateAliasCommand";
51
- export * from "./commands/UpdateCustomKeyStoreCommand";
52
- export * from "./commands/UpdateKeyDescriptionCommand";
53
- export * from "./commands/UpdatePrimaryRegionCommand";
54
- export * from "./commands/VerifyCommand";
55
- export * from "./pagination/Interfaces";
56
- export * from "./models/index";
2
+ export * from "./KMSClient";
3
+ export * from "./commands";
4
+ export * from "./models";
5
+ export * from "./pagination";
@@ -0,0 +1,5 @@
1
+ export * from "./Interfaces";
2
+ export * from "./ListAliasesPaginator";
3
+ export * from "./ListGrantsPaginator";
4
+ export * from "./ListKeyPoliciesPaginator";
5
+ export * from "./ListKeysPaginator";
@@ -1,6 +1,7 @@
1
1
  import { __assign } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { Sha256 } from "@aws-crypto/sha256-browser";
4
+ import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
4
5
  import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
5
6
  import { invalidProvider } from "@aws-sdk/invalid-dependency";
6
7
  import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
@@ -10,7 +11,7 @@ import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
10
11
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
11
12
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
12
13
  export var getRuntimeConfig = function (config) {
13
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
14
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
14
15
  var clientSharedValues = getSharedRuntimeConfig(config);
15
- 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, utf8Decoder: (_m = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _m !== void 0 ? _m : fromUtf8, utf8Encoder: (_o = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _o !== void 0 ? _o : toUtf8 });
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 });
16
17
  };
@@ -1,7 +1,7 @@
1
1
  import { __assign } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
4
- import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver";
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
7
  import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
@@ -14,8 +14,8 @@ import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
14
14
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
15
15
  import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
16
16
  export var getRuntimeConfig = function (config) {
17
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
17
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18
18
  emitWarningIfUnsupportedVersion(process.version);
19
19
  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, utf8Decoder: (_m = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _m !== void 0 ? _m : fromUtf8, utf8Encoder: (_o = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _o !== void 0 ? _o : toUtf8 });
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 });
21
21
  };
@@ -124,6 +124,14 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
124
124
  * Optional logger for logging debug/info/warn/error.
125
125
  */
126
126
  logger?: __Logger;
127
+ /**
128
+ * Enables IPv6/IPv4 dualstack endpoint.
129
+ */
130
+ useDualstackEndpoint?: boolean | __Provider<boolean>;
131
+ /**
132
+ * Enables FIPS compatible endpoints.
133
+ */
134
+ useFipsEndpoint?: boolean | __Provider<boolean>;
127
135
  /**
128
136
  * Unique service identifier.
129
137
  * @internal