@aws-sdk/client-kms 3.38.0 → 3.42.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.
Files changed (64) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist-cjs/endpoints.js +415 -11
  3. package/dist-cjs/runtimeConfig.browser.js +6 -3
  4. package/dist-cjs/runtimeConfig.js +5 -3
  5. package/dist-es/endpoints.js +415 -11
  6. package/dist-es/runtimeConfig.browser.js +3 -2
  7. package/dist-es/runtimeConfig.js +3 -3
  8. package/dist-types/KMSClient.d.ts +8 -0
  9. package/dist-types/commands/CancelKeyDeletionCommand.d.ts +1 -1
  10. package/dist-types/commands/ConnectCustomKeyStoreCommand.d.ts +1 -1
  11. package/dist-types/commands/CreateAliasCommand.d.ts +1 -1
  12. package/dist-types/commands/CreateCustomKeyStoreCommand.d.ts +1 -1
  13. package/dist-types/commands/CreateGrantCommand.d.ts +1 -1
  14. package/dist-types/commands/CreateKeyCommand.d.ts +1 -1
  15. package/dist-types/commands/DecryptCommand.d.ts +1 -1
  16. package/dist-types/commands/DeleteAliasCommand.d.ts +1 -1
  17. package/dist-types/commands/DeleteCustomKeyStoreCommand.d.ts +1 -1
  18. package/dist-types/commands/DeleteImportedKeyMaterialCommand.d.ts +1 -1
  19. package/dist-types/commands/DescribeCustomKeyStoresCommand.d.ts +1 -1
  20. package/dist-types/commands/DescribeKeyCommand.d.ts +1 -1
  21. package/dist-types/commands/DisableKeyCommand.d.ts +1 -1
  22. package/dist-types/commands/DisableKeyRotationCommand.d.ts +1 -1
  23. package/dist-types/commands/DisconnectCustomKeyStoreCommand.d.ts +1 -1
  24. package/dist-types/commands/EnableKeyCommand.d.ts +1 -1
  25. package/dist-types/commands/EnableKeyRotationCommand.d.ts +1 -1
  26. package/dist-types/commands/EncryptCommand.d.ts +1 -1
  27. package/dist-types/commands/GenerateDataKeyCommand.d.ts +1 -1
  28. package/dist-types/commands/GenerateDataKeyPairCommand.d.ts +1 -1
  29. package/dist-types/commands/GenerateDataKeyPairWithoutPlaintextCommand.d.ts +1 -1
  30. package/dist-types/commands/GenerateDataKeyWithoutPlaintextCommand.d.ts +1 -1
  31. package/dist-types/commands/GenerateRandomCommand.d.ts +1 -1
  32. package/dist-types/commands/GetKeyPolicyCommand.d.ts +1 -1
  33. package/dist-types/commands/GetKeyRotationStatusCommand.d.ts +1 -1
  34. package/dist-types/commands/GetParametersForImportCommand.d.ts +1 -1
  35. package/dist-types/commands/GetPublicKeyCommand.d.ts +1 -1
  36. package/dist-types/commands/ImportKeyMaterialCommand.d.ts +1 -1
  37. package/dist-types/commands/ListAliasesCommand.d.ts +1 -1
  38. package/dist-types/commands/ListGrantsCommand.d.ts +1 -1
  39. package/dist-types/commands/ListKeyPoliciesCommand.d.ts +1 -1
  40. package/dist-types/commands/ListKeysCommand.d.ts +1 -1
  41. package/dist-types/commands/ListResourceTagsCommand.d.ts +1 -1
  42. package/dist-types/commands/ListRetirableGrantsCommand.d.ts +1 -1
  43. package/dist-types/commands/PutKeyPolicyCommand.d.ts +1 -1
  44. package/dist-types/commands/ReEncryptCommand.d.ts +1 -1
  45. package/dist-types/commands/ReplicateKeyCommand.d.ts +1 -1
  46. package/dist-types/commands/RetireGrantCommand.d.ts +1 -1
  47. package/dist-types/commands/RevokeGrantCommand.d.ts +1 -1
  48. package/dist-types/commands/ScheduleKeyDeletionCommand.d.ts +1 -1
  49. package/dist-types/commands/SignCommand.d.ts +1 -1
  50. package/dist-types/commands/TagResourceCommand.d.ts +1 -1
  51. package/dist-types/commands/UntagResourceCommand.d.ts +1 -1
  52. package/dist-types/commands/UpdateAliasCommand.d.ts +1 -1
  53. package/dist-types/commands/UpdateCustomKeyStoreCommand.d.ts +1 -1
  54. package/dist-types/commands/UpdateKeyDescriptionCommand.d.ts +1 -1
  55. package/dist-types/commands/UpdatePrimaryRegionCommand.d.ts +1 -1
  56. package/dist-types/commands/VerifyCommand.d.ts +1 -1
  57. package/dist-types/runtimeConfig.browser.d.ts +2 -0
  58. package/dist-types/runtimeConfig.d.ts +2 -0
  59. package/dist-types/runtimeConfig.native.d.ts +2 -0
  60. package/dist-types/ts3.4/KMSClient.d.ts +4 -0
  61. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
  62. package/dist-types/ts3.4/runtimeConfig.d.ts +2 -0
  63. package/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
  64. package/package.json +25 -25
