Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [KmsInventory] add resource_types to SearchAllResources, to allow filtering by resource type #6448

Merged
merged 2 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.