Reference documentation and code samples for the Cloud Key Management Service (KMS) V1 API module Google::Cloud::Kms::V1::Autokey.
Provides interfaces for usingCloud KMS
Autokeyto provision newCryptoKeys, ready for Customer Managed
Encryption Key (CMEK) use, on-demand. To support certain client tooling, this
feature is modeled around aKeyHandleresource: creating aKeyHandlein a resource
project and given location triggers Cloud KMS Autokey to provision aCryptoKeyin the configured key project and
the same location.
Prior to use in a given resource project,UpdateAutokeyConfigshould have been called on an ancestor folder, setting the key project where
Cloud KMS Autokey should create newCryptoKeys. See documentation for additional
prerequisites. To check what key project, if any, is currently configured on
a resource project's ancestor folder, seeShowEffectiveAutokeyConfig.
To load this service and instantiate a REST client:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Key Management Service (KMS) V1 API - Module Google::Cloud::Kms::V1::Autokey (v1.7.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.7.0 (latest)](/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-Autokey)\n- [1.6.0](/ruby/docs/reference/google-cloud-kms-v1/1.6.0/Google-Cloud-Kms-V1-Autokey)\n- [1.5.1](/ruby/docs/reference/google-cloud-kms-v1/1.5.1/Google-Cloud-Kms-V1-Autokey)\n- [1.4.0](/ruby/docs/reference/google-cloud-kms-v1/1.4.0/Google-Cloud-Kms-V1-Autokey)\n- [1.3.2](/ruby/docs/reference/google-cloud-kms-v1/1.3.2/Google-Cloud-Kms-V1-Autokey)\n- [1.2.1](/ruby/docs/reference/google-cloud-kms-v1/1.2.1/Google-Cloud-Kms-V1-Autokey)\n- [1.1.0](/ruby/docs/reference/google-cloud-kms-v1/1.1.0/Google-Cloud-Kms-V1-Autokey)\n- [1.0.2](/ruby/docs/reference/google-cloud-kms-v1/1.0.2/Google-Cloud-Kms-V1-Autokey)\n- [0.27.0](/ruby/docs/reference/google-cloud-kms-v1/0.27.0/Google-Cloud-Kms-V1-Autokey)\n- [0.26.0](/ruby/docs/reference/google-cloud-kms-v1/0.26.0/Google-Cloud-Kms-V1-Autokey)\n- [0.25.1](/ruby/docs/reference/google-cloud-kms-v1/0.25.1/Google-Cloud-Kms-V1-Autokey)\n- [0.24.3](/ruby/docs/reference/google-cloud-kms-v1/0.24.3/Google-Cloud-Kms-V1-Autokey)\n- [0.23.0](/ruby/docs/reference/google-cloud-kms-v1/0.23.0/Google-Cloud-Kms-V1-Autokey)\n- [0.22.1](/ruby/docs/reference/google-cloud-kms-v1/0.22.1/Google-Cloud-Kms-V1-Autokey)\n- [0.21.0](/ruby/docs/reference/google-cloud-kms-v1/0.21.0/Google-Cloud-Kms-V1-Autokey)\n- [0.20.0](/ruby/docs/reference/google-cloud-kms-v1/0.20.0/Google-Cloud-Kms-V1-Autokey)\n- [0.19.0](/ruby/docs/reference/google-cloud-kms-v1/0.19.0/Google-Cloud-Kms-V1-Autokey)\n- [0.18.1](/ruby/docs/reference/google-cloud-kms-v1/0.18.1/Google-Cloud-Kms-V1-Autokey)\n- [0.17.0](/ruby/docs/reference/google-cloud-kms-v1/0.17.0/Google-Cloud-Kms-V1-Autokey)\n- [0.16.0](/ruby/docs/reference/google-cloud-kms-v1/0.16.0/Google-Cloud-Kms-V1-Autokey)\n- [0.15.0](/ruby/docs/reference/google-cloud-kms-v1/0.15.0/Google-Cloud-Kms-V1-Autokey)\n- [0.14.0](/ruby/docs/reference/google-cloud-kms-v1/0.14.0/Google-Cloud-Kms-V1-Autokey)\n- [0.13.0](/ruby/docs/reference/google-cloud-kms-v1/0.13.0/Google-Cloud-Kms-V1-Autokey)\n- [0.12.0](/ruby/docs/reference/google-cloud-kms-v1/0.12.0/Google-Cloud-Kms-V1-Autokey)\n- [0.11.0](/ruby/docs/reference/google-cloud-kms-v1/0.11.0/Google-Cloud-Kms-V1-Autokey)\n- [0.10.2](/ruby/docs/reference/google-cloud-kms-v1/0.10.2/Google-Cloud-Kms-V1-Autokey) \nReference documentation and code samples for the Cloud Key Management Service (KMS) V1 API module Google::Cloud::Kms::V1::Autokey.\n\nProvides interfaces for using [Cloud KMS\nAutokey](https://cloud.google.com/kms/help/autokey) to provision new\n[CryptoKeys](/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-CryptoKey \"Google::Cloud::Kms::V1::CryptoKey (class)\"), ready for Customer Managed\nEncryption Key (CMEK) use, on-demand. To support certain client tooling, this\nfeature is modeled around a [KeyHandle](/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-KeyHandle \"Google::Cloud::Kms::V1::KeyHandle (class)\")\nresource: creating a [KeyHandle](/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-KeyHandle \"Google::Cloud::Kms::V1::KeyHandle (class)\") in a resource\nproject and given location triggers Cloud KMS Autokey to provision a\n[CryptoKey](/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-CryptoKey \"Google::Cloud::Kms::V1::CryptoKey (class)\") in the configured key project and\nthe same location.\n\nPrior to use in a given resource project,\n[UpdateAutokeyConfig](/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyAdmin-Client#Google__Cloud__Kms__V1__AutokeyAdmin__Client_update_autokey_config_instance_ \"Google::Cloud::Kms::V1::AutokeyAdmin::Client#update_autokey_config (method)\")\nshould have been called on an ancestor folder, setting the key project where\nCloud KMS Autokey should create new\n[CryptoKeys](/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-CryptoKey \"Google::Cloud::Kms::V1::CryptoKey (class)\"). 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](/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyAdmin-Client#Google__Cloud__Kms__V1__AutokeyAdmin__Client_show_effective_autokey_config_instance_ \"Google::Cloud::Kms::V1::AutokeyAdmin::Client#show_effective_autokey_config (method)\").\n\nTo load this service and instantiate a REST client: \n\n require \"google/cloud/kms/v1/autokey/rest\"\n client = ::Google::Cloud::Kms::V1::Autokey::Rest::Client.new"]]