@aws-sdk/client-kms 3.775.0 → 3.782.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.
- package/dist-types/commands/CancelKeyDeletionCommand.d.ts +5 -5
- package/dist-types/commands/ConnectCustomKeyStoreCommand.d.ts +7 -4
- package/dist-types/commands/CreateAliasCommand.d.ts +8 -5
- package/dist-types/commands/CreateCustomKeyStoreCommand.d.ts +8 -57
- package/dist-types/commands/CreateGrantCommand.d.ts +8 -8
- package/dist-types/commands/CreateKeyCommand.d.ts +1 -283
- package/dist-types/commands/DecryptCommand.d.ts +15 -39
- package/dist-types/commands/DeleteAliasCommand.d.ts +7 -4
- package/dist-types/commands/DeleteCustomKeyStoreCommand.d.ts +7 -4
- package/dist-types/commands/DeleteImportedKeyMaterialCommand.d.ts +7 -4
- package/dist-types/commands/DeriveSharedSecretCommand.d.ts +10 -10
- package/dist-types/commands/DescribeCustomKeyStoresCommand.d.ts +5 -92
- package/dist-types/commands/DescribeKeyCommand.d.ts +101 -138
- package/dist-types/commands/DisableKeyCommand.d.ts +7 -4
- package/dist-types/commands/DisableKeyRotationCommand.d.ts +7 -4
- package/dist-types/commands/DisconnectCustomKeyStoreCommand.d.ts +7 -4
- package/dist-types/commands/EnableKeyCommand.d.ts +7 -4
- package/dist-types/commands/EnableKeyRotationCommand.d.ts +8 -5
- package/dist-types/commands/EncryptCommand.d.ts +15 -16
- package/dist-types/commands/GenerateDataKeyCommand.d.ts +8 -32
- package/dist-types/commands/GenerateDataKeyPairCommand.d.ts +10 -36
- package/dist-types/commands/GenerateDataKeyPairWithoutPlaintextCommand.d.ts +9 -9
- package/dist-types/commands/GenerateDataKeyWithoutPlaintextCommand.d.ts +7 -7
- package/dist-types/commands/GenerateMacCommand.d.ts +9 -9
- package/dist-types/commands/GenerateRandomCommand.d.ts +5 -26
- package/dist-types/commands/GetKeyPolicyCommand.d.ts +18 -6
- package/dist-types/commands/GetKeyRotationStatusCommand.d.ts +1 -20
- package/dist-types/commands/GetParametersForImportCommand.d.ts +1 -84
- package/dist-types/commands/GetPublicKeyCommand.d.ts +9 -9
- package/dist-types/commands/ImportKeyMaterialCommand.d.ts +10 -22
- package/dist-types/commands/ListAliasesCommand.d.ts +30 -30
- package/dist-types/commands/ListGrantsCommand.d.ts +1 -69
- package/dist-types/commands/ListKeyPoliciesCommand.d.ts +6 -6
- package/dist-types/commands/ListKeyRotationsCommand.d.ts +1 -28
- package/dist-types/commands/ListKeysCommand.d.ts +20 -20
- package/dist-types/commands/ListResourceTagsCommand.d.ts +12 -12
- package/dist-types/commands/ListRetirableGrantsCommand.d.ts +1 -30
- package/dist-types/commands/PutKeyPolicyCommand.d.ts +82 -6
- package/dist-types/commands/ReEncryptCommand.d.ts +8 -8
- package/dist-types/commands/ReplicateKeyCommand.d.ts +31 -29
- package/dist-types/commands/RetireGrantCommand.d.ts +8 -5
- package/dist-types/commands/RevokeGrantCommand.d.ts +8 -5
- package/dist-types/commands/RotateKeyOnDemandCommand.d.ts +5 -5
- package/dist-types/commands/ScheduleKeyDeletionCommand.d.ts +1 -18
- package/dist-types/commands/SignCommand.d.ts +18 -19
- package/dist-types/commands/TagResourceCommand.d.ts +10 -7
- package/dist-types/commands/UntagResourceCommand.d.ts +8 -5
- package/dist-types/commands/UpdateAliasCommand.d.ts +8 -5
- package/dist-types/commands/UpdateCustomKeyStoreCommand.d.ts +34 -38
- package/dist-types/commands/UpdateKeyDescriptionCommand.d.ts +8 -5
- package/dist-types/commands/UpdatePrimaryRegionCommand.d.ts +12 -9
- package/dist-types/commands/VerifyCommand.d.ts +20 -21
- package/dist-types/commands/VerifyMacCommand.d.ts +10 -10
- package/package.json +5 -5
|
@@ -105,23 +105,23 @@ declare const CancelKeyDeletionCommand_base: {
|
|
|
105
105
|
* @throws {@link KMSServiceException}
|
|
106
106
|
* <p>Base exception class for all service exceptions from KMS service.</p>
|
|
107
107
|
*
|
|
108
|
-
*
|
|
108
|
+
*
|
|
109
109
|
* @example To cancel deletion of a KMS key
|
|
110
110
|
* ```javascript
|
|
111
111
|
* // The following example cancels deletion of the specified KMS key.
|
|
112
112
|
* const input = {
|
|
113
|
-
*
|
|
113
|
+
* KeyId: "1234abcd-12ab-34cd-56ef-1234567890ab"
|
|
114
114
|
* };
|
|
115
115
|
* const command = new CancelKeyDeletionCommand(input);
|
|
116
116
|
* const response = await client.send(command);
|
|
117
|
-
* /* response
|
|
117
|
+
* /* response is
|
|
118
118
|
* {
|
|
119
|
-
*
|
|
119
|
+
* KeyId: "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
|
|
120
120
|
* }
|
|
121
121
|
* *\/
|
|
122
|
-
* // example id: to-cancel-deletion-of-a-cmk-1477428535102
|
|
123
122
|
* ```
|
|
124
123
|
*
|
|
124
|
+
* @public
|
|
125
125
|
*/
|
|
126
126
|
export declare class CancelKeyDeletionCommand extends CancelKeyDeletionCommand_base {
|
|
127
127
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -225,18 +225,21 @@ declare const ConnectCustomKeyStoreCommand_base: {
|
|
|
225
225
|
* @throws {@link KMSServiceException}
|
|
226
226
|
* <p>Base exception class for all service exceptions from KMS service.</p>
|
|
227
227
|
*
|
|
228
|
-
*
|
|
228
|
+
*
|
|
229
229
|
* @example To connect a custom key store
|
|
230
230
|
* ```javascript
|
|
231
231
|
* // This example connects an AWS KMS custom key store to its backing key store. For an AWS CloudHSM key store, it connects the key store to its AWS CloudHSM cluster. For an external key store, it connects the key store to the external key store proxy that communicates with your external key manager. This operation does not return any data. To verify that the custom key store is connected, use the <code>DescribeCustomKeyStores</code> operation.
|
|
232
232
|
* const input = {
|
|
233
|
-
*
|
|
233
|
+
* CustomKeyStoreId: "cks-1234567890abcdef0"
|
|
234
234
|
* };
|
|
235
235
|
* const command = new ConnectCustomKeyStoreCommand(input);
|
|
236
|
-
* await client.send(command);
|
|
237
|
-
*
|
|
236
|
+
* const response = await client.send(command);
|
|
237
|
+
* /* response is
|
|
238
|
+
* { /* empty *\/ }
|
|
239
|
+
* *\/
|
|
238
240
|
* ```
|
|
239
241
|
*
|
|
242
|
+
* @public
|
|
240
243
|
*/
|
|
241
244
|
export declare class ConnectCustomKeyStoreCommand extends ConnectCustomKeyStoreCommand_base {
|
|
242
245
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -155,19 +155,22 @@ declare const CreateAliasCommand_base: {
|
|
|
155
155
|
* @throws {@link KMSServiceException}
|
|
156
156
|
* <p>Base exception class for all service exceptions from KMS service.</p>
|
|
157
157
|
*
|
|
158
|
-
*
|
|
158
|
+
*
|
|
159
159
|
* @example To create an alias
|
|
160
160
|
* ```javascript
|
|
161
161
|
* // The following example creates an alias for the specified KMS key.
|
|
162
162
|
* const input = {
|
|
163
|
-
*
|
|
164
|
-
*
|
|
163
|
+
* AliasName: "alias/ExampleAlias",
|
|
164
|
+
* TargetKeyId: "1234abcd-12ab-34cd-56ef-1234567890ab"
|
|
165
165
|
* };
|
|
166
166
|
* const command = new CreateAliasCommand(input);
|
|
167
|
-
* await client.send(command);
|
|
168
|
-
*
|
|
167
|
+
* const response = await client.send(command);
|
|
168
|
+
* /* response is
|
|
169
|
+
* { /* metadata only *\/ }
|
|
170
|
+
* *\/
|
|
169
171
|
* ```
|
|
170
172
|
*
|
|
173
|
+
* @public
|
|
171
174
|
*/
|
|
172
175
|
export declare class CreateAliasCommand extends CreateAliasCommand_base {
|
|
173
176
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -281,75 +281,26 @@ declare const CreateCustomKeyStoreCommand_base: {
|
|
|
281
281
|
* @throws {@link KMSServiceException}
|
|
282
282
|
* <p>Base exception class for all service exceptions from KMS service.</p>
|
|
283
283
|
*
|
|
284
|
-
*
|
|
284
|
+
*
|
|
285
285
|
* @example To create an AWS CloudHSM key store
|
|
286
286
|
* ```javascript
|
|
287
287
|
* // This example creates a custom key store that is associated with an AWS CloudHSM cluster.
|
|
288
288
|
* const input = {
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
* };
|
|
294
|
-
* const command = new CreateCustomKeyStoreCommand(input);
|
|
295
|
-
* const response = await client.send(command);
|
|
296
|
-
* /* response ==
|
|
297
|
-
* {
|
|
298
|
-
* "CustomKeyStoreId": "cks-1234567890abcdef0"
|
|
299
|
-
* }
|
|
300
|
-
* *\/
|
|
301
|
-
* // example id: to-create-an-aws-cloudhsm-custom-key-store-1
|
|
302
|
-
* ```
|
|
303
|
-
*
|
|
304
|
-
* @example To create an external key store with VPC endpoint service connectivity
|
|
305
|
-
* ```javascript
|
|
306
|
-
* // This example creates an external key store that uses an Amazon VPC endpoint service to communicate with AWS KMS.
|
|
307
|
-
* const input = {
|
|
308
|
-
* "CustomKeyStoreName": "ExampleVPCEndpointKeyStore",
|
|
309
|
-
* "CustomKeyStoreType": "EXTERNAL_KEY_STORE",
|
|
310
|
-
* "XksProxyAuthenticationCredential": {
|
|
311
|
-
* "AccessKeyId": "ABCDE12345670EXAMPLE",
|
|
312
|
-
* "RawSecretAccessKey": "DXjSUawnel2fr6SKC7G25CNxTyWKE5PF9XX6H/u9pSo="
|
|
313
|
-
* },
|
|
314
|
-
* "XksProxyConnectivity": "VPC_ENDPOINT_SERVICE",
|
|
315
|
-
* "XksProxyUriEndpoint": "https://myproxy-private.xks.example.com",
|
|
316
|
-
* "XksProxyUriPath": "/example-prefix/kms/xks/v1",
|
|
317
|
-
* "XksProxyVpcEndpointServiceName": "com.amazonaws.vpce.us-east-1.vpce-svc-example1"
|
|
289
|
+
* CloudHsmClusterId: "cluster-234abcdefABC",
|
|
290
|
+
* CustomKeyStoreName: "ExampleKeyStore",
|
|
291
|
+
* KeyStorePassword: "kmsPswd",
|
|
292
|
+
* TrustAnchorCertificate: "<certificate-goes-here>"
|
|
318
293
|
* };
|
|
319
294
|
* const command = new CreateCustomKeyStoreCommand(input);
|
|
320
295
|
* const response = await client.send(command);
|
|
321
|
-
* /* response
|
|
296
|
+
* /* response is
|
|
322
297
|
* {
|
|
323
|
-
*
|
|
298
|
+
* CustomKeyStoreId: "cks-1234567890abcdef0"
|
|
324
299
|
* }
|
|
325
300
|
* *\/
|
|
326
|
-
* // example id: to-create-an-external-custom-key-store-with-vpc-connectivity-2
|
|
327
|
-
* ```
|
|
328
|
-
*
|
|
329
|
-
* @example To create an external key store with public endpoint connectivity
|
|
330
|
-
* ```javascript
|
|
331
|
-
* // This example creates an external key store with public endpoint connectivity.
|
|
332
|
-
* const input = {
|
|
333
|
-
* "CustomKeyStoreName": "ExamplePublicEndpointKeyStore",
|
|
334
|
-
* "CustomKeyStoreType": "EXTERNAL_KEY_STORE",
|
|
335
|
-
* "XksProxyAuthenticationCredential": {
|
|
336
|
-
* "AccessKeyId": "ABCDE12345670EXAMPLE",
|
|
337
|
-
* "RawSecretAccessKey": "DXjSUawnel2fr6SKC7G25CNxTyWKE5PF9XX6H/u9pSo="
|
|
338
|
-
* },
|
|
339
|
-
* "XksProxyConnectivity": "PUBLIC_ENDPOINT",
|
|
340
|
-
* "XksProxyUriEndpoint": "https://myproxy.xks.example.com",
|
|
341
|
-
* "XksProxyUriPath": "/kms/xks/v1"
|
|
342
|
-
* };
|
|
343
|
-
* const command = new CreateCustomKeyStoreCommand(input);
|
|
344
|
-
* const response = await client.send(command);
|
|
345
|
-
* /* response ==
|
|
346
|
-
* {
|
|
347
|
-
* "CustomKeyStoreId": "cks-987654321abcdef0"
|
|
348
|
-
* }
|
|
349
|
-
* *\/
|
|
350
|
-
* // example id: to-create-an-external-custom-key-store-with-a-public-endpoint-3
|
|
351
301
|
* ```
|
|
352
302
|
*
|
|
303
|
+
* @public
|
|
353
304
|
*/
|
|
354
305
|
export declare class CreateCustomKeyStoreCommand extends CreateCustomKeyStoreCommand_base {
|
|
355
306
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -186,29 +186,29 @@ declare const CreateGrantCommand_base: {
|
|
|
186
186
|
* @throws {@link KMSServiceException}
|
|
187
187
|
* <p>Base exception class for all service exceptions from KMS service.</p>
|
|
188
188
|
*
|
|
189
|
-
*
|
|
189
|
+
*
|
|
190
190
|
* @example To create a grant
|
|
191
191
|
* ```javascript
|
|
192
192
|
* // The following example creates a grant that allows the specified IAM role to encrypt data with the specified KMS key.
|
|
193
193
|
* const input = {
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
194
|
+
* GranteePrincipal: "arn:aws:iam::111122223333:role/ExampleRole",
|
|
195
|
+
* KeyId: "arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
196
|
+
* Operations: [
|
|
197
197
|
* "Encrypt",
|
|
198
198
|
* "Decrypt"
|
|
199
199
|
* ]
|
|
200
200
|
* };
|
|
201
201
|
* const command = new CreateGrantCommand(input);
|
|
202
202
|
* const response = await client.send(command);
|
|
203
|
-
* /* response
|
|
203
|
+
* /* response is
|
|
204
204
|
* {
|
|
205
|
-
*
|
|
206
|
-
*
|
|
205
|
+
* GrantId: "0c237476b39f8bc44e45212e08498fbe3151305030726c0590dd8d3e9f3d6a60",
|
|
206
|
+
* GrantToken: "AQpAM2RhZTk1MGMyNTk2ZmZmMzEyYWVhOWViN2I1MWM4Mzc0MWFiYjc0ZDE1ODkyNGFlNTIzODZhMzgyZjBlNGY3NiKIAgEBAgB4Pa6VDCWW__MSrqnre1HIN0Grt00ViSSuUjhqOC8OT3YAAADfMIHcBgkqhkiG9w0BBwaggc4wgcsCAQAwgcUGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMmqLyBTAegIn9XlK5AgEQgIGXZQjkBcl1dykDdqZBUQ6L1OfUivQy7JVYO2-ZJP7m6f1g8GzV47HX5phdtONAP7K_HQIflcgpkoCqd_fUnE114mSmiagWkbQ5sqAVV3ov-VeqgrvMe5ZFEWLMSluvBAqdjHEdMIkHMlhlj4ENZbzBfo9Wxk8b8SnwP4kc4gGivedzFXo-dwN8fxjjq_ZZ9JFOj2ijIbj5FyogDCN0drOfi8RORSEuCEmPvjFRMFAwcmwFkN2NPp89amA"
|
|
207
207
|
* }
|
|
208
208
|
* *\/
|
|
209
|
-
* // example id: to-create-a-grant-1477972226782
|
|
210
209
|
* ```
|
|
211
210
|
*
|
|
211
|
+
* @public
|
|
212
212
|
*/
|
|
213
213
|
export declare class CreateGrantCommand extends CreateGrantCommand_base {
|
|
214
214
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -407,290 +407,8 @@ declare const CreateKeyCommand_base: {
|
|
|
407
407
|
* @throws {@link KMSServiceException}
|
|
408
408
|
* <p>Base exception class for all service exceptions from KMS service.</p>
|
|
409
409
|
*
|
|
410
|
-
* @public
|
|
411
|
-
* @example To create a KMS key
|
|
412
|
-
* ```javascript
|
|
413
|
-
* // The following example creates a symmetric KMS key for encryption and decryption. No parameters are required for this operation.
|
|
414
|
-
* const input = {};
|
|
415
|
-
* const command = new CreateKeyCommand(input);
|
|
416
|
-
* const response = await client.send(command);
|
|
417
|
-
* /* response ==
|
|
418
|
-
* {
|
|
419
|
-
* "KeyMetadata": {
|
|
420
|
-
* "AWSAccountId": "111122223333",
|
|
421
|
-
* "Arn": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
422
|
-
* "CreationDate": "2017-07-05T14:04:55-07:00",
|
|
423
|
-
* "CustomerMasterKeySpec": "SYMMETRIC_DEFAULT",
|
|
424
|
-
* "Description": "",
|
|
425
|
-
* "Enabled": true,
|
|
426
|
-
* "EncryptionAlgorithms": [
|
|
427
|
-
* "SYMMETRIC_DEFAULT"
|
|
428
|
-
* ],
|
|
429
|
-
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
430
|
-
* "KeyManager": "CUSTOMER",
|
|
431
|
-
* "KeySpec": "SYMMETRIC_DEFAULT",
|
|
432
|
-
* "KeyState": "Enabled",
|
|
433
|
-
* "KeyUsage": "ENCRYPT_DECRYPT",
|
|
434
|
-
* "MultiRegion": false,
|
|
435
|
-
* "Origin": "AWS_KMS"
|
|
436
|
-
* }
|
|
437
|
-
* }
|
|
438
|
-
* *\/
|
|
439
|
-
* // example id: to-create-a-cmk-1
|
|
440
|
-
* ```
|
|
441
|
-
*
|
|
442
|
-
* @example To create an asymmetric RSA KMS key for encryption and decryption
|
|
443
|
-
* ```javascript
|
|
444
|
-
* // This example creates a KMS key that contains an asymmetric RSA key pair for encryption and decryption. The key spec and key usage can't be changed after the key is created.
|
|
445
|
-
* const input = {
|
|
446
|
-
* "KeySpec": "RSA_4096",
|
|
447
|
-
* "KeyUsage": "ENCRYPT_DECRYPT"
|
|
448
|
-
* };
|
|
449
|
-
* const command = new CreateKeyCommand(input);
|
|
450
|
-
* const response = await client.send(command);
|
|
451
|
-
* /* response ==
|
|
452
|
-
* {
|
|
453
|
-
* "KeyMetadata": {
|
|
454
|
-
* "AWSAccountId": "111122223333",
|
|
455
|
-
* "Arn": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
456
|
-
* "CreationDate": "2021-04-05T14:04:55-07:00",
|
|
457
|
-
* "CustomerMasterKeySpec": "RSA_4096",
|
|
458
|
-
* "Description": "",
|
|
459
|
-
* "Enabled": true,
|
|
460
|
-
* "EncryptionAlgorithms": [
|
|
461
|
-
* "RSAES_OAEP_SHA_1",
|
|
462
|
-
* "RSAES_OAEP_SHA_256"
|
|
463
|
-
* ],
|
|
464
|
-
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
465
|
-
* "KeyManager": "CUSTOMER",
|
|
466
|
-
* "KeySpec": "RSA_4096",
|
|
467
|
-
* "KeyState": "Enabled",
|
|
468
|
-
* "KeyUsage": "ENCRYPT_DECRYPT",
|
|
469
|
-
* "MultiRegion": false,
|
|
470
|
-
* "Origin": "AWS_KMS"
|
|
471
|
-
* }
|
|
472
|
-
* }
|
|
473
|
-
* *\/
|
|
474
|
-
* // example id: to-create-an-asymmetric-rsa-kms-key-for-encryption-and-decryption-2
|
|
475
|
-
* ```
|
|
476
|
-
*
|
|
477
|
-
* @example To create an asymmetric elliptic curve KMS key for signing and verification
|
|
478
|
-
* ```javascript
|
|
479
|
-
* // This example creates a KMS key that contains an asymmetric elliptic curve (ECC) key pair for signing and verification. The key usage is required even though "SIGN_VERIFY" is the only valid value for ECC KMS keys. The key spec and key usage can't be changed after the key is created.
|
|
480
|
-
* const input = {
|
|
481
|
-
* "KeySpec": "ECC_NIST_P521",
|
|
482
|
-
* "KeyUsage": "SIGN_VERIFY"
|
|
483
|
-
* };
|
|
484
|
-
* const command = new CreateKeyCommand(input);
|
|
485
|
-
* const response = await client.send(command);
|
|
486
|
-
* /* response ==
|
|
487
|
-
* {
|
|
488
|
-
* "KeyMetadata": {
|
|
489
|
-
* "AWSAccountId": "111122223333",
|
|
490
|
-
* "Arn": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
491
|
-
* "CreationDate": "2019-12-02T07:48:55-07:00",
|
|
492
|
-
* "CustomerMasterKeySpec": "ECC_NIST_P521",
|
|
493
|
-
* "Description": "",
|
|
494
|
-
* "Enabled": true,
|
|
495
|
-
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
496
|
-
* "KeyManager": "CUSTOMER",
|
|
497
|
-
* "KeySpec": "ECC_NIST_P521",
|
|
498
|
-
* "KeyState": "Enabled",
|
|
499
|
-
* "KeyUsage": "SIGN_VERIFY",
|
|
500
|
-
* "MultiRegion": false,
|
|
501
|
-
* "Origin": "AWS_KMS",
|
|
502
|
-
* "SigningAlgorithms": [
|
|
503
|
-
* "ECDSA_SHA_512"
|
|
504
|
-
* ]
|
|
505
|
-
* }
|
|
506
|
-
* }
|
|
507
|
-
* *\/
|
|
508
|
-
* // example id: to-create-an-asymmetric-elliptic-curve-kms-key-for-signing-and-verification-3
|
|
509
|
-
* ```
|
|
510
|
-
*
|
|
511
|
-
* @example To create an HMAC KMS key
|
|
512
|
-
* ```javascript
|
|
513
|
-
* // This example creates a 384-bit symmetric HMAC KMS key. The GENERATE_VERIFY_MAC key usage value is required even though it's the only valid value for HMAC KMS keys. The key spec and key usage can't be changed after the key is created.
|
|
514
|
-
* const input = {
|
|
515
|
-
* "KeySpec": "HMAC_384",
|
|
516
|
-
* "KeyUsage": "GENERATE_VERIFY_MAC"
|
|
517
|
-
* };
|
|
518
|
-
* const command = new CreateKeyCommand(input);
|
|
519
|
-
* const response = await client.send(command);
|
|
520
|
-
* /* response ==
|
|
521
|
-
* {
|
|
522
|
-
* "KeyMetadata": {
|
|
523
|
-
* "AWSAccountId": "111122223333",
|
|
524
|
-
* "Arn": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
525
|
-
* "CreationDate": "2022-04-05T14:04:55-07:00",
|
|
526
|
-
* "CustomerMasterKeySpec": "HMAC_384",
|
|
527
|
-
* "Description": "",
|
|
528
|
-
* "Enabled": true,
|
|
529
|
-
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
530
|
-
* "KeyManager": "CUSTOMER",
|
|
531
|
-
* "KeySpec": "HMAC_384",
|
|
532
|
-
* "KeyState": "Enabled",
|
|
533
|
-
* "KeyUsage": "GENERATE_VERIFY_MAC",
|
|
534
|
-
* "MacAlgorithms": [
|
|
535
|
-
* "HMAC_SHA_384"
|
|
536
|
-
* ],
|
|
537
|
-
* "MultiRegion": false,
|
|
538
|
-
* "Origin": "AWS_KMS"
|
|
539
|
-
* }
|
|
540
|
-
* }
|
|
541
|
-
* *\/
|
|
542
|
-
* // example id: to-create-an-hmac-kms-key-1630628752841
|
|
543
|
-
* ```
|
|
544
|
-
*
|
|
545
|
-
* @example To create a multi-Region primary KMS key
|
|
546
|
-
* ```javascript
|
|
547
|
-
* // This example creates a multi-Region primary symmetric encryption key. Because the default values for all parameters create a symmetric encryption key, only the MultiRegion parameter is required for this KMS key.
|
|
548
|
-
* const input = {
|
|
549
|
-
* "MultiRegion": true
|
|
550
|
-
* };
|
|
551
|
-
* const command = new CreateKeyCommand(input);
|
|
552
|
-
* const response = await client.send(command);
|
|
553
|
-
* /* response ==
|
|
554
|
-
* {
|
|
555
|
-
* "KeyMetadata": {
|
|
556
|
-
* "AWSAccountId": "111122223333",
|
|
557
|
-
* "Arn": "arn:aws:kms:us-west-2:111122223333:key/mrk-1234abcd12ab34cd56ef12345678990ab",
|
|
558
|
-
* "CreationDate": "2021-09-02T016:15:21-09:00",
|
|
559
|
-
* "CustomerMasterKeySpec": "SYMMETRIC_DEFAULT",
|
|
560
|
-
* "Description": "",
|
|
561
|
-
* "Enabled": true,
|
|
562
|
-
* "EncryptionAlgorithms": [
|
|
563
|
-
* "SYMMETRIC_DEFAULT"
|
|
564
|
-
* ],
|
|
565
|
-
* "KeyId": "mrk-1234abcd12ab34cd56ef12345678990ab",
|
|
566
|
-
* "KeyManager": "CUSTOMER",
|
|
567
|
-
* "KeySpec": "SYMMETRIC_DEFAULT",
|
|
568
|
-
* "KeyState": "Enabled",
|
|
569
|
-
* "KeyUsage": "ENCRYPT_DECRYPT",
|
|
570
|
-
* "MultiRegion": true,
|
|
571
|
-
* "MultiRegionConfiguration": {
|
|
572
|
-
* "MultiRegionKeyType": "PRIMARY",
|
|
573
|
-
* "PrimaryKey": {
|
|
574
|
-
* "Arn": "arn:aws:kms:us-west-2:111122223333:key/mrk-1234abcd12ab34cd56ef12345678990ab",
|
|
575
|
-
* "Region": "us-west-2"
|
|
576
|
-
* },
|
|
577
|
-
* "ReplicaKeys": []
|
|
578
|
-
* },
|
|
579
|
-
* "Origin": "AWS_KMS"
|
|
580
|
-
* }
|
|
581
|
-
* }
|
|
582
|
-
* *\/
|
|
583
|
-
* // example id: to-create-a-multi-region-primary-kms-key-4
|
|
584
|
-
* ```
|
|
585
|
-
*
|
|
586
|
-
* @example To create a KMS key for imported key material
|
|
587
|
-
* ```javascript
|
|
588
|
-
* // This example creates a symmetric KMS key with no key material. When the operation is complete, you can import your own key material into the KMS key. To create this KMS key, set the Origin parameter to EXTERNAL.
|
|
589
|
-
* const input = {
|
|
590
|
-
* "Origin": "EXTERNAL"
|
|
591
|
-
* };
|
|
592
|
-
* const command = new CreateKeyCommand(input);
|
|
593
|
-
* const response = await client.send(command);
|
|
594
|
-
* /* response ==
|
|
595
|
-
* {
|
|
596
|
-
* "KeyMetadata": {
|
|
597
|
-
* "AWSAccountId": "111122223333",
|
|
598
|
-
* "Arn": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
599
|
-
* "CreationDate": "2019-12-02T07:48:55-07:00",
|
|
600
|
-
* "CustomerMasterKeySpec": "SYMMETRIC_DEFAULT",
|
|
601
|
-
* "Description": "",
|
|
602
|
-
* "Enabled": false,
|
|
603
|
-
* "EncryptionAlgorithms": [
|
|
604
|
-
* "SYMMETRIC_DEFAULT"
|
|
605
|
-
* ],
|
|
606
|
-
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
607
|
-
* "KeyManager": "CUSTOMER",
|
|
608
|
-
* "KeySpec": "SYMMETRIC_DEFAULT",
|
|
609
|
-
* "KeyState": "PendingImport",
|
|
610
|
-
* "KeyUsage": "ENCRYPT_DECRYPT",
|
|
611
|
-
* "MultiRegion": false,
|
|
612
|
-
* "Origin": "EXTERNAL"
|
|
613
|
-
* }
|
|
614
|
-
* }
|
|
615
|
-
* *\/
|
|
616
|
-
* // example id: to-create-a-kms-key-for-imported-key-material-5
|
|
617
|
-
* ```
|
|
618
|
-
*
|
|
619
|
-
* @example To create a KMS key in an AWS CloudHSM key store
|
|
620
|
-
* ```javascript
|
|
621
|
-
* // This example creates a KMS key in the specified AWS CloudHSM key store. The operation creates the KMS key and its metadata in AWS KMS and creates the key material in the AWS CloudHSM cluster associated with the custom key store. This example requires the CustomKeyStoreId and Origin parameters.
|
|
622
|
-
* const input = {
|
|
623
|
-
* "CustomKeyStoreId": "cks-1234567890abcdef0",
|
|
624
|
-
* "Origin": "AWS_CLOUDHSM"
|
|
625
|
-
* };
|
|
626
|
-
* const command = new CreateKeyCommand(input);
|
|
627
|
-
* const response = await client.send(command);
|
|
628
|
-
* /* response ==
|
|
629
|
-
* {
|
|
630
|
-
* "KeyMetadata": {
|
|
631
|
-
* "AWSAccountId": "111122223333",
|
|
632
|
-
* "Arn": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
633
|
-
* "CloudHsmClusterId": "cluster-234abcdefABC",
|
|
634
|
-
* "CreationDate": "2019-12-02T07:48:55-07:00",
|
|
635
|
-
* "CustomKeyStoreId": "cks-1234567890abcdef0",
|
|
636
|
-
* "CustomerMasterKeySpec": "SYMMETRIC_DEFAULT",
|
|
637
|
-
* "Description": "",
|
|
638
|
-
* "Enabled": true,
|
|
639
|
-
* "EncryptionAlgorithms": [
|
|
640
|
-
* "SYMMETRIC_DEFAULT"
|
|
641
|
-
* ],
|
|
642
|
-
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
643
|
-
* "KeyManager": "CUSTOMER",
|
|
644
|
-
* "KeySpec": "SYMMETRIC_DEFAULT",
|
|
645
|
-
* "KeyState": "Enabled",
|
|
646
|
-
* "KeyUsage": "ENCRYPT_DECRYPT",
|
|
647
|
-
* "MultiRegion": false,
|
|
648
|
-
* "Origin": "AWS_CLOUDHSM"
|
|
649
|
-
* }
|
|
650
|
-
* }
|
|
651
|
-
* *\/
|
|
652
|
-
* // example id: to-create-a-kms-key-in-an-aws-cloudhsm-custom-key-store-6
|
|
653
|
-
* ```
|
|
654
|
-
*
|
|
655
|
-
* @example To create a KMS key in an external key store
|
|
656
|
-
* ```javascript
|
|
657
|
-
* // This example creates a KMS key in the specified external key store. It uses the XksKeyId parameter to associate the KMS key with an existing symmetric encryption key in your external key manager. This CustomKeyStoreId, Origin, and XksKeyId parameters are required in this operation.
|
|
658
|
-
* const input = {
|
|
659
|
-
* "CustomKeyStoreId": "cks-9876543210fedcba9",
|
|
660
|
-
* "Origin": "EXTERNAL_KEY_STORE",
|
|
661
|
-
* "XksKeyId": "bb8562717f809024"
|
|
662
|
-
* };
|
|
663
|
-
* const command = new CreateKeyCommand(input);
|
|
664
|
-
* const response = await client.send(command);
|
|
665
|
-
* /* response ==
|
|
666
|
-
* {
|
|
667
|
-
* "KeyMetadata": {
|
|
668
|
-
* "AWSAccountId": "111122223333",
|
|
669
|
-
* "Arn": "arn:aws:kms:us-east-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321",
|
|
670
|
-
* "CreationDate": "2022-02-02T07:48:55-07:00",
|
|
671
|
-
* "CustomKeyStoreId": "cks-9876543210fedcba9",
|
|
672
|
-
* "CustomerMasterKeySpec": "SYMMETRIC_DEFAULT",
|
|
673
|
-
* "Description": "",
|
|
674
|
-
* "Enabled": true,
|
|
675
|
-
* "EncryptionAlgorithms": [
|
|
676
|
-
* "SYMMETRIC_DEFAULT"
|
|
677
|
-
* ],
|
|
678
|
-
* "KeyId": "0987dcba-09fe-87dc-65ba-ab0987654321",
|
|
679
|
-
* "KeyManager": "CUSTOMER",
|
|
680
|
-
* "KeySpec": "SYMMETRIC_DEFAULT",
|
|
681
|
-
* "KeyState": "Enabled",
|
|
682
|
-
* "KeyUsage": "ENCRYPT_DECRYPT",
|
|
683
|
-
* "MultiRegion": false,
|
|
684
|
-
* "Origin": "EXTERNAL_KEY_STORE",
|
|
685
|
-
* "XksKeyConfiguration": {
|
|
686
|
-
* "Id": "bb8562717f809024"
|
|
687
|
-
* }
|
|
688
|
-
* }
|
|
689
|
-
* }
|
|
690
|
-
* *\/
|
|
691
|
-
* // example id: to-create-a-kms-key-in-an-external-custom-key-store-7
|
|
692
|
-
* ```
|
|
693
410
|
*
|
|
411
|
+
* @public
|
|
694
412
|
*/
|
|
695
413
|
export declare class CreateKeyCommand extends CreateKeyCommand_base {
|
|
696
414
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -247,69 +247,45 @@ declare const DecryptCommand_base: {
|
|
|
247
247
|
* @throws {@link KMSServiceException}
|
|
248
248
|
* <p>Base exception class for all service exceptions from KMS service.</p>
|
|
249
249
|
*
|
|
250
|
-
*
|
|
250
|
+
*
|
|
251
251
|
* @example To decrypt data with a symmetric encryption KMS key
|
|
252
252
|
* ```javascript
|
|
253
253
|
* // The following example decrypts data that was encrypted with a symmetric encryption KMS key. The KeyId is not required when decrypting with a symmetric encryption key, but it is a best practice.
|
|
254
254
|
* const input = {
|
|
255
|
-
*
|
|
256
|
-
*
|
|
255
|
+
* CiphertextBlob: "<binary data>",
|
|
256
|
+
* KeyId: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
|
|
257
257
|
* };
|
|
258
258
|
* const command = new DecryptCommand(input);
|
|
259
259
|
* const response = await client.send(command);
|
|
260
|
-
* /* response
|
|
260
|
+
* /* response is
|
|
261
261
|
* {
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
*
|
|
262
|
+
* EncryptionAlgorithm: "SYMMETRIC_DEFAULT",
|
|
263
|
+
* KeyId: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
264
|
+
* Plaintext: "<binary data>"
|
|
265
265
|
* }
|
|
266
266
|
* *\/
|
|
267
|
-
* // example id: to-decrypt-data-1
|
|
268
267
|
* ```
|
|
269
268
|
*
|
|
270
269
|
* @example To decrypt data with an asymmetric encryption KMS key
|
|
271
270
|
* ```javascript
|
|
272
271
|
* // 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.
|
|
273
272
|
* const input = {
|
|
274
|
-
*
|
|
275
|
-
*
|
|
276
|
-
*
|
|
273
|
+
* CiphertextBlob: "<binary data>",
|
|
274
|
+
* EncryptionAlgorithm: "RSAES_OAEP_SHA_256",
|
|
275
|
+
* KeyId: "0987dcba-09fe-87dc-65ba-ab0987654321"
|
|
277
276
|
* };
|
|
278
277
|
* const command = new DecryptCommand(input);
|
|
279
278
|
* const response = await client.send(command);
|
|
280
|
-
* /* response
|
|
279
|
+
* /* response is
|
|
281
280
|
* {
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
*
|
|
281
|
+
* EncryptionAlgorithm: "RSAES_OAEP_SHA_256",
|
|
282
|
+
* KeyId: "arn:aws:kms:us-west-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321",
|
|
283
|
+
* Plaintext: "<binary data>"
|
|
285
284
|
* }
|
|
286
285
|
* *\/
|
|
287
|
-
* // example id: to-decrypt-data-2
|
|
288
|
-
* ```
|
|
289
|
-
*
|
|
290
|
-
* @example To decrypt data for a Nitro enclave
|
|
291
|
-
* ```javascript
|
|
292
|
-
* // 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).
|
|
293
|
-
* const input = {
|
|
294
|
-
* "CiphertextBlob": "<binary data>",
|
|
295
|
-
* "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
296
|
-
* "Recipient": {
|
|
297
|
-
* "AttestationDocument": "<attestation document>",
|
|
298
|
-
* "KeyEncryptionAlgorithm": "RSAES_OAEP_SHA_256"
|
|
299
|
-
* }
|
|
300
|
-
* };
|
|
301
|
-
* const command = new DecryptCommand(input);
|
|
302
|
-
* const response = await client.send(command);
|
|
303
|
-
* /* response ==
|
|
304
|
-
* {
|
|
305
|
-
* "CiphertextForRecipient": "<binary data>",
|
|
306
|
-
* "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
307
|
-
* "Plaintext": ""
|
|
308
|
-
* }
|
|
309
|
-
* *\/
|
|
310
|
-
* // example id: to-decrypt-data-for-a-nitro-enclave-2
|
|
311
286
|
* ```
|
|
312
287
|
*
|
|
288
|
+
* @public
|
|
313
289
|
*/
|
|
314
290
|
export declare class DecryptCommand extends DecryptCommand_base {
|
|
315
291
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -134,18 +134,21 @@ declare const DeleteAliasCommand_base: {
|
|
|
134
134
|
* @throws {@link KMSServiceException}
|
|
135
135
|
* <p>Base exception class for all service exceptions from KMS service.</p>
|
|
136
136
|
*
|
|
137
|
-
*
|
|
137
|
+
*
|
|
138
138
|
* @example To delete an alias
|
|
139
139
|
* ```javascript
|
|
140
140
|
* // The following example deletes the specified alias.
|
|
141
141
|
* const input = {
|
|
142
|
-
*
|
|
142
|
+
* AliasName: "alias/ExampleAlias"
|
|
143
143
|
* };
|
|
144
144
|
* const command = new DeleteAliasCommand(input);
|
|
145
|
-
* await client.send(command);
|
|
146
|
-
*
|
|
145
|
+
* const response = await client.send(command);
|
|
146
|
+
* /* response is
|
|
147
|
+
* { /* metadata only *\/ }
|
|
148
|
+
* *\/
|
|
147
149
|
* ```
|
|
148
150
|
*
|
|
151
|
+
* @public
|
|
149
152
|
*/
|
|
150
153
|
export declare class DeleteAliasCommand extends DeleteAliasCommand_base {
|
|
151
154
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -163,18 +163,21 @@ declare const DeleteCustomKeyStoreCommand_base: {
|
|
|
163
163
|
* @throws {@link KMSServiceException}
|
|
164
164
|
* <p>Base exception class for all service exceptions from KMS service.</p>
|
|
165
165
|
*
|
|
166
|
-
*
|
|
166
|
+
*
|
|
167
167
|
* @example To delete a custom key store from AWS KMS
|
|
168
168
|
* ```javascript
|
|
169
169
|
* // This example deletes a custom key store from AWS KMS. This operation does not affect the backing key store, such as a CloudHSM cluster, external key store proxy, or your external key manager. This operation doesn't return any data. To verify that the operation was successful, use the DescribeCustomKeyStores operation.
|
|
170
170
|
* const input = {
|
|
171
|
-
*
|
|
171
|
+
* CustomKeyStoreId: "cks-1234567890abcdef0"
|
|
172
172
|
* };
|
|
173
173
|
* const command = new DeleteCustomKeyStoreCommand(input);
|
|
174
|
-
* await client.send(command);
|
|
175
|
-
*
|
|
174
|
+
* const response = await client.send(command);
|
|
175
|
+
* /* response is
|
|
176
|
+
* { /* empty *\/ }
|
|
177
|
+
* *\/
|
|
176
178
|
* ```
|
|
177
179
|
*
|
|
180
|
+
* @public
|
|
178
181
|
*/
|
|
179
182
|
export declare class DeleteCustomKeyStoreCommand extends DeleteCustomKeyStoreCommand_base {
|
|
180
183
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -122,18 +122,21 @@ declare const DeleteImportedKeyMaterialCommand_base: {
|
|
|
122
122
|
* @throws {@link KMSServiceException}
|
|
123
123
|
* <p>Base exception class for all service exceptions from KMS service.</p>
|
|
124
124
|
*
|
|
125
|
-
*
|
|
125
|
+
*
|
|
126
126
|
* @example To delete imported key material
|
|
127
127
|
* ```javascript
|
|
128
128
|
* // The following example deletes the imported key material from the specified KMS key.
|
|
129
129
|
* const input = {
|
|
130
|
-
*
|
|
130
|
+
* KeyId: "1234abcd-12ab-34cd-56ef-1234567890ab"
|
|
131
131
|
* };
|
|
132
132
|
* const command = new DeleteImportedKeyMaterialCommand(input);
|
|
133
|
-
* await client.send(command);
|
|
134
|
-
*
|
|
133
|
+
* const response = await client.send(command);
|
|
134
|
+
* /* response is
|
|
135
|
+
* { /* metadata only *\/ }
|
|
136
|
+
* *\/
|
|
135
137
|
* ```
|
|
136
138
|
*
|
|
139
|
+
* @public
|
|
137
140
|
*/
|
|
138
141
|
export declare class DeleteImportedKeyMaterialCommand extends DeleteImportedKeyMaterialCommand_base {
|
|
139
142
|
/** @internal type navigation helper, not in runtime. */
|