Interface GenerateRandomRequest.Builder
-
- All Superinterfaces:
AwsRequest.Builder,Buildable,CopyableBuilder<GenerateRandomRequest.Builder,GenerateRandomRequest>,KmsRequest.Builder,SdkBuilder<GenerateRandomRequest.Builder,GenerateRandomRequest>,SdkPojo,SdkRequest.Builder
- Enclosing class:
- GenerateRandomRequest
public static interface GenerateRandomRequest.Builder extends KmsRequest.Builder, SdkPojo, CopyableBuilder<GenerateRandomRequest.Builder,GenerateRandomRequest>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description GenerateRandomRequest.BuildercustomKeyStoreId(String customKeyStoreId)Generates the random byte string in the CloudHSM cluster that is associated with the specified CloudHSM key store.GenerateRandomRequest.BuildernumberOfBytes(Integer numberOfBytes)The length of the random byte string.GenerateRandomRequest.BuilderoverrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer)GenerateRandomRequest.BuilderoverrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)default GenerateRandomRequest.Builderrecipient(Consumer<RecipientInfo.Builder> recipient)A signed attestation document from an Amazon Web Services Nitro enclave and the encryption algorithm to use with the enclave's public key.GenerateRandomRequest.Builderrecipient(RecipientInfo recipient)A signed attestation document from an Amazon Web Services Nitro enclave and the encryption algorithm to use with the enclave's public key.-
Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfiguration
-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.services.kms.model.KmsRequest.Builder
build
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
-
-
-
Method Detail
-
numberOfBytes
GenerateRandomRequest.Builder numberOfBytes(Integer numberOfBytes)
The length of the random byte string. This parameter is required.
- Parameters:
numberOfBytes- The length of the random byte string. This parameter is required.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
customKeyStoreId
GenerateRandomRequest.Builder customKeyStoreId(String customKeyStoreId)
Generates the random byte string in the CloudHSM cluster that is associated with the specified CloudHSM key store. To find the ID of a custom key store, use the DescribeCustomKeyStores operation.
External key store IDs are not valid for this parameter. If you specify the ID of an external key store,
GenerateRandomthrows anUnsupportedOperationException.- Parameters:
customKeyStoreId- Generates the random byte string in the CloudHSM cluster that is associated with the specified CloudHSM key store. To find the ID of a custom key store, use the DescribeCustomKeyStores operation.External key store IDs are not valid for this parameter. If you specify the ID of an external key store,
GenerateRandomthrows anUnsupportedOperationException.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
recipient
GenerateRandomRequest.Builder recipient(RecipientInfo recipient)
A signed attestation document from an Amazon Web Services Nitro enclave and the encryption algorithm to use with the enclave's public key. The only valid encryption algorithm is
RSAES_OAEP_SHA_256.This parameter only supports attestation documents for Amazon Web Services Nitro Enclaves. To include this parameter, use the Amazon Web Services Nitro Enclaves SDK or any Amazon Web Services SDK.
When you use this parameter, instead of returning plaintext bytes, KMS encrypts the plaintext bytes under the public key in the attestation document, and returns the resulting ciphertext in the
CiphertextForRecipientfield in the response. This ciphertext can be decrypted only with the private key in the enclave. ThePlaintextfield in the response is null or empty.For information about the interaction between KMS and Amazon Web Services Nitro Enclaves, see How Amazon Web Services Nitro Enclaves uses KMS in the Key Management Service Developer Guide.
- Parameters:
recipient- A signed attestation document from an Amazon Web Services Nitro enclave and the encryption algorithm to use with the enclave's public key. The only valid encryption algorithm isRSAES_OAEP_SHA_256.This parameter only supports attestation documents for Amazon Web Services Nitro Enclaves. To include this parameter, use the Amazon Web Services Nitro Enclaves SDK or any Amazon Web Services SDK.
When you use this parameter, instead of returning plaintext bytes, KMS encrypts the plaintext bytes under the public key in the attestation document, and returns the resulting ciphertext in the
CiphertextForRecipientfield in the response. This ciphertext can be decrypted only with the private key in the enclave. ThePlaintextfield in the response is null or empty.For information about the interaction between KMS and Amazon Web Services Nitro Enclaves, see How Amazon Web Services Nitro Enclaves uses KMS in the Key Management Service Developer Guide.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
recipient
default GenerateRandomRequest.Builder recipient(Consumer<RecipientInfo.Builder> recipient)
A signed attestation document from an Amazon Web Services Nitro enclave and the encryption algorithm to use with the enclave's public key. The only valid encryption algorithm is
RSAES_OAEP_SHA_256.This parameter only supports attestation documents for Amazon Web Services Nitro Enclaves. To include this parameter, use the Amazon Web Services Nitro Enclaves SDK or any Amazon Web Services SDK.
When you use this parameter, instead of returning plaintext bytes, KMS encrypts the plaintext bytes under the public key in the attestation document, and returns the resulting ciphertext in the
CiphertextForRecipientfield in the response. This ciphertext can be decrypted only with the private key in the enclave. ThePlaintextfield in the response is null or empty.For information about the interaction between KMS and Amazon Web Services Nitro Enclaves, see How Amazon Web Services Nitro Enclaves uses KMS in the Key Management Service Developer Guide.
This is a convenience method that creates an instance of theRecipientInfo.Builderavoiding the need to create one manually viaRecipientInfo.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed torecipient(RecipientInfo).- Parameters:
recipient- a consumer that will call methods onRecipientInfo.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
recipient(RecipientInfo)
-
overrideConfiguration
GenerateRandomRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder
-
overrideConfiguration
GenerateRandomRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer)
- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder
-
-