public class GenerateRandomRequest extends AmazonWebServiceRequest implements java.io.Serializable
Returns a random byte string that is cryptographically secure.
By default, the random byte string is generated in AWS KMS. To generate the byte string in the AWS CloudHSM cluster that is associated with a custom key store, specify the custom key store ID.
For more information about entropy and random number generation, see the AWS Key Management Service Cryptographic Details whitepaper.
Required permissions: kms:GenerateRandom (IAM policy)
Constructor and Description |
---|
GenerateRandomRequest() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getCustomKeyStoreId()
Generates the random byte string in the AWS CloudHSM cluster that is
associated with the specified custom key store.
|
java.lang.Integer |
getNumberOfBytes()
The length of the byte string.
|
int |
hashCode() |
void |
setCustomKeyStoreId(java.lang.String customKeyStoreId)
Generates the random byte string in the AWS CloudHSM cluster that is
associated with the specified custom key store.
|
void |
setNumberOfBytes(java.lang.Integer numberOfBytes)
The length of the byte string.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
GenerateRandomRequest |
withCustomKeyStoreId(java.lang.String customKeyStoreId)
Generates the random byte string in the AWS CloudHSM cluster that is
associated with the specified custom key store.
|
GenerateRandomRequest |
withNumberOfBytes(java.lang.Integer numberOfBytes)
The length of the byte string.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public java.lang.Integer getNumberOfBytes()
The length of the byte string.
Constraints:
Range: 1 - 1024
The length of the byte string.
public void setNumberOfBytes(java.lang.Integer numberOfBytes)
The length of the byte string.
Constraints:
Range: 1 - 1024
numberOfBytes
- The length of the byte string.
public GenerateRandomRequest withNumberOfBytes(java.lang.Integer numberOfBytes)
The length of the byte string.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 1 - 1024
numberOfBytes
- The length of the byte string.
public java.lang.String getCustomKeyStoreId()
Generates the random byte string in the AWS CloudHSM cluster that is associated with the specified custom key store. To find the ID of a custom key store, use the DescribeCustomKeyStores operation.
Constraints:
Length: 1 - 64
Generates the random byte string in the AWS CloudHSM cluster that is associated with the specified custom key store. To find the ID of a custom key store, use the DescribeCustomKeyStores operation.
public void setCustomKeyStoreId(java.lang.String customKeyStoreId)
Generates the random byte string in the AWS CloudHSM cluster that is associated with the specified custom key store. To find the ID of a custom key store, use the DescribeCustomKeyStores operation.
Constraints:
Length: 1 - 64
customKeyStoreId
- Generates the random byte string in the AWS CloudHSM cluster that is associated with the specified custom key store. To find the ID of a custom key store, use the DescribeCustomKeyStores operation.
public GenerateRandomRequest withCustomKeyStoreId(java.lang.String customKeyStoreId)
Generates the random byte string in the AWS CloudHSM cluster that is associated with the specified custom key store. To find the ID of a custom key store, use the DescribeCustomKeyStores operation.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 64
customKeyStoreId
- Generates the random byte string in the AWS CloudHSM cluster that is associated with the specified custom key store. To find the ID of a custom key store, use the DescribeCustomKeyStores operation.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.