0.22.0 (latest) 0.21.0 0.20.0 0.19.0 0.18.0 0.17.0 0.16.2 0.15.1 0.14.1 0.13.0 0.12.2 0.11.3 0.10.0 0.9.1 0.8.3 0.7.0 0.6.1 0.5.0 0.4.0 0.3.0 0.2.1 0.1.0 Reference documentation and code samples for the KMS Inventory V1 API class Google::Cloud::Kms::Inventory::V1::KeyDashboardService::Client.

Client for the KeyDashboardService service.


<br />

Provides a cross-region view of all Cloud KMS keys in a given Cloud project.

## Inherits

- Object

## Includes

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

## Methods

### .configure

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

Configure the KeyDashboardService Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client-Configuration "Google::Cloud::Kms::Inventory::V1::KeyDashboardService::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-inventory-v1/latest/Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client-Configuration))
**Returns**

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

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

### #configure

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

Configure the KeyDashboardService 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-inventory-v1/latest/Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client#Google__Cloud__Kms__Inventory__V1__KeyDashboardService__Client_configure_class_ "Google::Cloud::Kms::Inventory::V1::KeyDashboardService::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client-Configuration "Google::Cloud::Kms::Inventory::V1::KeyDashboardService::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-inventory-v1/latest/Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client-Configuration))
**Returns**

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

### #initialize

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

Create a new KeyDashboardService client object.
**Yields**

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

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

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

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

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

### #list_crypto_keys

    def list_crypto_keys(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Kms::V1::CryptoKey>
    def list_crypto_keys(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Kms::V1::CryptoKey>

Returns cryptographic keys managed by Cloud KMS in a given Cloud project.
Note that this data is sourced from snapshots, meaning it may not
completely reflect the actual state of key metadata at call time.
**Overloads**

    def list_crypto_keys(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Kms::V1::CryptoKey>

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

- **request** ([::Google::Cloud::Kms::Inventory::V1::ListCryptoKeysRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-Inventory-V1-ListCryptoKeysRequest), ::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 list_crypto_keys(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Kms::V1::CryptoKey>

Pass arguments to `list_crypto_keys` 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**

- **parent** (::String) --- Required. The Google Cloud project for which to retrieve key metadata, in the format `projects/*`
- **page_size** (::Integer) --- Optional. The maximum number of keys to return. The service may return fewer than this value. If unspecified, at most 1000 keys will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
- **page_token** (::String) --- Optional. Pass this into a subsequent request in order to receive the next page of results.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::Kms::V1::CryptoKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-V1-CryptoKey)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::Kms::V1::CryptoKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-V1-CryptoKey)\>)
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Kms::V1::CryptoKey.
  p item
end
```

### #logger

    def logger() -> Logger

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

- (Logger)

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)