[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\Apigee\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Apigee\GoogleCloudApigeeV1Deployment;
|
---|
| 21 | use Google\Service\Apigee\GoogleCloudApigeeV1ListDeploymentsResponse;
|
---|
| 22 | use Google\Service\Apigee\GoogleIamV1Policy;
|
---|
| 23 | use Google\Service\Apigee\GoogleIamV1SetIamPolicyRequest;
|
---|
| 24 | use Google\Service\Apigee\GoogleIamV1TestIamPermissionsRequest;
|
---|
| 25 | use Google\Service\Apigee\GoogleIamV1TestIamPermissionsResponse;
|
---|
| 26 |
|
---|
| 27 | /**
|
---|
| 28 | * The "deployments" collection of methods.
|
---|
| 29 | * Typical usage is:
|
---|
| 30 | * <code>
|
---|
| 31 | * $apigeeService = new Google\Service\Apigee(...);
|
---|
| 32 | * $deployments = $apigeeService->organizations_environments_deployments;
|
---|
| 33 | * </code>
|
---|
| 34 | */
|
---|
| 35 | class OrganizationsEnvironmentsDeployments extends \Google\Service\Resource
|
---|
| 36 | {
|
---|
| 37 | /**
|
---|
| 38 | * Gets a particular deployment of Api proxy or a shared flow in an environment
|
---|
| 39 | * (deployments.get)
|
---|
| 40 | *
|
---|
| 41 | * @param string $name Required. Name of the api proxy or the shared flow
|
---|
| 42 | * deployment. Use the following structure in your request:
|
---|
| 43 | * `organizations/{org}/environments/{env}/deployments/{deployment}`
|
---|
| 44 | * @param array $optParams Optional parameters.
|
---|
| 45 | * @return GoogleCloudApigeeV1Deployment
|
---|
| 46 | * @throws \Google\Service\Exception
|
---|
| 47 | */
|
---|
| 48 | public function get($name, $optParams = [])
|
---|
| 49 | {
|
---|
| 50 | $params = ['name' => $name];
|
---|
| 51 | $params = array_merge($params, $optParams);
|
---|
| 52 | return $this->call('get', [$params], GoogleCloudApigeeV1Deployment::class);
|
---|
| 53 | }
|
---|
| 54 | /**
|
---|
| 55 | * Gets the IAM policy on a deployment. For more information, see [Manage users,
|
---|
| 56 | * roles, and permissions using the
|
---|
| 57 | * API](https://cloud.google.com/apigee/docs/api-platform/system-
|
---|
| 58 | * administration/manage-users-roles). You must have the
|
---|
| 59 | * `apigee.deployments.getIamPolicy` permission to call this API.
|
---|
| 60 | * (deployments.getIamPolicy)
|
---|
| 61 | *
|
---|
| 62 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
| 63 | * requested. See [Resource
|
---|
| 64 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
| 65 | * appropriate value for this field.
|
---|
| 66 | * @param array $optParams Optional parameters.
|
---|
| 67 | *
|
---|
| 68 | * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
|
---|
| 69 | * version that will be used to format the policy. Valid values are 0, 1, and 3.
|
---|
| 70 | * Requests specifying an invalid value will be rejected. Requests for policies
|
---|
| 71 | * with any conditional role bindings must specify version 3. Policies with no
|
---|
| 72 | * conditional role bindings may specify any valid value or leave the field
|
---|
| 73 | * unset. The policy in the response might use the policy version that you
|
---|
| 74 | * specified, or it might use a lower policy version. For example, if you
|
---|
| 75 | * specify version 3, but the policy has no conditional role bindings, the
|
---|
| 76 | * response uses version 1. To learn which resources support conditions in their
|
---|
| 77 | * IAM policies, see the [IAM
|
---|
| 78 | * documentation](https://cloud.google.com/iam/help/conditions/resource-
|
---|
| 79 | * policies).
|
---|
| 80 | * @return GoogleIamV1Policy
|
---|
| 81 | * @throws \Google\Service\Exception
|
---|
| 82 | */
|
---|
| 83 | public function getIamPolicy($resource, $optParams = [])
|
---|
| 84 | {
|
---|
| 85 | $params = ['resource' => $resource];
|
---|
| 86 | $params = array_merge($params, $optParams);
|
---|
| 87 | return $this->call('getIamPolicy', [$params], GoogleIamV1Policy::class);
|
---|
| 88 | }
|
---|
| 89 | /**
|
---|
| 90 | * Lists all deployments of API proxies or shared flows in an environment.
|
---|
| 91 | * (deployments.listOrganizationsEnvironmentsDeployments)
|
---|
| 92 | *
|
---|
| 93 | * @param string $parent Required. Name of the environment for which to return
|
---|
| 94 | * deployment information in the following format:
|
---|
| 95 | * `organizations/{org}/environments/{env}`
|
---|
| 96 | * @param array $optParams Optional parameters.
|
---|
| 97 | *
|
---|
| 98 | * @opt_param bool sharedFlows Optional. Flag that specifies whether to return
|
---|
| 99 | * shared flow or API proxy deployments. Set to `true` to return shared flow
|
---|
| 100 | * deployments; set to `false` to return API proxy deployments. Defaults to
|
---|
| 101 | * `false`.
|
---|
| 102 | * @return GoogleCloudApigeeV1ListDeploymentsResponse
|
---|
| 103 | * @throws \Google\Service\Exception
|
---|
| 104 | */
|
---|
| 105 | public function listOrganizationsEnvironmentsDeployments($parent, $optParams = [])
|
---|
| 106 | {
|
---|
| 107 | $params = ['parent' => $parent];
|
---|
| 108 | $params = array_merge($params, $optParams);
|
---|
| 109 | return $this->call('list', [$params], GoogleCloudApigeeV1ListDeploymentsResponse::class);
|
---|
| 110 | }
|
---|
| 111 | /**
|
---|
| 112 | * Sets the IAM policy on a deployment, if the policy already exists it will be
|
---|
| 113 | * replaced. For more information, see [Manage users, roles, and permissions
|
---|
| 114 | * using the API](https://cloud.google.com/apigee/docs/api-platform/system-
|
---|
| 115 | * administration/manage-users-roles). You must have the
|
---|
| 116 | * `apigee.deployments.setIamPolicy` permission to call this API.
|
---|
| 117 | * (deployments.setIamPolicy)
|
---|
| 118 | *
|
---|
| 119 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
| 120 | * specified. See [Resource
|
---|
| 121 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
| 122 | * appropriate value for this field.
|
---|
| 123 | * @param GoogleIamV1SetIamPolicyRequest $postBody
|
---|
| 124 | * @param array $optParams Optional parameters.
|
---|
| 125 | * @return GoogleIamV1Policy
|
---|
| 126 | * @throws \Google\Service\Exception
|
---|
| 127 | */
|
---|
| 128 | public function setIamPolicy($resource, GoogleIamV1SetIamPolicyRequest $postBody, $optParams = [])
|
---|
| 129 | {
|
---|
| 130 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
| 131 | $params = array_merge($params, $optParams);
|
---|
| 132 | return $this->call('setIamPolicy', [$params], GoogleIamV1Policy::class);
|
---|
| 133 | }
|
---|
| 134 | /**
|
---|
| 135 | * Tests the permissions of a user on a deployment, and returns a subset of
|
---|
| 136 | * permissions that the user has on the deployment. If the deployment does not
|
---|
| 137 | * exist, an empty permission set is returned (a NOT_FOUND error is not
|
---|
| 138 | * returned). (deployments.testIamPermissions)
|
---|
| 139 | *
|
---|
| 140 | * @param string $resource REQUIRED: The resource for which the policy detail is
|
---|
| 141 | * being requested. See [Resource
|
---|
| 142 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
| 143 | * appropriate value for this field.
|
---|
| 144 | * @param GoogleIamV1TestIamPermissionsRequest $postBody
|
---|
| 145 | * @param array $optParams Optional parameters.
|
---|
| 146 | * @return GoogleIamV1TestIamPermissionsResponse
|
---|
| 147 | * @throws \Google\Service\Exception
|
---|
| 148 | */
|
---|
| 149 | public function testIamPermissions($resource, GoogleIamV1TestIamPermissionsRequest $postBody, $optParams = [])
|
---|
| 150 | {
|
---|
| 151 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
| 152 | $params = array_merge($params, $optParams);
|
---|
| 153 | return $this->call('testIamPermissions', [$params], GoogleIamV1TestIamPermissionsResponse::class);
|
---|
| 154 | }
|
---|
| 155 | }
|
---|
| 156 |
|
---|
| 157 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 158 | class_alias(OrganizationsEnvironmentsDeployments::class, 'Google_Service_Apigee_Resource_OrganizationsEnvironmentsDeployments');
|
---|