@aws-sdk/client-kms 3.131.0 → 3.132.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 (37) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist-cjs/models/models_0.js +6 -0
  3. package/dist-cjs/pagination/DescribeCustomKeyStoresPaginator.js +36 -0
  4. package/dist-cjs/pagination/ListResourceTagsPaginator.js +36 -0
  5. package/dist-cjs/pagination/ListRetirableGrantsPaginator.js +36 -0
  6. package/dist-cjs/pagination/index.js +3 -0
  7. package/dist-es/models/models_0.js +6 -0
  8. package/dist-es/pagination/DescribeCustomKeyStoresPaginator.js +75 -0
  9. package/dist-es/pagination/ListResourceTagsPaginator.js +75 -0
  10. package/dist-es/pagination/ListRetirableGrantsPaginator.js +75 -0
  11. package/dist-es/pagination/index.js +3 -0
  12. package/dist-types/KMS.d.ts +49 -27
  13. package/dist-types/commands/CreateCustomKeyStoreCommand.d.ts +1 -1
  14. package/dist-types/commands/CreateKeyCommand.d.ts +5 -3
  15. package/dist-types/commands/DeleteCustomKeyStoreCommand.d.ts +2 -2
  16. package/dist-types/commands/DescribeCustomKeyStoresCommand.d.ts +1 -1
  17. package/dist-types/commands/DescribeKeyCommand.d.ts +1 -1
  18. package/dist-types/commands/DisconnectCustomKeyStoreCommand.d.ts +1 -1
  19. package/dist-types/commands/EncryptCommand.d.ts +5 -1
  20. package/dist-types/commands/GenerateDataKeyCommand.d.ts +12 -6
  21. package/dist-types/commands/GenerateDataKeyPairCommand.d.ts +3 -3
  22. package/dist-types/commands/GenerateDataKeyPairWithoutPlaintextCommand.d.ts +3 -3
  23. package/dist-types/commands/GenerateRandomCommand.d.ts +4 -1
  24. package/dist-types/commands/GetPublicKeyCommand.d.ts +5 -2
  25. package/dist-types/commands/UpdateCustomKeyStoreCommand.d.ts +1 -1
  26. package/dist-types/commands/VerifyCommand.d.ts +5 -1
  27. package/dist-types/models/models_0.d.ts +56 -38
  28. package/dist-types/pagination/DescribeCustomKeyStoresPaginator.d.ts +4 -0
  29. package/dist-types/pagination/ListResourceTagsPaginator.d.ts +4 -0
  30. package/dist-types/pagination/ListRetirableGrantsPaginator.d.ts +4 -0
  31. package/dist-types/pagination/index.d.ts +3 -0
  32. package/dist-types/ts3.4/models/models_0.d.ts +11 -5
  33. package/dist-types/ts3.4/pagination/DescribeCustomKeyStoresPaginator.d.ts +4 -0
  34. package/dist-types/ts3.4/pagination/ListResourceTagsPaginator.d.ts +4 -0
  35. package/dist-types/ts3.4/pagination/ListRetirableGrantsPaginator.d.ts +4 -0
  36. package/dist-types/ts3.4/pagination/index.d.ts +3 -0
  37. package/package.json +1 -1
