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 |
protection |
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 |
create |
Output only. The time at which this A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
generate |
Output only. The time this A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
destroy |
Output only. The time this A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
destroy |
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: |
import |
Output only. The name of the |
import |
Output only. The time at which this A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
import |
Output only. The root cause of the most recent import failure. Only present if |
generation |
Output only. The root cause of the most recent generation failure. Only present if |
external |
Output only. The root cause of the most recent external destruction failure. Only present if |
external |
ExternalProtectionLevelOptions stores a group of additional fields for configuring a |
reimport |
Output only. Whether or not this key version is eligible for reimport, by being specified as a target in |
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. This version may only become ENABLED again if this version is reimportEligible and the original key material is reimported with a call to KeyManagementService.ImportCryptoKeyVersion . |
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 . |
GENERATION_FAILED |
This version was not generated successfully. It may not be used, enabled, disabled, or destroyed. Additional details can be found in CryptoKeyVersion.generation_failure_reason . |
PENDING_EXTERNAL_DESTRUCTION |
This version was destroyed, and it may not be used or enabled again. Cloud KMS is waiting for the corresponding key material residing in an external key manager to be destroyed. |
EXTERNAL_DESTRUCTION_FAILED |
This version was destroyed, and it may not be used or enabled again. However, Cloud KMS could not confirm that the corresponding key material residing in an external key manager was destroyed. Additional details can be found in CryptoKeyVersion.external_destruction_failure_reason . |
ExternalProtectionLevelOptions
ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion
that are specific to the EXTERNAL
protection level and EXTERNAL_VPC
protection levels.
JSON representation |
---|
{ "externalKeyUri": string, "ekmConnectionKeyPath": string } |
Fields | |
---|---|
external |
The URI for an external resource that this |
ekm |
The path to the external key material on the EKM when using |
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 . |
|
Import wrapped key material into a CryptoKeyVersion . |
|
Lists CryptoKeyVersions . |
|
Signs data using a CryptoKeyVersion with CryptoKey.purpose MAC, producing a tag that can be verified by another source with the same key. |
|
Verifies MAC tag using a CryptoKeyVersion with CryptoKey.purpose MAC, and returns a response that indicates whether or not the verification was successful. |
|
Update a CryptoKeyVersion 's metadata. |
|
Decrypts data that was originally encrypted using a raw cryptographic mechanism. |
|
Encrypts data using portable cryptographic primitives. |
|
Restore a CryptoKeyVersion in the DESTROY_SCHEDULED state. |