@@ -1,53 +1,457 @@
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",
336
+ "ap-southeast-3-fips",
20
337
  "ca-central-1",
338
+ "ca-central-1-fips",
21
339
  "eu-central-1",
340
+ "eu-central-1-fips",
22
341
  "eu-north-1",
342
+ "eu-north-1-fips",
23
343
  "eu-south-1",
344
+ "eu-south-1-fips",
24
345
  "eu-west-1",
346
+ "eu-west-1-fips",
25
347
  "eu-west-2",
348
+ "eu-west-2-fips",
26
349
  "eu-west-3",
350
+ "eu-west-3-fips",
27
351
  "me-south-1",
352
+ "me-south-1-fips",
28
353
  "sa-east-1",
354
+ "sa-east-1-fips",
29
355
  "us-east-1",
356
+ "us-east-1-fips",
30
357
  "us-east-2",
358
+ "us-east-2-fips",
31
359
  "us-west-1",
360
+ "us-west-1-fips",
32
361
  "us-west-2",
362
+ "us-west-2-fips",
363
+ ],
364
+ regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
365
+ variants: [
366
+ {
367
+ hostname: "kms.{region}.amazonaws.com",
368
+ tags: [],
369
+ },
370
+ {
371
+ hostname: "kms-fips.{region}.amazonaws.com",
372
+ tags: ["fips"],
373
+ },
374
+ {
375
+ hostname: "kms-fips.{region}.api.aws",
376
+ tags: ["dualstack", "fips"],
377
+ },
378
+ {
379
+ hostname: "kms.{region}.api.aws",
380
+ tags: ["dualstack"],
381
+ },
33
382
  ],
34
- hostname: "kms.{region}.amazonaws.com",
35
383
  },
36
384
  "aws-cn": {
37
385
  regions: ["cn-north-1", "cn-northwest-1"],
38
- hostname: "kms.{region}.amazonaws.com.cn",
386
+ regionRegex: "^cn\\-\\w+\\-\\d+$",
387
+ variants: [
388
+ {
389
+ hostname: "kms.{region}.amazonaws.com.cn",
390
+ tags: [],
391
+ },
392
+ {
393
+ hostname: "kms-fips.{region}.amazonaws.com.cn",
394
+ tags: ["fips"],
395
+ },
396
+ {
397
+ hostname: "kms-fips.{region}.api.amazonwebservices.com.cn",
398
+ tags: ["dualstack", "fips"],
399
+ },
400
+ {
401
+ hostname: "kms.{region}.api.amazonwebservices.com.cn",
402
+ tags: ["dualstack"],
403
+ },
404
+ ],
39
405
  },
40
406
  "aws-iso": {
41
- regions: ["ProdFips", "us-iso-east-1", "us-iso-west-1"],
42
- hostname: "kms.{region}.c2s.ic.gov",
407
+ regions: ["ProdFips", "us-iso-east-1", "us-iso-east-1-fips", "us-iso-west-1", "us-iso-west-1-fips"],
408
+ regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
409
+ variants: [
410
+ {
411
+ hostname: "kms.{region}.c2s.ic.gov",
412
+ tags: [],
413
+ },
414
+ {
415
+ hostname: "kms-fips.{region}.c2s.ic.gov",
416
+ tags: ["fips"],
417
+ },
418
+ ],
43
419
  },
