source: vendor/google/apiclient-services/src/Container/Resource/ProjectsZonesClusters.php

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

Upload project files

  • Property mode set to 100644
File size: 23.4 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\Container\Resource;
19
20use Google\Service\Container\Cluster;
21use Google\Service\Container\CompleteIPRotationRequest;
22use Google\Service\Container\CreateClusterRequest;
23use Google\Service\Container\ListClustersResponse;
24use Google\Service\Container\Operation;
25use Google\Service\Container\SetAddonsConfigRequest;
26use Google\Service\Container\SetLabelsRequest;
27use Google\Service\Container\SetLegacyAbacRequest;
28use Google\Service\Container\SetLocationsRequest;
29use Google\Service\Container\SetLoggingServiceRequest;
30use Google\Service\Container\SetMaintenancePolicyRequest;
31use Google\Service\Container\SetMasterAuthRequest;
32use Google\Service\Container\SetMonitoringServiceRequest;
33use Google\Service\Container\SetNetworkPolicyRequest;
34use Google\Service\Container\StartIPRotationRequest;
35use Google\Service\Container\UpdateClusterRequest;
36use Google\Service\Container\UpdateMasterRequest;
37
38/**
39 * The "clusters" collection of methods.
40 * Typical usage is:
41 * <code>
42 * $containerService = new Google\Service\Container(...);
43 * $clusters = $containerService->projects_zones_clusters;
44 * </code>
45 */
46class ProjectsZonesClusters extends \Google\Service\Resource
47{
48 /**
49 * Sets the addons for a specific cluster. (clusters.addons)
50 *
51 * @param string $projectId Deprecated. The Google Developers Console [project
52 * ID or project number](https://cloud.google.com/resource-
53 * manager/docs/creating-managing-projects). This field has been deprecated and
54 * replaced by the name field.
55 * @param string $zone Deprecated. The name of the Google Compute Engine
56 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the
57 * cluster resides. This field has been deprecated and replaced by the name
58 * field.
59 * @param string $clusterId Deprecated. The name of the cluster to upgrade. This
60 * field has been deprecated and replaced by the name field.
61 * @param SetAddonsConfigRequest $postBody
62 * @param array $optParams Optional parameters.
63 * @return Operation
64 * @throws \Google\Service\Exception
65 */
66 public function addons($projectId, $zone, $clusterId, SetAddonsConfigRequest $postBody, $optParams = [])
67 {
68 $params = ['projectId' => $projectId, 'zone' => $zone, 'clusterId' => $clusterId, 'postBody' => $postBody];
69 $params = array_merge($params, $optParams);
70 return $this->call('addons', [$params], Operation::class);
71 }
72 /**
73 * Completes master IP rotation. (clusters.completeIpRotation)
74 *
75 * @param string $projectId Deprecated. The Google Developers Console [project
76 * ID or project number](https://cloud.google.com/resource-
77 * manager/docs/creating-managing-projects). This field has been deprecated and
78 * replaced by the name field.
79 * @param string $zone Deprecated. The name of the Google Compute Engine
80 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the
81 * cluster resides. This field has been deprecated and replaced by the name
82 * field.
83 * @param string $clusterId Deprecated. The name of the cluster. This field has
84 * been deprecated and replaced by the name field.
85 * @param CompleteIPRotationRequest $postBody
86 * @param array $optParams Optional parameters.
87 * @return Operation
88 * @throws \Google\Service\Exception
89 */
90 public function completeIpRotation($projectId, $zone, $clusterId, CompleteIPRotationRequest $postBody, $optParams = [])
91 {
92 $params = ['projectId' => $projectId, 'zone' => $zone, 'clusterId' => $clusterId, 'postBody' => $postBody];
93 $params = array_merge($params, $optParams);
94 return $this->call('completeIpRotation', [$params], Operation::class);
95 }
96 /**
97 * Creates a cluster, consisting of the specified number and type of Google
98 * Compute Engine instances. By default, the cluster is created in the project's
99 * [default network](https://cloud.google.com/compute/docs/networks-and-
100 * firewalls#networks). One firewall is added for the cluster. After cluster
101 * creation, the Kubelet creates routes for each node to allow the containers on
102 * that node to communicate with all other instances in the cluster. Finally, an
103 * entry is added to the project's global metadata indicating which CIDR range
104 * the cluster is using. (clusters.create)
105 *
106 * @param string $projectId Deprecated. The Google Developers Console [project
107 * ID or project number](https://cloud.google.com/resource-
108 * manager/docs/creating-managing-projects). This field has been deprecated and
109 * replaced by the parent field.
110 * @param string $zone Deprecated. The name of the Google Compute Engine
111 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the
112 * cluster resides. This field has been deprecated and replaced by the parent
113 * field.
114 * @param CreateClusterRequest $postBody
115 * @param array $optParams Optional parameters.
116 * @return Operation
117 * @throws \Google\Service\Exception
118 */
119 public function create($projectId, $zone, CreateClusterRequest $postBody, $optParams = [])
120 {
121 $params = ['projectId' => $projectId, 'zone' => $zone, 'postBody' => $postBody];
122 $params = array_merge($params, $optParams);
123 return $this->call('create', [$params], Operation::class);
124 }
125 /**
126 * Deletes the cluster, including the Kubernetes endpoint and all worker nodes.
127 * Firewalls and routes that were configured during cluster creation are also
128 * deleted. Other Google Compute Engine resources that might be in use by the
129 * cluster, such as load balancer resources, are not deleted if they weren't
130 * present when the cluster was initially created. (clusters.delete)
131 *
132 * @param string $projectId Deprecated. The Google Developers Console [project
133 * ID or project number](https://cloud.google.com/resource-
134 * manager/docs/creating-managing-projects). This field has been deprecated and
135 * replaced by the name field.
136 * @param string $zone Deprecated. The name of the Google Compute Engine
137 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the
138 * cluster resides. This field has been deprecated and replaced by the name
139 * field.
140 * @param string $clusterId Deprecated. The name of the cluster to delete. This
141 * field has been deprecated and replaced by the name field.
142 * @param array $optParams Optional parameters.
143 *
144 * @opt_param string name The name (project, location, cluster) of the cluster
145 * to delete. Specified in the format `projects/locations/clusters`.
146 * @return Operation
147 * @throws \Google\Service\Exception
148 */
149 public function delete($projectId, $zone, $clusterId, $optParams = [])
150 {
151 $params = ['projectId' => $projectId, 'zone' => $zone, 'clusterId' => $clusterId];
152 $params = array_merge($params, $optParams);
153 return $this->call('delete', [$params], Operation::class);
154 }
155 /**
156 * Gets the details of a specific cluster. (clusters.get)
157 *
158 * @param string $projectId Deprecated. The Google Developers Console [project
159 * ID or project number](https://cloud.google.com/resource-
160 * manager/docs/creating-managing-projects). This field has been deprecated and
161 * replaced by the name field.
162 * @param string $zone Deprecated. The name of the Google Compute Engine
163 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the
164 * cluster resides. This field has been deprecated and replaced by the name
165 * field.
166 * @param string $clusterId Deprecated. The name of the cluster to retrieve.
167 * This field has been deprecated and replaced by the name field.
168 * @param array $optParams Optional parameters.
169 *
170 * @opt_param string name The name (project, location, cluster) of the cluster
171 * to retrieve. Specified in the format `projects/locations/clusters`.
172 * @return Cluster
173 * @throws \Google\Service\Exception
174 */
175 public function get($projectId, $zone, $clusterId, $optParams = [])
176 {
177 $params = ['projectId' => $projectId, 'zone' => $zone, 'clusterId' => $clusterId];
178 $params = array_merge($params, $optParams);
179 return $this->call('get', [$params], Cluster::class);
180 }
181 /**
182 * Enables or disables the ABAC authorization mechanism on a cluster.
183 * (clusters.legacyAbac)
184 *
185 * @param string $projectId Deprecated. The Google Developers Console [project
186 * ID or project number](https://cloud.google.com/resource-
187 * manager/docs/creating-managing-projects). This field has been deprecated and
188 * replaced by the name field.
189 * @param string $zone Deprecated. The name of the Google Compute Engine
190 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the
191 * cluster resides. This field has been deprecated and replaced by the name
192 * field.
193 * @param string $clusterId Deprecated. The name of the cluster to update. This
194 * field has been deprecated and replaced by the name field.
195 * @param SetLegacyAbacRequest $postBody
196 * @param array $optParams Optional parameters.
197 * @return Operation
198 * @throws \Google\Service\Exception
199 */
200 public function legacyAbac($projectId, $zone, $clusterId, SetLegacyAbacRequest $postBody, $optParams = [])
201 {
202 $params = ['projectId' => $projectId, 'zone' => $zone, 'clusterId' => $clusterId, 'postBody' => $postBody];
203 $params = array_merge($params, $optParams);
204 return $this->call('legacyAbac', [$params], Operation::class);
205 }
206 /**
207 * Lists all clusters owned by a project in either the specified zone or all
208 * zones. (clusters.listProjectsZonesClusters)
209 *
210 * @param string $projectId Deprecated. The Google Developers Console [project
211 * ID or project number](https://cloud.google.com/resource-
212 * manager/docs/creating-managing-projects). This field has been deprecated and
213 * replaced by the parent field.
214 * @param string $zone Deprecated. The name of the Google Compute Engine
215 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the
216 * cluster resides, or "-" for all zones. This field has been deprecated and
217 * replaced by the parent field.
218 * @param array $optParams Optional parameters.
219 *
220 * @opt_param string parent The parent (project and location) where the clusters
221 * will be listed. Specified in the format `projects/locations`. Location "-"
222 * matches all zones and all regions.
223 * @return ListClustersResponse
224 * @throws \Google\Service\Exception
225 */
226 public function listProjectsZonesClusters($projectId, $zone, $optParams = [])
227 {
228 $params = ['projectId' => $projectId, 'zone' => $zone];
229 $params = array_merge($params, $optParams);
230 return $this->call('list', [$params], ListClustersResponse::class);
231 }
232 /**
233 * Sets the locations for a specific cluster. Deprecated. Use
234 * [projects.locations.clusters.update](https://cloud.google.com/kubernetes-
235 * engine/docs/reference/rest/v1/projects.locations.clusters/update) instead.
236 * (clusters.locations)
237 *
238 * @param string $projectId Deprecated. The Google Developers Console [project
239 * ID or project number](https://cloud.google.com/resource-
240 * manager/docs/creating-managing-projects). This field has been deprecated and
241 * replaced by the name field.
242 * @param string $zone Deprecated. The name of the Google Compute Engine
243 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the
244 * cluster resides. This field has been deprecated and replaced by the name
245 * field.
246 * @param string $clusterId Deprecated. The name of the cluster to upgrade. This
247 * field has been deprecated and replaced by the name field.
248 * @param SetLocationsRequest $postBody
249 * @param array $optParams Optional parameters.
250 * @return Operation
251 * @throws \Google\Service\Exception
252 */
253 public function locations($projectId, $zone, $clusterId, SetLocationsRequest $postBody, $optParams = [])
254 {
255 $params = ['projectId' => $projectId, 'zone' => $zone, 'clusterId' => $clusterId, 'postBody' => $postBody];
256 $params = array_merge($params, $optParams);
257 return $this->call('locations', [$params], Operation::class);
258 }
259 /**
260 * Sets the logging service for a specific cluster. (clusters.logging)
261 *
262 * @param string $projectId Deprecated. The Google Developers Console [project
263 * ID or project number](https://cloud.google.com/resource-
264 * manager/docs/creating-managing-projects). This field has been deprecated and
265 * replaced by the name field.
266 * @param string $zone Deprecated. The name of the Google Compute Engine
267 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the
268 * cluster resides. This field has been deprecated and replaced by the name
269 * field.
270 * @param string $clusterId Deprecated. The name of the cluster to upgrade. This
271 * field has been deprecated and replaced by the name field.
272 * @param SetLoggingServiceRequest $postBody
273 * @param array $optParams Optional parameters.
274 * @return Operation
275 * @throws \Google\Service\Exception
276 */
277 public function logging($projectId, $zone, $clusterId, SetLoggingServiceRequest $postBody, $optParams = [])
278 {
279 $params = ['projectId' => $projectId, 'zone' => $zone, 'clusterId' => $clusterId, 'postBody' => $postBody];
280 $params = array_merge($params, $optParams);
281 return $this->call('logging', [$params], Operation::class);
282 }
283 /**
284 * Updates the master for a specific cluster. (clusters.master)
285 *
286 * @param string $projectId Deprecated. The Google Developers Console [project
287 * ID or project number](https://cloud.google.com/resource-
288 * manager/docs/creating-managing-projects). This field has been deprecated and
289 * replaced by the name field.
290 * @param string $zone Deprecated. The name of the Google Compute Engine
291 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the
292 * cluster resides. This field has been deprecated and replaced by the name
293 * field.
294 * @param string $clusterId Deprecated. The name of the cluster to upgrade. This
295 * field has been deprecated and replaced by the name field.
296 * @param UpdateMasterRequest $postBody
297 * @param array $optParams Optional parameters.
298 * @return Operation
299 * @throws \Google\Service\Exception
300 */
301 public function master($projectId, $zone, $clusterId, UpdateMasterRequest $postBody, $optParams = [])
302 {
303 $params = ['projectId' => $projectId, 'zone' => $zone, 'clusterId' => $clusterId, 'postBody' => $postBody];
304 $params = array_merge($params, $optParams);
305 return $this->call('master', [$params], Operation::class);
306 }
307 /**
308 * Sets the monitoring service for a specific cluster. (clusters.monitoring)
309 *
310 * @param string $projectId Deprecated. The Google Developers Console [project
311 * ID or project number](https://cloud.google.com/resource-
312 * manager/docs/creating-managing-projects). This field has been deprecated and
313 * replaced by the name field.
314 * @param string $zone Deprecated. The name of the Google Compute Engine
315 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the
316 * cluster resides. This field has been deprecated and replaced by the name
317 * field.
318 * @param string $clusterId Deprecated. The name of the cluster to upgrade. This
319 * field has been deprecated and replaced by the name field.
320 * @param SetMonitoringServiceRequest $postBody
321 * @param array $optParams Optional parameters.
322 * @return Operation
323 * @throws \Google\Service\Exception
324 */
325 public function monitoring($projectId, $zone, $clusterId, SetMonitoringServiceRequest $postBody, $optParams = [])
326 {
327 $params = ['projectId' => $projectId, 'zone' => $zone, 'clusterId' => $clusterId, 'postBody' => $postBody];
328 $params = array_merge($params, $optParams);
329 return $this->call('monitoring', [$params], Operation::class);
330 }
331 /**
332 * Sets labels on a cluster. (clusters.resourceLabels)
333 *
334 * @param string $projectId Deprecated. The Google Developers Console [project
335 * ID or project number](https://cloud.google.com/resource-
336 * manager/docs/creating-managing-projects). This field has been deprecated and
337 * replaced by the name field.
338 * @param string $zone Deprecated. The name of the Google Compute Engine
339 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the
340 * cluster resides. This field has been deprecated and replaced by the name
341 * field.
342 * @param string $clusterId Deprecated. The name of the cluster. This field has
343 * been deprecated and replaced by the name field.
344 * @param SetLabelsRequest $postBody
345 * @param array $optParams Optional parameters.
346 * @return Operation
347 * @throws \Google\Service\Exception
348 */
349 public function resourceLabels($projectId, $zone, $clusterId, SetLabelsRequest $postBody, $optParams = [])
350 {
351 $params = ['projectId' => $projectId, 'zone' => $zone, 'clusterId' => $clusterId, 'postBody' => $postBody];
352 $params = array_merge($params, $optParams);
353 return $this->call('resourceLabels', [$params], Operation::class);
354 }
355 /**
356 * Sets the maintenance policy for a cluster. (clusters.setMaintenancePolicy)
357 *
358 * @param string $projectId Required. The Google Developers Console [project ID
359 * or project number](https://cloud.google.com/resource-manager/docs/creating-
360 * managing-projects).
361 * @param string $zone Required. The name of the Google Compute Engine
362 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the
363 * cluster resides.
364 * @param string $clusterId Required. The name of the cluster to update.
365 * @param SetMaintenancePolicyRequest $postBody
366 * @param array $optParams Optional parameters.
367 * @return Operation
368 * @throws \Google\Service\Exception
369 */
370 public function setMaintenancePolicy($projectId, $zone, $clusterId, SetMaintenancePolicyRequest $postBody, $optParams = [])
371 {
372 $params = ['projectId' => $projectId, 'zone' => $zone, 'clusterId' => $clusterId, 'postBody' => $postBody];
373 $params = array_merge($params, $optParams);
374 return $this->call('setMaintenancePolicy', [$params], Operation::class);
375 }
376 /**
377 * Sets master auth materials. Currently supports changing the admin password or
378 * a specific cluster, either via password generation or explicitly setting the
379 * password. (clusters.setMasterAuth)
380 *
381 * @param string $projectId Deprecated. The Google Developers Console [project
382 * ID or project number](https://cloud.google.com/resource-
383 * manager/docs/creating-managing-projects). This field has been deprecated and
384 * replaced by the name field.
385 * @param string $zone Deprecated. The name of the Google Compute Engine
386 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the
387 * cluster resides. This field has been deprecated and replaced by the name
388 * field.
389 * @param string $clusterId Deprecated. The name of the cluster to upgrade. This
390 * field has been deprecated and replaced by the name field.
391 * @param SetMasterAuthRequest $postBody
392 * @param array $optParams Optional parameters.
393 * @return Operation
394 * @throws \Google\Service\Exception
395 */
396 public function setMasterAuth($projectId, $zone, $clusterId, SetMasterAuthRequest $postBody, $optParams = [])
397 {
398 $params = ['projectId' => $projectId, 'zone' => $zone, 'clusterId' => $clusterId, 'postBody' => $postBody];
399 $params = array_merge($params, $optParams);
400 return $this->call('setMasterAuth', [$params], Operation::class);
401 }
402 /**
403 * Enables or disables Network Policy for a cluster. (clusters.setNetworkPolicy)
404 *
405 * @param string $projectId Deprecated. The Google Developers Console [project
406 * ID or project number](https://cloud.google.com/resource-
407 * manager/docs/creating-managing-projects). This field has been deprecated and
408 * replaced by the name field.
409 * @param string $zone Deprecated. The name of the Google Compute Engine
410 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the
411 * cluster resides. This field has been deprecated and replaced by the name
412 * field.
413 * @param string $clusterId Deprecated. The name of the cluster. This field has
414 * been deprecated and replaced by the name field.
415 * @param SetNetworkPolicyRequest $postBody
416 * @param array $optParams Optional parameters.
417 * @return Operation
418 * @throws \Google\Service\Exception
419 */
420 public function setNetworkPolicy($projectId, $zone, $clusterId, SetNetworkPolicyRequest $postBody, $optParams = [])
421 {
422 $params = ['projectId' => $projectId, 'zone' => $zone, 'clusterId' => $clusterId, 'postBody' => $postBody];
423 $params = array_merge($params, $optParams);
424 return $this->call('setNetworkPolicy', [$params], Operation::class);
425 }
426 /**
427 * Starts master IP rotation. (clusters.startIpRotation)
428 *
429 * @param string $projectId Deprecated. The Google Developers Console [project
430 * ID or project number](https://cloud.google.com/resource-
431 * manager/docs/creating-managing-projects). This field has been deprecated and
432 * replaced by the name field.
433 * @param string $zone Deprecated. The name of the Google Compute Engine
434 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the
435 * cluster resides. This field has been deprecated and replaced by the name
436 * field.
437 * @param string $clusterId Deprecated. The name of the cluster. This field has
438 * been deprecated and replaced by the name field.
439 * @param StartIPRotationRequest $postBody
440 * @param array $optParams Optional parameters.
441 * @return Operation
442 * @throws \Google\Service\Exception
443 */
444 public function startIpRotation($projectId, $zone, $clusterId, StartIPRotationRequest $postBody, $optParams = [])
445 {
446 $params = ['projectId' => $projectId, 'zone' => $zone, 'clusterId' => $clusterId, 'postBody' => $postBody];
447 $params = array_merge($params, $optParams);
448 return $this->call('startIpRotation', [$params], Operation::class);
449 }
450 /**
451 * Updates the settings of a specific cluster. (clusters.update)
452 *
453 * @param string $projectId Deprecated. The Google Developers Console [project
454 * ID or project number](https://cloud.google.com/resource-
455 * manager/docs/creating-managing-projects). This field has been deprecated and
456 * replaced by the name field.
457 * @param string $zone Deprecated. The name of the Google Compute Engine
458 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the
459 * cluster resides. This field has been deprecated and replaced by the name
460 * field.
461 * @param string $clusterId Deprecated. The name of the cluster to upgrade. This
462 * field has been deprecated and replaced by the name field.
463 * @param UpdateClusterRequest $postBody
464 * @param array $optParams Optional parameters.
465 * @return Operation
466 * @throws \Google\Service\Exception
467 */
468 public function update($projectId, $zone, $clusterId, UpdateClusterRequest $postBody, $optParams = [])
469 {
470 $params = ['projectId' => $projectId, 'zone' => $zone, 'clusterId' => $clusterId, 'postBody' => $postBody];
471 $params = array_merge($params, $optParams);
472 return $this->call('update', [$params], Operation::class);
473 }
474}
475
476// Adding a class alias for backwards compatibility with the previous class name.
477class_alias(ProjectsZonesClusters::class, 'Google_Service_Container_Resource_ProjectsZonesClusters');
Note: See TracBrowser for help on using the repository browser.