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::SearchProtectedResourcesRequest.

Request message for
[KeyTrackingService.SearchProtectedResources](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-Inventory-V1-KeyTrackingService-Client#Google__Cloud__Kms__Inventory__V1__KeyTrackingService__Client_search_protected_resources_instance_ "Google::Cloud::Kms::Inventory::V1::KeyTrackingService::Client#search_protected_resources (method)").

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #crypto_key

    def crypto_key() -> ::String

**Returns**

- (::String) --- Required. The resource name of the [CryptoKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-V1-CryptoKey "Google::Cloud::Kms::V1::CryptoKey (class)").

### #crypto_key=

    def crypto_key=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The resource name of the [CryptoKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-V1-CryptoKey "Google::Cloud::Kms::V1::CryptoKey (class)").
**Returns**

- (::String) --- Required. The resource name of the [CryptoKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-V1-CryptoKey "Google::Cloud::Kms::V1::CryptoKey (class)").

### #page_size

    def page_size() -> ::Integer

**Returns**

- (::Integer) --- The maximum number of resources to return. The service may return fewer than this value. If unspecified, at most 500 resources will be returned. The maximum value is 500; values above 500 will be coerced to 500.

### #page_size=

    def page_size=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- The maximum number of resources to return. The service may return fewer than this value. If unspecified, at most 500 resources will be returned. The maximum value is 500; values above 500 will be coerced to 500.
**Returns**

- (::Integer) --- The maximum number of resources to return. The service may return fewer than this value. If unspecified, at most 500 resources will be returned. The maximum value is 500; values above 500 will be coerced to 500.

### #page_token

    def page_token() -> ::String

**Returns**

- (::String) --- A page token, received from a previous [KeyTrackingService.SearchProtectedResources](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-Inventory-V1-KeyTrackingService-Client#Google__Cloud__Kms__Inventory__V1__KeyTrackingService__Client_search_protected_resources_instance_ "Google::Cloud::Kms::Inventory::V1::KeyTrackingService::Client#search_protected_resources (method)") call. Provide this to retrieve the subsequent page.


  When paginating, all other parameters provided to
  [KeyTrackingService.SearchProtectedResources](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-Inventory-V1-KeyTrackingService-Client#Google__Cloud__Kms__Inventory__V1__KeyTrackingService__Client_search_protected_resources_instance_ "Google::Cloud::Kms::Inventory::V1::KeyTrackingService::Client#search_protected_resources (method)")
  must match the call that provided the page token.

### #page_token=

    def page_token=(value) -> ::String

**Parameter**

- **value** (::String) --- A page token, received from a previous [KeyTrackingService.SearchProtectedResources](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-Inventory-V1-KeyTrackingService-Client#Google__Cloud__Kms__Inventory__V1__KeyTrackingService__Client_search_protected_resources_instance_ "Google::Cloud::Kms::Inventory::V1::KeyTrackingService::Client#search_protected_resources (method)") call. Provide this to retrieve the subsequent page.


  When paginating, all other parameters provided to
  [KeyTrackingService.SearchProtectedResources](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-Inventory-V1-KeyTrackingService-Client#Google__Cloud__Kms__Inventory__V1__KeyTrackingService__Client_search_protected_resources_instance_ "Google::Cloud::Kms::Inventory::V1::KeyTrackingService::Client#search_protected_resources (method)")
  must match the call that provided the page token.
**Returns**

- (::String) --- A page token, received from a previous [KeyTrackingService.SearchProtectedResources](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-Inventory-V1-KeyTrackingService-Client#Google__Cloud__Kms__Inventory__V1__KeyTrackingService__Client_search_protected_resources_instance_ "Google::Cloud::Kms::Inventory::V1::KeyTrackingService::Client#search_protected_resources (method)") call. Provide this to retrieve the subsequent page.


  When paginating, all other parameters provided to
  [KeyTrackingService.SearchProtectedResources](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-Inventory-V1-KeyTrackingService-Client#Google__Cloud__Kms__Inventory__V1__KeyTrackingService__Client_search_protected_resources_instance_ "Google::Cloud::Kms::Inventory::V1::KeyTrackingService::Client#search_protected_resources (method)")
  must match the call that provided the page token.

### #resource_types

    def resource_types() -> ::Array<::String>

**Returns**

- (::Array\<::String\>) --- Optional. A list of resource types that this request searches for. If empty, it will search all the [trackable resource
  types](https://cloud.google.com/kms/docs/view-key-usage#tracked-resource-types).


  Regular expressions are also supported. For example:
  - `compute.googleapis.com.*` snapshots resources whose type starts with `compute.googleapis.com`.
  - `.*Image` snapshots resources whose type ends with `Image`.
  - `.*Image.*` snapshots resources whose type contains `Image`.

  See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
  regular expression syntax. If the regular expression does not match any
  supported resource type, an INVALID_ARGUMENT error will be returned.

### #resource_types=

    def resource_types=(value) -> ::Array<::String>

**Parameter**

- **value** (::Array\<::String\>) --- Optional. A list of resource types that this request searches for. If empty, it will search all the [trackable resource
  types](https://cloud.google.com/kms/docs/view-key-usage#tracked-resource-types).


  Regular expressions are also supported. For example:
  - `compute.googleapis.com.*` snapshots resources whose type starts with `compute.googleapis.com`.
  - `.*Image` snapshots resources whose type ends with `Image`.
  - `.*Image.*` snapshots resources whose type contains `Image`.

  See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
  regular expression syntax. If the regular expression does not match any
  supported resource type, an INVALID_ARGUMENT error will be returned.
**Returns**

- (::Array\<::String\>) --- Optional. A list of resource types that this request searches for. If empty, it will search all the [trackable resource
  types](https://cloud.google.com/kms/docs/view-key-usage#tracked-resource-types).


  Regular expressions are also supported. For example:
  - `compute.googleapis.com.*` snapshots resources whose type starts with `compute.googleapis.com`.
  - `.*Image` snapshots resources whose type ends with `Image`.
  - `.*Image.*` snapshots resources whose type contains `Image`.

  See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
  regular expression syntax. If the regular expression does not match any
  supported resource type, an INVALID_ARGUMENT error will be returned.

### #scope

    def scope() -> ::String

**Returns**

- (::String) --- Required. A scope can be an organization or a project. Resources protected
  by the crypto key in provided scope will be returned.

  The following values are allowed:
  - organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/12345678")
  - projects/{PROJECT_ID} (e.g., "projects/foo-bar")
  - projects/{PROJECT_NUMBER} (e.g., "projects/12345678")

### #scope=

    def scope=(value) -> ::String

**Parameter**

- **value** (::String) ---

  Required. A scope can be an organization or a project. Resources protected
  by the crypto key in provided scope will be returned.

  The following values are allowed:
  - organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/12345678")
  - projects/{PROJECT_ID} (e.g., "projects/foo-bar")
  - projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
**Returns**

- (::String) --- Required. A scope can be an organization or a project. Resources protected
  by the crypto key in provided scope will be returned.

  The following values are allowed:
  - organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/12345678")
  - projects/{PROJECT_ID} (e.g., "projects/foo-bar")
  - projects/{PROJECT_NUMBER} (e.g., "projects/12345678")