Struct aws_sdk_kms::client::fluent_builders::GenerateRandom
source · pub struct GenerateRandom { /* private fields */ }
Expand description
Fluent builder constructing a request to GenerateRandom
.
Returns a random byte string that is cryptographically secure.
You must use the NumberOfBytes
parameter to specify the length of the random byte string. There is no default value for string length.
By default, the random byte string is generated in KMS. To generate the byte string in the CloudHSM cluster that is associated with a custom key store, specify the custom key store ID.
Applications in Amazon Web Services Nitro Enclaves can call this operation by using the Amazon Web Services Nitro Enclaves Development Kit. For information about the supporting parameters, see How Amazon Web Services Nitro Enclaves use KMS in the Key Management Service Developer Guide.
For more information about entropy and random number generation, see Key Management Service Cryptographic Details.
Cross-account use: Not applicable. GenerateRandom
does not use any account-specific resources, such as KMS keys.
Required permissions: kms:GenerateRandom (IAM policy)
Implementations§
source§impl GenerateRandom
impl GenerateRandom
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<GenerateRandom, AwsResponseRetryClassifier>, SdkError<GenerateRandomError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<GenerateRandom, AwsResponseRetryClassifier>, SdkError<GenerateRandomError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<GenerateRandomOutput, SdkError<GenerateRandomError>>
pub async fn send(
self
) -> Result<GenerateRandomOutput, SdkError<GenerateRandomError>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn number_of_bytes(self, input: i32) -> Self
pub fn number_of_bytes(self, input: i32) -> Self
The length of the random byte string. This parameter is required.
sourcepub fn set_number_of_bytes(self, input: Option<i32>) -> Self
pub fn set_number_of_bytes(self, input: Option<i32>) -> Self
The length of the random byte string. This parameter is required.
sourcepub fn custom_key_store_id(self, input: impl Into<String>) -> Self
pub fn custom_key_store_id(self, input: impl Into<String>) -> Self
Generates the random byte string in the CloudHSM cluster that is associated with the specified custom key store. To find the ID of a custom key store, use the DescribeCustomKeyStores
operation.
sourcepub fn set_custom_key_store_id(self, input: Option<String>) -> Self
pub fn set_custom_key_store_id(self, input: Option<String>) -> Self
Generates the random byte string in the CloudHSM cluster that is associated with the specified custom key store. To find the ID of a custom key store, use the DescribeCustomKeyStores
operation.
Trait Implementations§
source§impl Clone for GenerateRandom
impl Clone for GenerateRandom
source§fn clone(&self) -> GenerateRandom
fn clone(&self) -> GenerateRandom
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more