@aws-sdk/client-kms 3.346.0 → 3.347.1

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.
@@ -186,6 +186,90 @@ export interface GetParametersForImportCommandOutput extends GetParametersForImp
186
186
  * // example id: to-retrieve-the-public-key-and-import-token-for-a-cmk-1480626483211
187
187
  * ```
188
188
  *
189
+ * @example To download the public key and import token for a symmetric encryption KMS key
190
+ * ```javascript
191
+ * // The following example downloads a public key and import token to import symmetric encryption key material. It uses the default wrapping key spec and the RSAES_OAEP_SHA_256 wrapping algorithm.
192
+ * const input = {
193
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
194
+ * "WrappingAlgorithm": "RSAES_OAEP_SHA_1",
195
+ * "WrappingKeySpec": "RSA_2048"
196
+ * };
197
+ * const command = new GetParametersForImportCommand(input);
198
+ * const response = await client.send(command);
199
+ * /* response ==
200
+ * {
201
+ * "ImportToken": "<binary data>",
202
+ * "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
203
+ * "ParametersValidTo": "2023-02-01T14:52:17-08:00",
204
+ * "PublicKey": "<binary data>"
205
+ * }
206
+ * *\/
207
+ * // example id: to-download-the-public-key-and-import-token-1
208
+ * ```
209
+ *
210
+ * @example To download the public key and import token for an RSA asymmetric KMS key
211
+ * ```javascript
212
+ * // The following example downloads a public key and import token to import an RSA private key. It uses a required RSA_AES wrapping algorithm and the largest supported private key.
213
+ * const input = {
214
+ * "KeyId": "arn:aws:kms:us-east-2:111122223333:key/8888abcd-12ab-34cd-56ef-1234567890ab",
215
+ * "WrappingAlgorithm": "RSA_AES_KEY_WRAP_SHA_256",
216
+ * "WrappingKeySpec": "RSA_4096"
217
+ * };
218
+ * const command = new GetParametersForImportCommand(input);
219
+ * const response = await client.send(command);
220
+ * /* response ==
221
+ * {
222
+ * "ImportToken": "<binary data>",
223
+ * "KeyId": "arn:aws:kms:us-east-2:111122223333:key/8888abcd-12ab-34cd-56ef-1234567890ab",
224
+ * "ParametersValidTo": "2023-03-08T13:02:02-07:00",
225
+ * "PublicKey": "<binary data>"
226
+ * }
227
+ * *\/
228
+ * // example id: to-download-the-public-key-and-import-token-2
229
+ * ```
230
+ *
231
+ * @example To download the public key and import token for an elliptic curve (ECC) asymmetric KMS key
232
+ * ```javascript
233
+ * // The following example downloads a public key and import token to import an ECC_NIST_P521 (secp521r1) private key. You cannot directly wrap this ECC key under an RSA_2048 public key, although you can use an RSA_2048 public key with an RSA_AES wrapping algorithm to wrap any supported key material. This example requests an RSA_3072 public key for use with the RSAES_OAEP_SHA_256.
234
+ * const input = {
235
+ * "KeyId": "arn:aws:kms:us-east-2:111122223333:key/9876abcd-12ab-34cd-56ef-1234567890ab",
236
+ * "WrappingAlgorithm": "RSAES_OAEP_SHA_256",
237
+ * "WrappingKeySpec": "RSA_3072"
238
+ * };
239
+ * const command = new GetParametersForImportCommand(input);
240
+ * const response = await client.send(command);
241
+ * /* response ==
242
+ * {
243
+ * "ImportToken": "<binary data>",
244
+ * "KeyId": "arn:aws:kms:us-east-2:111122223333:key/9876abcd-12ab-34cd-56ef-1234567890ab",
245
+ * "ParametersValidTo": "2023-09-12T03:15:01-20:00",
246
+ * "PublicKey": "<binary data>"
247
+ * }
248
+ * *\/
249
+ * // example id: to-download-the-public-key-and-import-token-3
250
+ * ```
251
+ *
252
+ * @example To download the public key and import token for an HMAC KMS key
253
+ * ```javascript
254
+ * // The following example downloads a public key and import token to import an HMAC key. It uses the RSAES_OAEP_SHA_256 wrapping algorithm and an RSA_4096 private key.
255
+ * const input = {
256
+ * "KeyId": "2468abcd-12ab-34cd-56ef-1234567890ab",
257
+ * "WrappingAlgorithm": "RSAES_OAEP_SHA_256",
258
+ * "WrappingKeySpec": "RSA_4096"
259
+ * };
260
+ * const command = new GetParametersForImportCommand(input);
261
+ * const response = await client.send(command);
262
+ * /* response ==
263
+ * {
264
+ * "ImportToken": "<binary data>",
265
+ * "KeyId": "arn:aws:kms:us-east-2:111122223333:key/2468abcd-12ab-34cd-56ef-1234567890ab",
266
+ * "ParametersValidTo": "2023-04-02T13:02:02-07:00",
267
+ * "PublicKey": "<binary data>"
268
+ * }
269
+ * *\/
270
+ * // example id: to-download-the-public-key-and-import-token-4
271
+ * ```
272
+ *
189
273
  */
