Skip to content

Commit

Permalink
feat: add resource_types to SearchAllResources, to allow filtering by…
Browse files Browse the repository at this point in the history
… resource type (#6448)

PiperOrigin-RevId: 547834040
Source-Link: googleapis/googleapis@ecb3e47
Source-Link: googleapis/googleapis-gen@6869315
Copy-Tag: eyJwIjoiS21zSW52ZW50b3J5Ly5Pd2xCb3QueWFtbCIsImgiOiI2ODY5MzE1ZjYwZjFhMjAyOTY4ZjY2ZmIxMWIwNzQ4M2IxMTE0OGZjIn0=
  • Loading branch information
gcf-owl-bot[bot] authored Jul 13, 2023
1 parent c1b1e66 commit 98406a5
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 3 deletions.
7 changes: 4 additions & 3 deletions KmsInventory/metadata/V1/KeyTrackingService.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions KmsInventory/src/V1/Gapic/KeyTrackingServiceGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,21 @@ public function getProtectedResourcesSummary(
* If no page token is specified (the default), the first page
* of values will be returned. Any page token used here must have
* been generated by a previous call to the API.
* @type string[] $resourceTypes
* 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.
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
Expand Down Expand Up @@ -519,6 +534,10 @@ public function searchProtectedResources(
$request->setPageToken($optionalArgs['pageToken']);
}

if (isset($optionalArgs['resourceTypes'])) {
$request->setResourceTypes($optionalArgs['resourceTypes']);
}

$requestParams = new RequestParamsHeaderDescriptor(
$requestParamHeaders
);
Expand Down
74 changes: 74 additions & 0 deletions KmsInventory/src/V1/SearchProtectedResourcesRequest.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 98406a5

Please sign in to comment.