Protobuf type google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState
Namespace
Google \ Cloud \ Kms \ V1 \ CryptoKeyVersion
Methods
static::name
Parameter
Name
Description
value
mixed
static::value
Parameter
Name
Description
name
mixed
Constants
CRYPTO_KEY_VERSION_STATE_UNSPECIFIED
Value: 0
Not specified.
Generated from protobuf enum CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0;
PENDING_GENERATION
Value: 5
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.
Generated from protobuf enum PENDING_GENERATION = 5;
ENABLED
Value: 1
This version may be used for cryptographic operations.
Generated from protobuf enum ENABLED = 1;
DISABLED
Value: 2
This version may not be used, but the key material is still available,
and the version can be placed back into the
ENABLED
state.
Generated from protobuf enum DISABLED = 2;
DESTROYED
Value: 3
The key material of this version is destroyed and no longer stored.
Generated from protobuf enum DESTROY_SCHEDULED = 4;
PENDING_IMPORT
Value: 6
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.
Generated from protobuf enum PENDING_IMPORT = 6;
IMPORT_FAILED
Value: 7
This version was not imported successfully. It may not be used, enabled,
disabled, or destroyed. The submitted key material has been discarded.
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.
Generated from protobuf enum GENERATION_FAILED = 8;
PENDING_EXTERNAL_DESTRUCTION
Value: 9
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.
Generated from protobuf enum PENDING_EXTERNAL_DESTRUCTION = 9;
EXTERNAL_DESTRUCTION_FAILED
Value: 10
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.
Generated from protobuf enum EXTERNAL_DESTRUCTION_FAILED = 10;
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Cloud KMS V1 Client - Class CryptoKeyVersionState (2.3.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.3.1 (latest)](/php/docs/reference/cloud-kms/latest/V1.CryptoKeyVersion.CryptoKeyVersionState)\n- [2.3.0](/php/docs/reference/cloud-kms/2.3.0/V1.CryptoKeyVersion.CryptoKeyVersionState)\n- [2.2.0](/php/docs/reference/cloud-kms/2.2.0/V1.CryptoKeyVersion.CryptoKeyVersionState)\n- [2.1.6](/php/docs/reference/cloud-kms/2.1.6/V1.CryptoKeyVersion.CryptoKeyVersionState)\n- [2.0.0](/php/docs/reference/cloud-kms/2.0.0/V1.CryptoKeyVersion.CryptoKeyVersionState)\n- [1.23.0](/php/docs/reference/cloud-kms/1.23.0/V1.CryptoKeyVersion.CryptoKeyVersionState)\n- [1.22.1](/php/docs/reference/cloud-kms/1.22.1/V1.CryptoKeyVersion.CryptoKeyVersionState)\n- [1.21.4](/php/docs/reference/cloud-kms/1.21.4/V1.CryptoKeyVersion.CryptoKeyVersionState)\n- [1.20.3](/php/docs/reference/cloud-kms/1.20.3/V1.CryptoKeyVersion.CryptoKeyVersionState)\n- [1.19.0](/php/docs/reference/cloud-kms/1.19.0/V1.CryptoKeyVersion.CryptoKeyVersionState)\n- [1.18.1](/php/docs/reference/cloud-kms/1.18.1/V1.CryptoKeyVersion.CryptoKeyVersionState)\n- [1.17.0](/php/docs/reference/cloud-kms/1.17.0/V1.CryptoKeyVersion.CryptoKeyVersionState)\n- [1.16.4](/php/docs/reference/cloud-kms/1.16.4/V1.CryptoKeyVersion.CryptoKeyVersionState)\n- [1.15.3](/php/docs/reference/cloud-kms/1.15.3/V1.CryptoKeyVersion.CryptoKeyVersionState) \nReference documentation and code samples for the Cloud KMS V1 Client class CryptoKeyVersionState.\n\nThe state of a [CryptoKeyVersion](/php/docs/reference/cloud-kms/latest/V1.CryptoKeyVersion),\nindicating if it can be used.\n\nProtobuf type `google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Kms \\\\ V1 \\\\ CryptoKeyVersion\n\nMethods\n-------\n\n### static::name\n\n### static::value\n\nConstants\n---------\n\n### CRYPTO_KEY_VERSION_STATE_UNSPECIFIED\n\n Value: 0\n\nNot specified.\n\nGenerated from protobuf enum `CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0;`\n\n### PENDING_GENERATION\n\n Value: 5\n\nThis version is still being generated. It may not be used, enabled,\ndisabled, or destroyed yet. Cloud KMS will automatically mark this\nversion\n[ENABLED](/php/docs/reference/cloud-kms/latest/V1.CryptoKeyVersion.CryptoKeyVersionState#_Google_Cloud_Kms_V1_CryptoKeyVersion_CryptoKeyVersionState__ENABLED)\nas soon as the version is ready.\n\nGenerated from protobuf enum `PENDING_GENERATION = 5;`\n\n### ENABLED\n\n Value: 1\n\nThis version may be used for cryptographic operations.\n\nGenerated from protobuf enum `ENABLED = 1;`\n\n### DISABLED\n\n Value: 2\n\nThis version may not be used, but the key material is still available,\nand the version can be placed back into the\n[ENABLED](/php/docs/reference/cloud-kms/latest/V1.CryptoKeyVersion.CryptoKeyVersionState#_Google_Cloud_Kms_V1_CryptoKeyVersion_CryptoKeyVersionState__ENABLED)\nstate.\n\nGenerated from protobuf enum `DISABLED = 2;`\n\n### DESTROYED\n\n Value: 3\n\nThe key material of this version is destroyed and no longer stored.\n\nThis version may only become\n[ENABLED](/php/docs/reference/cloud-kms/latest/V1.CryptoKeyVersion.CryptoKeyVersionState#_Google_Cloud_Kms_V1_CryptoKeyVersion_CryptoKeyVersionState__ENABLED)\nagain if this version is\n[reimport_eligible](/php/docs/reference/cloud-kms/latest/V1.CryptoKeyVersion#_Google_Cloud_Kms_V1_CryptoKeyVersion__getReimportEligible__)\nand the original key material is reimported with a call to\n[KeyManagementService.ImportCryptoKeyVersion](/php/docs/reference/cloud-kms/latest/V1.Client.KeyManagementServiceClient#_Google_Cloud_Kms_V1_Client_KeyManagementServiceClient__importCryptoKeyVersion__).\n\nGenerated from protobuf enum `DESTROYED = 3;`\n\n### DESTROY_SCHEDULED\n\n Value: 4\n\nThis version is scheduled for destruction, and will be destroyed soon.\n\nCall\n[RestoreCryptoKeyVersion](/php/docs/reference/cloud-kms/latest/V1.Client.KeyManagementServiceClient#_Google_Cloud_Kms_V1_Client_KeyManagementServiceClient__restoreCryptoKeyVersion__)\nto put it back into the\n[DISABLED](/php/docs/reference/cloud-kms/latest/V1.CryptoKeyVersion.CryptoKeyVersionState#_Google_Cloud_Kms_V1_CryptoKeyVersion_CryptoKeyVersionState__DISABLED)\nstate.\n\nGenerated from protobuf enum `DESTROY_SCHEDULED = 4;`\n\n### PENDING_IMPORT\n\n Value: 6\n\nThis version is still being imported. It may not be used, enabled,\ndisabled, or destroyed yet. Cloud KMS will automatically mark this\nversion\n[ENABLED](/php/docs/reference/cloud-kms/latest/V1.CryptoKeyVersion.CryptoKeyVersionState#_Google_Cloud_Kms_V1_CryptoKeyVersion_CryptoKeyVersionState__ENABLED)\nas soon as the version is ready.\n\nGenerated from protobuf enum `PENDING_IMPORT = 6;`\n\n### IMPORT_FAILED\n\n Value: 7\n\nThis version was not imported successfully. It may not be used, enabled,\ndisabled, or destroyed. The submitted key material has been discarded.\n\nAdditional details can be found in\n[CryptoKeyVersion.import_failure_reason](/php/docs/reference/cloud-kms/latest/V1.CryptoKeyVersion#_Google_Cloud_Kms_V1_CryptoKeyVersion__getImportFailureReason__).\n\nGenerated from protobuf enum `IMPORT_FAILED = 7;`\n\n### GENERATION_FAILED\n\n Value: 8\n\nThis version was not generated successfully. It may not be used, enabled,\ndisabled, or destroyed. Additional details can be found in\n[CryptoKeyVersion.generation_failure_reason](/php/docs/reference/cloud-kms/latest/V1.CryptoKeyVersion#_Google_Cloud_Kms_V1_CryptoKeyVersion__getGenerationFailureReason__).\n\nGenerated from protobuf enum `GENERATION_FAILED = 8;`\n\n### PENDING_EXTERNAL_DESTRUCTION\n\n Value: 9\n\nThis version was destroyed, and it may not be used or enabled again.\n\nCloud KMS is waiting for the corresponding key material residing in an\nexternal key manager to be destroyed.\n\nGenerated from protobuf enum `PENDING_EXTERNAL_DESTRUCTION = 9;`\n\n### EXTERNAL_DESTRUCTION_FAILED\n\n Value: 10\n\nThis version was destroyed, and it may not be used or enabled again.\n\nHowever, Cloud KMS could not confirm that the corresponding key material\nresiding in an external key manager was destroyed. Additional details can\nbe found in\n[CryptoKeyVersion.external_destruction_failure_reason](/php/docs/reference/cloud-kms/latest/V1.CryptoKeyVersion#_Google_Cloud_Kms_V1_CryptoKeyVersion__getExternalDestructionFailureReason__).\n\nGenerated from protobuf enum `EXTERNAL_DESTRUCTION_FAILED = 10;`"]]