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.
Identifier. Name of the [KeyHandle][google.cloud.kms.v1.KeyHandle]
resource, e.g.
projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis document provides reference information for the \u003ccode\u003eKeyHandle\u003c/code\u003e class within the Google Cloud Key Management Service v1 API, specifically for .NET.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eKeyHandle\u003c/code\u003e class is a resource-oriented representation for Cloud KMS Autokey requests and the resulting provisioning of a \u003ccode\u003eCryptoKey\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version available is 3.16.0, but multiple versions from 2.2.0 to 3.15.0 are accessible through the provided links.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eKeyHandle\u003c/code\u003e implements interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eKeyHandle\u003c/code\u003e class includes properties like \u003ccode\u003eKeyHandleName\u003c/code\u003e, \u003ccode\u003eKmsKey\u003c/code\u003e, \u003ccode\u003eKmsKeyAsCryptoKeyName\u003c/code\u003e, \u003ccode\u003eName\u003c/code\u003e, and \u003ccode\u003eResourceTypeSelector\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Key Management Service v1 API - Class KeyHandle (3.18.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.18.0 (latest)](/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.KeyHandle)\n- [3.17.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.17.0/Google.Cloud.Kms.V1.KeyHandle)\n- [3.16.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.16.0/Google.Cloud.Kms.V1.KeyHandle)\n- [3.15.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.15.0/Google.Cloud.Kms.V1.KeyHandle)\n- [3.14.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.14.0/Google.Cloud.Kms.V1.KeyHandle)\n- [3.13.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.13.0/Google.Cloud.Kms.V1.KeyHandle)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.12.0/Google.Cloud.Kms.V1.KeyHandle)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.11.0/Google.Cloud.Kms.V1.KeyHandle)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.10.0/Google.Cloud.Kms.V1.KeyHandle)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.9.0/Google.Cloud.Kms.V1.KeyHandle)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.8.0/Google.Cloud.Kms.V1.KeyHandle)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.7.0/Google.Cloud.Kms.V1.KeyHandle)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.6.0/Google.Cloud.Kms.V1.KeyHandle)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.5.0/Google.Cloud.Kms.V1.KeyHandle)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.4.0/Google.Cloud.Kms.V1.KeyHandle)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.3.0/Google.Cloud.Kms.V1.KeyHandle)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.2.0/Google.Cloud.Kms.V1.KeyHandle)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.1.0/Google.Cloud.Kms.V1.KeyHandle)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.0.0/Google.Cloud.Kms.V1.KeyHandle)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/2.9.0/Google.Cloud.Kms.V1.KeyHandle)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/2.8.0/Google.Cloud.Kms.V1.KeyHandle)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/2.7.0/Google.Cloud.Kms.V1.KeyHandle)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/2.6.0/Google.Cloud.Kms.V1.KeyHandle)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/2.5.0/Google.Cloud.Kms.V1.KeyHandle)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/2.4.0/Google.Cloud.Kms.V1.KeyHandle)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/2.3.0/Google.Cloud.Kms.V1.KeyHandle)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/2.2.0/Google.Cloud.Kms.V1.KeyHandle) \n\n public sealed class KeyHandle : IMessage\u003cKeyHandle\u003e, IEquatable\u003cKeyHandle\u003e, IDeepCloneable\u003cKeyHandle\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Key Management Service v1 API class KeyHandle.\n\nResource-oriented representation of a request to Cloud KMS Autokey and the\nresulting provisioning of a \\[CryptoKey\\]\\[google.cloud.kms.v1.CryptoKey\\]. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e KeyHandle \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[KeyHandle](/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.KeyHandle), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[KeyHandle](/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](/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) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Kms.V1](/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Kms.V1.dll\n\nConstructors\n------------\n\n### KeyHandle()\n\n public KeyHandle()\n\n### KeyHandle(KeyHandle)\n\n public KeyHandle(KeyHandle other)\n\nProperties\n----------\n\n### KeyHandleName\n\n public KeyHandleName KeyHandleName { get; set; }\n\n[KeyHandleName](/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.KeyHandleName)-typed view over the [Name](/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.KeyHandle#Google_Cloud_Kms_V1_KeyHandle_Name) resource name property.\n\n### KmsKey\n\n public string KmsKey { get; set; }\n\nOutput only. Name of a \\[CryptoKey\\]\\[google.cloud.kms.v1.CryptoKey\\] that has\nbeen provisioned for Customer Managed Encryption Key (CMEK) use in the\n\\[KeyHandle\\]\\[google.cloud.kms.v1.KeyHandle\\] project and location for the\nrequested resource type. The \\[CryptoKey\\]\\[google.cloud.kms.v1.CryptoKey\\]\nproject will reflect the value configured in the\n\\[AutokeyConfig\\]\\[google.cloud.kms.v1.AutokeyConfig\\] on the resource\nproject's ancestor folder at the time of the\n\\[KeyHandle\\]\\[google.cloud.kms.v1.KeyHandle\\] creation. If more than one\nancestor folder has a configured\n\\[AutokeyConfig\\]\\[google.cloud.kms.v1.AutokeyConfig\\], the nearest of these\nconfigurations is used.\n\n### KmsKeyAsCryptoKeyName\n\n public CryptoKeyName KmsKeyAsCryptoKeyName { get; set; }\n\n[CryptoKeyName](/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.CryptoKeyName)-typed view over the [KmsKey](/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.KeyHandle#Google_Cloud_Kms_V1_KeyHandle_KmsKey) resource name property.\n\n### Name\n\n public string Name { get; set; }\n\nIdentifier. Name of the \\[KeyHandle\\]\\[google.cloud.kms.v1.KeyHandle\\]\nresource, e.g.\n`projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}`.\n\n### ResourceTypeSelector\n\n public string ResourceTypeSelector { get; set; }\n\nRequired. Indicates the resource type that the resulting\n\\[CryptoKey\\]\\[google.cloud.kms.v1.CryptoKey\\] is meant to protect, e.g.\n`{SERVICE}.googleapis.com/{TYPE}`. See documentation for supported resource\ntypes."]]