Resource: 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.
JSON representation | |
---|---|
{ "name": string, "state": enum ( |
Fields | |
---|---|
name |
Output only. The resource name for this |
state |
The current state of the |
protectionLevel |
Output only. The |
algorithm |
Output only. The |
attestation |
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 |
createTime |
Output only. The time at which this A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
generateTime |
Output only. The time this A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
destroyTime |
Output only. The time this A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
destroyEventTime |
Output only. The time this CryptoKeyVersion's key material was destroyed. Only present if A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
importJob |
Output only. The name of the |
importTime |
Output only. The time at which this A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
importFailureReason |
Output only. The root cause of an import failure. Only present if |
externalProtectionLevelOptions |
ExternalProtectionLevelOptions stores a group of additional fields for configuring a |
CryptoKeyVersionState
The state of a CryptoKeyVersion
, indicating if it can be used.
Enums | |
---|---|
CRYPTO_KEY_VERSION_STATE_UNSPECIFIED |
Not specified. |
PENDING_GENERATION |
This version is still being generated. It may not be used, enabled, disabled, or destroyed yet. Cloud KMS will automatically mark this version ENABLED as soon as the version is ready. |
ENABLED |
This version may be used for cryptographic operations. |
DISABLED |
This version may not be used, but the key material is still available, and the version can be placed back into the ENABLED state. |
DESTROYED |
This version is destroyed, and the key material is no longer stored. A version may not leave this state once entered. |
DESTROY_SCHEDULED |
This version is scheduled for destruction, and will be destroyed soon. Call cryptoKeyVersions.restore to put it back into the DISABLED state. |
PENDING_IMPORT |
This version is still being imported. It may not be used, enabled, disabled, or destroyed yet. Cloud KMS will automatically mark this version ENABLED as soon as the version is ready. |
IMPORT_FAILED |
This version was not imported successfully. It may not be used, enabled, disabled, or destroyed. The submitted key material has been discarded. Additional details can be found in CryptoKeyVersion.import_failure_reason . |
ExternalProtectionLevelOptions
ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion
that are specific to the EXTERNAL
protection level.
JSON representation | |
---|---|
{ "externalKeyUri": string } |
Fields | |
---|---|
externalKeyUri |
The URI for an external resource that this |
Methods |
|
---|---|
|
Decrypts data that was encrypted with a public key retrieved from GetPublicKey corresponding to a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_DECRYPT. |
|
Signs data using a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_SIGN, producing a signature that can be verified with the public key retrieved from GetPublicKey . |
|
Create a new CryptoKeyVersion in a CryptoKey . |
|
Schedule a CryptoKeyVersion for destruction. |
|
Returns metadata for a given CryptoKeyVersion . |
|
Returns the public key for the given CryptoKeyVersion . |
|
Imports a new CryptoKeyVersion into an existing CryptoKey using the wrapped key material provided in the request. |
|
Lists CryptoKeyVersions . |
|
Update a CryptoKeyVersion 's metadata. |
|
Restore a CryptoKeyVersion in the DESTROY_SCHEDULED state. |