@@ -299,7 +299,7 @@ export declare class KMS extends KMSClient {
299
299
  /**
300
300
  * <p>Creates a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a> that is associated with an <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/clusters.html">CloudHSM cluster</a> that you own and
301
301
  * manage.</p>
302
- * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">Custom Key Store feature</a> feature in KMS, which
302
+ * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store feature</a> feature in KMS, which
303
303
  * combines the convenience and extensive integration of KMS with the isolation and control of a
304
304
  * single-tenant key store.</p>
305
305
  * <p>Before you create the custom key store, you must assemble
@@ -434,7 +434,9 @@ export declare class KMS extends KMSClient {
434
434
  * <dd>
435
435
  * <p>To create a symmetric encryption KMS key, you aren't required to specify any parameters. The default value for
436
436
  * <code>KeySpec</code>, <code>SYMMETRIC_DEFAULT</code>, and the default value for
437
- * <code>KeyUsage</code>, <code>ENCRYPT_DECRYPT</code>, create a symmetric encryption KMS key.</p>
437
+ * <code>KeyUsage</code>, <code>ENCRYPT_DECRYPT</code>, create a symmetric encryption KMS key. For technical details, see
438
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-symmetric-default">
439
+ * SYMMETRIC_DEFAULT key spec</a> in the <i>Key Management Service Developer Guide</i>.</p>
438
440
  * <p>If you need a key for basic encryption and decryption or you
439
441
  * are creating a KMS key to protect your resources in an Amazon Web Services service, create a symmetric encryption KMS key. The key material in a symmetric encryption key never leaves KMS unencrypted. You can use a symmetric encryption KMS key to encrypt and decrypt data up to 4,096 bytes, but they are typically used to generate data keys and data keys pairs. For details, see <a>GenerateDataKey</a> and <a>GenerateDataKeyPair</a>.</p>
440
442
  * <p> </p>
@@ -445,9 +447,9 @@ export declare class KMS extends KMSClient {
445
447
  * the type of key material in the KMS key. Then, use the <code>KeyUsage</code> parameter
446
448
  * to determine whether the KMS key will be used to encrypt and decrypt or sign and verify.
447
449
  * You can't change these properties after the KMS key is created.</p>
448
- * <p>Asymmetric KMS keys contain an RSA key pair or an Elliptic Curve (ECC) key pair. The private key in an asymmetric
450
+ * <p>Asymmetric KMS keys contain an RSA key pair, Elliptic Curve (ECC) key pair, or an SM2 key pair (China Regions only). The private key in an asymmetric
449
451
  * KMS key never leaves KMS unencrypted. However, you can use the <a>GetPublicKey</a> operation to download the public key
450
- * so it can be used outside of KMS. KMS keys with RSA key pairs can be used to encrypt or decrypt data or sign and verify messages (but not both).
452
+ * so it can be used outside of KMS. KMS keys with RSA or SM2 key pairs can be used to encrypt or decrypt data or sign and verify messages (but not both).
451
453
  * KMS keys with ECC key pairs can be used only to sign and verify messages.
452
454
  * For information about asymmetric KMS keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Asymmetric KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
453
455
  * <p> </p>
@@ -702,7 +704,7 @@ export declare class KMS extends KMSClient {
702
704
  /**
703
705
  * <p>Deletes a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a>. This operation does not delete the CloudHSM cluster that is
704
706
  * associated with the custom key store, or affect any users or keys in the cluster.</p>
705
- * <p>The custom key store that you delete cannot contain any KMS <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys">KMS keys</a>. Before deleting the key store,
707
+ * <p>The custom key store that you delete cannot contain any <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys">KMS keys</a>. Before deleting the key store,
706
708
  * verify that you will never need to use any of the KMS keys in the key store for any
707
709
  * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations">cryptographic operations</a>. Then, use <a>ScheduleKeyDeletion</a> to delete the KMS keys from the
708
710
  * key store. When the scheduled waiting period expires, the <code>ScheduleKeyDeletion</code>
@@ -716,7 +718,7 @@ export declare class KMS extends KMSClient {
716
718
  * delete KMS keys and you can reconnect a disconnected custom key store at any time.</p>
717
719
  * <p>If the operation succeeds, it returns a JSON object with no
718
720
  * properties.</p>
719
- * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">Custom Key Store feature</a> feature in KMS, which
721
+ * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store feature</a> feature in KMS, which
720
722
  * combines the convenience and extensive integration of KMS with the isolation and control of a
721
723
  * single-tenant key store.</p>
722
724
  * <p>
@@ -796,7 +798,7 @@ export declare class KMS extends KMSClient {
796
798
  deleteImportedKeyMaterial(args: DeleteImportedKeyMaterialCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteImportedKeyMaterialCommandOutput) => void): void;
797
799
  /**
798
800
  * <p>Gets information about <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key stores</a> in the account and Region.</p>
799
- * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">Custom Key Store feature</a> feature in KMS, which
801
+ * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store feature</a> feature in KMS, which
800
802
  * combines the convenience and extensive integration of KMS with the isolation and control of a
801
803
  * single-tenant key store.</p>
802
804
  * <p>By default, this operation returns information about all custom key
@@ -872,7 +874,7 @@ export declare class KMS extends KMSClient {
872
874
  * <p>Whether automatic key rotation is enabled on the KMS key. To get this information, use
873
875
  * <a>GetKeyRotationStatus</a>. Also, some key states prevent a KMS key from
874
876
  * being automatically rotated. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotate-keys-how-it-works">How Automatic Key Rotation
875
- * Works</a> in <i>Key Management Service Developer Guide</i>.</p>
877
+ * Works</a> in the <i>Key Management Service Developer Guide</i>.</p>
876
878
  * </li>
877
879
  * <li>
878
880
  * <p>Tags on the KMS key. To get this information, use <a>ListResourceTags</a>.</p>
@@ -1011,7 +1013,7 @@ export declare class KMS extends KMSClient {
1011
1013
  * <a>ConnectCustomKeyStore</a> operation.</p>
1012
1014
  * <p>If the operation succeeds, it returns a JSON object with no
1013
1015
  * properties.</p>
1014
- * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">Custom Key Store feature</a> feature in KMS, which
1016
+ * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store feature</a> feature in KMS, which
1015
1017
  * combines the convenience and extensive integration of KMS with the isolation and control of a
1016
1018
  * single-tenant key store.</p>
1017
1019
  *
@@ -1136,7 +1138,7 @@ export declare class KMS extends KMSClient {
1136
1138
  * <code>InvalidCiphertextException</code>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption
1137
1139
  * Context</a> in the <i>Key Management Service Developer Guide</i>.</p>
1138
1140
  * <p>If you specify an asymmetric KMS key, you must also specify the encryption algorithm. The
1139
- * algorithm must be compatible with the KMS key type.</p>
1141
+ * algorithm must be compatible with the KMS key spec.</p>
1140
1142
  * <important>
1141
1143
  * <p>When you use an asymmetric KMS key to encrypt or reencrypt data, be sure to record the KMS key and encryption algorithm that you choose. You will be required to provide the same KMS key and encryption algorithm when you decrypt the data. If the KMS key and algorithm do not match the values used to encrypt the data, the decrypt operation fails.</p>
1142
1144
  * <p>You are not required to supply the key ID and encryption algorithm when you decrypt with symmetric encryption KMS keys because KMS stores this information in the ciphertext blob. KMS cannot store metadata in ciphertext generated with asymmetric keys. The standard format for asymmetric key ciphertext does not include configurable fields.</p>
@@ -1200,6 +1202,10 @@ export declare class KMS extends KMSClient {
1200
1202
  * </li>
1201
1203
  * </ul>
1202
1204
  * </li>
1205
+ * <li>
1206
+ * <p>
1207
+ * <code>SM2PKE</code>: 1024 bytes (China Regions only)</p>
1208
+ * </li>
1203
1209
  * </ul>
1204
1210
  * <p>The KMS key that you use for this operation must be in a compatible key state. For
1205
1211
  * details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
@@ -1237,15 +1243,21 @@ export declare class KMS extends KMSClient {
1237
1243
  /**
1238
1244
  * <p>Returns a unique symmetric data key for use outside of KMS. This operation returns a
1239
1245
  * plaintext copy of the data key and a copy that is encrypted under a symmetric encryption KMS
1240
- * key that you specify. The bytes in the plaintext key are random; they are not related to the caller or the KMS
1241
- * key. You can use the plaintext key to encrypt your data outside of KMS and store the encrypted
1242
- * data key with the encrypted data.</p>
1246
+ * key that you specify. The bytes in the plaintext key are random; they are not related
1247
+ * to the caller or the KMS key. You can use the plaintext key to encrypt your data outside of KMS
1248
+ * and store the encrypted data key with the encrypted data.</p>
1243
1249
  *
1244
1250
  * <p>To generate a data key, specify the symmetric encryption KMS key that will be used to
1245
1251
  * encrypt the data key. You cannot use an asymmetric KMS key to encrypt data keys. To get the
1246
- * type of your KMS key, use the <a>DescribeKey</a> operation. You must also specify the length of
1247
- * the data key. Use either the <code>KeySpec</code> or <code>NumberOfBytes</code> parameters
1248
- * (but not both). For 128-bit and 256-bit data keys, use the <code>KeySpec</code> parameter. </p>
1252
+ * type of your KMS key, use the <a>DescribeKey</a> operation.</p>
1253
+ *
1254
+ * <p>You must also specify the length of the data key. Use either the <code>KeySpec</code> or
1255
+ * <code>NumberOfBytes</code> parameters (but not both). For 128-bit and 256-bit data keys, use
1256
+ * the <code>KeySpec</code> parameter.</p>
1257
+ *
1258
+ * <p>To generate an SM4 data key (China Regions only), specify a <code>KeySpec</code> value of
1259
+ * <code>AES_128</code> or <code>NumberOfBytes</code> value of <code>128</code>. The symmetric
1260
+ * encryption key used in China Regions to encrypt your data key is an SM4 encryption key.</p>
1249
1261
  *
1250
1262
  * <p>To get only an encrypted copy of the data key, use <a>GenerateDataKeyWithoutPlaintext</a>. To generate an asymmetric data key pair, use
1251
1263
  * the <a>GenerateDataKeyPair</a> or <a>GenerateDataKeyPairWithoutPlaintext</a> operation. To get a cryptographically secure
@@ -1351,9 +1363,9 @@ export declare class KMS extends KMSClient {
1351
1363
  * custom key store. To get the type and origin of your KMS key, use the <a>DescribeKey</a>
1352
1364
  * operation. </p>
1353
1365
  * <p>Use the <code>KeyPairSpec</code> parameter to choose an RSA or Elliptic Curve (ECC) data
1354
- * key pair. KMS recommends that your use ECC key pairs for signing, and use RSA key pairs for
1355
- * either encryption or signing, but not both. However, KMS cannot enforce any restrictions on
1356
- * the use of data key pairs outside of KMS.</p>
1366
+ * key pair. In China Regions, you can also choose an SM2 data key pair. KMS recommends that you use
1367
+ * ECC key pairs for signing, and use RSA and SM2 key pairs for either encryption or signing, but not both.
1368
+ * However, KMS cannot enforce any restrictions on the use of data key pairs outside of KMS.</p>
1357
1369
  *
1358
1370
  * <p>If you are using the data key pair to encrypt data, or for any operation where you don't
1359
1371
  * immediately need a private key, consider using the <a>GenerateDataKeyPairWithoutPlaintext</a> operation.
@@ -1432,9 +1444,9 @@ export declare class KMS extends KMSClient {
1432
1444
  * custom key store. To get the type and origin of your KMS key, use the <a>DescribeKey</a>
1433
1445
  * operation. </p>
1434
1446
  * <p>Use the <code>KeyPairSpec</code> parameter to choose an RSA or Elliptic Curve (ECC) data
1435
- * key pair. KMS recommends that your use ECC key pairs for signing, and use RSA key pairs for
1436
- * either encryption or signing, but not both. However, KMS cannot enforce any restrictions on
1437
- * the use of data key pairs outside of KMS.</p>
1447
+ * key pair. In China Regions, you can also choose an SM2 data key pair. KMS recommends that you
1448
+ * use ECC key pairs for signing, and use RSA and SM2 key pairs for either encryption or signing, but not
1449
+ * both. However, KMS cannot enforce any restrictions on the use of data key pairs outside of KMS.</p>
1438
1450
  * <p>
1439
1451
  * <code>GenerateDataKeyPairWithoutPlaintext</code> returns a unique data key pair for each
1440
1452
  * request. The bytes in the key are not related to the caller or KMS key that is used to encrypt
@@ -1601,13 +1613,16 @@ export declare class KMS extends KMSClient {
1601
1613
  generateMac(args: GenerateMacCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GenerateMacCommandOutput) => void): void;
1602
1614
  /**
1603
1615
  * <p>Returns a random byte string that is cryptographically secure.</p>
1616
+ * <p>You must use the <code>NumberOfBytes</code> parameter to specify the length of the random
1617
+ * byte string. There is no default value for string length.</p>
1604
1618
  * <p>By default, the random byte string is generated in KMS. To generate the byte string in
1605
1619
  * the CloudHSM cluster that is associated with a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a>, specify the custom key store
1606
1620
  * ID.</p>
1607
1621
  * <p>Applications in Amazon Web Services Nitro Enclaves can call this operation by using the <a href="https://github.com/aws/aws-nitro-enclaves-sdk-c">Amazon Web Services Nitro Enclaves Development Kit</a>. For information about the supporting parameters, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html">How Amazon Web Services Nitro Enclaves use KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
1608
1622
  * <p>For more information about entropy and random number generation, see
1609
1623
  * <a href="https://docs.aws.amazon.com/kms/latest/cryptographic-details/">Key Management Service Cryptographic Details</a>.</p>
1610
- *
1624
+ * <p>
1625
+ * <b>Cross-account use</b>: Not applicable. <code>GenerateRandom</code> does not use any account-specific resources, such as KMS keys.</p>
1611
1626
  * <p>
1612
1627
  * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GenerateRandom</a> (IAM policy)</p>
1613
1628
  */
@@ -1737,8 +1752,11 @@ export declare class KMS extends KMSClient {
1737
1752
  * KMS by calling the <a>Encrypt</a>, <a>ReEncrypt</a>, or <a>Verify</a> operations with the identifier of an asymmetric KMS key. When you use the
1738
1753
  * public key within KMS, you benefit from the authentication, authorization, and logging that
1739
1754
  * are part of every KMS operation. You also reduce of risk of encrypting data that cannot be
1740
- * decrypted. These features are not effective outside of KMS. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/download-public-key.html#download-public-key-considerations">Special
1741
- * Considerations for Downloading Public Keys</a>.</p>
1755
+ * decrypted. These features are not effective outside of KMS.</p>
1756
+ * <p>To verify a signature outside of KMS with an SM2 public key (China Regions only), you must
1757
+ * specify the distinguishing ID. By default, KMS uses <code>1234567812345678</code> as the
1758
+ * distinguishing ID. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-sm-offline-verification">Offline verification
1759
+ * with SM2 key pairs</a>.</p>
1742
1760
  * <p>To help you use the public key safely outside of KMS, <code>GetPublicKey</code> returns
1743
1761
  * important information about the public key in the response, including:</p>
1744
1762
  * <ul>
@@ -2732,7 +2750,7 @@ export declare class KMS extends KMSClient {
2732
2750
  * </ul>
2733
2751
  * <p>If the operation succeeds, it returns a JSON object with no
2734
2752
  * properties.</p>
2735
- * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">Custom Key Store feature</a> feature in KMS, which
2753
+ * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store feature</a> feature in KMS, which
2736
2754
  * combines the convenience and extensive integration of KMS with the isolation and control of a
2737
2755
  * single-tenant key store.</p>
2738
2756
  * <p>
@@ -2889,7 +2907,11 @@ export declare class KMS extends KMSClient {
2889
2907
  * signature.</p>
2890
2908
  * <p>You can also verify the digital signature by using the public key of the KMS key outside
2891
2909
  * of KMS. Use the <a>GetPublicKey</a> operation to download the public key in the
2892
- * asymmetric KMS key and then use the public key to verify the signature outside of KMS. The
2910
+ * asymmetric KMS key and then use the public key to verify the signature outside of KMS. To
2911
+ * verify a signature outside of KMS with an SM2 public key, you must specify the distinguishing
2912
+ * ID. By default, KMS uses <code>1234567812345678</code> as the distinguishing ID. For more
2913
+ * information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-sm-offline-verification">Offline
2914
+ * verification with SM2 key pairs</a> in <i>Key Management Service Developer Guide</i>. The
2893
2915
  * advantage of using the <code>Verify</code> operation is that it is performed within KMS. As
2894
2916
  * a result, it's easy to call, the operation is performed within the FIPS boundary, it is logged
2895
2917
  * in CloudTrail, and you can use key policy and IAM policy to determine who is authorized to use
@@ -9,7 +9,7 @@ export interface CreateCustomKeyStoreCommandOutput extends CreateCustomKeyStoreR
9
9
  /**
10
10
  * <p>Creates a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a> that is associated with an <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/clusters.html">CloudHSM cluster</a> that you own and
11
11
  * manage.</p>
12
- * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">Custom Key Store feature</a> feature in KMS, which
12
+ * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store feature</a> feature in KMS, which
13
13
  * combines the convenience and extensive integration of KMS with the isolation and control of a
14
14
  * single-tenant key store.</p>
15
15
  * <p>Before you create the custom key store, you must assemble
@@ -21,7 +21,9 @@ export interface CreateKeyCommandOutput extends CreateKeyResponse, __MetadataBea
21
21
  * <dd>
22
22
  * <p>To create a symmetric encryption KMS key, you aren't required to specify any parameters. The default value for
23
23
  * <code>KeySpec</code>, <code>SYMMETRIC_DEFAULT</code>, and the default value for
24
- * <code>KeyUsage</code>, <code>ENCRYPT_DECRYPT</code>, create a symmetric encryption KMS key.</p>
24
+ * <code>KeyUsage</code>, <code>ENCRYPT_DECRYPT</code>, create a symmetric encryption KMS key. For technical details, see
25
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-symmetric-default">
26
+ * SYMMETRIC_DEFAULT key spec</a> in the <i>Key Management Service Developer Guide</i>.</p>
25
27
  * <p>If you need a key for basic encryption and decryption or you
26
28
  * are creating a KMS key to protect your resources in an Amazon Web Services service, create a symmetric encryption KMS key. The key material in a symmetric encryption key never leaves KMS unencrypted. You can use a symmetric encryption KMS key to encrypt and decrypt data up to 4,096 bytes, but they are typically used to generate data keys and data keys pairs. For details, see <a>GenerateDataKey</a> and <a>GenerateDataKeyPair</a>.</p>
27
29
  * <p> </p>
@@ -32,9 +34,9 @@ export interface CreateKeyCommandOutput extends CreateKeyResponse, __MetadataBea
32
34
  * the type of key material in the KMS key. Then, use the <code>KeyUsage</code> parameter
33
35
  * to determine whether the KMS key will be used to encrypt and decrypt or sign and verify.
34
36
  * You can't change these properties after the KMS key is created.</p>
35
- * <p>Asymmetric KMS keys contain an RSA key pair or an Elliptic Curve (ECC) key pair. The private key in an asymmetric
37
+ * <p>Asymmetric KMS keys contain an RSA key pair, Elliptic Curve (ECC) key pair, or an SM2 key pair (China Regions only). The private key in an asymmetric
36
38
  * KMS key never leaves KMS unencrypted. However, you can use the <a>GetPublicKey</a> operation to download the public key
37
- * so it can be used outside of KMS. KMS keys with RSA key pairs can be used to encrypt or decrypt data or sign and verify messages (but not both).
39
+ * so it can be used outside of KMS. KMS keys with RSA or SM2 key pairs can be used to encrypt or decrypt data or sign and verify messages (but not both).
38
40
  * KMS keys with ECC key pairs can be used only to sign and verify messages.
39
41
  * For information about asymmetric KMS keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Asymmetric KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
40
42
  * <p> </p>
@@ -9,7 +9,7 @@ export interface DeleteCustomKeyStoreCommandOutput extends DeleteCustomKeyStoreR
9
9
  /**
10
10
  * <p>Deletes a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a>. This operation does not delete the CloudHSM cluster that is
11
11
  * associated with the custom key store, or affect any users or keys in the cluster.</p>
12
- * <p>The custom key store that you delete cannot contain any KMS <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys">KMS keys</a>. Before deleting the key store,
12
+ * <p>The custom key store that you delete cannot contain any <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys">KMS keys</a>. Before deleting the key store,
13
13
  * verify that you will never need to use any of the KMS keys in the key store for any
14
14
  * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations">cryptographic operations</a>. Then, use <a>ScheduleKeyDeletion</a> to delete the KMS keys from the
15
15
  * key store. When the scheduled waiting period expires, the <code>ScheduleKeyDeletion</code>
@@ -23,7 +23,7 @@ export interface DeleteCustomKeyStoreCommandOutput extends DeleteCustomKeyStoreR
23
23
  * delete KMS keys and you can reconnect a disconnected custom key store at any time.</p>
24
24
  * <p>If the operation succeeds, it returns a JSON object with no
25
25
  * properties.</p>
26
- * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">Custom Key Store feature</a> feature in KMS, which
26
+ * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store feature</a> feature in KMS, which
27
27
  * combines the convenience and extensive integration of KMS with the isolation and control of a
28
28
  * single-tenant key store.</p>
29
29
  * <p>
@@ -8,7 +8,7 @@ export interface DescribeCustomKeyStoresCommandOutput extends DescribeCustomKeyS
8
8
  }
9
9
  /**
10
10
  * <p>Gets information about <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key stores</a> in the account and Region.</p>
11
- * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">Custom Key Store feature</a> feature in KMS, which
11
+ * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store feature</a> feature in KMS, which
12
12
  * combines the convenience and extensive integration of KMS with the isolation and control of a
13
13
  * single-tenant key store.</p>
14
14
  * <p>By default, this operation returns information about all custom key
@@ -25,7 +25,7 @@ export interface DescribeKeyCommandOutput extends DescribeKeyResponse, __Metadat
25
25
  * <p>Whether automatic key rotation is enabled on the KMS key. To get this information, use
26
26
  * <a>GetKeyRotationStatus</a>. Also, some key states prevent a KMS key from
27
27
  * being automatically rotated. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotate-keys-how-it-works">How Automatic Key Rotation
28
- * Works</a> in <i>Key Management Service Developer Guide</i>.</p>
28
+ * Works</a> in the <i>Key Management Service Developer Guide</i>.</p>
29
29
  * </li>
30
30
  * <li>
31
31
  * <p>Tags on the KMS key. To get this information, use <a>ListResourceTags</a>.</p>
@@ -20,7 +20,7 @@ export interface DisconnectCustomKeyStoreCommandOutput extends DisconnectCustomK
20
20
  * <a>ConnectCustomKeyStore</a> operation.</p>
21
21
  * <p>If the operation succeeds, it returns a JSON object with no
22
22
  * properties.</p>
23
- * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">Custom Key Store feature</a> feature in KMS, which
23
+ * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store feature</a> feature in KMS, which
24
24
  * combines the convenience and extensive integration of KMS with the isolation and control of a
25
25
  * single-tenant key store.</p>
26
26
  *
@@ -20,7 +20,7 @@ export interface EncryptCommandOutput extends EncryptResponse, __MetadataBearer
20
20
  * <code>InvalidCiphertextException</code>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption
21
21
  * Context</a> in the <i>Key Management Service Developer Guide</i>.</p>
22
22
  * <p>If you specify an asymmetric KMS key, you must also specify the encryption algorithm. The
23
- * algorithm must be compatible with the KMS key type.</p>
23
+ * algorithm must be compatible with the KMS key spec.</p>
24
24
  * <important>
25
25
  * <p>When you use an asymmetric KMS key to encrypt or reencrypt data, be sure to record the KMS key and encryption algorithm that you choose. You will be required to provide the same KMS key and encryption algorithm when you decrypt the data. If the KMS key and algorithm do not match the values used to encrypt the data, the decrypt operation fails.</p>
26
26
  * <p>You are not required to supply the key ID and encryption algorithm when you decrypt with symmetric encryption KMS keys because KMS stores this information in the ciphertext blob. KMS cannot store metadata in ciphertext generated with asymmetric keys. The standard format for asymmetric key ciphertext does not include configurable fields.</p>
@@ -84,6 +84,10 @@ export interface EncryptCommandOutput extends EncryptResponse, __MetadataBearer
84
84
  * </li>
85
85
  * </ul>
86
86
  * </li>
87
+ * <li>
88
+ * <p>
89
+ * <code>SM2PKE</code>: 1024 bytes (China Regions only)</p>
90
+ * </li>
87
91
  * </ul>
88
92
  * <p>The KMS key that you use for this operation must be in a compatible key state. For
89
93
  * details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
@@ -9,15 +9,21 @@ export interface GenerateDataKeyCommandOutput extends GenerateDataKeyResponse, _
9
9
  /**
10
10
  * <p>Returns a unique symmetric data key for use outside of KMS. This operation returns a
11
11
  * plaintext copy of the data key and a copy that is encrypted under a symmetric encryption KMS
12
- * key that you specify. The bytes in the plaintext key are random; they are not related to the caller or the KMS
13
- * key. You can use the plaintext key to encrypt your data outside of KMS and store the encrypted
14
- * data key with the encrypted data.</p>
12
+ * key that you specify. The bytes in the plaintext key are random; they are not related
13
+ * to the caller or the KMS key. You can use the plaintext key to encrypt your data outside of KMS
14
+ * and store the encrypted data key with the encrypted data.</p>
15
15
  *
16
16
  * <p>To generate a data key, specify the symmetric encryption KMS key that will be used to
17
17
  * encrypt the data key. You cannot use an asymmetric KMS key to encrypt data keys. To get the
18
- * type of your KMS key, use the <a>DescribeKey</a> operation. You must also specify the length of
19
- * the data key. Use either the <code>KeySpec</code> or <code>NumberOfBytes</code> parameters
20
- * (but not both). For 128-bit and 256-bit data keys, use the <code>KeySpec</code> parameter. </p>
18
+ * type of your KMS key, use the <a>DescribeKey</a> operation.</p>
19
+ *
20
+ * <p>You must also specify the length of the data key. Use either the <code>KeySpec</code> or
21
+ * <code>NumberOfBytes</code> parameters (but not both). For 128-bit and 256-bit data keys, use
22
+ * the <code>KeySpec</code> parameter.</p>
23
+ *
24
+ * <p>To generate an SM4 data key (China Regions only), specify a <code>KeySpec</code> value of
25
+ * <code>AES_128</code> or <code>NumberOfBytes</code> value of <code>128</code>. The symmetric
26
+ * encryption key used in China Regions to encrypt your data key is an SM4 encryption key.</p>
21
27
  *
22
28
  * <p>To get only an encrypted copy of the data key, use <a>GenerateDataKeyWithoutPlaintext</a>. To generate an asymmetric data key pair, use
23
29
  * the <a>GenerateDataKeyPair</a> or <a>GenerateDataKeyPairWithoutPlaintext</a> operation. To get a cryptographically secure
@@ -23,9 +23,9 @@ export interface GenerateDataKeyPairCommandOutput extends GenerateDataKeyPairRes
23
23
  * custom key store. To get the type and origin of your KMS key, use the <a>DescribeKey</a>
24
24
  * operation. </p>
25
25
  * <p>Use the <code>KeyPairSpec</code> parameter to choose an RSA or Elliptic Curve (ECC) data
26
- * key pair. KMS recommends that your use ECC key pairs for signing, and use RSA key pairs for
27
- * either encryption or signing, but not both. However, KMS cannot enforce any restrictions on
28
- * the use of data key pairs outside of KMS.</p>
26
+ * key pair. In China Regions, you can also choose an SM2 data key pair. KMS recommends that you use
27
+ * ECC key pairs for signing, and use RSA and SM2 key pairs for either encryption or signing, but not both.
28
+ * However, KMS cannot enforce any restrictions on the use of data key pairs outside of KMS.</p>
29
29
  *
30
30
  * <p>If you are using the data key pair to encrypt data, or for any operation where you don't
31
31
  * immediately need a private key, consider using the <a>GenerateDataKeyPairWithoutPlaintext</a> operation.
@@ -20,9 +20,9 @@ export interface GenerateDataKeyPairWithoutPlaintextCommandOutput extends Genera
20
20
  * custom key store. To get the type and origin of your KMS key, use the <a>DescribeKey</a>
21
21
  * operation. </p>
22
22
  * <p>Use the <code>KeyPairSpec</code> parameter to choose an RSA or Elliptic Curve (ECC) data
23
- * key pair. KMS recommends that your use ECC key pairs for signing, and use RSA key pairs for
24
- * either encryption or signing, but not both. However, KMS cannot enforce any restrictions on
25
- * the use of data key pairs outside of KMS.</p>
23
+ * key pair. In China Regions, you can also choose an SM2 data key pair. KMS recommends that you
24
+ * use ECC key pairs for signing, and use RSA and SM2 key pairs for either encryption or signing, but not
25
+ * both. However, KMS cannot enforce any restrictions on the use of data key pairs outside of KMS.</p>
26
26
  * <p>
27
27
  * <code>GenerateDataKeyPairWithoutPlaintext</code> returns a unique data key pair for each
28
28
  * request. The bytes in the key are not related to the caller or KMS key that is used to encrypt
@@ -8,13 +8,16 @@ export interface GenerateRandomCommandOutput extends GenerateRandomResponse, __M
8
8
  }
9
9
  /**
10
10
  * <p>Returns a random byte string that is cryptographically secure.</p>
11
+ * <p>You must use the <code>NumberOfBytes</code> parameter to specify the length of the random
12
+ * byte string. There is no default value for string length.</p>
11
13
  * <p>By default, the random byte string is generated in KMS. To generate the byte string in
12
14
  * the CloudHSM cluster that is associated with a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a>, specify the custom key store
13
15
  * ID.</p>
14
16
  * <p>Applications in Amazon Web Services Nitro Enclaves can call this operation by using the <a href="https://github.com/aws/aws-nitro-enclaves-sdk-c">Amazon Web Services Nitro Enclaves Development Kit</a>. For information about the supporting parameters, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html">How Amazon Web Services Nitro Enclaves use KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
15
17
  * <p>For more information about entropy and random number generation, see
16
18
  * <a href="https://docs.aws.amazon.com/kms/latest/cryptographic-details/">Key Management Service Cryptographic Details</a>.</p>
17
- *
19
+ * <p>
20
+ * <b>Cross-account use</b>: Not applicable. <code>GenerateRandom</code> does not use any account-specific resources, such as KMS keys.</p>
18
21
  * <p>
19
22
  * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GenerateRandom</a> (IAM policy)</p>
20
23
  * @example
@@ -16,8 +16,11 @@ export interface GetPublicKeyCommandOutput extends GetPublicKeyResponse, __Metad
16
16
  * KMS by calling the <a>Encrypt</a>, <a>ReEncrypt</a>, or <a>Verify</a> operations with the identifier of an asymmetric KMS key. When you use the
17
17
  * public key within KMS, you benefit from the authentication, authorization, and logging that
18
18
  * are part of every KMS operation. You also reduce of risk of encrypting data that cannot be
19
- * decrypted. These features are not effective outside of KMS. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/download-public-key.html#download-public-key-considerations">Special
20
- * Considerations for Downloading Public Keys</a>.</p>
19
+ * decrypted. These features are not effective outside of KMS.</p>
20
+ * <p>To verify a signature outside of KMS with an SM2 public key (China Regions only), you must
21
+ * specify the distinguishing ID. By default, KMS uses <code>1234567812345678</code> as the
22
+ * distinguishing ID. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-sm-offline-verification">Offline verification
23
+ * with SM2 key pairs</a>.</p>
21
24
  * <p>To help you use the public key safely outside of KMS, <code>GetPublicKey</code> returns
22
25
  * important information about the public key in the response, including:</p>
23
26
  * <ul>
@@ -42,7 +42,7 @@ export interface UpdateCustomKeyStoreCommandOutput extends UpdateCustomKeyStoreR
42
42
  * </ul>
43
43
  * <p>If the operation succeeds, it returns a JSON object with no
44
44
  * properties.</p>
45
- * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">Custom Key Store feature</a> feature in KMS, which
45
+ * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store feature</a> feature in KMS, which
46
46
  * combines the convenience and extensive integration of KMS with the isolation and control of a
47
47
  * single-tenant key store.</p>
48
48
  * <p>
@@ -22,7 +22,11 @@ export interface VerifyCommandOutput extends VerifyResponse, __MetadataBearer {
22
22
  * signature.</p>
23
23
  * <p>You can also verify the digital signature by using the public key of the KMS key outside
24
24
  * of KMS. Use the <a>GetPublicKey</a> operation to download the public key in the
25
- * asymmetric KMS key and then use the public key to verify the signature outside of KMS. The
25
+ * asymmetric KMS key and then use the public key to verify the signature outside of KMS. To
26
+ * verify a signature outside of KMS with an SM2 public key, you must specify the distinguishing
27
+ * ID. By default, KMS uses <code>1234567812345678</code> as the distinguishing ID. For more
28
+ * information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-sm-offline-verification">Offline
29
+ * verification with SM2 key pairs</a> in <i>Key Management Service Developer Guide</i>. The
26
30
  * advantage of using the <code>Verify</code> operation is that it is performed within KMS. As
27
31
  * a result, it's easy to call, the operation is performed within the FIPS boundary, it is logged
28
32
  * in CloudTrail, and you can use key policy and IAM policy to determine who is authorized to use