@aws-sdk/client-kms 3.332.0 → 3.334.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.
@@ -140,6 +140,7 @@ export interface DecryptCommandOutput extends DecryptResponse, __MetadataBearer
140
140
  * // KeyId: "STRING_VALUE",
141
141
  * // Plaintext: "BLOB_VALUE",
142
142
  * // EncryptionAlgorithm: "SYMMETRIC_DEFAULT" || "RSAES_OAEP_SHA_1" || "RSAES_OAEP_SHA_256" || "SM2PKE",
143
+ * // CiphertextForRecipient: "BLOB_VALUE",
143
144
  * // };
144
145
  *
145
146
  * ```
@@ -290,49 +291,6 @@ export interface DecryptCommandOutput extends DecryptResponse, __MetadataBearer
290
291
  * // example id: to-decrypt-data-for-a-nitro-enclave-2
291
292
  * ```
292
293
  *
293
- * @example To decrypt data with an asymmetric encryption KMS key
294
- * ```javascript
295
- * // The following example decrypts data that was encrypted with an asymmetric encryption KMS key. When the KMS encryption key is asymmetric, you must specify the KMS key ID and the encryption algorithm that was used to encrypt the data.
296
- * const input = {
297
- * "CiphertextBlob": "<binary data>",
298
- * "EncryptionAlgorithm": "RSAES_OAEP_SHA_256",
299
- * "KeyId": "0987dcba-09fe-87dc-65ba-ab0987654321"
300
- * };
301
- * const command = new DecryptCommand(input);
302
- * const response = await client.send(command);
303
- * /* response ==
304
- * {
305
- * "EncryptionAlgorithm": "RSAES_OAEP_SHA_256",
306
- * "KeyId": "arn:aws:kms:us-west-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321",
307
- * "Plaintext": "<binary data>"
308
- * }
309
- * *\/
310
- * // example id: to-decrypt-data-2
311
- * ```
312
- *
313
- * @example To decrypt data for a Nitro enclave
314
- * ```javascript
315
- * // The following Decrypt example includes the Recipient parameter with a signed attestation document from an AWS Nitro enclave. Instead of returning the decrypted data in plaintext (Plaintext), the operation returns the decrypted data encrypted by the public key from the attestation document (CiphertextForRecipient).
316
- * const input = {
317
- * "CiphertextBlob": "<binary data>",
318
- * "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
319
- * "Recipient": {
320
- * "AttestationDocument": "<attestation document>",
321
- * "KeyEncryptionAlgorithm": "RSAES_OAEP_SHA_256"
322
- * }
323
- * };
324
- * const command = new DecryptCommand(input);
325
- * const response = await client.send(command);
326
- * /* response ==
327
- * {
328
- * "CiphertextForRecipient": "<binary data>",
329
- * "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
330
- * "Plaintext": ""
331
- * }
332
- * *\/
333
- * // example id: to-decrypt-data-for-a-nitro-enclave-2
334
- * ```
335
- *
336
294
  */
