# Cloud Key Management Service (KMS) V1 API - Class Google::Cloud::Kms::V1::AutokeyConfig (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 class Google::Cloud::Kms::V1::AutokeyConfig.

Cloud KMS Autokey configuration for a folder.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #etag

    def etag() -> ::String

**Returns**

- (::String) --- Optional. A checksum computed by the server based on the value of other fields. This may be sent on update requests to ensure that the client has an up-to-date value before proceeding. The request will be rejected with an ABORTED error on a mismatched etag.

### #etag=

    def etag=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. A checksum computed by the server based on the value of other fields. This may be sent on update requests to ensure that the client has an up-to-date value before proceeding. The request will be rejected with an ABORTED error on a mismatched etag.
**Returns**

- (::String) --- Optional. A checksum computed by the server based on the value of other fields. This may be sent on update requests to ensure that the client has an up-to-date value before proceeding. The request will be rejected with an ABORTED error on a mismatched etag.

### #key_project

    def key_project() -> ::String

**Returns**

- (::String) --- Optional. Name of the key project, e.g. `projects/{PROJECT_ID}` or `projects/{PROJECT_NUMBER}`, where Cloud KMS Autokey will provision a new [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)") when 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)") is created. On [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)"), the caller will require `cloudkms.cryptoKeys.setIamPolicy` permission on this key project. Once configured, for Cloud KMS Autokey to function properly, this key project must have the Cloud KMS API activated and the Cloud KMS Service Agent for this key project must be granted the `cloudkms.admin` role (or pertinent permissions). A request with an empty key project field will clear the configuration.

### #key_project=

    def key_project=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. Name of the key project, e.g. `projects/{PROJECT_ID}` or `projects/{PROJECT_NUMBER}`, where Cloud KMS Autokey will provision a new [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)") when 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)") is created. On [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)"), the caller will require `cloudkms.cryptoKeys.setIamPolicy` permission on this key project. Once configured, for Cloud KMS Autokey to function properly, this key project must have the Cloud KMS API activated and the Cloud KMS Service Agent for this key project must be granted the `cloudkms.admin` role (or pertinent permissions). A request with an empty key project field will clear the configuration.
**Returns**

- (::String) --- Optional. Name of the key project, e.g. `projects/{PROJECT_ID}` or `projects/{PROJECT_NUMBER}`, where Cloud KMS Autokey will provision a new [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)") when 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)") is created. On [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)"), the caller will require `cloudkms.cryptoKeys.setIamPolicy` permission on this key project. Once configured, for Cloud KMS Autokey to function properly, this key project must have the Cloud KMS API activated and the Cloud KMS Service Agent for this key project must be granted the `cloudkms.admin` role (or pertinent permissions). A request with an empty key project field will clear the configuration.

### #key_project_resolution_mode

    def key_project_resolution_mode() -> ::Google::Cloud::Kms::V1::AutokeyConfig::KeyProjectResolutionMode

**Returns**

- ([::Google::Cloud::Kms::V1::AutokeyConfig::KeyProjectResolutionMode](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyConfig-KeyProjectResolutionMode)) --- Optional. KeyProjectResolutionMode for the AutokeyConfig. Valid values are `DEDICATED_KEY_PROJECT`, `RESOURCE_PROJECT`, or `DISABLED`.

### #key_project_resolution_mode=

    def key_project_resolution_mode=(value) -> ::Google::Cloud::Kms::V1::AutokeyConfig::KeyProjectResolutionMode

**Parameter**

- **value** ([::Google::Cloud::Kms::V1::AutokeyConfig::KeyProjectResolutionMode](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyConfig-KeyProjectResolutionMode)) --- Optional. KeyProjectResolutionMode for the AutokeyConfig. Valid values are `DEDICATED_KEY_PROJECT`, `RESOURCE_PROJECT`, or `DISABLED`.
**Returns**

- ([::Google::Cloud::Kms::V1::AutokeyConfig::KeyProjectResolutionMode](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyConfig-KeyProjectResolutionMode)) --- Optional. KeyProjectResolutionMode for the AutokeyConfig. Valid values are `DEDICATED_KEY_PROJECT`, `RESOURCE_PROJECT`, or `DISABLED`.

### #name

    def name() -> ::String

**Returns**

- (::String) --- Identifier. Name of the [AutokeyConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyConfig "Google::Cloud::Kms::V1::AutokeyConfig (class)") resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or `projects/{PROJECT_NUMBER}/autokeyConfig`.

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- Identifier. Name of the [AutokeyConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyConfig "Google::Cloud::Kms::V1::AutokeyConfig (class)") resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or `projects/{PROJECT_NUMBER}/autokeyConfig`.
**Returns**

- (::String) --- Identifier. Name of the [AutokeyConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyConfig "Google::Cloud::Kms::V1::AutokeyConfig (class)") resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig` or `projects/{PROJECT_NUMBER}/autokeyConfig`.

### #state

    def state() -> ::Google::Cloud::Kms::V1::AutokeyConfig::State

**Returns**

- ([::Google::Cloud::Kms::V1::AutokeyConfig::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyConfig-State)) --- Output only. The state for the AutokeyConfig.