# Modify the configuration for all KeyDashboardService clients::Google::Cloud::Kms::Inventory::V1::KeyDashboardService::Client.configuredo|config|config.timeout=10.0end
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.
See Configuration
for a description of the configuration fields.
# Create a client using the default configurationclient=::Google::Cloud::Kms::Inventory::V1::KeyDashboardService::Client.new# Create a client using a custom configurationclient=::Google::Cloud::Kms::Inventory::V1::KeyDashboardService::Client.newdo|config|config.timeout=10.0end
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.
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
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_keysrequest# 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.eachdo|item|# Each element is of type ::Google::Cloud::Kms::V1::CryptoKey.pitemend
#logger
deflogger()->Logger
The logger used for request/response debug logging.
[[["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-08-28 UTC."],[],[],null,["# KMS Inventory V1 API - Class Google::Cloud::Kms::Inventory::V1::KeyDashboardService::Client (v0.15.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.15.1 (latest)](/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client)\n- [0.15.0](/ruby/docs/reference/google-cloud-kms-inventory-v1/0.15.0/Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client)\n- [0.14.1](/ruby/docs/reference/google-cloud-kms-inventory-v1/0.14.1/Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client)\n- [0.13.0](/ruby/docs/reference/google-cloud-kms-inventory-v1/0.13.0/Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client)\n- [0.12.2](/ruby/docs/reference/google-cloud-kms-inventory-v1/0.12.2/Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client)\n- [0.11.3](/ruby/docs/reference/google-cloud-kms-inventory-v1/0.11.3/Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client)\n- [0.10.0](/ruby/docs/reference/google-cloud-kms-inventory-v1/0.10.0/Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client)\n- [0.9.1](/ruby/docs/reference/google-cloud-kms-inventory-v1/0.9.1/Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client)\n- [0.8.3](/ruby/docs/reference/google-cloud-kms-inventory-v1/0.8.3/Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client)\n- [0.7.0](/ruby/docs/reference/google-cloud-kms-inventory-v1/0.7.0/Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client)\n- [0.6.1](/ruby/docs/reference/google-cloud-kms-inventory-v1/0.6.1/Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client)\n- [0.5.0](/ruby/docs/reference/google-cloud-kms-inventory-v1/0.5.0/Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client)\n- [0.4.0](/ruby/docs/reference/google-cloud-kms-inventory-v1/0.4.0/Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client)\n- [0.3.0](/ruby/docs/reference/google-cloud-kms-inventory-v1/0.3.0/Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client)\n- [0.2.1](/ruby/docs/reference/google-cloud-kms-inventory-v1/0.2.1/Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client)\n- [0.1.0](/ruby/docs/reference/google-cloud-kms-inventory-v1/0.1.0/Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client) \nReference documentation and code samples for the KMS Inventory V1 API class Google::Cloud::Kms::Inventory::V1::KeyDashboardService::Client.\n\nClient for the KeyDashboardService service.\n\n\n\u003cbr /\u003e\n\nProvides a cross-region view of all Cloud KMS keys in a given Cloud project. \n\nInherits\n--------\n\n- Object \n\nIncludes\n--------\n\n- [Google::Cloud::Kms::Inventory::V1::KeyDashboardService::Paths](./Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Paths)\n\nMethods\n-------\n\n### .configure\n\n def self.configure() { |config| ... } -\u003e Client::Configuration\n\nConfigure the KeyDashboardService Client class.\n\n\n\u003cbr /\u003e\n\nSee [Configuration](/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)\")\nfor a description of the configuration fields. \n**Yields**\n\n- (config) --- Configure the Client client. \n**Yield Parameter**\n\n- **config** ([Client::Configuration](./Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client-Configuration)) \n**Returns**\n\n- ([Client::Configuration](./Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client-Configuration))\n**Example** \n\n```ruby\n# Modify the configuration for all KeyDashboardService clients\n::Google::Cloud::Kms::Inventory::V1::KeyDashboardService::Client.configure do |config|\n config.timeout = 10.0\nend\n```\n\n### #configure\n\n def configure() { |config| ... } -\u003e Client::Configuration\n\nConfigure the KeyDashboardService Client instance.\n\n\nThe configuration is set to the derived mode, meaning that values can be changed,\nbut structural changes (adding new fields, etc.) are not allowed. Structural changes\nshould be made on [Client.configure](/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)\").\n\n\u003cbr /\u003e\n\nSee [Configuration](/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)\")\nfor a description of the configuration fields. \n**Yields**\n\n- (config) --- Configure the Client client. \n**Yield Parameter**\n\n- **config** ([Client::Configuration](./Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client-Configuration)) \n**Returns**\n\n- ([Client::Configuration](./Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client-Configuration))\n\n### #initialize\n\n def initialize() { |config| ... } -\u003e Client\n\nCreate a new KeyDashboardService client object. \n**Yields**\n\n- (config) --- Configure the KeyDashboardService client. \n**Yield Parameter**\n\n- **config** ([Client::Configuration](./Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client-Configuration)) \n**Returns**\n\n- ([Client](./Google-Cloud-Kms-Inventory-V1-KeyDashboardService-Client)) --- a new instance of Client\n**Example** \n\n```ruby\n# Create a client using the default configuration\nclient = ::Google::Cloud::Kms::Inventory::V1::KeyDashboardService::Client.new\n\n# Create a client using a custom configuration\nclient = ::Google::Cloud::Kms::Inventory::V1::KeyDashboardService::Client.new do |config|\n config.timeout = 10.0\nend\n```\n\n### #list_crypto_keys\n\n def list_crypto_keys(request, options = nil) -\u003e ::Gapic::PagedEnumerable\u003c::Google::Cloud::Kms::V1::CryptoKey\u003e\n def list_crypto_keys(parent: nil, page_size: nil, page_token: nil) -\u003e ::Gapic::PagedEnumerable\u003c::Google::Cloud::Kms::V1::CryptoKey\u003e\n\nReturns cryptographic keys managed by Cloud KMS in a given Cloud project.\nNote that this data is sourced from snapshots, meaning it may not\ncompletely reflect the actual state of key metadata at call time. \n**Overloads** \n\n def list_crypto_keys(request, options = nil) -\u003e ::Gapic::PagedEnumerable\u003c::Google::Cloud::Kms::V1::CryptoKey\u003e\n\nPass arguments to `list_crypto_keys` via a request object, either of type [ListCryptoKeysRequest](/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. \n**Parameters**\n\n- **request** ([::Google::Cloud::Kms::Inventory::V1::ListCryptoKeysRequest](./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.\n- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. \n\n def list_crypto_keys(parent: nil, page_size: nil, page_token: nil) -\u003e ::Gapic::PagedEnumerable\u003c::Google::Cloud::Kms::V1::CryptoKey\u003e\n\nPass 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). \n**Parameters**\n\n- **parent** (::String) --- Required. The Google Cloud project for which to retrieve key metadata, in the format `projects/*`\n- **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.\n- **page_token** (::String) --- Optional. Pass this into a subsequent request in order to receive the next page of results. \n**Yields**\n\n- (response, operation) --- Access the result along with the RPC operation \n**Yield Parameters**\n\n- **response** (::Gapic::PagedEnumerable\\\u003c[::Google::Cloud::Kms::V1::CryptoKey](./Google-Cloud-Kms-V1-CryptoKey)\\\u003e)\n- **operation** (::GRPC::ActiveCall::Operation) \n**Returns**\n\n- (::Gapic::PagedEnumerable\\\u003c[::Google::Cloud::Kms::V1::CryptoKey](./Google-Cloud-Kms-V1-CryptoKey)\\\u003e) \n**Raises**\n\n- (::Google::Cloud::Error) --- if the RPC is aborted.\n**Example**\n\nBasic example \n\n```ruby\nrequire \"google/cloud/kms/inventory/v1\"\n\n# Create a client object. The client can be reused for multiple calls.\nclient = Google::Cloud::Kms::Inventory::V1::KeyDashboardService::Client.new\n\n# Create a request. To set request fields, pass in keyword arguments.\nrequest = Google::Cloud::Kms::Inventory::V1::ListCryptoKeysRequest.new\n\n# Call the list_crypto_keys method.\nresult = client.list_crypto_keys request\n\n# The returned object is of type Gapic::PagedEnumerable. You can iterate\n# over elements, and API calls will be issued to fetch pages as needed.\nresult.each do |item|\n # Each element is of type ::Google::Cloud::Kms::V1::CryptoKey.\n p item\nend\n```\n\n### #logger\n\n def logger() -\u003e Logger\n\nThe logger used for request/response debug logging. \n**Returns**\n\n- (Logger)\n\n### #universe_domain\n\n def universe_domain() -\u003e String\n\nThe effective universe domain \n**Returns**\n\n- (String)"]]