337
295
  export declare class DecryptCommand extends $Command<DecryptCommandInput, DecryptCommandOutput, KMSClientResolvedConfig> {
338
296
  readonly input: DecryptCommandInput;
@@ -150,17 +150,6 @@ export interface DisconnectCustomKeyStoreCommandOutput extends DisconnectCustomK
150
150
  * // example id: to-disconnect-a-custom-key-store-from-its-cloudhsm-cluster-234abcdefABC
151
151
  * ```
152
152
  *
153
- * @example To disconnect a custom key store from its CloudHSM cluster
154
- * ```javascript
155
- * // This example disconnects an AWS KMS custom key store from its backing key store. For an AWS CloudHSM key store, it disconnects the key store from its AWS CloudHSM cluster. For an external key store, it disconnects the key store from the external key store proxy that communicates with your external key manager. This operation doesn't return any data. To verify that the custom key store is disconnected, use the <code>DescribeCustomKeyStores</code> operation.
156
- * const input = {
157
- * "CustomKeyStoreId": "cks-1234567890abcdef0"
158
- * };
159
- * const command = new DisconnectCustomKeyStoreCommand(input);
160
- * await client.send(command);
161
- * // example id: to-disconnect-a-custom-key-store-from-its-cloudhsm-cluster-234abcdefABC
162
- * ```
163
- *
164
153
  */
165
154
  export declare class DisconnectCustomKeyStoreCommand extends $Command<DisconnectCustomKeyStoreCommandInput, DisconnectCustomKeyStoreCommandOutput, KMSClientResolvedConfig> {
166
155
  readonly input: DisconnectCustomKeyStoreCommandInput;
@@ -265,26 +265,6 @@ export interface EncryptCommandOutput extends EncryptResponse, __MetadataBearer
265
265
  * // example id: to-encrypt-data-2
266
266
  * ```
267
267
  *
268
- * @example To encrypt data with an asymmetric encryption KMS key
269
- * ```javascript
270
- * // The following example encrypts data with the specified RSA asymmetric KMS key. When you encrypt with an asymmetric key, you must specify the encryption algorithm.
271
- * const input = {
272
- * "EncryptionAlgorithm": "RSAES_OAEP_SHA_256",
273
- * "KeyId": "0987dcba-09fe-87dc-65ba-ab0987654321",
274
- * "Plaintext": "<binary data>"
275
- * };
276
- * const command = new EncryptCommand(input);
277
- * const response = await client.send(command);
278
- * /* response ==
279
- * {
280
- * "CiphertextBlob": "<binary data>",
281
- * "EncryptionAlgorithm": "RSAES_OAEP_SHA_256",
282
- * "KeyId": "arn:aws:kms:us-west-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321"
283
- * }
284
- * *\/
285
- * // example id: to-encrypt-data-2
286
- * ```
287
- *
288
268
  */
289
269
  export declare class EncryptCommand extends $Command<EncryptCommandInput, EncryptCommandOutput, KMSClientResolvedConfig> {
290
270
  readonly input: EncryptCommandInput;
@@ -148,6 +148,7 @@ export interface GenerateDataKeyCommandOutput extends GenerateDataKeyResponse, _
148
148
  * // CiphertextBlob: "BLOB_VALUE",
149
149
  * // Plaintext: "BLOB_VALUE",
150
150
  * // KeyId: "STRING_VALUE",
151
+ * // CiphertextForRecipient: "BLOB_VALUE",
151
152
  * // };
152
153
  *
153
154
  * ```
@@ -265,30 +266,6 @@ export interface GenerateDataKeyCommandOutput extends GenerateDataKeyResponse, _
265
266
  * // example id: to-generate-a-data-key-for-a-nitro-enclave-2
266
267
  * ```
267
268
  *
268
- * @example To generate a data key pair for a Nitro enclave
269
- * ```javascript
270
- * // The following example includes the Recipient parameter with a signed attestation document from an AWS Nitro enclave. Instead of returning a copy of the data key encrypted by the KMS key and a plaintext copy of the data key, GenerateDataKey returns one copy of the data key encrypted by the KMS key (CiphertextBlob) and one copy of the data key encrypted by the public key from the attestation document (CiphertextForRecipient). The operation doesn't return a plaintext data key.
271
- * const input = {
272
- * "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
273
- * "KeySpec": "AES_256",
274
- * "Recipient": {
275
- * "AttestationDocument": "<attestation document>",
276
- * "KeyEncryptionAlgorithm": "RSAES_OAEP_SHA_256"
277
- * }
278
- * };
279
- * const command = new GenerateDataKeyCommand(input);
280
- * const response = await client.send(command);
281
- * /* response ==
282
- * {
283
- * "CiphertextBlob": "<binary data>",
284
- * "CiphertextForRecipient": "<binary data>",
285
- * "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
286
- * "Plaintext": ""
287
- * }
288
- * *\/
289
- * // example id: to-generate-a-data-key-for-a-nitro-enclave-2
290
- * ```
291
- *
292
269
  */
293
270
  export declare class GenerateDataKeyCommand extends $Command<GenerateDataKeyCommandInput, GenerateDataKeyCommandOutput, KMSClientResolvedConfig> {
294
271
  readonly input: GenerateDataKeyCommandInput;
@@ -127,6 +127,7 @@ export interface GenerateDataKeyPairCommandOutput extends GenerateDataKeyPairRes
127
127
  * // PublicKey: "BLOB_VALUE",
128
128
  * // KeyId: "STRING_VALUE",
129
129
  * // KeyPairSpec: "RSA_2048" || "RSA_3072" || "RSA_4096" || "ECC_NIST_P256" || "ECC_NIST_P384" || "ECC_NIST_P521" || "ECC_SECG_P256K1" || "SM2",
130
+ * // CiphertextForRecipient: "BLOB_VALUE",
130
131
  * // };
131
132
  *
132
133
  * ```
@@ -252,32 +253,6 @@ export interface GenerateDataKeyPairCommandOutput extends GenerateDataKeyPairRes
252
253
  * // example id: to-generate-a-data-key-pair-for-a-nitro-enclave-2
253
254
  * ```
254
255
  *
255
- * @example To generate a data key pair for a Nitro enclave
256
- * ```javascript
257
- * // The following example includes the Recipient parameter with a signed attestation document from an AWS Nitro enclave. Instead of returning a plaintext copy of the private data key, GenerateDataKeyPair returns a copy of the private data key encrypted by the public key from the attestation document (CiphertextForRecipient). It returns the public data key (PublicKey) and a copy of private data key encrypted under the specified KMS key (PrivateKeyCiphertextBlob), as usual, but plaintext private data key field (PrivateKeyPlaintext) is null or empty.
258
- * const input = {
259
- * "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
260
- * "KeyPairSpec": "RSA_3072",
261
- * "Recipient": {
262
- * "AttestationDocument": "<attestation document>",
263
- * "KeyEncryptionAlgorithm": "RSAES_OAEP_SHA_256"
264
- * }
265
- * };
266
- * const command = new GenerateDataKeyPairCommand(input);
267
- * const response = await client.send(command);
268
- * /* response ==
269
- * {
270
- * "CiphertextForRecipient": "<binary data>",
271
- * "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
272
- * "KeyPairSpec": "RSA_3072",
273
- * "PrivateKeyCiphertextBlob": "<binary data>",
274
- * "PrivateKeyPlaintext": "",
275
- * "PublicKey": "<binary data>"
276
- * }
277
- * *\/
278
- * // example id: to-generate-a-data-key-pair-for-a-nitro-enclave-2
279
- * ```
280
- *
281
256
  */
282
257
  export declare class GenerateDataKeyPairCommand extends $Command<GenerateDataKeyPairCommandInput, GenerateDataKeyPairCommandOutput, KMSClientResolvedConfig> {
283
258
  readonly input: GenerateDataKeyPairCommandInput;
@@ -58,6 +58,7 @@ export interface GenerateRandomCommandOutput extends GenerateRandomResponse, __M
58
58
  * const response = await client.send(command);
59
59
  * // { // GenerateRandomResponse
60
60
  * // Plaintext: "BLOB_VALUE",
61
+ * // CiphertextForRecipient: "BLOB_VALUE",
61
62
  * // };
62
63
  *
63
64
  * ```
@@ -160,27 +161,6 @@ export interface GenerateRandomCommandOutput extends GenerateRandomResponse, __M
160
161
  * // example id: to-generate-random-data-2
161
162
  * ```
162
163
  *
163
- * @example To generate random data
164
- * ```javascript
165
- * // The following example includes the Recipient parameter with a signed attestation document from an AWS Nitro enclave. Instead of returning a plaintext (unencrypted) byte string, GenerateRandom returns the byte string encrypted by the public key from the enclave's attestation document.
166
- * const input = {
167
- * "NumberOfBytes": 1024,
168
- * "Recipient": {
169
- * "AttestationDocument": "<attestation document>",
170
- * "KeyEncryptionAlgorithm": "RSAES_OAEP_SHA_256"
171
- * }
172
- * };
173
- * const command = new GenerateRandomCommand(input);
174
- * const response = await client.send(command);
175
- * /* response ==
176
- * {
177
- * "CiphertextForRecipient": "<binary data>",
178
- * "Plaintext": ""
179
- * }
180
- * *\/
181
- * // example id: to-generate-random-data-2
182
- * ```
183
- *
184
164
  */
185
165
  export declare class GenerateRandomCommand extends $Command<GenerateRandomCommandInput, GenerateRandomCommandOutput, KMSClientResolvedConfig> {
186
166
  readonly input: GenerateRandomCommandInput;
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.332.0",
4
+ "version": "3.334.0",
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",