190
274
  export declare class GetParametersForImportCommand extends $Command<GetParametersForImportCommandInput, GetParametersForImportCommandOutput, KMSClientResolvedConfig> {
191
275
  readonly input: GetParametersForImportCommandInput;
@@ -226,6 +226,35 @@ export interface ImportKeyMaterialCommandOutput extends ImportKeyMaterialRespons
226
226
  * // example id: to-import-key-material-into-a-cmk-1480630551969
227
227
  * ```
228
228
  *
229
+ * @example To import key material into a KMS key
230
+ * ```javascript
231
+ * // The following example imports key material into the specified KMS key.
232
+ * const input = {
233
+ * "EncryptedKeyMaterial": "<binary data>",
234
+ * "ExpirationModel": "KEY_MATERIAL_DOES_NOT_EXPIRE",
235
+ * "ImportToken": "<binary data>",
236
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
237
+ * };
238
+ * const command = new ImportKeyMaterialCommand(input);
239
+ * await client.send(command);
240
+ * // example id: to-import-key-material-into-a-kms-key-1
241
+ * ```
242
+ *
243
+ * @example To import key material into a KMS key
244
+ * ```javascript
245
+ * // The following example imports key material that expires in 3 days. It might be part of an application that frequently reimports the same key material to comply with business rules or regulations.
246
+ * const input = {
247
+ * "EncryptedKeyMaterial": "<binary data>",
248
+ * "ExpirationModel": "KEY_MATERIAL_EXPIRES",
249
+ * "ImportToken": "<binary data>",
250
+ * "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
251
+ * "ValidTo": "2023-09-30T00:00:00-00:00"
252
+ * };
253
+ * const command = new ImportKeyMaterialCommand(input);
254
+ * await client.send(command);
255
+ * // example id: to-import-key-material-into-a-kms-key-2
256
+ * ```
257
+ *
229
258
  */
230
259
  export declare class ImportKeyMaterialCommand extends $Command<ImportKeyMaterialCommandInput, ImportKeyMaterialCommandOutput, KMSClientResolvedConfig> {
231
260
  readonly input: ImportKeyMaterialCommandInput;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-kms",
3
3
  "description": "AWS SDK for JavaScript Kms Client for Node.js, Browser and React Native",
4
- "version": "3.346.0",
4
+ "version": "3.347.1",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -21,36 +21,36 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "3.0.0",
23
23
  "@aws-crypto/sha256-js": "3.0.0",
24
- "@aws-sdk/client-sts": "3.345.0",
25
- "@aws-sdk/config-resolver": "3.342.0",
26
- "@aws-sdk/credential-provider-node": "3.345.0",
27
- "@aws-sdk/fetch-http-handler": "3.342.0",
28
- "@aws-sdk/hash-node": "3.344.0",
29
- "@aws-sdk/invalid-dependency": "3.342.0",
30
- "@aws-sdk/middleware-content-length": "3.342.0",
31
- "@aws-sdk/middleware-endpoint": "3.344.0",
32
- "@aws-sdk/middleware-host-header": "3.342.0",
33
- "@aws-sdk/middleware-logger": "3.342.0",
34
- "@aws-sdk/middleware-recursion-detection": "3.342.0",
35
- "@aws-sdk/middleware-retry": "3.342.0",
36
- "@aws-sdk/middleware-serde": "3.342.0",
37
- "@aws-sdk/middleware-signing": "3.342.0",
38
- "@aws-sdk/middleware-stack": "3.342.0",
39
- "@aws-sdk/middleware-user-agent": "3.345.0",
40
- "@aws-sdk/node-config-provider": "3.342.0",
41
- "@aws-sdk/node-http-handler": "3.344.0",
42
- "@aws-sdk/smithy-client": "3.342.0",
43
- "@aws-sdk/types": "3.342.0",
44
- "@aws-sdk/url-parser": "3.342.0",
24
+ "@aws-sdk/client-sts": "3.347.1",
25
+ "@aws-sdk/config-resolver": "3.347.0",
26
+ "@aws-sdk/credential-provider-node": "3.347.0",
27
+ "@aws-sdk/fetch-http-handler": "3.347.0",
28
+ "@aws-sdk/hash-node": "3.347.0",
29
+ "@aws-sdk/invalid-dependency": "3.347.0",
30
+ "@aws-sdk/middleware-content-length": "3.347.0",
31
+ "@aws-sdk/middleware-endpoint": "3.347.0",
32
+ "@aws-sdk/middleware-host-header": "3.347.0",
33
+ "@aws-sdk/middleware-logger": "3.347.0",
34
+ "@aws-sdk/middleware-recursion-detection": "3.347.0",
35
+ "@aws-sdk/middleware-retry": "3.347.0",
36
+ "@aws-sdk/middleware-serde": "3.347.0",
37
+ "@aws-sdk/middleware-signing": "3.347.0",
38
+ "@aws-sdk/middleware-stack": "3.347.0",
39
+ "@aws-sdk/middleware-user-agent": "3.347.0",
40
+ "@aws-sdk/node-config-provider": "3.347.0",
41
+ "@aws-sdk/node-http-handler": "3.347.0",
42
+ "@aws-sdk/smithy-client": "3.347.0",
43
+ "@aws-sdk/types": "3.347.0",
44
+ "@aws-sdk/url-parser": "3.347.0",
45
45
  "@aws-sdk/util-base64": "3.310.0",
46
46
  "@aws-sdk/util-body-length-browser": "3.310.0",
47
47
  "@aws-sdk/util-body-length-node": "3.310.0",
48
- "@aws-sdk/util-defaults-mode-browser": "3.342.0",
49
- "@aws-sdk/util-defaults-mode-node": "3.342.0",
50
- "@aws-sdk/util-endpoints": "3.342.0",
51
- "@aws-sdk/util-retry": "3.342.0",
52
- "@aws-sdk/util-user-agent-browser": "3.345.0",
53
- "@aws-sdk/util-user-agent-node": "3.345.0",
48
+ "@aws-sdk/util-defaults-mode-browser": "3.347.0",
49
+ "@aws-sdk/util-defaults-mode-node": "3.347.0",
50
+ "@aws-sdk/util-endpoints": "3.347.0",
51
+ "@aws-sdk/util-retry": "3.347.0",
52
+ "@aws-sdk/util-user-agent-browser": "3.347.0",
53
+ "@aws-sdk/util-user-agent-node": "3.347.0",
54
54
  "@aws-sdk/util-utf8": "3.310.0",
55
55
  "@smithy/protocol-http": "^1.0.1",
56
56
  "@smithy/types": "^1.0.0",