Cloud KMS V1 Client - Class GetPublicKeyRequest (2.3.0)

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

Request message for KeyManagementService.GetPublicKey.

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

Namespace

Google \ Cloud \ Kms \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
dataarray

Optional. Data for populating the Message object.

↳ namestring

Required. The name of the CryptoKeyVersion public key to get.

↳ public_key_formatint

Optional. The PublicKey format specified by the user. This field is required for PQC algorithms. If specified, the public key will be exported through the public_key field in the requested format. Otherwise, the pem field will be populated for non-PQC algorithms, and an error will be returned for PQC algorithms.

getName

Required. The name of the CryptoKeyVersion public key to get.

Returns
TypeDescription
string

setName

Required. The name of the CryptoKeyVersion public key to get.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getPublicKeyFormat

Optional. The PublicKey format specified by the user. This field is required for PQC algorithms. If specified, the public key will be exported through the public_key field in the requested format. Otherwise, the pem field will be populated for non-PQC algorithms, and an error will be returned for PQC algorithms.

Returns
TypeDescription
int

setPublicKeyFormat

Optional. The PublicKey format specified by the user. This field is required for PQC algorithms. If specified, the public key will be exported through the public_key field in the requested format. Otherwise, the pem field will be populated for non-PQC algorithms, and an error will be returned for PQC algorithms.

Parameter
NameDescription
varint
Returns
TypeDescription
$this

static::build

Parameter
NameDescription
namestring

Required. The name of the CryptoKeyVersion public key to get. Please see KeyManagementServiceClient::cryptoKeyVersionName() for help formatting this field.

Returns
TypeDescription
GetPublicKeyRequest