# Cloud Key Management Service (KMS) V1 API - Module Google::Cloud::Kms::V1::Autokey (v1.13.0)

1.13.0 (latest) 1.12.1 1.11.0 1.10.0 1.9.2 1.8.0 1.7.0 1.6.0 1.5.1 1.4.0 1.3.2 1.2.1 1.1.0 1.0.2 0.27.0 0.26.0 0.25.1 0.24.3 0.23.0 0.22.1 0.21.0 0.20.0 0.19.0 0.18.1 0.17.0 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.2 Reference documentation and code samples for the Cloud Key Management Service (KMS) V1 API module Google::Cloud::Kms::V1::Autokey.

Provides interfaces for using [Cloud KMS
Autokey](https://cloud.google.com/kms/help/autokey) to provision new
[CryptoKeys](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-CryptoKey "Google::Cloud::Kms::V1::CryptoKey (class)"), ready for Customer Managed
Encryption Key (CMEK) use, on-demand. To support certain client tooling, this
feature is modeled around a [KeyHandle](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-KeyHandle "Google::Cloud::Kms::V1::KeyHandle (class)")
resource: creating a [KeyHandle](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-KeyHandle "Google::Cloud::Kms::V1::KeyHandle (class)") in a resource
project and given location triggers Cloud KMS Autokey to provision a
[CryptoKey](https://docs.cloud.google.com/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
the same location.

Prior to use in a given resource project,
[UpdateAutokeyConfig](https://docs.cloud.google.com/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)")
should have been called on an ancestor folder, setting the key project where
Cloud KMS Autokey should create new
[CryptoKeys](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-CryptoKey "Google::Cloud::Kms::V1::CryptoKey (class)"). See documentation for additional
prerequisites. To check what key project, if any, is currently configured on
a resource project's ancestor folder, see
[ShowEffectiveAutokeyConfig](https://docs.cloud.google.com/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)").

To load this service and instantiate a REST client:

    require "google/cloud/kms/v1/autokey/rest"
    client = ::Google::Cloud::Kms::V1::Autokey::Rest::Client.new