All Products
Search
Document Center

Key Management Service:GenerateRandom

Last Updated:Mar 31, 2026

Generates random bytes of a specified length.

Request parameters

ParameterTypeRequiredExampleDescription
Lengthint32Yes32The length of the random number to generate. Valid values: 1 to 64.

Response parameters

ParameterTypeExampleDescription
RandombytesBinary dataThe generated random bytes.
RequestIdstring475f1620-b9d3-4d35-b5c6-3fbdd941423dThe request ID.

Error codes

For more information about error codes, see Common error codes.