3.27.0 (latest) 3.26.0 3.25.0 3.24.0 3.23.0 3.22.0 3.21.0 3.20.0 3.19.0 3.18.0 3.17.0 3.16.0 3.15.0 3.14.0 3.13.0 3.12.0 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0

    public sealed class KeyHandle : IMessage<KeyHandle>, IEquatable<KeyHandle>, IDeepCloneable<KeyHandle>, IBufferMessage, IMessage

Reference documentation and code samples for the Google Cloud Key Management Service v1 API class KeyHandle.

Resource-oriented representation of a request to Cloud KMS Autokey and the
resulting provisioning of a \[CryptoKey\]\[google.cloud.kms.v1.CryptoKey\].

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> KeyHandle

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[KeyHandle](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.KeyHandle), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[KeyHandle](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.KeyHandle), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[KeyHandle](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.KeyHandle), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Kms.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1)

## Assembly

Google.Cloud.Kms.V1.dll

## Constructors

### KeyHandle()

    public KeyHandle()

### KeyHandle(KeyHandle)

    public KeyHandle(KeyHandle other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.KeyHandle` |

## Properties

### KeyHandleName

    public KeyHandleName KeyHandleName { get; set; }

[KeyHandleName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.KeyHandleName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.KeyHandle#Google_Cloud_Kms_V1_KeyHandle_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.KeyHandleName` |   |

### KmsKey

    public string KmsKey { get; set; }

Output only. Name of a \[CryptoKey\]\[google.cloud.kms.v1.CryptoKey\] that has
been provisioned for Customer Managed Encryption Key (CMEK) use in the
\[KeyHandle\]\[google.cloud.kms.v1.KeyHandle\] project and location for the
requested resource type. The \[CryptoKey\]\[google.cloud.kms.v1.CryptoKey\]
project will reflect the value configured in the
\[AutokeyConfig\]\[google.cloud.kms.v1.AutokeyConfig\] on the resource
project's ancestor folder at the time of the
\[KeyHandle\]\[google.cloud.kms.v1.KeyHandle\] creation. If more than one
ancestor folder has a configured
\[AutokeyConfig\]\[google.cloud.kms.v1.AutokeyConfig\], the nearest of these
configurations is used.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### KmsKeyAsCryptoKeyName

    public CryptoKeyName KmsKeyAsCryptoKeyName { get; set; }

[CryptoKeyName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.CryptoKeyName)-typed view over the [KmsKey](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.KeyHandle#Google_Cloud_Kms_V1_KeyHandle_KmsKey) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.CryptoKeyName` |   |

### Name

    public string Name { get; set; }

Identifier. Name of the \[KeyHandle\]\[google.cloud.kms.v1.KeyHandle\]
resource, e.g.
`projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ResourceTypeSelector

    public string ResourceTypeSelector { get; set; }

Required. Indicates the resource type that the resulting
\[CryptoKey\]\[google.cloud.kms.v1.CryptoKey\] is meant to protect, e.g.
`{SERVICE}.googleapis.com/{TYPE}`. See documentation for supported resource
types.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |