source: vendor/google/apiclient-services/src/ApigeeRegistry/Resource/ProjectsLocationsInstances.php@ e3d4e0a

Last change on this file since e3d4e0a was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 2 weeks ago

Upload project files

  • Property mode set to 100644
File size: 6.6 KB
Line 
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
18namespace Google\Service\ApigeeRegistry\Resource;
19
20use Google\Service\ApigeeRegistry\Instance;
21use Google\Service\ApigeeRegistry\Operation;
22use Google\Service\ApigeeRegistry\Policy;
23use Google\Service\ApigeeRegistry\SetIamPolicyRequest;
24use Google\Service\ApigeeRegistry\TestIamPermissionsRequest;
25use Google\Service\ApigeeRegistry\TestIamPermissionsResponse;
26
27/**
28 * The "instances" collection of methods.
29 * Typical usage is:
30 * <code>
31 * $apigeeregistryService = new Google\Service\ApigeeRegistry(...);
32 * $instances = $apigeeregistryService->projects_locations_instances;
33 * </code>
34 */
35class ProjectsLocationsInstances extends \Google\Service\Resource
36{
37 /**
38 * Provisions instance resources for the Registry. (instances.create)
39 *
40 * @param string $parent Required. Parent resource of the Instance, of the form:
41 * `projects/locations`
42 * @param Instance $postBody
43 * @param array $optParams Optional parameters.
44 *
45 * @opt_param string instanceId Required. Identifier to assign to the Instance.
46 * Must be unique within scope of the parent resource.
47 * @return Operation
48 * @throws \Google\Service\Exception
49 */
50 public function create($parent, Instance $postBody, $optParams = [])
51 {
52 $params = ['parent' => $parent, 'postBody' => $postBody];
53 $params = array_merge($params, $optParams);
54 return $this->call('create', [$params], Operation::class);
55 }
56 /**
57 * Deletes the Registry instance. (instances.delete)
58 *
59 * @param string $name Required. The name of the Instance to delete. Format:
60 * `projects/locations/instances`.
61 * @param array $optParams Optional parameters.
62 * @return Operation
63 * @throws \Google\Service\Exception
64 */
65 public function delete($name, $optParams = [])
66 {
67 $params = ['name' => $name];
68 $params = array_merge($params, $optParams);
69 return $this->call('delete', [$params], Operation::class);
70 }
71 /**
72 * Gets details of a single Instance. (instances.get)
73 *
74 * @param string $name Required. The name of the Instance to retrieve. Format:
75 * `projects/locations/instances`.
76 * @param array $optParams Optional parameters.
77 * @return Instance
78 * @throws \Google\Service\Exception
79 */
80 public function get($name, $optParams = [])
81 {
82 $params = ['name' => $name];
83 $params = array_merge($params, $optParams);
84 return $this->call('get', [$params], Instance::class);
85 }
86 /**
87 * Gets the access control policy for a resource. Returns an empty policy if the
88 * resource exists and does not have a policy set. (instances.getIamPolicy)
89 *
90 * @param string $resource REQUIRED: The resource for which the policy is being
91 * requested. See [Resource
92 * names](https://cloud.google.com/apis/design/resource_names) for the
93 * appropriate value for this field.
94 * @param array $optParams Optional parameters.
95 *
96 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
97 * version that will be used to format the policy. Valid values are 0, 1, and 3.
98 * Requests specifying an invalid value will be rejected. Requests for policies
99 * with any conditional role bindings must specify version 3. Policies with no
100 * conditional role bindings may specify any valid value or leave the field
101 * unset. The policy in the response might use the policy version that you
102 * specified, or it might use a lower policy version. For example, if you
103 * specify version 3, but the policy has no conditional role bindings, the
104 * response uses version 1. To learn which resources support conditions in their
105 * IAM policies, see the [IAM
106 * documentation](https://cloud.google.com/iam/help/conditions/resource-
107 * policies).
108 * @return Policy
109 * @throws \Google\Service\Exception
110 */
111 public function getIamPolicy($resource, $optParams = [])
112 {
113 $params = ['resource' => $resource];
114 $params = array_merge($params, $optParams);
115 return $this->call('getIamPolicy', [$params], Policy::class);
116 }
117 /**
118 * Sets the access control policy on the specified resource. Replaces any
119 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
120 * `PERMISSION_DENIED` errors. (instances.setIamPolicy)
121 *
122 * @param string $resource REQUIRED: The resource for which the policy is being
123 * specified. See [Resource
124 * names](https://cloud.google.com/apis/design/resource_names) for the
125 * appropriate value for this field.
126 * @param SetIamPolicyRequest $postBody
127 * @param array $optParams Optional parameters.
128 * @return Policy
129 * @throws \Google\Service\Exception
130 */
131 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
132 {
133 $params = ['resource' => $resource, 'postBody' => $postBody];
134 $params = array_merge($params, $optParams);
135 return $this->call('setIamPolicy', [$params], Policy::class);
136 }
137 /**
138 * Returns permissions that a caller has on the specified resource. If the
139 * resource does not exist, this will return an empty set of permissions, not a
140 * `NOT_FOUND` error. Note: This operation is designed to be used for building
141 * permission-aware UIs and command-line tools, not for authorization checking.
142 * This operation may "fail open" without warning.
143 * (instances.testIamPermissions)
144 *
145 * @param string $resource REQUIRED: The resource for which the policy detail is
146 * being requested. See [Resource
147 * names](https://cloud.google.com/apis/design/resource_names) for the
148 * appropriate value for this field.
149 * @param TestIamPermissionsRequest $postBody
150 * @param array $optParams Optional parameters.
151 * @return TestIamPermissionsResponse
152 * @throws \Google\Service\Exception
153 */
154 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
155 {
156 $params = ['resource' => $resource, 'postBody' => $postBody];
157 $params = array_merge($params, $optParams);
158 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
159 }
160}
161
162// Adding a class alias for backwards compatibility with the previous class name.
163class_alias(ProjectsLocationsInstances::class, 'Google_Service_ApigeeRegistry_Resource_ProjectsLocationsInstances');
Note: See TracBrowser for help on using the repository browser.