Reference documentation and code samples for the Cloud KMS V1 Client class CryptoKeyVersion.
A CryptoKeyVersion represents an
individual cryptographic key, and the associated key material.
An
ENABLED
version can be used for cryptographic operations.
For security reasons, the raw cryptographic key material represented by a
CryptoKeyVersion can never be viewed
or exported. It can only be used to encrypt, decrypt, or sign data when an
authorized user or application invokes Cloud KMS.
Generated from protobuf message google.cloud.kms.v1.CryptoKeyVersion
Namespace
Google \ Cloud \ Kms \ V1
Methods
__construct
| Parameter |
| Name |
Description |
data |
mixed
|
getName
Output only. The resource name for this
CryptoKeyVersion in the format
projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*.
| Returns |
| Type |
Description |
string |
|
setName
Output only. The resource name for this
CryptoKeyVersion in the format
projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*.
| Parameter |
| Name |
Description |
var |
string
|
| Returns |
| Type |
Description |
$this |
|
getState
setState
| Returns |
| Type |
Description |
$this |
|
getProtectionLevel
setProtectionLevel
| Returns |
| Type |
Description |
$this |
|
getAlgorithm
setAlgorithm
| Returns |
| Type |
Description |
$this |
|
getAttestation
Output only. Statement that was generated and signed by the HSM at key
creation time. Use this statement to verify attributes of the key as stored
on the HSM, independently of Google. Only provided for key versions with
protection_level
HSM.
hasAttestation
clearAttestation
setAttestation
Output only. Statement that was generated and signed by the HSM at key
creation time. Use this statement to verify attributes of the key as stored
on the HSM, independently of Google. Only provided for key versions with
protection_level
HSM.
| Returns |
| Type |
Description |
$this |
|
getCreateTime
hasCreateTime
clearCreateTime
setCreateTime
| Returns |
| Type |
Description |
$this |
|
getGenerateTime
hasGenerateTime
clearGenerateTime
setGenerateTime
| Returns |
| Type |
Description |
$this |
|
getDestroyTime
hasDestroyTime
clearDestroyTime
setDestroyTime
| Returns |
| Type |
Description |
$this |
|
getDestroyEventTime
Output only. The time this CryptoKeyVersion's key material was
destroyed. Only present if
state is
DESTROYED.
hasDestroyEventTime
clearDestroyEventTime
setDestroyEventTime
Output only. The time this CryptoKeyVersion's key material was
destroyed. Only present if
state is
DESTROYED.
| Returns |
| Type |
Description |
$this |
|
getImportJob
Output only. The name of the ImportJob
used in the most recent import of this
CryptoKeyVersion. Only present if
the underlying key material was imported.
| Returns |
| Type |
Description |
string |
|
setImportJob
Output only. The name of the ImportJob
used in the most recent import of this
CryptoKeyVersion. Only present if
the underlying key material was imported.
| Parameter |
| Name |
Description |
var |
string
|
| Returns |
| Type |
Description |
$this |
|
getImportTime
Output only. The time at which this
CryptoKeyVersion's key material was
most recently imported.
hasImportTime
clearImportTime
setImportTime
Output only. The time at which this
CryptoKeyVersion's key material was
most recently imported.
| Returns |
| Type |
Description |
$this |
|
getImportFailureReason
Output only. The root cause of the most recent import failure. Only present
if state is
IMPORT_FAILED.
| Returns |
| Type |
Description |
string |
|
setImportFailureReason
Output only. The root cause of the most recent import failure. Only present
if state is
IMPORT_FAILED.
| Parameter |
| Name |
Description |
var |
string
|
| Returns |
| Type |
Description |
$this |
|
getGenerationFailureReason
Output only. The root cause of the most recent generation failure. Only
present if state is
GENERATION_FAILED.
| Returns |
| Type |
Description |
string |
|
setGenerationFailureReason
Output only. The root cause of the most recent generation failure. Only
present if state is
GENERATION_FAILED.
| Parameter |
| Name |
Description |
var |
string
|
| Returns |
| Type |
Description |
$this |
|
getExternalDestructionFailureReason
| Returns |
| Type |
Description |
string |
|
setExternalDestructionFailureReason
| Parameter |
| Name |
Description |
var |
string
|
| Returns |
| Type |
Description |
$this |
|
getExternalProtectionLevelOptions
ExternalProtectionLevelOptions stores a group of additional fields for
configuring a CryptoKeyVersion that
are specific to the
EXTERNAL protection level
and EXTERNAL_VPC
protection levels.
hasExternalProtectionLevelOptions
clearExternalProtectionLevelOptions
setExternalProtectionLevelOptions
ExternalProtectionLevelOptions stores a group of additional fields for
configuring a CryptoKeyVersion that
are specific to the
EXTERNAL protection level
and EXTERNAL_VPC
protection levels.
| Returns |
| Type |
Description |
$this |
|
getReimportEligible
| Returns |
| Type |
Description |
bool |
|
setReimportEligible
| Parameter |
| Name |
Description |
var |
bool
|
| Returns |
| Type |
Description |
$this |
|