Cloud KMS V1 Client - Class GenerateRandomBytesRequest (1.20.3)

Reference documentation and code samples for the Cloud KMS V1 Client class GenerateRandomBytesRequest.

Request message for KeyManagementService.GenerateRandomBytes.

Generated from protobuf message google.cloud.kms.v1.GenerateRandomBytesRequest

Namespace

Google \ Cloud \ Kms \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ location string

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

↳ length_bytes int

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

↳ protection_level int

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

getLocation

The project-specific location in which to generate random bytes.

For example, "projects/my-project/locations/us-central1".

Returns
TypeDescription
string

setLocation

The project-specific location in which to generate random bytes.

For example, "projects/my-project/locations/us-central1".

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getLengthBytes

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

Returns
TypeDescription
int

setLengthBytes

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

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getProtectionLevel

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

Returns
TypeDescription
int

setProtectionLevel

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

Parameter
NameDescription
var int
Returns
TypeDescription
$this

static::build

Parameters
NameDescription
location string

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

lengthBytes int

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

protectionLevel int

The ProtectionLevel to use when generating the random data. Currently, only HSM protection level is supported. For allowed values, use constants defined on Google\Cloud\Kms\V1\ProtectionLevel

Returns
TypeDescription
Google\Cloud\Kms\V1\GenerateRandomBytesRequest