# REST Resource: projects.locations.keyHandles

- [Resource: KeyHandle](https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyHandles#KeyHandle)
  - [JSON representation](https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyHandles#KeyHandle.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyHandles#METHODS_SUMMARY)

## Resource: KeyHandle

Resource-oriented representation of a request to Cloud KMS Autokey and the resulting provisioning of a `https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys#CryptoKey`.

| JSON representation |
|---|
| ``` { "name": string, "kmsKey": string, "resourceTypeSelector": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. Name of the `https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyHandles#KeyHandle` resource, e.g. `projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`. |
| `kmsKey` | `string` Output only. Name of a `https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys#CryptoKey` that has been provisioned for Customer Managed Encryption Key (CMEK) use in the `https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyHandles#KeyHandle` project and location for the requested resource type. The `https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys#CryptoKey` project will reflect the value configured in the `https://docs.cloud.google.com/kms/docs/reference/rest/v1/AutokeyConfig` on the resource project's ancestor folder at the time of the `https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyHandles#KeyHandle` creation. If more than one ancestor folder has a configured `https://docs.cloud.google.com/kms/docs/reference/rest/v1/AutokeyConfig`, the nearest of these configurations is used. |
| `resourceTypeSelector` | `string` Required. Indicates the resource type that the resulting `https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys#CryptoKey` is meant to protect, e.g. `{SERVICE}.googleapis.com/{TYPE}`. See documentation for supported resource types. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyHandles/create` | Creates a new `https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyHandles#KeyHandle`, triggering the provisioning of a new `https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys#CryptoKey` for CMEK use with the given resource type in the configured key project and the same location. |
| ### `https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyHandles/get` | Returns the `https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyHandles#KeyHandle`. |
| ### `https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyHandles/list` | Lists `https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyHandles#KeyHandle`. |