[e3d4e0a] | 1 | <?php
|
---|
| 2 | /*
|
---|
| 3 | * Copyright 2014 Google Inc.
|
---|
| 4 | *
|
---|
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
---|
| 6 | * use this file except in compliance with the License. You may obtain a copy of
|
---|
| 7 | * the License at
|
---|
| 8 | *
|
---|
| 9 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
| 10 | *
|
---|
| 11 | * Unless required by applicable law or agreed to in writing, software
|
---|
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
---|
| 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
---|
| 14 | * License for the specific language governing permissions and limitations under
|
---|
| 15 | * the License.
|
---|
| 16 | */
|
---|
| 17 |
|
---|
| 18 | namespace Google\Service\Kmsinventory\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Kmsinventory\GoogleCloudKmsInventoryV1SearchProtectedResourcesResponse;
|
---|
| 21 |
|
---|
| 22 | /**
|
---|
| 23 | * The "protectedResources" collection of methods.
|
---|
| 24 | * Typical usage is:
|
---|
| 25 | * <code>
|
---|
| 26 | * $kmsinventoryService = new Google\Service\Kmsinventory(...);
|
---|
| 27 | * $protectedResources = $kmsinventoryService->organizations_protectedResources;
|
---|
| 28 | * </code>
|
---|
| 29 | */
|
---|
| 30 | class OrganizationsProtectedResources extends \Google\Service\Resource
|
---|
| 31 | {
|
---|
| 32 | /**
|
---|
| 33 | * Returns metadata about the resources protected by the given Cloud KMS
|
---|
| 34 | * CryptoKey in the given Cloud organization. (protectedResources.search)
|
---|
| 35 | *
|
---|
| 36 | * @param string $scope Required. Resource name of the organization. Example:
|
---|
| 37 | * organizations/123
|
---|
| 38 | * @param array $optParams Optional parameters.
|
---|
| 39 | *
|
---|
| 40 | * @opt_param string cryptoKey Required. The resource name of the CryptoKey.
|
---|
| 41 | * @opt_param int pageSize The maximum number of resources to return. The
|
---|
| 42 | * service may return fewer than this value. If unspecified, at most 500
|
---|
| 43 | * resources will be returned. The maximum value is 500; values above 500 will
|
---|
| 44 | * be coerced to 500.
|
---|
| 45 | * @opt_param string pageToken A page token, received from a previous
|
---|
| 46 | * KeyTrackingService.SearchProtectedResources call. Provide this to retrieve
|
---|
| 47 | * the subsequent page. When paginating, all other parameters provided to
|
---|
| 48 | * KeyTrackingService.SearchProtectedResources must match the call that provided
|
---|
| 49 | * the page token.
|
---|
| 50 | * @opt_param string resourceTypes Optional. A list of resource types that this
|
---|
| 51 | * request searches for. If empty, it will search all the [trackable resource
|
---|
| 52 | * types](https://cloud.google.com/kms/docs/view-key-usage#tracked-resource-
|
---|
| 53 | * types). Regular expressions are also supported. For example: *
|
---|
| 54 | * `compute.googleapis.com.*` snapshots resources whose type starts with
|
---|
| 55 | * `compute.googleapis.com`. * `.*Image` snapshots resources whose type ends
|
---|
| 56 | * with `Image`. * `.*Image.*` snapshots resources whose type contains `Image`.
|
---|
| 57 | * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
|
---|
| 58 | * regular expression syntax. If the regular expression does not match any
|
---|
| 59 | * supported resource type, an INVALID_ARGUMENT error will be returned.
|
---|
| 60 | * @return GoogleCloudKmsInventoryV1SearchProtectedResourcesResponse
|
---|
| 61 | * @throws \Google\Service\Exception
|
---|
| 62 | */
|
---|
| 63 | public function search($scope, $optParams = [])
|
---|
| 64 | {
|
---|
| 65 | $params = ['scope' => $scope];
|
---|
| 66 | $params = array_merge($params, $optParams);
|
---|
| 67 | return $this->call('search', [$params], GoogleCloudKmsInventoryV1SearchProtectedResourcesResponse::class);
|
---|
| 68 | }
|
---|
| 69 | }
|
---|
| 70 |
|
---|
| 71 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 72 | class_alias(OrganizationsProtectedResources::class, 'Google_Service_Kmsinventory_Resource_OrganizationsProtectedResources');
|
---|