source: vendor/google/apiclient-services/src/GKEOnPrem/Resource/ProjectsLocationsVmwareClustersVmwareNodePools.php@ e3d4e0a

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

Upload project files

  • Property mode set to 100644
File size: 13.1 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\GKEOnPrem\Resource;
19
20use Google\Service\GKEOnPrem\EnrollVmwareNodePoolRequest;
21use Google\Service\GKEOnPrem\ListVmwareNodePoolsResponse;
22use Google\Service\GKEOnPrem\Operation;
23use Google\Service\GKEOnPrem\Policy;
24use Google\Service\GKEOnPrem\SetIamPolicyRequest;
25use Google\Service\GKEOnPrem\TestIamPermissionsRequest;
26use Google\Service\GKEOnPrem\TestIamPermissionsResponse;
27use Google\Service\GKEOnPrem\VmwareNodePool;
28
29/**
30 * The "vmwareNodePools" collection of methods.
31 * Typical usage is:
32 * <code>
33 * $gkeonpremService = new Google\Service\GKEOnPrem(...);
34 * $vmwareNodePools = $gkeonpremService->projects_locations_vmwareClusters_vmwareNodePools;
35 * </code>
36 */
37class ProjectsLocationsVmwareClustersVmwareNodePools extends \Google\Service\Resource
38{
39 /**
40 * Creates a new VMware node pool in a given project, location and VMWare
41 * cluster. (vmwareNodePools.create)
42 *
43 * @param string $parent Required. The parent resource where this node pool will
44 * be created. projects/{project}/locations/{location}/vmwareClusters/{cluster}
45 * @param VmwareNodePool $postBody
46 * @param array $optParams Optional parameters.
47 *
48 * @opt_param bool validateOnly If set, only validate the request, but do not
49 * actually create the node pool.
50 * @opt_param string vmwareNodePoolId The ID to use for the node pool, which
51 * will become the final component of the node pool's resource name. This value
52 * must be up to 40 characters and follow RFC-1123
53 * (https://tools.ietf.org/html/rfc1123) format. The value must not be permitted
54 * to be a UUID (or UUID-like: anything matching
55 * /^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$/i).
56 * @return Operation
57 * @throws \Google\Service\Exception
58 */
59 public function create($parent, VmwareNodePool $postBody, $optParams = [])
60 {
61 $params = ['parent' => $parent, 'postBody' => $postBody];
62 $params = array_merge($params, $optParams);
63 return $this->call('create', [$params], Operation::class);
64 }
65 /**
66 * Deletes a single VMware node pool. (vmwareNodePools.delete)
67 *
68 * @param string $name Required. The name of the node pool to delete. Format: pr
69 * ojects/{project}/locations/{location}/vmwareClusters/{cluster}/vmwareNodePool
70 * s/{nodepool}
71 * @param array $optParams Optional parameters.
72 *
73 * @opt_param bool allowMissing If set to true, and the VMware node pool is not
74 * found, the request will succeed but no action will be taken on the server and
75 * return a completed LRO.
76 * @opt_param string etag The current etag of the VmwareNodePool. If an etag is
77 * provided and does not match the current etag of the node pool, deletion will
78 * be blocked and an ABORTED error will be returned.
79 * @opt_param bool ignoreErrors If set to true, the deletion of a VMware node
80 * pool resource will succeed even if errors occur during deletion. This
81 * parameter can be used when you want to delete GCP's node pool resource and
82 * you've already deleted the on-prem admin cluster that hosted your node pool.
83 * WARNING: Using this parameter when your user cluster still exists may result
84 * in a deleted GCP node pool but an existing on-prem node pool.
85 * @opt_param bool validateOnly If set, only validate the request, but do not
86 * actually delete the node pool.
87 * @return Operation
88 * @throws \Google\Service\Exception
89 */
90 public function delete($name, $optParams = [])
91 {
92 $params = ['name' => $name];
93 $params = array_merge($params, $optParams);
94 return $this->call('delete', [$params], Operation::class);
95 }
96 /**
97 * Enrolls a VMware node pool to Anthos On-Prem API (vmwareNodePools.enroll)
98 *
99 * @param string $parent Required. The parent resource where the node pool is
100 * enrolled in.
101 * @param EnrollVmwareNodePoolRequest $postBody
102 * @param array $optParams Optional parameters.
103 * @return Operation
104 * @throws \Google\Service\Exception
105 */
106 public function enroll($parent, EnrollVmwareNodePoolRequest $postBody, $optParams = [])
107 {
108 $params = ['parent' => $parent, 'postBody' => $postBody];
109 $params = array_merge($params, $optParams);
110 return $this->call('enroll', [$params], Operation::class);
111 }
112 /**
113 * Gets details of a single VMware node pool. (vmwareNodePools.get)
114 *
115 * @param string $name Required. The name of the node pool to retrieve. projects
116 * /{project}/locations/{location}/vmwareClusters/{cluster}/vmwareNodePools/{nod
117 * epool}
118 * @param array $optParams Optional parameters.
119 *
120 * @opt_param string view View for VMware node pool. When `BASIC` is specified,
121 * only the node pool resource name is returned. The default/unset value
122 * `NODE_POOL_VIEW_UNSPECIFIED` is the same as `FULL', which returns the
123 * complete node pool configuration details.
124 * @return VmwareNodePool
125 * @throws \Google\Service\Exception
126 */
127 public function get($name, $optParams = [])
128 {
129 $params = ['name' => $name];
130 $params = array_merge($params, $optParams);
131 return $this->call('get', [$params], VmwareNodePool::class);
132 }
133 /**
134 * Gets the access control policy for a resource. Returns an empty policy if the
135 * resource exists and does not have a policy set.
136 * (vmwareNodePools.getIamPolicy)
137 *
138 * @param string $resource REQUIRED: The resource for which the policy is being
139 * requested. See [Resource
140 * names](https://cloud.google.com/apis/design/resource_names) for the
141 * appropriate value for this field.
142 * @param array $optParams Optional parameters.
143 *
144 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
145 * version that will be used to format the policy. Valid values are 0, 1, and 3.
146 * Requests specifying an invalid value will be rejected. Requests for policies
147 * with any conditional role bindings must specify version 3. Policies with no
148 * conditional role bindings may specify any valid value or leave the field
149 * unset. The policy in the response might use the policy version that you
150 * specified, or it might use a lower policy version. For example, if you
151 * specify version 3, but the policy has no conditional role bindings, the
152 * response uses version 1. To learn which resources support conditions in their
153 * IAM policies, see the [IAM
154 * documentation](https://cloud.google.com/iam/help/conditions/resource-
155 * policies).
156 * @return Policy
157 * @throws \Google\Service\Exception
158 */
159 public function getIamPolicy($resource, $optParams = [])
160 {
161 $params = ['resource' => $resource];
162 $params = array_merge($params, $optParams);
163 return $this->call('getIamPolicy', [$params], Policy::class);
164 }
165 /**
166 * Lists VMware node pools in a given project, location and VMWare cluster.
167 * (vmwareNodePools.listProjectsLocationsVmwareClustersVmwareNodePools)
168 *
169 * @param string $parent Required. The parent, which owns this collection of
170 * node pools. Format:
171 * projects/{project}/locations/{location}/vmwareClusters/{vmwareCluster}
172 * @param array $optParams Optional parameters.
173 *
174 * @opt_param int pageSize The maximum number of node pools to return. The
175 * service may return fewer than this value. If unspecified, at most 50 node
176 * pools will be returned. The maximum value is 1000; values above 1000 will be
177 * coerced to 1000.
178 * @opt_param string pageToken A page token, received from a previous
179 * `ListVmwareNodePools` call. Provide this to retrieve the subsequent page.
180 * When paginating, all other parameters provided to `ListVmwareNodePools` must
181 * match the call that provided the page token.
182 * @opt_param string view View for VMware node pools. When `BASIC` is specified,
183 * only the node pool resource name is returned. The default/unset value
184 * `NODE_POOL_VIEW_UNSPECIFIED` is the same as `FULL', which returns the
185 * complete node pool configuration details.
186 * @return ListVmwareNodePoolsResponse
187 * @throws \Google\Service\Exception
188 */
189 public function listProjectsLocationsVmwareClustersVmwareNodePools($parent, $optParams = [])
190 {
191 $params = ['parent' => $parent];
192 $params = array_merge($params, $optParams);
193 return $this->call('list', [$params], ListVmwareNodePoolsResponse::class);
194 }
195 /**
196 * Updates the parameters of a single VMware node pool. (vmwareNodePools.patch)
197 *
198 * @param string $name Immutable. The resource name of this node pool.
199 * @param VmwareNodePool $postBody
200 * @param array $optParams Optional parameters.
201 *
202 * @opt_param string updateMask Required. Field mask is used to specify the
203 * fields to be overwritten in the VMwareNodePool resource by the update. The
204 * fields specified in the update_mask are relative to the resource, not the
205 * full request. A field will be overwritten if it is in the mask. If the user
206 * does not provide a mask then all populated fields in the VMwareNodePool
207 * message will be updated. Empty fields will be ignored unless a field mask is
208 * used.
209 * @opt_param bool validateOnly Validate the request without actually doing any
210 * updates.
211 * @return Operation
212 * @throws \Google\Service\Exception
213 */
214 public function patch($name, VmwareNodePool $postBody, $optParams = [])
215 {
216 $params = ['name' => $name, 'postBody' => $postBody];
217 $params = array_merge($params, $optParams);
218 return $this->call('patch', [$params], Operation::class);
219 }
220 /**
221 * Sets the access control policy on the specified resource. Replaces any
222 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
223 * `PERMISSION_DENIED` errors. (vmwareNodePools.setIamPolicy)
224 *
225 * @param string $resource REQUIRED: The resource for which the policy is being
226 * specified. See [Resource
227 * names](https://cloud.google.com/apis/design/resource_names) for the
228 * appropriate value for this field.
229 * @param SetIamPolicyRequest $postBody
230 * @param array $optParams Optional parameters.
231 * @return Policy
232 * @throws \Google\Service\Exception
233 */
234 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
235 {
236 $params = ['resource' => $resource, 'postBody' => $postBody];
237 $params = array_merge($params, $optParams);
238 return $this->call('setIamPolicy', [$params], Policy::class);
239 }
240 /**
241 * Returns permissions that a caller has on the specified resource. If the
242 * resource does not exist, this will return an empty set of permissions, not a
243 * `NOT_FOUND` error. Note: This operation is designed to be used for building
244 * permission-aware UIs and command-line tools, not for authorization checking.
245 * This operation may "fail open" without warning.
246 * (vmwareNodePools.testIamPermissions)
247 *
248 * @param string $resource REQUIRED: The resource for which the policy detail is
249 * being requested. See [Resource
250 * names](https://cloud.google.com/apis/design/resource_names) for the
251 * appropriate value for this field.
252 * @param TestIamPermissionsRequest $postBody
253 * @param array $optParams Optional parameters.
254 * @return TestIamPermissionsResponse
255 * @throws \Google\Service\Exception
256 */
257 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
258 {
259 $params = ['resource' => $resource, 'postBody' => $postBody];
260 $params = array_merge($params, $optParams);
261 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
262 }
263 /**
264 * Unenrolls a VMware node pool to Anthos On-Prem API (vmwareNodePools.unenroll)
265 *
266 * @param string $name Required. The name of the node pool to unenroll. Format:
267 * projects/{project}/locations/{location}/vmwareClusters/{cluster}/vmwareNodePo
268 * ols/{nodepool}
269 * @param array $optParams Optional parameters.
270 *
271 * @opt_param bool allowMissing If set to true, and the VMware node pool is not
272 * found, the request will succeed but no action will be taken on the server and
273 * return a completed LRO.
274 * @opt_param string etag The current etag of the VMware node pool. If an etag
275 * is provided and does not match the current etag of node pool, deletion will
276 * be blocked and an ABORTED error will be returned.
277 * @opt_param bool validateOnly If set, only validate the request, but do not
278 * actually unenroll the node pool.
279 * @return Operation
280 * @throws \Google\Service\Exception
281 */
282 public function unenroll($name, $optParams = [])
283 {
284 $params = ['name' => $name];
285 $params = array_merge($params, $optParams);
286 return $this->call('unenroll', [$params], Operation::class);
287 }
288}
289
290// Adding a class alias for backwards compatibility with the previous class name.
291class_alias(ProjectsLocationsVmwareClustersVmwareNodePools::class, 'Google_Service_GKEOnPrem_Resource_ProjectsLocationsVmwareClustersVmwareNodePools');
Note: See TracBrowser for help on using the repository browser.