Cloud KMS V1 Client - Class CreateCryptoKeyRequest (2.3.0)

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

Request message for KeyManagementService.CreateCryptoKey.

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

Namespace

Google \ Cloud \ Kms \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
dataarray

Optional. Data for populating the Message object.

↳ parentstring

Required. The name of the KeyRing associated with the CryptoKeys.

↳ crypto_key_idstring

Required. It must be unique within a KeyRing and match the regular expression [a-zA-Z0-9_-]{1,63}

↳ crypto_keyCryptoKey

Required. A CryptoKey with initial field values.

↳ skip_initial_version_creationbool

If set to true, the request will create a CryptoKey without any CryptoKeyVersions. You must manually call CreateCryptoKeyVersion or ImportCryptoKeyVersion before you can use this CryptoKey.

getParent

Required. The name of the KeyRing associated with the CryptoKeys.

Returns
TypeDescription
string

setParent

Required. The name of the KeyRing associated with the CryptoKeys.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getCryptoKeyId

Required. It must be unique within a KeyRing and match the regular expression [a-zA-Z0-9_-]{1,63}

Returns
TypeDescription
string

setCryptoKeyId

Required. It must be unique within a KeyRing and match the regular expression [a-zA-Z0-9_-]{1,63}

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getCryptoKey

Required. A CryptoKey with initial field values.

Returns
TypeDescription
CryptoKey|null

hasCryptoKey

clearCryptoKey

setCryptoKey

Required. A CryptoKey with initial field values.

Parameter
NameDescription
varCryptoKey
Returns
TypeDescription
$this

getSkipInitialVersionCreation

If set to true, the request will create a CryptoKey without any CryptoKeyVersions. You must manually call CreateCryptoKeyVersion or ImportCryptoKeyVersion before you can use this CryptoKey.

Returns
TypeDescription
bool

setSkipInitialVersionCreation

If set to true, the request will create a CryptoKey without any CryptoKeyVersions. You must manually call CreateCryptoKeyVersion or ImportCryptoKeyVersion before you can use this CryptoKey.

Parameter
NameDescription
varbool
Returns
TypeDescription
$this

static::build

Parameters
NameDescription
parentstring

Required. The name of the KeyRing associated with the CryptoKeys. Please see KeyManagementServiceClient::keyRingName() for help formatting this field.

cryptoKeyIdstring

Required. It must be unique within a KeyRing and match the regular expression [a-zA-Z0-9_-]{1,63}

cryptoKeyCryptoKey

Required. A CryptoKey with initial field values.

Returns
TypeDescription
CreateCryptoKeyRequest