44
420
  "aws-iso-b": {
45
- regions: ["ProdFips", "us-isob-east-1"],
46
- hostname: "kms.{region}.sc2s.sgov.gov",
421
+ regions: ["ProdFips", "us-isob-east-1", "us-isob-east-1-fips"],
422
+ regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
423
+ variants: [
424
+ {
425
+ hostname: "kms.{region}.sc2s.sgov.gov",
426
+ tags: [],
427
+ },
428
+ {
429
+ hostname: "kms-fips.{region}.sc2s.sgov.gov",
430
+ tags: ["fips"],
431
+ },
432
+ ],
47
433
  },
48
434
  "aws-us-gov": {
49
- regions: ["ProdFips", "us-gov-east-1", "us-gov-west-1"],
50
- hostname: "kms.{region}.amazonaws.com",
435
+ regions: ["ProdFips", "us-gov-east-1", "us-gov-east-1-fips", "us-gov-west-1", "us-gov-west-1-fips"],
436
+ regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
437
+ variants: [
438
+ {
439
+ hostname: "kms.{region}.amazonaws.com",
440
+ tags: [],
441
+ },
442
+ {
443
+ hostname: "kms-fips.{region}.amazonaws.com",
444
+ tags: ["fips"],
445
+ },
446
+ {
447
+ hostname: "kms-fips.{region}.api.aws",
448
+ tags: ["dualstack", "fips"],
449
+ },
450
+ {
451
+ hostname: "kms.{region}.api.aws",
452
+ tags: ["dualstack"],
453
+ },
454
+ ],
51
455
  },
52
456
  };
53
457
  export var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
@@ -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
@@ -33,7 +33,7 @@ export interface CancelKeyDeletionCommandOutput extends CancelKeyDeletionRespons
33
33
  *
34
34
  * @see {@link CancelKeyDeletionCommandInput} for command's `input` shape.
35
35
  * @see {@link CancelKeyDeletionCommandOutput} for command's `response` shape.
36
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
36
+ * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
37
37
  *
38
38
  */
