Cloud KMS V1 Client - Class CreateCryptoKeyRequest (2.11.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
Name Description
data array

Optional. Data for populating the Message object.

↳ parent string

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

↳ crypto_key_id string

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

↳ crypto_key CryptoKey

Required. A CryptoKey with initial field values.

↳ skip_initial_version_creation bool

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.

↳ trusted_wrapping_enabled bool

Optional. Whether trusted wrapping will be enabled on the first CryptoKeyVersions created for this CryptoKey. This field is only supported for keys with CryptoKeyVersionTemplate.protection_level HSM_SINGLE_TENANT. This field is supported for all CryptoKeyPurposes except ENCRYPT_DECRYPT.

getParent

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

Returns
Type Description
string

setParent

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

Parameter
Name Description
var string
Returns
Type Description
$this

getCryptoKeyId

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

Returns
Type Description
string

setCryptoKeyId

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

Parameter
Name Description
var string
Returns
Type Description
$this

getCryptoKey

Required. A CryptoKey with initial field values.

Returns
Type Description
CryptoKey|null

hasCryptoKey

clearCryptoKey

setCryptoKey

Required. A CryptoKey with initial field values.

Parameter
Name Description
var CryptoKey
Returns
Type Description
$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
Type Description
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
Name Description
var bool
Returns
Type Description
$this

getTrustedWrappingEnabled

Optional. Whether trusted wrapping will be enabled on the first CryptoKeyVersions created for this CryptoKey. This field is only supported for keys with CryptoKeyVersionTemplate.protection_level HSM_SINGLE_TENANT.

This field is supported for all CryptoKeyPurposes except ENCRYPT_DECRYPT.

Returns
Type Description
bool

setTrustedWrappingEnabled

Optional. Whether trusted wrapping will be enabled on the first CryptoKeyVersions created for this CryptoKey. This field is only supported for keys with CryptoKeyVersionTemplate.protection_level HSM_SINGLE_TENANT.

This field is supported for all CryptoKeyPurposes except ENCRYPT_DECRYPT.

Parameter
Name Description
var bool
Returns
Type Description
$this

static::build

Parameters
Name Description
parent string

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

cryptoKeyId string

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

cryptoKey CryptoKey

Required. A CryptoKey with initial field values.

Returns
Type Description
CreateCryptoKeyRequest