# Cloud Key Management Service (KMS) V1 API - Module Google::Cloud::Kms::V1::EkmConnection::KeyManagementMode (v1.13.0)

1.13.0 (latest) 1.12.1 1.11.0 1.10.0 1.9.2 1.8.0 1.7.0 1.6.0 1.5.1 1.4.0 1.3.2 1.2.1 1.1.0 1.0.2 0.27.0 0.26.0 0.25.1 0.24.3 0.23.0 0.22.1 0.21.0 0.20.0 0.19.0 0.18.1 0.17.0 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.2 Reference documentation and code samples for the Cloud Key Management Service (KMS) V1 API module Google::Cloud::Kms::V1::EkmConnection::KeyManagementMode.

[KeyManagementMode](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-EkmConnection-KeyManagementMode "Google::Cloud::Kms::V1::EkmConnection::KeyManagementMode (module)")
describes who can perform control plane cryptographic operations using this
[EkmConnection](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-EkmConnection "Google::Cloud::Kms::V1::EkmConnection (class)").

## Constants

### KEY_MANAGEMENT_MODE_UNSPECIFIED

**value:** 0  
Not specified.

### MANUAL

**value:** 1  

EKM-side key management operations on
[CryptoKeys](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-CryptoKey "Google::Cloud::Kms::V1::CryptoKey (class)") created with this
[EkmConnection](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-EkmConnection "Google::Cloud::Kms::V1::EkmConnection (class)") must be initiated from
the EKM directly and cannot be performed from Cloud KMS. This means that:

<br />

- When creating a [CryptoKeyVersion](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-CryptoKeyVersion "Google::Cloud::Kms::V1::CryptoKeyVersion (class)") associated with this [EkmConnection](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-EkmConnection "Google::Cloud::Kms::V1::EkmConnection (class)"), the caller must supply the key path of pre-existing external key material that will be linked to the [CryptoKeyVersion](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-CryptoKeyVersion "Google::Cloud::Kms::V1::CryptoKeyVersion (class)").
- Destruction of external key material cannot be requested via the Cloud KMS API and must be performed directly in the EKM.
- Automatic rotation of key material is not supported.

### CLOUD_KMS

**value:** 2  

All [CryptoKeys](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-CryptoKey "Google::Cloud::Kms::V1::CryptoKey (class)") created with this
[EkmConnection](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-EkmConnection "Google::Cloud::Kms::V1::EkmConnection (class)") use EKM-side key
management operations initiated from Cloud KMS. This means that:

<br />

- When a [CryptoKeyVersion](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-CryptoKeyVersion "Google::Cloud::Kms::V1::CryptoKeyVersion (class)") associated with this [EkmConnection](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-EkmConnection "Google::Cloud::Kms::V1::EkmConnection (class)") is created, the EKM automatically generates new key material and a new key path. The caller cannot supply the key path of pre-existing external key material.
- Destruction of external key material associated with this [EkmConnection](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-EkmConnection "Google::Cloud::Kms::V1::EkmConnection (class)") can be requested by calling [DestroyCryptoKeyVersion](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-KeyManagementService-Client#Google__Cloud__Kms__V1__KeyManagementService__Client_destroy_crypto_key_version_instance_ "Google::Cloud::Kms::V1::KeyManagementService::Client#destroy_crypto_key_version (method)").
- Automatic rotation of key material is supported.