39
39
  export declare class CancelKeyDeletionCommand extends $Command<CancelKeyDeletionCommandInput, CancelKeyDeletionCommandOutput, KMSClientResolvedConfig> {
@@ -81,7 +81,7 @@ export interface ConnectCustomKeyStoreCommandOutput extends ConnectCustomKeyStor
81
81
  *
82
82
  * @see {@link ConnectCustomKeyStoreCommandInput} for command's `input` shape.
83
83
  * @see {@link ConnectCustomKeyStoreCommandOutput} for command's `response` shape.
84
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
84
+ * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
85
85
  *
86
86
  */
87
87
  export declare class ConnectCustomKeyStoreCommand extends $Command<ConnectCustomKeyStoreCommandInput, ConnectCustomKeyStoreCommandOutput, KMSClientResolvedConfig> {
@@ -77,7 +77,7 @@ export interface CreateAliasCommandOutput extends __MetadataBearer {
77
77
  *
78
78
  * @see {@link CreateAliasCommandInput} for command's `input` shape.
79
79
  * @see {@link CreateAliasCommandOutput} for command's `response` shape.
80
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
80
+ * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
81
81
  *
82
82
  */
83
83
  export declare class CreateAliasCommand extends $Command<CreateAliasCommandInput, CreateAliasCommandOutput, KMSClientResolvedConfig> {
@@ -69,7 +69,7 @@ export interface CreateCustomKeyStoreCommandOutput extends CreateCustomKeyStoreR
69
69
  *
70
70
  * @see {@link CreateCustomKeyStoreCommandInput} for command's `input` shape.
71
71
  * @see {@link CreateCustomKeyStoreCommandOutput} for command's `response` shape.
72
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
72
+ * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
73
73
  *
74
74
  */
75
75
  export declare class CreateCustomKeyStoreCommand extends $Command<CreateCustomKeyStoreCommandInput, CreateCustomKeyStoreCommandOutput, KMSClientResolvedConfig> {
@@ -82,7 +82,7 @@ export interface CreateGrantCommandOutput extends CreateGrantResponse, __Metadat
82
82
  *
83
83
  * @see {@link CreateGrantCommandInput} for command's `input` shape.
84
84
  * @see {@link CreateGrantCommandOutput} for command's `response` shape.
85
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
85
+ * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
86
86
  *
87
87
  */
88
88
  export declare class CreateGrantCommand extends $Command<CreateGrantCommandInput, CreateGrantCommandOutput, KMSClientResolvedConfig> {
@@ -144,7 +144,7 @@ export interface CreateKeyCommandOutput extends CreateKeyResponse, __MetadataBea
144
144
  *
145
145
  * @see {@link CreateKeyCommandInput} for command's `input` shape.
146
146
  * @see {@link CreateKeyCommandOutput} for command's `response` shape.
147
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
147
+ * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
148
148
  *
149
149
  */
150
150
  export declare class CreateKeyCommand extends $Command<CreateKeyCommandInput, CreateKeyCommandOutput, KMSClientResolvedConfig> {
@@ -108,7 +108,7 @@ export interface DecryptCommandOutput extends DecryptResponse, __MetadataBearer
108
108
  *
109
109
  * @see {@link DecryptCommandInput} for command's `input` shape.
110
110
  * @see {@link DecryptCommandOutput} for command's `response` shape.
111
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
111
+ * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
112
112
  *
113
113
  */
114
114
  export declare class DecryptCommand extends $Command<DecryptCommandInput, DecryptCommandOutput, KMSClientResolvedConfig> {
@@ -67,7 +67,7 @@ export interface DeleteAliasCommandOutput extends __MetadataBearer {
67
67
  *
68
68
  * @see {@link DeleteAliasCommandInput} for command's `input` shape.
69
69
  * @see {@link DeleteAliasCommandOutput} for command's `response` shape.
70
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
70
+ * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
71
71
  *
72
72
  */
73
73
  export declare class DeleteAliasCommand extends $Command<DeleteAliasCommandInput, DeleteAliasCommandOutput, KMSClientResolvedConfig> {
@@ -74,7 +74,7 @@ export interface DeleteCustomKeyStoreCommandOutput extends DeleteCustomKeyStoreR
74
74
  *
75
75
  * @see {@link DeleteCustomKeyStoreCommandInput} for command's `input` shape.
76
76
  * @see {@link DeleteCustomKeyStoreCommandOutput} for command's `response` shape.
77
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
77
+ * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
78
78
  *
79
79
  */
80
80
  export declare class DeleteCustomKeyStoreCommand extends $Command<DeleteCustomKeyStoreCommandInput, DeleteCustomKeyStoreCommandOutput, KMSClientResolvedConfig> {
@@ -49,7 +49,7 @@ export interface DeleteImportedKeyMaterialCommandOutput extends __MetadataBearer
49
49
  *
50
50
  * @see {@link DeleteImportedKeyMaterialCommandInput} for command's `input` shape.
51
51
  * @see {@link DeleteImportedKeyMaterialCommandOutput} for command's `response` shape.
52
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
52
+ * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
53
53
  *
54
54
  */
55
55
  export declare class DeleteImportedKeyMaterialCommand extends $Command<DeleteImportedKeyMaterialCommandInput, DeleteImportedKeyMaterialCommandOutput, KMSClientResolvedConfig> {
@@ -73,7 +73,7 @@ export interface DescribeCustomKeyStoresCommandOutput extends DescribeCustomKeyS
73
73
  *
74
74
  * @see {@link DescribeCustomKeyStoresCommandInput} for command's `input` shape.
75
75
  * @see {@link DescribeCustomKeyStoresCommandOutput} for command's `response` shape.
76
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
76
+ * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
77
77
  *
78
78
  */
79
79
  export declare class DescribeCustomKeyStoresCommand extends $Command<DescribeCustomKeyStoresCommandInput, DescribeCustomKeyStoresCommandOutput, KMSClientResolvedConfig> {
@@ -99,7 +99,7 @@ export interface DescribeKeyCommandOutput extends DescribeKeyResponse, __Metadat
99
99
  *
100
100
  * @see {@link DescribeKeyCommandInput} for command's `input` shape.
101
101
  * @see {@link DescribeKeyCommandOutput} for command's `response` shape.
102
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
102
+ * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
103
103
  *
104
104
  */
105
105
  export declare class DescribeKeyCommand extends $Command<DescribeKeyCommandInput, DescribeKeyCommandOutput, KMSClientResolvedConfig> {
@@ -35,7 +35,7 @@ export interface DisableKeyCommandOutput extends __MetadataBearer {
35
35
  *
36
36
  * @see {@link DisableKeyCommandInput} for command's `input` shape.
37
37
  * @see {@link DisableKeyCommandOutput} for command's `response` shape.
38
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
38
+ * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
39
39
  *
40
40
  */
41
41
  export declare class DisableKeyCommand extends $Command<DisableKeyCommandInput, DisableKeyCommandOutput, KMSClientResolvedConfig> {