Reference documentation and code samples for the Google Cloud Key Management Service v1 API class Autokey.
Provides interfaces for using Cloud KMS
Autokey to provision new
[CryptoKeys][google.cloud.kms.v1.CryptoKey], ready for Customer Managed
Encryption Key (CMEK) use, on-demand. To support certain client tooling, this
feature is modeled around a [KeyHandle][google.cloud.kms.v1.KeyHandle]
resource: creating a [KeyHandle][google.cloud.kms.v1.KeyHandle] in a resource
project and given location triggers Cloud KMS Autokey to provision a
[CryptoKey][google.cloud.kms.v1.CryptoKey] in the configured key project and
the same location.
Prior to use in a given resource project,
[UpdateAutokeyConfig][google.cloud.kms.v1.AutokeyAdmin.UpdateAutokeyConfig]
should have been called on an ancestor folder, setting the key project where
Cloud KMS Autokey should create new
[CryptoKeys][google.cloud.kms.v1.CryptoKey]. See documentation for additional
prerequisites. To check what key project, if any, is currently configured on
a resource project's ancestor folder, see
[ShowEffectiveAutokeyConfig][google.cloud.kms.v1.AutokeyAdmin.ShowEffectiveAutokeyConfig].
public static void BindService(ServiceBinderBase serviceBinder, Autokey.AutokeyBase serviceImpl)
Register service method with a service binder with or without implementation. Useful when customizing the service binding logic.
Note: this method is part of an experimental API that can change or be removed without any prior notice.
[[["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\u003eThe latest version of the Google Cloud Key Management Service v1 API class Autokey is 3.16.0, with multiple previous versions available for reference, spanning from 2.2.0 to the newest 3.16.0.\u003c/p\u003e\n"],["\u003cp\u003eAutokey provisions new CryptoKeys on-demand, enabling the use of Customer Managed Encryption Keys (CMEK).\u003c/p\u003e\n"],["\u003cp\u003eCreating a KeyHandle in a resource project triggers Cloud KMS Autokey to provision a CryptoKey in the configured key project and location.\u003c/p\u003e\n"],["\u003cp\u003eBefore utilizing Autokey, UpdateAutokeyConfig must be called on an ancestor folder to set the key project for CryptoKey creation, and ShowEffectiveAutokeyConfig can be used to check the current key project configuration.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBindService\u003c/code\u003e method allows you to create a service definition or to register a service method with or without implementation for server-side handling of the Autokey feature.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Key Management Service v1 API - Class Autokey (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.Autokey)\n- [3.17.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.17.0/Google.Cloud.Kms.V1.Autokey)\n- [3.16.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.16.0/Google.Cloud.Kms.V1.Autokey)\n- [3.15.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.15.0/Google.Cloud.Kms.V1.Autokey)\n- [3.14.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.14.0/Google.Cloud.Kms.V1.Autokey)\n- [3.13.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.13.0/Google.Cloud.Kms.V1.Autokey)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.12.0/Google.Cloud.Kms.V1.Autokey)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.11.0/Google.Cloud.Kms.V1.Autokey)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.10.0/Google.Cloud.Kms.V1.Autokey)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.9.0/Google.Cloud.Kms.V1.Autokey)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.8.0/Google.Cloud.Kms.V1.Autokey)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.7.0/Google.Cloud.Kms.V1.Autokey)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.6.0/Google.Cloud.Kms.V1.Autokey)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.5.0/Google.Cloud.Kms.V1.Autokey)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.4.0/Google.Cloud.Kms.V1.Autokey)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.3.0/Google.Cloud.Kms.V1.Autokey)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.2.0/Google.Cloud.Kms.V1.Autokey)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.1.0/Google.Cloud.Kms.V1.Autokey)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/3.0.0/Google.Cloud.Kms.V1.Autokey)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/2.9.0/Google.Cloud.Kms.V1.Autokey)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/2.8.0/Google.Cloud.Kms.V1.Autokey)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/2.7.0/Google.Cloud.Kms.V1.Autokey)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/2.6.0/Google.Cloud.Kms.V1.Autokey)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/2.5.0/Google.Cloud.Kms.V1.Autokey)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/2.4.0/Google.Cloud.Kms.V1.Autokey)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/2.3.0/Google.Cloud.Kms.V1.Autokey)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Kms.V1/2.2.0/Google.Cloud.Kms.V1.Autokey) \n\n public static class Autokey\n\nReference documentation and code samples for the Google Cloud Key Management Service v1 API class Autokey.\n\nProvides interfaces for using [Cloud KMS\nAutokey](https://cloud.google.com/kms/help/autokey) to provision new\n\\[CryptoKeys\\]\\[google.cloud.kms.v1.CryptoKey\\], ready for Customer Managed\nEncryption Key (CMEK) use, on-demand. To support certain client tooling, this\nfeature is modeled around a \\[KeyHandle\\]\\[google.cloud.kms.v1.KeyHandle\\]\nresource: creating a \\[KeyHandle\\]\\[google.cloud.kms.v1.KeyHandle\\] in a resource\nproject and given location triggers Cloud KMS Autokey to provision a\n\\[CryptoKey\\]\\[google.cloud.kms.v1.CryptoKey\\] in the configured key project and\nthe same location.\n\nPrior to use in a given resource project,\n\\[UpdateAutokeyConfig\\]\\[google.cloud.kms.v1.AutokeyAdmin.UpdateAutokeyConfig\\]\nshould have been called on an ancestor folder, setting the key project where\nCloud KMS Autokey should create new\n\\[CryptoKeys\\]\\[google.cloud.kms.v1.CryptoKey\\]. See documentation for additional\nprerequisites. To check what key project, if any, is currently configured on\na resource project's ancestor folder, see\n\\[ShowEffectiveAutokeyConfig\\]\\[google.cloud.kms.v1.AutokeyAdmin.ShowEffectiveAutokeyConfig\\]. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Autokey \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.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) \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\nMethods\n-------\n\n### BindService(AutokeyBase)\n\n public static ServerServiceDefinition BindService(Autokey.AutokeyBase serviceImpl)\n\nCreates service definition that can be registered with a server\n\n### BindService(ServiceBinderBase, AutokeyBase)\n\n public static void BindService(ServiceBinderBase serviceBinder, Autokey.AutokeyBase serviceImpl)\n\nRegister service method with a service binder with or without implementation. Useful when customizing the service binding logic.\nNote: this method is part of an experimental API that can change or be removed without any prior notice."]]