Struct aws_sdk_kms::operation::generate_random::GenerateRandomInput
source · #[non_exhaustive]pub struct GenerateRandomInput {
pub number_of_bytes: Option<i32>,
pub custom_key_store_id: Option<String>,
pub recipient: Option<RecipientInfo>,
}
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.number_of_bytes: Option<i32>
The length of the random byte string. This parameter is required.
custom_key_store_id: Option<String>
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, GenerateRandom
throws an UnsupportedOperationException
.
recipient: Option<RecipientInfo>
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 CiphertextForRecipient
field in the response. This ciphertext can be decrypted only with the private key in the enclave. The Plaintext
field 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.
Implementations§
source§impl GenerateRandomInput
impl GenerateRandomInput
sourcepub fn number_of_bytes(&self) -> Option<i32>
pub fn number_of_bytes(&self) -> Option<i32>
The length of the random byte string. This parameter is required.
sourcepub fn custom_key_store_id(&self) -> Option<&str>
pub fn custom_key_store_id(&self) -> Option<&str>
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, GenerateRandom
throws an UnsupportedOperationException
.
sourcepub fn recipient(&self) -> Option<&RecipientInfo>
pub fn recipient(&self) -> Option<&RecipientInfo>
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 CiphertextForRecipient
field in the response. This ciphertext can be decrypted only with the private key in the enclave. The Plaintext
field 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.
source§impl GenerateRandomInput
impl GenerateRandomInput
sourcepub fn builder() -> GenerateRandomInputBuilder
pub fn builder() -> GenerateRandomInputBuilder
Creates a new builder-style object to manufacture GenerateRandomInput
.
Trait Implementations§
source§impl Clone for GenerateRandomInput
impl Clone for GenerateRandomInput
source§fn clone(&self) -> GenerateRandomInput
fn clone(&self) -> GenerateRandomInput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for GenerateRandomInput
impl Debug for GenerateRandomInput
source§impl PartialEq for GenerateRandomInput
impl PartialEq for GenerateRandomInput
source§fn eq(&self, other: &GenerateRandomInput) -> bool
fn eq(&self, other: &GenerateRandomInput) -> bool
self
and other
values to be equal, and is used
by ==
.