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\Compute\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Compute\Operation;
|
---|
21 | use Google\Service\Compute\Policy;
|
---|
22 | use Google\Service\Compute\StoragePool;
|
---|
23 | use Google\Service\Compute\StoragePoolAggregatedList;
|
---|
24 | use Google\Service\Compute\StoragePoolList;
|
---|
25 | use Google\Service\Compute\StoragePoolListDisks;
|
---|
26 | use Google\Service\Compute\TestPermissionsRequest;
|
---|
27 | use Google\Service\Compute\TestPermissionsResponse;
|
---|
28 | use Google\Service\Compute\ZoneSetPolicyRequest;
|
---|
29 |
|
---|
30 | /**
|
---|
31 | * The "storagePools" collection of methods.
|
---|
32 | * Typical usage is:
|
---|
33 | * <code>
|
---|
34 | * $computeService = new Google\Service\Compute(...);
|
---|
35 | * $storagePools = $computeService->storagePools;
|
---|
36 | * </code>
|
---|
37 | */
|
---|
38 | class StoragePools extends \Google\Service\Resource
|
---|
39 | {
|
---|
40 | /**
|
---|
41 | * Retrieves an aggregated list of storage pools. To prevent failure, Google
|
---|
42 | * recommends that you set the `returnPartialSuccess` parameter to `true`.
|
---|
43 | * (storagePools.aggregatedList)
|
---|
44 | *
|
---|
45 | * @param string $project Project ID for this request.
|
---|
46 | * @param array $optParams Optional parameters.
|
---|
47 | *
|
---|
48 | * @opt_param string filter A filter expression that filters resources listed in
|
---|
49 | * the response. Most Compute resources support two types of filter expressions:
|
---|
50 | * expressions that support regular expressions and expressions that follow API
|
---|
51 | * improvement proposal AIP-160. These two types of filter expressions cannot be
|
---|
52 | * mixed in one request. If you want to use AIP-160, your expression must
|
---|
53 | * specify the field name, an operator, and the value that you want to use for
|
---|
54 | * filtering. The value must be a string, a number, or a boolean. The operator
|
---|
55 | * must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you
|
---|
56 | * are filtering Compute Engine instances, you can exclude instances named
|
---|
57 | * `example-instance` by specifying `name != example-instance`. The `:*`
|
---|
58 | * comparison can be used to test whether a key has been defined. For example,
|
---|
59 | * to find all objects with `owner` label use: ``` labels.owner:* ``` You can
|
---|
60 | * also filter nested fields. For example, you could specify
|
---|
61 | * `scheduling.automaticRestart = false` to include instances only if they are
|
---|
62 | * not scheduled for automatic restarts. You can use filtering on nested fields
|
---|
63 | * to filter based on resource labels. To filter on multiple expressions,
|
---|
64 | * provide each separate expression within parentheses. For example: ```
|
---|
65 | * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By
|
---|
66 | * default, each expression is an `AND` expression. However, you can include
|
---|
67 | * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel
|
---|
68 | * Skylake") OR (cpuPlatform = "Intel Broadwell") AND
|
---|
69 | * (scheduling.automaticRestart = true) ``` If you want to use a regular
|
---|
70 | * expression, use the `eq` (equal) or `ne` (not equal) operator against a
|
---|
71 | * single un-parenthesized expression with or without quotes or against multiple
|
---|
72 | * parenthesized expressions. Examples: `fieldname eq unquoted literal`
|
---|
73 | * `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"`
|
---|
74 | * `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is
|
---|
75 | * interpreted as a regular expression using Google RE2 library syntax. The
|
---|
76 | * literal value must match the entire field. For example, to filter for
|
---|
77 | * instances that do not end with name "instance", you would use `name ne
|
---|
78 | * .*instance`. You cannot combine constraints on multiple fields using regular
|
---|
79 | * expressions.
|
---|
80 | * @opt_param bool includeAllScopes Indicates whether every visible scope for
|
---|
81 | * each scope type (zone, region, global) should be included in the response.
|
---|
82 | * For new resource types added after this field, the flag has no effect as new
|
---|
83 | * resource types will always include every visible scope for each scope type in
|
---|
84 | * response. For resource types which predate this field, if this flag is
|
---|
85 | * omitted or false, only scopes of the scope types where the resource type is
|
---|
86 | * expected to be found will be included.
|
---|
87 | * @opt_param string maxResults The maximum number of results per page that
|
---|
88 | * should be returned. If the number of available results is larger than
|
---|
89 | * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
|
---|
90 | * get the next page of results in subsequent list requests. Acceptable values
|
---|
91 | * are `0` to `500`, inclusive. (Default: `500`)
|
---|
92 | * @opt_param string orderBy Sorts list results by a certain order. By default,
|
---|
93 | * results are returned in alphanumerical order based on the resource name. You
|
---|
94 | * can also sort results in descending order based on the creation timestamp
|
---|
95 | * using `orderBy="creationTimestamp desc"`. This sorts results based on the
|
---|
96 | * `creationTimestamp` field in reverse chronological order (newest result
|
---|
97 | * first). Use this to sort resources like operations so that the newest
|
---|
98 | * operation is returned first. Currently, only sorting by `name` or
|
---|
99 | * `creationTimestamp desc` is supported.
|
---|
100 | * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
|
---|
101 | * the `nextPageToken` returned by a previous list request to get the next page
|
---|
102 | * of results.
|
---|
103 | * @opt_param bool returnPartialSuccess Opt-in for partial success behavior
|
---|
104 | * which provides partial results in case of failure. The default value is
|
---|
105 | * false. For example, when partial success behavior is enabled, aggregatedList
|
---|
106 | * for a single zone scope either returns all resources in the zone or no
|
---|
107 | * resources, with an error code.
|
---|
108 | * @opt_param string serviceProjectNumber The Shared VPC service project id or
|
---|
109 | * service project number for which aggregated list request is invoked for
|
---|
110 | * subnetworks list-usable api.
|
---|
111 | * @return StoragePoolAggregatedList
|
---|
112 | * @throws \Google\Service\Exception
|
---|
113 | */
|
---|
114 | public function aggregatedList($project, $optParams = [])
|
---|
115 | {
|
---|
116 | $params = ['project' => $project];
|
---|
117 | $params = array_merge($params, $optParams);
|
---|
118 | return $this->call('aggregatedList', [$params], StoragePoolAggregatedList::class);
|
---|
119 | }
|
---|
120 | /**
|
---|
121 | * Deletes the specified storage pool. Deleting a storagePool removes its data
|
---|
122 | * permanently and is irreversible. However, deleting a storagePool does not
|
---|
123 | * delete any snapshots previously made from the storagePool. You must
|
---|
124 | * separately delete snapshots. (storagePools.delete)
|
---|
125 | *
|
---|
126 | * @param string $project Project ID for this request.
|
---|
127 | * @param string $zone The name of the zone for this request.
|
---|
128 | * @param string $storagePool Name of the storage pool to delete.
|
---|
129 | * @param array $optParams Optional parameters.
|
---|
130 | *
|
---|
131 | * @opt_param string requestId An optional request ID to identify requests.
|
---|
132 | * Specify a unique request ID so that if you must retry your request, the
|
---|
133 | * server will know to ignore the request if it has already been completed. For
|
---|
134 | * example, consider a situation where you make an initial request and the
|
---|
135 | * request times out. If you make the request again with the same request ID,
|
---|
136 | * the server can check if original operation with the same request ID was
|
---|
137 | * received, and if so, will ignore the second request. This prevents clients
|
---|
138 | * from accidentally creating duplicate commitments. The request ID must be a
|
---|
139 | * valid UUID with the exception that zero UUID is not supported (
|
---|
140 | * 00000000-0000-0000-0000-000000000000).
|
---|
141 | * @return Operation
|
---|
142 | * @throws \Google\Service\Exception
|
---|
143 | */
|
---|
144 | public function delete($project, $zone, $storagePool, $optParams = [])
|
---|
145 | {
|
---|
146 | $params = ['project' => $project, 'zone' => $zone, 'storagePool' => $storagePool];
|
---|
147 | $params = array_merge($params, $optParams);
|
---|
148 | return $this->call('delete', [$params], Operation::class);
|
---|
149 | }
|
---|
150 | /**
|
---|
151 | * Returns a specified storage pool. Gets a list of available storage pools by
|
---|
152 | * making a list() request. (storagePools.get)
|
---|
153 | *
|
---|
154 | * @param string $project Project ID for this request.
|
---|
155 | * @param string $zone The name of the zone for this request.
|
---|
156 | * @param string $storagePool Name of the storage pool to return.
|
---|
157 | * @param array $optParams Optional parameters.
|
---|
158 | * @return StoragePool
|
---|
159 | * @throws \Google\Service\Exception
|
---|
160 | */
|
---|
161 | public function get($project, $zone, $storagePool, $optParams = [])
|
---|
162 | {
|
---|
163 | $params = ['project' => $project, 'zone' => $zone, 'storagePool' => $storagePool];
|
---|
164 | $params = array_merge($params, $optParams);
|
---|
165 | return $this->call('get', [$params], StoragePool::class);
|
---|
166 | }
|
---|
167 | /**
|
---|
168 | * Gets the access control policy for a resource. May be empty if no such policy
|
---|
169 | * or resource exists. (storagePools.getIamPolicy)
|
---|
170 | *
|
---|
171 | * @param string $project Project ID for this request.
|
---|
172 | * @param string $zone The name of the zone for this request.
|
---|
173 | * @param string $resource Name or id of the resource for this request.
|
---|
174 | * @param array $optParams Optional parameters.
|
---|
175 | *
|
---|
176 | * @opt_param int optionsRequestedPolicyVersion Requested IAM Policy version.
|
---|
177 | * @return Policy
|
---|
178 | * @throws \Google\Service\Exception
|
---|
179 | */
|
---|
180 | public function getIamPolicy($project, $zone, $resource, $optParams = [])
|
---|
181 | {
|
---|
182 | $params = ['project' => $project, 'zone' => $zone, 'resource' => $resource];
|
---|
183 | $params = array_merge($params, $optParams);
|
---|
184 | return $this->call('getIamPolicy', [$params], Policy::class);
|
---|
185 | }
|
---|
186 | /**
|
---|
187 | * Creates a storage pool in the specified project using the data in the
|
---|
188 | * request. (storagePools.insert)
|
---|
189 | *
|
---|
190 | * @param string $project Project ID for this request.
|
---|
191 | * @param string $zone The name of the zone for this request.
|
---|
192 | * @param StoragePool $postBody
|
---|
193 | * @param array $optParams Optional parameters.
|
---|
194 | *
|
---|
195 | * @opt_param string requestId An optional request ID to identify requests.
|
---|
196 | * Specify a unique request ID so that if you must retry your request, the
|
---|
197 | * server will know to ignore the request if it has already been completed. For
|
---|
198 | * example, consider a situation where you make an initial request and the
|
---|
199 | * request times out. If you make the request again with the same request ID,
|
---|
200 | * the server can check if original operation with the same request ID was
|
---|
201 | * received, and if so, will ignore the second request. This prevents clients
|
---|
202 | * from accidentally creating duplicate commitments. The request ID must be a
|
---|
203 | * valid UUID with the exception that zero UUID is not supported (
|
---|
204 | * 00000000-0000-0000-0000-000000000000).
|
---|
205 | * @return Operation
|
---|
206 | * @throws \Google\Service\Exception
|
---|
207 | */
|
---|
208 | public function insert($project, $zone, StoragePool $postBody, $optParams = [])
|
---|
209 | {
|
---|
210 | $params = ['project' => $project, 'zone' => $zone, 'postBody' => $postBody];
|
---|
211 | $params = array_merge($params, $optParams);
|
---|
212 | return $this->call('insert', [$params], Operation::class);
|
---|
213 | }
|
---|
214 | /**
|
---|
215 | * Retrieves a list of storage pools contained within the specified zone.
|
---|
216 | * (storagePools.listStoragePools)
|
---|
217 | *
|
---|
218 | * @param string $project Project ID for this request.
|
---|
219 | * @param string $zone The name of the zone for this request.
|
---|
220 | * @param array $optParams Optional parameters.
|
---|
221 | *
|
---|
222 | * @opt_param string filter A filter expression that filters resources listed in
|
---|
223 | * the response. Most Compute resources support two types of filter expressions:
|
---|
224 | * expressions that support regular expressions and expressions that follow API
|
---|
225 | * improvement proposal AIP-160. These two types of filter expressions cannot be
|
---|
226 | * mixed in one request. If you want to use AIP-160, your expression must
|
---|
227 | * specify the field name, an operator, and the value that you want to use for
|
---|
228 | * filtering. The value must be a string, a number, or a boolean. The operator
|
---|
229 | * must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you
|
---|
230 | * are filtering Compute Engine instances, you can exclude instances named
|
---|
231 | * `example-instance` by specifying `name != example-instance`. The `:*`
|
---|
232 | * comparison can be used to test whether a key has been defined. For example,
|
---|
233 | * to find all objects with `owner` label use: ``` labels.owner:* ``` You can
|
---|
234 | * also filter nested fields. For example, you could specify
|
---|
235 | * `scheduling.automaticRestart = false` to include instances only if they are
|
---|
236 | * not scheduled for automatic restarts. You can use filtering on nested fields
|
---|
237 | * to filter based on resource labels. To filter on multiple expressions,
|
---|
238 | * provide each separate expression within parentheses. For example: ```
|
---|
239 | * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By
|
---|
240 | * default, each expression is an `AND` expression. However, you can include
|
---|
241 | * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel
|
---|
242 | * Skylake") OR (cpuPlatform = "Intel Broadwell") AND
|
---|
243 | * (scheduling.automaticRestart = true) ``` If you want to use a regular
|
---|
244 | * expression, use the `eq` (equal) or `ne` (not equal) operator against a
|
---|
245 | * single un-parenthesized expression with or without quotes or against multiple
|
---|
246 | * parenthesized expressions. Examples: `fieldname eq unquoted literal`
|
---|
247 | * `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"`
|
---|
248 | * `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is
|
---|
249 | * interpreted as a regular expression using Google RE2 library syntax. The
|
---|
250 | * literal value must match the entire field. For example, to filter for
|
---|
251 | * instances that do not end with name "instance", you would use `name ne
|
---|
252 | * .*instance`. You cannot combine constraints on multiple fields using regular
|
---|
253 | * expressions.
|
---|
254 | * @opt_param string maxResults The maximum number of results per page that
|
---|
255 | * should be returned. If the number of available results is larger than
|
---|
256 | * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
|
---|
257 | * get the next page of results in subsequent list requests. Acceptable values
|
---|
258 | * are `0` to `500`, inclusive. (Default: `500`)
|
---|
259 | * @opt_param string orderBy Sorts list results by a certain order. By default,
|
---|
260 | * results are returned in alphanumerical order based on the resource name. You
|
---|
261 | * can also sort results in descending order based on the creation timestamp
|
---|
262 | * using `orderBy="creationTimestamp desc"`. This sorts results based on the
|
---|
263 | * `creationTimestamp` field in reverse chronological order (newest result
|
---|
264 | * first). Use this to sort resources like operations so that the newest
|
---|
265 | * operation is returned first. Currently, only sorting by `name` or
|
---|
266 | * `creationTimestamp desc` is supported.
|
---|
267 | * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
|
---|
268 | * the `nextPageToken` returned by a previous list request to get the next page
|
---|
269 | * of results.
|
---|
270 | * @opt_param bool returnPartialSuccess Opt-in for partial success behavior
|
---|
271 | * which provides partial results in case of failure. The default value is
|
---|
272 | * false. For example, when partial success behavior is enabled, aggregatedList
|
---|
273 | * for a single zone scope either returns all resources in the zone or no
|
---|
274 | * resources, with an error code.
|
---|
275 | * @return StoragePoolList
|
---|
276 | * @throws \Google\Service\Exception
|
---|
277 | */
|
---|
278 | public function listStoragePools($project, $zone, $optParams = [])
|
---|
279 | {
|
---|
280 | $params = ['project' => $project, 'zone' => $zone];
|
---|
281 | $params = array_merge($params, $optParams);
|
---|
282 | return $this->call('list', [$params], StoragePoolList::class);
|
---|
283 | }
|
---|
284 | /**
|
---|
285 | * Lists the disks in a specified storage pool. (storagePools.listDisks)
|
---|
286 | *
|
---|
287 | * @param string $project Project ID for this request.
|
---|
288 | * @param string $zone The name of the zone for this request.
|
---|
289 | * @param string $storagePool Name of the storage pool to list disks of.
|
---|
290 | * @param array $optParams Optional parameters.
|
---|
291 | *
|
---|
292 | * @opt_param string filter A filter expression that filters resources listed in
|
---|
293 | * the response. Most Compute resources support two types of filter expressions:
|
---|
294 | * expressions that support regular expressions and expressions that follow API
|
---|
295 | * improvement proposal AIP-160. These two types of filter expressions cannot be
|
---|
296 | * mixed in one request. If you want to use AIP-160, your expression must
|
---|
297 | * specify the field name, an operator, and the value that you want to use for
|
---|
298 | * filtering. The value must be a string, a number, or a boolean. The operator
|
---|
299 | * must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you
|
---|
300 | * are filtering Compute Engine instances, you can exclude instances named
|
---|
301 | * `example-instance` by specifying `name != example-instance`. The `:*`
|
---|
302 | * comparison can be used to test whether a key has been defined. For example,
|
---|
303 | * to find all objects with `owner` label use: ``` labels.owner:* ``` You can
|
---|
304 | * also filter nested fields. For example, you could specify
|
---|
305 | * `scheduling.automaticRestart = false` to include instances only if they are
|
---|
306 | * not scheduled for automatic restarts. You can use filtering on nested fields
|
---|
307 | * to filter based on resource labels. To filter on multiple expressions,
|
---|
308 | * provide each separate expression within parentheses. For example: ```
|
---|
309 | * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By
|
---|
310 | * default, each expression is an `AND` expression. However, you can include
|
---|
311 | * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel
|
---|
312 | * Skylake") OR (cpuPlatform = "Intel Broadwell") AND
|
---|
313 | * (scheduling.automaticRestart = true) ``` If you want to use a regular
|
---|
314 | * expression, use the `eq` (equal) or `ne` (not equal) operator against a
|
---|
315 | * single un-parenthesized expression with or without quotes or against multiple
|
---|
316 | * parenthesized expressions. Examples: `fieldname eq unquoted literal`
|
---|
317 | * `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"`
|
---|
318 | * `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is
|
---|
319 | * interpreted as a regular expression using Google RE2 library syntax. The
|
---|
320 | * literal value must match the entire field. For example, to filter for
|
---|
321 | * instances that do not end with name "instance", you would use `name ne
|
---|
322 | * .*instance`. You cannot combine constraints on multiple fields using regular
|
---|
323 | * expressions.
|
---|
324 | * @opt_param string maxResults The maximum number of results per page that
|
---|
325 | * should be returned. If the number of available results is larger than
|
---|
326 | * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
|
---|
327 | * get the next page of results in subsequent list requests. Acceptable values
|
---|
328 | * are `0` to `500`, inclusive. (Default: `500`)
|
---|
329 | * @opt_param string orderBy Sorts list results by a certain order. By default,
|
---|
330 | * results are returned in alphanumerical order based on the resource name. You
|
---|
331 | * can also sort results in descending order based on the creation timestamp
|
---|
332 | * using `orderBy="creationTimestamp desc"`. This sorts results based on the
|
---|
333 | * `creationTimestamp` field in reverse chronological order (newest result
|
---|
334 | * first). Use this to sort resources like operations so that the newest
|
---|
335 | * operation is returned first. Currently, only sorting by `name` or
|
---|
336 | * `creationTimestamp desc` is supported.
|
---|
337 | * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
|
---|
338 | * the `nextPageToken` returned by a previous list request to get the next page
|
---|
339 | * of results.
|
---|
340 | * @opt_param bool returnPartialSuccess Opt-in for partial success behavior
|
---|
341 | * which provides partial results in case of failure. The default value is
|
---|
342 | * false. For example, when partial success behavior is enabled, aggregatedList
|
---|
343 | * for a single zone scope either returns all resources in the zone or no
|
---|
344 | * resources, with an error code.
|
---|
345 | * @return StoragePoolListDisks
|
---|
346 | * @throws \Google\Service\Exception
|
---|
347 | */
|
---|
348 | public function listDisks($project, $zone, $storagePool, $optParams = [])
|
---|
349 | {
|
---|
350 | $params = ['project' => $project, 'zone' => $zone, 'storagePool' => $storagePool];
|
---|
351 | $params = array_merge($params, $optParams);
|
---|
352 | return $this->call('listDisks', [$params], StoragePoolListDisks::class);
|
---|
353 | }
|
---|
354 | /**
|
---|
355 | * Sets the access control policy on the specified resource. Replaces any
|
---|
356 | * existing policy. (storagePools.setIamPolicy)
|
---|
357 | *
|
---|
358 | * @param string $project Project ID for this request.
|
---|
359 | * @param string $zone The name of the zone for this request.
|
---|
360 | * @param string $resource Name or id of the resource for this request.
|
---|
361 | * @param ZoneSetPolicyRequest $postBody
|
---|
362 | * @param array $optParams Optional parameters.
|
---|
363 | * @return Policy
|
---|
364 | * @throws \Google\Service\Exception
|
---|
365 | */
|
---|
366 | public function setIamPolicy($project, $zone, $resource, ZoneSetPolicyRequest $postBody, $optParams = [])
|
---|
367 | {
|
---|
368 | $params = ['project' => $project, 'zone' => $zone, 'resource' => $resource, 'postBody' => $postBody];
|
---|
369 | $params = array_merge($params, $optParams);
|
---|
370 | return $this->call('setIamPolicy', [$params], Policy::class);
|
---|
371 | }
|
---|
372 | /**
|
---|
373 | * Returns permissions that a caller has on the specified resource.
|
---|
374 | * (storagePools.testIamPermissions)
|
---|
375 | *
|
---|
376 | * @param string $project Project ID for this request.
|
---|
377 | * @param string $zone The name of the zone for this request.
|
---|
378 | * @param string $resource Name or id of the resource for this request.
|
---|
379 | * @param TestPermissionsRequest $postBody
|
---|
380 | * @param array $optParams Optional parameters.
|
---|
381 | * @return TestPermissionsResponse
|
---|
382 | * @throws \Google\Service\Exception
|
---|
383 | */
|
---|
384 | public function testIamPermissions($project, $zone, $resource, TestPermissionsRequest $postBody, $optParams = [])
|
---|
385 | {
|
---|
386 | $params = ['project' => $project, 'zone' => $zone, 'resource' => $resource, 'postBody' => $postBody];
|
---|
387 | $params = array_merge($params, $optParams);
|
---|
388 | return $this->call('testIamPermissions', [$params], TestPermissionsResponse::class);
|
---|
389 | }
|
---|
390 | /**
|
---|
391 | * Updates the specified storagePool with the data included in the request. The
|
---|
392 | * update is performed only on selected fields included as part of update-mask.
|
---|
393 | * Only the following fields can be modified: pool_provisioned_capacity_gb,
|
---|
394 | * pool_provisioned_iops and pool_provisioned_throughput. (storagePools.update)
|
---|
395 | *
|
---|
396 | * @param string $project Project ID for this request.
|
---|
397 | * @param string $zone The name of the zone for this request.
|
---|
398 | * @param string $storagePool The storagePool name for this request.
|
---|
399 | * @param StoragePool $postBody
|
---|
400 | * @param array $optParams Optional parameters.
|
---|
401 | *
|
---|
402 | * @opt_param string requestId An optional request ID to identify requests.
|
---|
403 | * Specify a unique request ID so that if you must retry your request, the
|
---|
404 | * server will know to ignore the request if it has already been completed. For
|
---|
405 | * example, consider a situation where you make an initial request and the
|
---|
406 | * request times out. If you make the request again with the same request ID,
|
---|
407 | * the server can check if original operation with the same request ID was
|
---|
408 | * received, and if so, will ignore the second request. This prevents clients
|
---|
409 | * from accidentally creating duplicate commitments. The request ID must be a
|
---|
410 | * valid UUID with the exception that zero UUID is not supported (
|
---|
411 | * 00000000-0000-0000-0000-000000000000).
|
---|
412 | * @opt_param string updateMask update_mask indicates fields to be updated as
|
---|
413 | * part of this request.
|
---|
414 | * @return Operation
|
---|
415 | * @throws \Google\Service\Exception
|
---|
416 | */
|
---|
417 | public function update($project, $zone, $storagePool, StoragePool $postBody, $optParams = [])
|
---|
418 | {
|
---|
419 | $params = ['project' => $project, 'zone' => $zone, 'storagePool' => $storagePool, 'postBody' => $postBody];
|
---|
420 | $params = array_merge($params, $optParams);
|
---|
421 | return $this->call('update', [$params], Operation::class);
|
---|
422 | }
|
---|
423 | }
|
---|
424 |
|
---|
425 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
426 | class_alias(StoragePools::class, 'Google_Service_Compute_Resource_StoragePools');
|
---|