# Cloud KMS V1 Client - Class KeyManagementMode (2.9.0)

2.9.0 (latest) 2.8.0 2.7.0 2.6.0 2.5.2 2.4.0 2.3.1 2.2.0 2.1.6 2.0.0 1.23.0 1.22.1 1.21.4 1.20.3 1.19.0 1.18.1 1.17.0 1.16.4 1.15.3 Reference documentation and code samples for the Cloud KMS V1 Client class KeyManagementMode.

[KeyManagementMode](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.EkmConnection.KeyManagementMode)
describes who can perform control plane cryptographic operations using this
[EkmConnection](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.EkmConnection).

Protobuf type `google.cloud.kms.v1.EkmConnection.KeyManagementMode`

## Namespace

Google \\ Cloud \\ Kms \\ V1 \\ EkmConnection

## Methods

### static::name

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `mixed` |

### static::value

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `mixed` |

## Constants

### KEY_MANAGEMENT_MODE_UNSPECIFIED

    Value: 0

Not specified.

Generated from protobuf enum `KEY_MANAGEMENT_MODE_UNSPECIFIED = 0;`

### MANUAL

    Value: 1

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

- When creating a
  [CryptoKeyVersion](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.CryptoKeyVersion) associated with
  this
  [EkmConnection](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.EkmConnection), 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/php/docs/reference/cloud-kms/latest/V1.CryptoKeyVersion).

- 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.

Generated from protobuf enum `MANUAL = 1;`

### CLOUD_KMS

    Value: 2

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

- When a [CryptoKeyVersion](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.CryptoKeyVersion)
  associated with this [EkmConnection](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.EkmConnection)
  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/php/docs/reference/cloud-kms/latest/V1.EkmConnection) can be requested by
  calling
  [DestroyCryptoKeyVersion](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Client.KeyManagementServiceClient#_Google_Cloud_Kms_V1_Client_KeyManagementServiceClient__destroyCryptoKeyVersion__).

- Automatic rotation of key material is supported.

Generated from protobuf enum `CLOUD_KMS = 2;`