source: vendor/google/apiclient-services/src/BigtableAdmin/Resource/ProjectsInstancesClusters.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.5 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\BigtableAdmin\Resource;
19
20use Google\Service\BigtableAdmin\BigtableadminEmpty;
21use Google\Service\BigtableAdmin\Cluster;
22use Google\Service\BigtableAdmin\ListClustersResponse;
23use Google\Service\BigtableAdmin\Operation;
24
25/**
26 * The "clusters" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $bigtableadminService = new Google\Service\BigtableAdmin(...);
30 * $clusters = $bigtableadminService->projects_instances_clusters;
31 * </code>
32 */
33class ProjectsInstancesClusters extends \Google\Service\Resource
34{
35 /**
36 * Creates a cluster within an instance. Note that exactly one of
37 * Cluster.serve_nodes and Cluster.cluster_config.cluster_autoscaling_config can
38 * be set. If serve_nodes is set to non-zero, then the cluster is manually
39 * scaled. If cluster_config.cluster_autoscaling_config is non-empty, then
40 * autoscaling is enabled. (clusters.create)
41 *
42 * @param string $parent Required. The unique name of the instance in which to
43 * create the new cluster. Values are of the form
44 * `projects/{project}/instances/{instance}`.
45 * @param Cluster $postBody
46 * @param array $optParams Optional parameters.
47 *
48 * @opt_param string clusterId Required. The ID to be used when referring to the
49 * new cluster within its instance, e.g., just `mycluster` rather than
50 * `projects/myproject/instances/myinstance/clusters/mycluster`.
51 * @return Operation
52 * @throws \Google\Service\Exception
53 */
54 public function create($parent, Cluster $postBody, $optParams = [])
55 {
56 $params = ['parent' => $parent, 'postBody' => $postBody];
57 $params = array_merge($params, $optParams);
58 return $this->call('create', [$params], Operation::class);
59 }
60 /**
61 * Deletes a cluster from an instance. (clusters.delete)
62 *
63 * @param string $name Required. The unique name of the cluster to be deleted.
64 * Values are of the form
65 * `projects/{project}/instances/{instance}/clusters/{cluster}`.
66 * @param array $optParams Optional parameters.
67 * @return BigtableadminEmpty
68 * @throws \Google\Service\Exception
69 */
70 public function delete($name, $optParams = [])
71 {
72 $params = ['name' => $name];
73 $params = array_merge($params, $optParams);
74 return $this->call('delete', [$params], BigtableadminEmpty::class);
75 }
76 /**
77 * Gets information about a cluster. (clusters.get)
78 *
79 * @param string $name Required. The unique name of the requested cluster.
80 * Values are of the form
81 * `projects/{project}/instances/{instance}/clusters/{cluster}`.
82 * @param array $optParams Optional parameters.
83 * @return Cluster
84 * @throws \Google\Service\Exception
85 */
86 public function get($name, $optParams = [])
87 {
88 $params = ['name' => $name];
89 $params = array_merge($params, $optParams);
90 return $this->call('get', [$params], Cluster::class);
91 }
92 /**
93 * Lists information about clusters in an instance.
94 * (clusters.listProjectsInstancesClusters)
95 *
96 * @param string $parent Required. The unique name of the instance for which a
97 * list of clusters is requested. Values are of the form
98 * `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list
99 * Clusters for all Instances in a project, e.g.,
100 * `projects/myproject/instances/-`.
101 * @param array $optParams Optional parameters.
102 *
103 * @opt_param string pageToken DEPRECATED: This field is unused and ignored.
104 * @return ListClustersResponse
105 * @throws \Google\Service\Exception
106 */
107 public function listProjectsInstancesClusters($parent, $optParams = [])
108 {
109 $params = ['parent' => $parent];
110 $params = array_merge($params, $optParams);
111 return $this->call('list', [$params], ListClustersResponse::class);
112 }
113 /**
114 * Partially updates a cluster within a project. This method is the preferred
115 * way to update a Cluster. To enable and update autoscaling, set
116 * cluster_config.cluster_autoscaling_config. When autoscaling is enabled,
117 * serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it
118 * are ignored. Note that an update cannot simultaneously set serve_nodes to
119 * non-zero and cluster_config.cluster_autoscaling_config to non-empty, and also
120 * specify both in the update_mask. To disable autoscaling, clear
121 * cluster_config.cluster_autoscaling_config, and explicitly set a serve_node
122 * count via the update_mask. (clusters.partialUpdateCluster)
123 *
124 * @param string $name The unique name of the cluster. Values are of the form
125 * `projects/{project}/instances/{instance}/clusters/a-z*`.
126 * @param Cluster $postBody
127 * @param array $optParams Optional parameters.
128 *
129 * @opt_param string updateMask Required. The subset of Cluster fields which
130 * should be replaced.
131 * @return Operation
132 * @throws \Google\Service\Exception
133 */
134 public function partialUpdateCluster($name, Cluster $postBody, $optParams = [])
135 {
136 $params = ['name' => $name, 'postBody' => $postBody];
137 $params = array_merge($params, $optParams);
138 return $this->call('partialUpdateCluster', [$params], Operation::class);
139 }
140 /**
141 * Updates a cluster within an instance. Note that UpdateCluster does not
142 * support updating cluster_config.cluster_autoscaling_config. In order to
143 * update it, you must use PartialUpdateCluster. (clusters.update)
144 *
145 * @param string $name The unique name of the cluster. Values are of the form
146 * `projects/{project}/instances/{instance}/clusters/a-z*`.
147 * @param Cluster $postBody
148 * @param array $optParams Optional parameters.
149 * @return Operation
150 * @throws \Google\Service\Exception
151 */
152 public function update($name, Cluster $postBody, $optParams = [])
153 {
154 $params = ['name' => $name, 'postBody' => $postBody];
155 $params = array_merge($params, $optParams);
156 return $this->call('update', [$params], Operation::class);
157 }
158}
159
160// Adding a class alias for backwards compatibility with the previous class name.
161class_alias(ProjectsInstancesClusters::class, 'Google_Service_BigtableAdmin_Resource_ProjectsInstancesClusters');
Note: See TracBrowser for help on using the repository browser.