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\VMwareEngine\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\VMwareEngine\ListManagementDnsZoneBindingsResponse;
|
---|
21 | use Google\Service\VMwareEngine\ManagementDnsZoneBinding;
|
---|
22 | use Google\Service\VMwareEngine\Operation;
|
---|
23 | use Google\Service\VMwareEngine\RepairManagementDnsZoneBindingRequest;
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * The "managementDnsZoneBindings" collection of methods.
|
---|
27 | * Typical usage is:
|
---|
28 | * <code>
|
---|
29 | * $vmwareengineService = new Google\Service\VMwareEngine(...);
|
---|
30 | * $managementDnsZoneBindings = $vmwareengineService->projects_locations_privateClouds_managementDnsZoneBindings;
|
---|
31 | * </code>
|
---|
32 | */
|
---|
33 | class ProjectsLocationsPrivateCloudsManagementDnsZoneBindings extends \Google\Service\Resource
|
---|
34 | {
|
---|
35 | /**
|
---|
36 | * Creates a new `ManagementDnsZoneBinding` resource in a private cloud. This
|
---|
37 | * RPC creates the DNS binding and the resource that represents the DNS binding
|
---|
38 | * of the consumer VPC network to the management DNS zone. A management DNS zone
|
---|
39 | * is the Cloud DNS cross-project binding zone that VMware Engine creates for
|
---|
40 | * each private cloud. It contains FQDNs and corresponding IP addresses for the
|
---|
41 | * private cloud's ESXi hosts and management VM appliances like vCenter and NSX
|
---|
42 | * Manager. (managementDnsZoneBindings.create)
|
---|
43 | *
|
---|
44 | * @param string $parent Required. The resource name of the private cloud to
|
---|
45 | * create a new management DNS zone binding for. Resource names are schemeless
|
---|
46 | * URIs that follow the conventions in
|
---|
47 | * https://cloud.google.com/apis/design/resource_names. For example:
|
---|
48 | * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
|
---|
49 | * @param ManagementDnsZoneBinding $postBody
|
---|
50 | * @param array $optParams Optional parameters.
|
---|
51 | *
|
---|
52 | * @opt_param string managementDnsZoneBindingId Required. The user-provided
|
---|
53 | * identifier of the `ManagementDnsZoneBinding` resource to be created. This
|
---|
54 | * identifier must be unique among `ManagementDnsZoneBinding` resources within
|
---|
55 | * the parent and becomes the final token in the name URI. The identifier must
|
---|
56 | * meet the following requirements: * Only contains 1-63 alphanumeric characters
|
---|
57 | * and hyphens * Begins with an alphabetical character * Ends with a non-hyphen
|
---|
58 | * character * Not formatted as a UUID * Complies with [RFC
|
---|
59 | * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
|
---|
60 | * @opt_param string requestId Optional. A request ID to identify requests.
|
---|
61 | * Specify a unique request ID so that if you must retry your request, the
|
---|
62 | * server will know to ignore the request if it has already been completed. The
|
---|
63 | * server guarantees that a request doesn't result in creation of duplicate
|
---|
64 | * commitments for at least 60 minutes. For example, consider a situation where
|
---|
65 | * you make an initial request and the request times out. If you make the
|
---|
66 | * request again with the same request ID, the server can check if the original
|
---|
67 | * operation with the same request ID was received, and if so, will ignore the
|
---|
68 | * second request. This prevents clients from accidentally creating duplicate
|
---|
69 | * commitments. The request ID must be a valid UUID with the exception that zero
|
---|
70 | * UUID is not supported (00000000-0000-0000-0000-000000000000).
|
---|
71 | * @return Operation
|
---|
72 | * @throws \Google\Service\Exception
|
---|
73 | */
|
---|
74 | public function create($parent, ManagementDnsZoneBinding $postBody, $optParams = [])
|
---|
75 | {
|
---|
76 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
77 | $params = array_merge($params, $optParams);
|
---|
78 | return $this->call('create', [$params], Operation::class);
|
---|
79 | }
|
---|
80 | /**
|
---|
81 | * Deletes a `ManagementDnsZoneBinding` resource. When a management DNS zone
|
---|
82 | * binding is deleted, the corresponding consumer VPC network is no longer bound
|
---|
83 | * to the management DNS zone. (managementDnsZoneBindings.delete)
|
---|
84 | *
|
---|
85 | * @param string $name Required. The resource name of the management DNS zone
|
---|
86 | * binding to delete. Resource names are schemeless URIs that follow the
|
---|
87 | * conventions in https://cloud.google.com/apis/design/resource_names. For
|
---|
88 | * example: `projects/my-project/locations/us-central1-a/privateClouds/my-
|
---|
89 | * cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
|
---|
90 | * @param array $optParams Optional parameters.
|
---|
91 | *
|
---|
92 | * @opt_param string requestId Optional. A request ID to identify requests.
|
---|
93 | * Specify a unique request ID so that if you must retry your request, the
|
---|
94 | * server will know to ignore the request if it has already been completed. The
|
---|
95 | * server guarantees that a request doesn't result in creation of duplicate
|
---|
96 | * commitments for at least 60 minutes. For example, consider a situation where
|
---|
97 | * you make an initial request and the request times out. If you make the
|
---|
98 | * request again with the same request ID, the server can check if the original
|
---|
99 | * operation with the same request ID was received, and if so, will ignore the
|
---|
100 | * second request. This prevents clients from accidentally creating duplicate
|
---|
101 | * commitments. The request ID must be a valid UUID with the exception that zero
|
---|
102 | * UUID is not supported (00000000-0000-0000-0000-000000000000).
|
---|
103 | * @return Operation
|
---|
104 | * @throws \Google\Service\Exception
|
---|
105 | */
|
---|
106 | public function delete($name, $optParams = [])
|
---|
107 | {
|
---|
108 | $params = ['name' => $name];
|
---|
109 | $params = array_merge($params, $optParams);
|
---|
110 | return $this->call('delete', [$params], Operation::class);
|
---|
111 | }
|
---|
112 | /**
|
---|
113 | * Retrieves a 'ManagementDnsZoneBinding' resource by its resource name.
|
---|
114 | * (managementDnsZoneBindings.get)
|
---|
115 | *
|
---|
116 | * @param string $name Required. The resource name of the management DNS zone
|
---|
117 | * binding to retrieve. Resource names are schemeless URIs that follow the
|
---|
118 | * conventions in https://cloud.google.com/apis/design/resource_names. For
|
---|
119 | * example: `projects/my-project/locations/us-central1-a/privateClouds/my-
|
---|
120 | * cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
|
---|
121 | * @param array $optParams Optional parameters.
|
---|
122 | * @return ManagementDnsZoneBinding
|
---|
123 | * @throws \Google\Service\Exception
|
---|
124 | */
|
---|
125 | public function get($name, $optParams = [])
|
---|
126 | {
|
---|
127 | $params = ['name' => $name];
|
---|
128 | $params = array_merge($params, $optParams);
|
---|
129 | return $this->call('get', [$params], ManagementDnsZoneBinding::class);
|
---|
130 | }
|
---|
131 | /**
|
---|
132 | * Lists Consumer VPCs bound to Management DNS Zone of a given private cloud. (m
|
---|
133 | * anagementDnsZoneBindings.listProjectsLocationsPrivateCloudsManagementDnsZoneB
|
---|
134 | * indings)
|
---|
135 | *
|
---|
136 | * @param string $parent Required. The resource name of the private cloud to be
|
---|
137 | * queried for management DNS zone bindings. Resource names are schemeless URIs
|
---|
138 | * that follow the conventions in
|
---|
139 | * https://cloud.google.com/apis/design/resource_names. For example:
|
---|
140 | * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
|
---|
141 | * @param array $optParams Optional parameters.
|
---|
142 | *
|
---|
143 | * @opt_param string filter A filter expression that matches resources returned
|
---|
144 | * in the response. The expression must specify the field name, a comparison
|
---|
145 | * operator, and the value that you want to use for filtering. The value must be
|
---|
146 | * a string, a number, or a boolean. The comparison operator must be `=`, `!=`,
|
---|
147 | * `>`, or `<`. For example, if you are filtering a list of Management DNS Zone
|
---|
148 | * Bindings, you can exclude the ones named `example-management-dns-zone-
|
---|
149 | * binding` by specifying `name != "example-management-dns-zone-binding"`. To
|
---|
150 | * filter on multiple expressions, provide each separate expression within
|
---|
151 | * parentheses. For example: ``` (name = "example-management-dns-zone-binding")
|
---|
152 | * (createTime > "2021-04-12T08:15:10.40Z") ``` By default, each expression is
|
---|
153 | * an `AND` expression. However, you can include `AND` and `OR` expressions
|
---|
154 | * explicitly. For example: ``` (name = "example-management-dns-zone-binding-1")
|
---|
155 | * AND (createTime > "2021-04-12T08:15:10.40Z") OR (name = "example-management-
|
---|
156 | * dns-zone-binding-2") ```
|
---|
157 | * @opt_param string orderBy Sorts list results by a certain order. By default,
|
---|
158 | * returned results are ordered by `name` in ascending order. You can also sort
|
---|
159 | * results in descending order based on the `name` value using `orderBy="name
|
---|
160 | * desc"`. Currently, only ordering by `name` is supported.
|
---|
161 | * @opt_param int pageSize The maximum number of management DNS zone bindings to
|
---|
162 | * return in one page. The service may return fewer than this value. The maximum
|
---|
163 | * value is coerced to 1000. The default value of this field is 500.
|
---|
164 | * @opt_param string pageToken A page token, received from a previous
|
---|
165 | * `ListManagementDnsZoneBindings` call. Provide this to retrieve the subsequent
|
---|
166 | * page. When paginating, all other parameters provided to
|
---|
167 | * `ListManagementDnsZoneBindings` must match the call that provided the page
|
---|
168 | * token.
|
---|
169 | * @return ListManagementDnsZoneBindingsResponse
|
---|
170 | * @throws \Google\Service\Exception
|
---|
171 | */
|
---|
172 | public function listProjectsLocationsPrivateCloudsManagementDnsZoneBindings($parent, $optParams = [])
|
---|
173 | {
|
---|
174 | $params = ['parent' => $parent];
|
---|
175 | $params = array_merge($params, $optParams);
|
---|
176 | return $this->call('list', [$params], ListManagementDnsZoneBindingsResponse::class);
|
---|
177 | }
|
---|
178 | /**
|
---|
179 | * Updates a `ManagementDnsZoneBinding` resource. Only fields specified in
|
---|
180 | * `update_mask` are applied. (managementDnsZoneBindings.patch)
|
---|
181 | *
|
---|
182 | * @param string $name Output only. The resource name of this binding. Resource
|
---|
183 | * names are schemeless URIs that follow the conventions in
|
---|
184 | * https://cloud.google.com/apis/design/resource_names. For example:
|
---|
185 | * `projects/my-project/locations/us-central1-a/privateClouds/my-
|
---|
186 | * cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
|
---|
187 | * @param ManagementDnsZoneBinding $postBody
|
---|
188 | * @param array $optParams Optional parameters.
|
---|
189 | *
|
---|
190 | * @opt_param string requestId Optional. A request ID to identify requests.
|
---|
191 | * Specify a unique request ID so that if you must retry your request, the
|
---|
192 | * server will know to ignore the request if it has already been completed. The
|
---|
193 | * server guarantees that a request doesn't result in creation of duplicate
|
---|
194 | * commitments for at least 60 minutes. For example, consider a situation where
|
---|
195 | * you make an initial request and the request times out. If you make the
|
---|
196 | * request again with the same request ID, the server can check if the original
|
---|
197 | * operation with the same request ID was received, and if so, will ignore the
|
---|
198 | * second request. This prevents clients from accidentally creating duplicate
|
---|
199 | * commitments. The request ID must be a valid UUID with the exception that zero
|
---|
200 | * UUID is not supported (00000000-0000-0000-0000-000000000000).
|
---|
201 | * @opt_param string updateMask Required. Field mask is used to specify the
|
---|
202 | * fields to be overwritten in the `ManagementDnsZoneBinding` resource by the
|
---|
203 | * update. The fields specified in the `update_mask` are relative to the
|
---|
204 | * resource, not the full request. A field will be overwritten if it is in the
|
---|
205 | * mask. If the user does not provide a mask then all fields will be
|
---|
206 | * overwritten.
|
---|
207 | * @return Operation
|
---|
208 | * @throws \Google\Service\Exception
|
---|
209 | */
|
---|
210 | public function patch($name, ManagementDnsZoneBinding $postBody, $optParams = [])
|
---|
211 | {
|
---|
212 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
213 | $params = array_merge($params, $optParams);
|
---|
214 | return $this->call('patch', [$params], Operation::class);
|
---|
215 | }
|
---|
216 | /**
|
---|
217 | * Retries to create a `ManagementDnsZoneBinding` resource that is in failed
|
---|
218 | * state. (managementDnsZoneBindings.repair)
|
---|
219 | *
|
---|
220 | * @param string $name Required. The resource name of the management DNS zone
|
---|
221 | * binding to repair. Resource names are schemeless URIs that follow the
|
---|
222 | * conventions in https://cloud.google.com/apis/design/resource_names. For
|
---|
223 | * example: `projects/my-project/locations/us-central1-a/privateClouds/my-
|
---|
224 | * cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
|
---|
225 | * @param RepairManagementDnsZoneBindingRequest $postBody
|
---|
226 | * @param array $optParams Optional parameters.
|
---|
227 | * @return Operation
|
---|
228 | * @throws \Google\Service\Exception
|
---|
229 | */
|
---|
230 | public function repair($name, RepairManagementDnsZoneBindingRequest $postBody, $optParams = [])
|
---|
231 | {
|
---|
232 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
233 | $params = array_merge($params, $optParams);
|
---|
234 | return $this->call('repair', [$params], Operation::class);
|
---|
235 | }
|
---|
236 | }
|
---|
237 |
|
---|
238 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
239 | class_alias(ProjectsLocationsPrivateCloudsManagementDnsZoneBindings::class, 'Google_Service_VMwareEngine_Resource_ProjectsLocationsPrivateCloudsManagementDnsZoneBindings');
|
---|