source: vendor/google/apiclient-services/src/VMwareEngine/Resource/ProjectsLocationsPrivateClouds.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: 22.8 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\VMwareEngine\Resource;
19
20use Google\Service\VMwareEngine\Credentials;
21use Google\Service\VMwareEngine\DnsForwarding;
22use Google\Service\VMwareEngine\ListPrivateCloudsResponse;
23use Google\Service\VMwareEngine\Operation;
24use Google\Service\VMwareEngine\Policy;
25use Google\Service\VMwareEngine\PrivateCloud;
26use Google\Service\VMwareEngine\ResetNsxCredentialsRequest;
27use Google\Service\VMwareEngine\ResetVcenterCredentialsRequest;
28use Google\Service\VMwareEngine\SetIamPolicyRequest;
29use Google\Service\VMwareEngine\TestIamPermissionsRequest;
30use Google\Service\VMwareEngine\TestIamPermissionsResponse;
31use Google\Service\VMwareEngine\UndeletePrivateCloudRequest;
32
33/**
34 * The "privateClouds" collection of methods.
35 * Typical usage is:
36 * <code>
37 * $vmwareengineService = new Google\Service\VMwareEngine(...);
38 * $privateClouds = $vmwareengineService->projects_locations_privateClouds;
39 * </code>
40 */
41class ProjectsLocationsPrivateClouds extends \Google\Service\Resource
42{
43 /**
44 * Creates a new `PrivateCloud` resource in a given project and location.
45 * Private clouds of type `STANDARD` and `TIME_LIMITED` are zonal resources,
46 * `STRETCHED` private clouds are regional. Creating a private cloud also
47 * creates a [management cluster](https://cloud.google.com/vmware-
48 * engine/docs/concepts-vmware-components) for that private cloud.
49 * (privateClouds.create)
50 *
51 * @param string $parent Required. The resource name of the location to create
52 * the new private cloud in. Resource names are schemeless URIs that follow the
53 * conventions in https://cloud.google.com/apis/design/resource_names. For
54 * example: `projects/my-project/locations/us-central1-a`
55 * @param PrivateCloud $postBody
56 * @param array $optParams Optional parameters.
57 *
58 * @opt_param string privateCloudId Required. The user-provided identifier of
59 * the private cloud to be created. This identifier must be unique among each
60 * `PrivateCloud` within the parent and becomes the final token in the name URI.
61 * The identifier must meet the following requirements: * Only contains 1-63
62 * alphanumeric characters and hyphens * Begins with an alphabetical character *
63 * Ends with a non-hyphen character * Not formatted as a UUID * Complies with
64 * [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
65 * @opt_param string requestId Optional. The request ID must be a valid UUID
66 * with the exception that zero UUID is not supported
67 * (00000000-0000-0000-0000-000000000000).
68 * @opt_param bool validateOnly Optional. True if you want the request to be
69 * validated and not executed; false otherwise.
70 * @return Operation
71 * @throws \Google\Service\Exception
72 */
73 public function create($parent, PrivateCloud $postBody, $optParams = [])
74 {
75 $params = ['parent' => $parent, 'postBody' => $postBody];
76 $params = array_merge($params, $optParams);
77 return $this->call('create', [$params], Operation::class);
78 }
79 /**
80 * Schedules a `PrivateCloud` resource for deletion. A `PrivateCloud` resource
81 * scheduled for deletion has `PrivateCloud.state` set to `DELETED` and
82 * `expireTime` set to the time when deletion is final and can no longer be
83 * reversed. The delete operation is marked as done as soon as the
84 * `PrivateCloud` is successfully scheduled for deletion (this also applies when
85 * `delayHours` is set to zero), and the operation is not kept in pending state
86 * until `PrivateCloud` is purged. `PrivateCloud` can be restored using
87 * `UndeletePrivateCloud` method before the `expireTime` elapses. When
88 * `expireTime` is reached, deletion is final and all private cloud resources
89 * are irreversibly removed and billing stops. During the final removal process,
90 * `PrivateCloud.state` is set to `PURGING`. `PrivateCloud` can be polled using
91 * standard `GET` method for the whole period of deletion and purging. It will
92 * not be returned only when it is completely purged. (privateClouds.delete)
93 *
94 * @param string $name Required. The resource name of the private cloud to
95 * delete. Resource names are schemeless URIs that follow the conventions in
96 * https://cloud.google.com/apis/design/resource_names. For example:
97 * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
98 * @param array $optParams Optional parameters.
99 *
100 * @opt_param int delayHours Optional. Time delay of the deletion specified in
101 * hours. The default value is `3`. Specifying a non-zero value for this field
102 * changes the value of `PrivateCloud.state` to `DELETED` and sets `expire_time`
103 * to the planned deletion time. Deletion can be cancelled before `expire_time`
104 * elapses using VmwareEngine.UndeletePrivateCloud. Specifying a value of `0`
105 * for this field instead begins the deletion process and ceases billing
106 * immediately. During the final deletion process, the value of
107 * `PrivateCloud.state` becomes `PURGING`.
108 * @opt_param bool force Optional. If set to true, cascade delete is enabled and
109 * all children of this private cloud resource are also deleted. When this flag
110 * is set to false, the private cloud will not be deleted if there are any
111 * children other than the management cluster. The management cluster is always
112 * deleted.
113 * @opt_param string requestId Optional. The request ID must be a valid UUID
114 * with the exception that zero UUID is not supported
115 * (00000000-0000-0000-0000-000000000000).
116 * @return Operation
117 * @throws \Google\Service\Exception
118 */
119 public function delete($name, $optParams = [])
120 {
121 $params = ['name' => $name];
122 $params = array_merge($params, $optParams);
123 return $this->call('delete', [$params], Operation::class);
124 }
125 /**
126 * Retrieves a `PrivateCloud` resource by its resource name. (privateClouds.get)
127 *
128 * @param string $name Required. The resource name of the private cloud to
129 * retrieve. Resource names are schemeless URIs that follow the conventions in
130 * https://cloud.google.com/apis/design/resource_names. For example:
131 * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
132 * @param array $optParams Optional parameters.
133 * @return PrivateCloud
134 * @throws \Google\Service\Exception
135 */
136 public function get($name, $optParams = [])
137 {
138 $params = ['name' => $name];
139 $params = array_merge($params, $optParams);
140 return $this->call('get', [$params], PrivateCloud::class);
141 }
142 /**
143 * Gets details of the `DnsForwarding` config. (privateClouds.getDnsForwarding)
144 *
145 * @param string $name Required. The resource name of a `DnsForwarding` to
146 * retrieve. Resource names are schemeless URIs that follow the conventions in
147 * https://cloud.google.com/apis/design/resource_names. For example:
148 * `projects/my-project/locations/us-central1-a/privateClouds/my-
149 * cloud/dnsForwarding`
150 * @param array $optParams Optional parameters.
151 * @return DnsForwarding
152 * @throws \Google\Service\Exception
153 */
154 public function getDnsForwarding($name, $optParams = [])
155 {
156 $params = ['name' => $name];
157 $params = array_merge($params, $optParams);
158 return $this->call('getDnsForwarding', [$params], DnsForwarding::class);
159 }
160 /**
161 * Gets the access control policy for a resource. Returns an empty policy if the
162 * resource exists and does not have a policy set. (privateClouds.getIamPolicy)
163 *
164 * @param string $resource REQUIRED: The resource for which the policy is being
165 * requested. See [Resource
166 * names](https://cloud.google.com/apis/design/resource_names) for the
167 * appropriate value for this field.
168 * @param array $optParams Optional parameters.
169 *
170 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
171 * version that will be used to format the policy. Valid values are 0, 1, and 3.
172 * Requests specifying an invalid value will be rejected. Requests for policies
173 * with any conditional role bindings must specify version 3. Policies with no
174 * conditional role bindings may specify any valid value or leave the field
175 * unset. The policy in the response might use the policy version that you
176 * specified, or it might use a lower policy version. For example, if you
177 * specify version 3, but the policy has no conditional role bindings, the
178 * response uses version 1. To learn which resources support conditions in their
179 * IAM policies, see the [IAM
180 * documentation](https://cloud.google.com/iam/help/conditions/resource-
181 * policies).
182 * @return Policy
183 * @throws \Google\Service\Exception
184 */
185 public function getIamPolicy($resource, $optParams = [])
186 {
187 $params = ['resource' => $resource];
188 $params = array_merge($params, $optParams);
189 return $this->call('getIamPolicy', [$params], Policy::class);
190 }
191 /**
192 * Lists `PrivateCloud` resources in a given project and location.
193 * (privateClouds.listProjectsLocationsPrivateClouds)
194 *
195 * @param string $parent Required. The resource name of the private cloud to be
196 * queried for clusters. Resource names are schemeless URIs that follow the
197 * conventions in https://cloud.google.com/apis/design/resource_names. For
198 * example: `projects/my-project/locations/us-central1-a`
199 * @param array $optParams Optional parameters.
200 *
201 * @opt_param string filter A filter expression that matches resources returned
202 * in the response. The expression must specify the field name, a comparison
203 * operator, and the value that you want to use for filtering. The value must be
204 * a string, a number, or a boolean. The comparison operator must be `=`, `!=`,
205 * `>`, or `<`. For example, if you are filtering a list of private clouds, you
206 * can exclude the ones named `example-pc` by specifying `name != "example-pc"`.
207 * You can also filter nested fields. For example, you could specify
208 * `networkConfig.managementCidr = "192.168.0.0/24"` to include private clouds
209 * only if they have a matching address in their network configuration. To
210 * filter on multiple expressions, provide each separate expression within
211 * parentheses. For example: ``` (name = "example-pc") (createTime >
212 * "2021-04-12T08:15:10.40Z") ``` By default, each expression is an `AND`
213 * expression. However, you can include `AND` and `OR` expressions explicitly.
214 * For example: ``` (name = "private-cloud-1") AND (createTime >
215 * "2021-04-12T08:15:10.40Z") OR (name = "private-cloud-2") ```
216 * @opt_param string orderBy Sorts list results by a certain order. By default,
217 * returned results are ordered by `name` in ascending order. You can also sort
218 * results in descending order based on the `name` value using `orderBy="name
219 * desc"`. Currently, only ordering by `name` is supported.
220 * @opt_param int pageSize The maximum number of private clouds to return in one
221 * page. The service may return fewer than this value. The maximum value is
222 * coerced to 1000. The default value of this field is 500.
223 * @opt_param string pageToken A page token, received from a previous
224 * `ListPrivateClouds` call. Provide this to retrieve the subsequent page. When
225 * paginating, all other parameters provided to `ListPrivateClouds` must match
226 * the call that provided the page token.
227 * @return ListPrivateCloudsResponse
228 * @throws \Google\Service\Exception
229 */
230 public function listProjectsLocationsPrivateClouds($parent, $optParams = [])
231 {
232 $params = ['parent' => $parent];
233 $params = array_merge($params, $optParams);
234 return $this->call('list', [$params], ListPrivateCloudsResponse::class);
235 }
236 /**
237 * Modifies a `PrivateCloud` resource. Only the following fields can be updated:
238 * `description`. Only fields specified in `updateMask` are applied. During
239 * operation processing, the resource is temporarily in the `ACTIVE` state
240 * before the operation fully completes. For that period of time, you can't
241 * update the resource. Use the operation status to determine when the
242 * processing fully completes. (privateClouds.patch)
243 *
244 * @param string $name Output only. Identifier. The resource name of this
245 * private cloud. Resource names are schemeless URIs that follow the conventions
246 * in https://cloud.google.com/apis/design/resource_names. For example:
247 * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
248 * @param PrivateCloud $postBody
249 * @param array $optParams Optional parameters.
250 *
251 * @opt_param string requestId Optional. The request ID must be a valid UUID
252 * with the exception that zero UUID is not supported
253 * (00000000-0000-0000-0000-000000000000).
254 * @opt_param string updateMask Required. Field mask is used to specify the
255 * fields to be overwritten in the `PrivateCloud` resource by the update. The
256 * fields specified in `updateMask` are relative to the resource, not the full
257 * request. A field will be overwritten if it is in the mask. If the user does
258 * not provide a mask then all fields will be overwritten.
259 * @return Operation
260 * @throws \Google\Service\Exception
261 */
262 public function patch($name, PrivateCloud $postBody, $optParams = [])
263 {
264 $params = ['name' => $name, 'postBody' => $postBody];
265 $params = array_merge($params, $optParams);
266 return $this->call('patch', [$params], Operation::class);
267 }
268 /**
269 * Resets credentials of the NSX appliance. (privateClouds.resetNsxCredentials)
270 *
271 * @param string $privateCloud Required. The resource name of the private cloud
272 * to reset credentials for. Resource names are schemeless URIs that follow the
273 * conventions in https://cloud.google.com/apis/design/resource_names. For
274 * example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
275 * @param ResetNsxCredentialsRequest $postBody
276 * @param array $optParams Optional parameters.
277 * @return Operation
278 * @throws \Google\Service\Exception
279 */
280 public function resetNsxCredentials($privateCloud, ResetNsxCredentialsRequest $postBody, $optParams = [])
281 {
282 $params = ['privateCloud' => $privateCloud, 'postBody' => $postBody];
283 $params = array_merge($params, $optParams);
284 return $this->call('resetNsxCredentials', [$params], Operation::class);
285 }
286 /**
287 * Resets credentials of the Vcenter appliance.
288 * (privateClouds.resetVcenterCredentials)
289 *
290 * @param string $privateCloud Required. The resource name of the private cloud
291 * to reset credentials for. Resource names are schemeless URIs that follow the
292 * conventions in https://cloud.google.com/apis/design/resource_names. For
293 * example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
294 * @param ResetVcenterCredentialsRequest $postBody
295 * @param array $optParams Optional parameters.
296 * @return Operation
297 * @throws \Google\Service\Exception
298 */
299 public function resetVcenterCredentials($privateCloud, ResetVcenterCredentialsRequest $postBody, $optParams = [])
300 {
301 $params = ['privateCloud' => $privateCloud, 'postBody' => $postBody];
302 $params = array_merge($params, $optParams);
303 return $this->call('resetVcenterCredentials', [$params], Operation::class);
304 }
305 /**
306 * Sets the access control policy on the specified resource. Replaces any
307 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
308 * `PERMISSION_DENIED` errors. (privateClouds.setIamPolicy)
309 *
310 * @param string $resource REQUIRED: The resource for which the policy is being
311 * specified. See [Resource
312 * names](https://cloud.google.com/apis/design/resource_names) for the
313 * appropriate value for this field.
314 * @param SetIamPolicyRequest $postBody
315 * @param array $optParams Optional parameters.
316 * @return Policy
317 * @throws \Google\Service\Exception
318 */
319 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
320 {
321 $params = ['resource' => $resource, 'postBody' => $postBody];
322 $params = array_merge($params, $optParams);
323 return $this->call('setIamPolicy', [$params], Policy::class);
324 }
325 /**
326 * Gets details of credentials for NSX appliance.
327 * (privateClouds.showNsxCredentials)
328 *
329 * @param string $privateCloud Required. The resource name of the private cloud
330 * to be queried for credentials. Resource names are schemeless URIs that follow
331 * the conventions in https://cloud.google.com/apis/design/resource_names. For
332 * example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
333 * @param array $optParams Optional parameters.
334 * @return Credentials
335 * @throws \Google\Service\Exception
336 */
337 public function showNsxCredentials($privateCloud, $optParams = [])
338 {
339 $params = ['privateCloud' => $privateCloud];
340 $params = array_merge($params, $optParams);
341 return $this->call('showNsxCredentials', [$params], Credentials::class);
342 }
343 /**
344 * Gets details of credentials for Vcenter appliance.
345 * (privateClouds.showVcenterCredentials)
346 *
347 * @param string $privateCloud Required. The resource name of the private cloud
348 * to be queried for credentials. Resource names are schemeless URIs that follow
349 * the conventions in https://cloud.google.com/apis/design/resource_names. For
350 * example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
351 * @param array $optParams Optional parameters.
352 *
353 * @opt_param string username Optional. The username of the user to be queried
354 * for credentials. The default value of this field is CloudOwner@gve.local. The
355 * provided value must be one of the following: CloudOwner@gve.local, solution-
356 * user-01@gve.local, solution-user-02@gve.local, solution-user-03@gve.local,
357 * solution-user-04@gve.local, solution-user-05@gve.local, zertoadmin@gve.local.
358 * @return Credentials
359 * @throws \Google\Service\Exception
360 */
361 public function showVcenterCredentials($privateCloud, $optParams = [])
362 {
363 $params = ['privateCloud' => $privateCloud];
364 $params = array_merge($params, $optParams);
365 return $this->call('showVcenterCredentials', [$params], Credentials::class);
366 }
367 /**
368 * Returns permissions that a caller has on the specified resource. If the
369 * resource does not exist, this will return an empty set of permissions, not a
370 * `NOT_FOUND` error. Note: This operation is designed to be used for building
371 * permission-aware UIs and command-line tools, not for authorization checking.
372 * This operation may "fail open" without warning.
373 * (privateClouds.testIamPermissions)
374 *
375 * @param string $resource REQUIRED: The resource for which the policy detail is
376 * being requested. See [Resource
377 * names](https://cloud.google.com/apis/design/resource_names) for the
378 * appropriate value for this field.
379 * @param TestIamPermissionsRequest $postBody
380 * @param array $optParams Optional parameters.
381 * @return TestIamPermissionsResponse
382 * @throws \Google\Service\Exception
383 */
384 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
385 {
386 $params = ['resource' => $resource, 'postBody' => $postBody];
387 $params = array_merge($params, $optParams);
388 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
389 }
390 /**
391 * Restores a private cloud that was previously scheduled for deletion by
392 * `DeletePrivateCloud`. A `PrivateCloud` resource scheduled for deletion has
393 * `PrivateCloud.state` set to `DELETED` and `PrivateCloud.expireTime` set to
394 * the time when deletion can no longer be reversed. (privateClouds.undelete)
395 *
396 * @param string $name Required. The resource name of the private cloud
397 * scheduled for deletion. Resource names are schemeless URIs that follow the
398 * conventions in https://cloud.google.com/apis/design/resource_names. For
399 * example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
400 * @param UndeletePrivateCloudRequest $postBody
401 * @param array $optParams Optional parameters.
402 * @return Operation
403 * @throws \Google\Service\Exception
404 */
405 public function undelete($name, UndeletePrivateCloudRequest $postBody, $optParams = [])
406 {
407 $params = ['name' => $name, 'postBody' => $postBody];
408 $params = array_merge($params, $optParams);
409 return $this->call('undelete', [$params], Operation::class);
410 }
411 /**
412 * Updates the parameters of the `DnsForwarding` config, like associated
413 * domains. Only fields specified in `update_mask` are applied.
414 * (privateClouds.updateDnsForwarding)
415 *
416 * @param string $name Output only. Identifier. The resource name of this DNS
417 * profile. Resource names are schemeless URIs that follow the conventions in
418 * https://cloud.google.com/apis/design/resource_names. For example:
419 * `projects/my-project/locations/us-central1-a/privateClouds/my-
420 * cloud/dnsForwarding`
421 * @param DnsForwarding $postBody
422 * @param array $optParams Optional parameters.
423 *
424 * @opt_param string requestId Optional. A request ID to identify requests.
425 * Specify a unique request ID so that if you must retry your request, the
426 * server will know to ignore the request if it has already been completed. The
427 * server guarantees that a request doesn't result in creation of duplicate
428 * commitments for at least 60 minutes. For example, consider a situation where
429 * you make an initial request and the request times out. If you make the
430 * request again with the same request ID, the server can check if original
431 * operation with the same request ID was received, and if so, will ignore the
432 * second request. This prevents clients from accidentally creating duplicate
433 * commitments. The request ID must be a valid UUID with the exception that zero
434 * UUID is not supported (00000000-0000-0000-0000-000000000000).
435 * @opt_param string updateMask Required. Field mask is used to specify the
436 * fields to be overwritten in the `DnsForwarding` resource by the update. The
437 * fields specified in the `update_mask` are relative to the resource, not the
438 * full request. A field will be overwritten if it is in the mask. If the user
439 * does not provide a mask then all fields will be overwritten.
440 * @return Operation
441 * @throws \Google\Service\Exception
442 */
443 public function updateDnsForwarding($name, DnsForwarding $postBody, $optParams = [])
444 {
445 $params = ['name' => $name, 'postBody' => $postBody];
446 $params = array_merge($params, $optParams);
447 return $this->call('updateDnsForwarding', [$params], Operation::class);
448 }
449}
450
451// Adding a class alias for backwards compatibility with the previous class name.
452class_alias(ProjectsLocationsPrivateClouds::class, 'Google_Service_VMwareEngine_Resource_ProjectsLocationsPrivateClouds');
Note: See TracBrowser for help on using the repository browser.