[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\CloudAsset\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\CloudAsset\BatchGetEffectiveIamPoliciesResponse;
|
---|
| 21 |
|
---|
| 22 | /**
|
---|
| 23 | * The "effectiveIamPolicies" collection of methods.
|
---|
| 24 | * Typical usage is:
|
---|
| 25 | * <code>
|
---|
| 26 | * $cloudassetService = new Google\Service\CloudAsset(...);
|
---|
| 27 | * $effectiveIamPolicies = $cloudassetService->effectiveIamPolicies;
|
---|
| 28 | * </code>
|
---|
| 29 | */
|
---|
| 30 | class EffectiveIamPolicies extends \Google\Service\Resource
|
---|
| 31 | {
|
---|
| 32 | /**
|
---|
| 33 | * Gets effective IAM policies for a batch of resources.
|
---|
| 34 | * (effectiveIamPolicies.batchGet)
|
---|
| 35 | *
|
---|
| 36 | * @param string $scope Required. Only IAM policies on or below the scope will
|
---|
| 37 | * be returned. This can only be an organization number (such as
|
---|
| 38 | * "organizations/123"), a folder number (such as "folders/123"), a project ID
|
---|
| 39 | * (such as "projects/my-project-id"), or a project number (such as
|
---|
| 40 | * "projects/12345"). To know how to get organization ID, visit [here
|
---|
| 41 | * ](https://cloud.google.com/resource-manager/docs/creating-managing-
|
---|
| 42 | * organization#retrieving_your_organization_id). To know how to get folder or
|
---|
| 43 | * project ID, visit [here ](https://cloud.google.com/resource-
|
---|
| 44 | * manager/docs/creating-managing-
|
---|
| 45 | * folders#viewing_or_listing_folders_and_projects).
|
---|
| 46 | * @param array $optParams Optional parameters.
|
---|
| 47 | *
|
---|
| 48 | * @opt_param string names Required. The names refer to the
|
---|
| 49 | * [full_resource_names] (https://cloud.google.com/asset-
|
---|
| 50 | * inventory/docs/resource-name-format) of the asset types [supported by search
|
---|
| 51 | * APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types). A
|
---|
| 52 | * maximum of 20 resources' effective policies can be retrieved in a batch.
|
---|
| 53 | * @return BatchGetEffectiveIamPoliciesResponse
|
---|
| 54 | * @throws \Google\Service\Exception
|
---|
| 55 | */
|
---|
| 56 | public function batchGet($scope, $optParams = [])
|
---|
| 57 | {
|
---|
| 58 | $params = ['scope' => $scope];
|
---|
| 59 | $params = array_merge($params, $optParams);
|
---|
| 60 | return $this->call('batchGet', [$params], BatchGetEffectiveIamPoliciesResponse::class);
|
---|
| 61 | }
|
---|
| 62 | }
|
---|
| 63 |
|
---|
| 64 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 65 | class_alias(EffectiveIamPolicies::class, 'Google_Service_CloudAsset_Resource_EffectiveIamPolicies');
|
---|