v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-134796204.9 KB
projects

Generate random bytes using the Cloud KMS randomness source in the provided location.

post/v1/{+location}:generateRandomBytes

Path parameters

locationstring required

The project-specific location in which to generate random bytes. For example, "projects/my-project/locations/us-central1".

Request body

protectionLevel'PROTECTION_LEVEL_UNSPECIFIED' | 'SOFTWARE' | 'HSM' | 'EXTERNAL' | 'EXTERNAL_VPC' | 'HSM_SINGLE_TENANT'

The ProtectionLevel to use when generating the random data. Currently, only HSM protection level is supported.

lengthBytesinteger

The length in bytes of the amount of randomness to retrieve. Minimum 8 bytes, maximum 1024 bytes.

Response

Successful response