public static final class GenerateDataKeyRequest.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
GenerateDataKeyRequest |
build() |
GenerateDataKeyRequest.Builder |
encryptionContext(Map<String,?> encryptionContext)
The JSON string that consists of key-value pairs.
|
GenerateDataKeyRequest.Builder |
keyId(String keyId)
The ID of the CMK.
|
GenerateDataKeyRequest.Builder |
keySpec(String keySpec)
The type of the data key that you want to generate.
|
GenerateDataKeyRequest.Builder |
numberOfBytes(Integer numberOfBytes)
The length of the data key that you want to generate.
|
public GenerateDataKeyRequest.Builder encryptionContext(Map<String,?> encryptionContext)
If you specify this parameter, an equivalent value is required when you call the [Decrypt](~~28950~~) operation. For more information, see [EncryptionContext](~~42975~~).
public GenerateDataKeyRequest.Builder keyId(String keyId)
You can also set this parameter to an alias that is bound to the CMK. For more information, see [Alias overview](~~68522~~).
public GenerateDataKeyRequest.Builder keySpec(String keySpec)
* AES\_256: a 256-bit symmetric key * AES\_128: a 128-bit symmetric key > We recommend that you use the KeySpec or NumberOfBytes parameter to specify the length of a data key. If none of the parameters are specified, KMS generates a 256-bit data key. If both parameters are specified, KMS ignores the KeySpec parameter.
public GenerateDataKeyRequest.Builder numberOfBytes(Integer numberOfBytes)
Valid values: 1 to 1024. Default value: * If the KeySpec parameter is set to AES\_256, set the value of the NumberOfBytes parameter to 32. * If the KeySpec parameter is set to AES\_128, set the value of the NumberOfBytes parameter to 16.
public GenerateDataKeyRequest build()
Copyright © 2023. All rights reserved.