Values.GenerateRandomResponseSourceReturns 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 associated with an CloudHSM key store, use the CustomKeyStoreId parameter. GenerateRandom also supports Amazon Web Services Nitro Enclaves, which provide an isolated compute environment in Amazon EC2. To call GenerateRandom for a Nitro enclave or NitroTPM, use the Amazon Web Services Nitro Enclaves SDK or any Amazon Web Services SDK. Use the Recipient parameter to provide the attestation document for the attested environment. Instead of plaintext bytes, the response includes the plaintext bytes encrypted under the public key from the attestation document (CiphertextForRecipient). For information about the interaction between KMS and Amazon Web Services Nitro Enclaves or Amazon Web Services NitroTPM, see Cryptographic attestation support in KMS in the Key Management Service Developer Guide. For more information about entropy and random number generation, see Entropy and random number generation in the Key Management Service Developer Guide. Cross-account use: Not applicable. GenerateRandom does not use any account-specific resources, such as KMS keys. Required permissions: kms:GenerateRandom (IAM policy) Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.
type nonrec t = {plaintext : PlaintextType.t option;The random byte string. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded. If the response includes the CiphertextForRecipient field, the Plaintext field is null or empty.
*)ciphertextForRecipient : CiphertextType.t option;The plaintext random bytes encrypted with the public key from the attestation document. This ciphertext can be decrypted only by using a private key from the attested environment. This field is included in the response only when the Recipient parameter in the request includes a valid attestation document from an Amazon Web Services Nitro enclave or NitroTPM. For information about the interaction between KMS and Amazon Web Services Nitro Enclaves or Amazon Web Services NitroTPM, see Cryptographic attestation support in KMS in the Key Management Service Developer Guide.
*)}type nonrec error = [ | `CustomKeyStoreInvalidStateException of CustomKeyStoreInvalidStateException.t| `CustomKeyStoreNotFoundException of CustomKeyStoreNotFoundException.t| `DependencyTimeoutException of DependencyTimeoutException.t| `KMSInternalException of KMSInternalException.t| `UnsupportedOperationException of UnsupportedOperationException.t| `Unknown_operation_error of string * string option ]val error_of_json :
string ->
Yojson.Safe.t ->
[> `CustomKeyStoreInvalidStateException of
CustomKeyStoreInvalidStateException.t
| `CustomKeyStoreNotFoundException of CustomKeyStoreNotFoundException.t
| `DependencyTimeoutException of DependencyTimeoutException.t
| `KMSInternalException of KMSInternalException.t
| `Unknown_operation_error of string * string option
| `UnsupportedOperationException of UnsupportedOperationException.t ]val error_of_xml :
string ->
Awso.Xml.t ->
[> `CustomKeyStoreInvalidStateException of
CustomKeyStoreInvalidStateException.t
| `CustomKeyStoreNotFoundException of CustomKeyStoreNotFoundException.t
| `DependencyTimeoutException of DependencyTimeoutException.t
| `KMSInternalException of KMSInternalException.t
| `Unknown_operation_error of string * string option
| `UnsupportedOperationException of UnsupportedOperationException.t ]