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

REST client for the AutokeyAdmin service.


<br />

Provides interfaces for managing [Cloud KMS
Autokey](https://cloud.google.com/kms/help/autokey) folder-level or
project-level configurations. A configuration is inherited by all descendent
folders and projects. A configuration at a folder or project overrides any
other configurations in its ancestry. Setting a configuration on a folder is
a prerequisite for Cloud KMS Autokey, so that users working in a descendant
project can request provisioned [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 when using
the dedicated key project mode. This is not required when using the delegated
key management mode for same-project keys.

## Inherits

- Object

## Includes

- [Google::Cloud::Kms::V1::AutokeyAdmin::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyAdmin-Paths)

## Methods

### .configure

    def self.configure() { |config| ... } -> Client::Configuration

Configure the AutokeyAdmin Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyAdmin-Rest-Client-Configuration "Google::Cloud::Kms::V1::AutokeyAdmin::Rest::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyAdmin-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyAdmin-Rest-Client-Configuration))
**Example**

```ruby
# Modify the configuration for all AutokeyAdmin clients
::Google::Cloud::Kms::V1::AutokeyAdmin::Rest::Client.configure do |config|
  config.timeout = 10.0
end
```

### #configure

    def configure() { |config| ... } -> Client::Configuration

Configure the AutokeyAdmin Client instance.


The configuration is set to the derived mode, meaning that values can be changed,
but structural changes (adding new fields, etc.) are not allowed. Structural changes
should be made on [Client.configure](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyAdmin-Rest-Client#Google__Cloud__Kms__V1__AutokeyAdmin__Rest__Client_configure_class_ "Google::Cloud::Kms::V1::AutokeyAdmin::Rest::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyAdmin-Rest-Client-Configuration "Google::Cloud::Kms::V1::AutokeyAdmin::Rest::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyAdmin-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyAdmin-Rest-Client-Configuration))

### #get_autokey_config

    def get_autokey_config(request, options = nil) -> ::Google::Cloud::Kms::V1::AutokeyConfig
    def get_autokey_config(name: nil) -> ::Google::Cloud::Kms::V1::AutokeyConfig

Returns 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)") for a folder
or project.
**Overloads**

    def get_autokey_config(request, options = nil) -> ::Google::Cloud::Kms::V1::AutokeyConfig

Pass arguments to `get_autokey_config` via a request object, either of type [GetAutokeyConfigRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-GetAutokeyConfigRequest "Google::Cloud::Kms::V1::GetAutokeyConfigRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Kms::V1::GetAutokeyConfigRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-GetAutokeyConfigRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

    def get_autokey_config(name: nil) -> ::Google::Cloud::Kms::V1::AutokeyConfig

Pass arguments to `get_autokey_config` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameter**

- **name** (::String) --- Required. 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`.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::Kms::V1::AutokeyConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyConfig))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::Kms::V1::AutokeyConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyConfig))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/kms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Kms::V1::AutokeyAdmin::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Kms::V1::GetAutokeyConfigRequest.new

# Call the get_autokey_config method.
result = client.get_autokey_config request

# The returned object is of type Google::Cloud::Kms::V1::AutokeyConfig.
p result
```

### #iam_policy_client

    def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Rest::Client

Get the associated client for mix-in of the IAMPolicy.
**Returns**

- (Google::Iam::V1::IAMPolicy::Rest::Client)

### #initialize

    def initialize() { |config| ... } -> Client

Create a new AutokeyAdmin REST client object.
**Yields**

- (config) --- Configure the AutokeyAdmin client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyAdmin-Rest-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyAdmin-Rest-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::Kms::V1::AutokeyAdmin::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Kms::V1::AutokeyAdmin::Rest::Client.new do |config|
  config.timeout = 10.0
end
```

### #location_client

    def location_client() -> Google::Cloud::Location::Locations::Rest::Client

Get the associated client for mix-in of the Locations.
**Returns**

- (Google::Cloud::Location::Locations::Rest::Client)

### #logger

    def logger() -> Logger

The logger used for request/response debug logging.
**Returns**

- (Logger)

### #show_effective_autokey_config

    def show_effective_autokey_config(request, options = nil) -> ::Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigResponse
    def show_effective_autokey_config(parent: nil) -> ::Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigResponse

Returns the effective Cloud KMS Autokey configuration for a given project.
**Overloads**

    def show_effective_autokey_config(request, options = nil) -> ::Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigResponse

Pass arguments to `show_effective_autokey_config` via a request object, either of type [ShowEffectiveAutokeyConfigRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-ShowEffectiveAutokeyConfigRequest "Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-ShowEffectiveAutokeyConfigRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

    def show_effective_autokey_config(parent: nil) -> ::Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigResponse

Pass arguments to `show_effective_autokey_config` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameter**

- **parent** (::String) --- Required. Name of the resource project to the show effective Cloud KMS Autokey configuration for. This may be helpful for interrogating the effect of nested folder configurations on a given resource project.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-ShowEffectiveAutokeyConfigResponse))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-ShowEffectiveAutokeyConfigResponse))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/kms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Kms::V1::AutokeyAdmin::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigRequest.new

# Call the show_effective_autokey_config method.
result = client.show_effective_autokey_config request

# The returned object is of type Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigResponse.
p result
```

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)

### #update_autokey_config

    def update_autokey_config(request, options = nil) -> ::Google::Cloud::Kms::V1::AutokeyConfig
    def update_autokey_config(autokey_config: nil, update_mask: nil) -> ::Google::Cloud::Kms::V1::AutokeyConfig

Updates 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)") for a folder
or a project. The caller must have both `cloudkms.autokeyConfigs.update`
permission on the parent folder and `cloudkms.cryptoKeys.setIamPolicy`
permission on the provided key project. 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)") creation in the folder's
descendant projects will use this configuration to determine where to
create the resulting [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)").
**Overloads**

    def update_autokey_config(request, options = nil) -> ::Google::Cloud::Kms::V1::AutokeyConfig

Pass arguments to `update_autokey_config` via a request object, either of type [UpdateAutokeyConfigRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-UpdateAutokeyConfigRequest "Google::Cloud::Kms::V1::UpdateAutokeyConfigRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Kms::V1::UpdateAutokeyConfigRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-UpdateAutokeyConfigRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

    def update_autokey_config(autokey_config: nil, update_mask: nil) -> ::Google::Cloud::Kms::V1::AutokeyConfig

Pass arguments to `update_autokey_config` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **autokey_config** ([::Google::Cloud::Kms::V1::AutokeyConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyConfig), ::Hash) --- Required. [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)") with values to update.
- **update_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- Required. Masks which fields 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)") to update, e.g. `keyProject`.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::Kms::V1::AutokeyConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyConfig))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::Kms::V1::AutokeyConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyConfig))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/kms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Kms::V1::AutokeyAdmin::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Kms::V1::UpdateAutokeyConfigRequest.new

# Call the update_autokey_config method.
result = client.update_autokey_config request

# The returned object is of type Google::Cloud::Kms::V1::AutokeyConfig.
p result
```