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\DiskMoveRequest;
|
---|
21 | use Google\Service\Compute\InstanceMoveRequest;
|
---|
22 | use Google\Service\Compute\Metadata;
|
---|
23 | use Google\Service\Compute\Operation;
|
---|
24 | use Google\Service\Compute\Project;
|
---|
25 | use Google\Service\Compute\ProjectsDisableXpnResourceRequest;
|
---|
26 | use Google\Service\Compute\ProjectsEnableXpnResourceRequest;
|
---|
27 | use Google\Service\Compute\ProjectsGetXpnResources;
|
---|
28 | use Google\Service\Compute\ProjectsListXpnHostsRequest;
|
---|
29 | use Google\Service\Compute\ProjectsSetCloudArmorTierRequest;
|
---|
30 | use Google\Service\Compute\ProjectsSetDefaultNetworkTierRequest;
|
---|
31 | use Google\Service\Compute\UsageExportLocation;
|
---|
32 | use Google\Service\Compute\XpnHostList;
|
---|
33 |
|
---|
34 | /**
|
---|
35 | * The "projects" collection of methods.
|
---|
36 | * Typical usage is:
|
---|
37 | * <code>
|
---|
38 | * $computeService = new Google\Service\Compute(...);
|
---|
39 | * $projects = $computeService->projects;
|
---|
40 | * </code>
|
---|
41 | */
|
---|
42 | class Projects extends \Google\Service\Resource
|
---|
43 | {
|
---|
44 | /**
|
---|
45 | * Disable this project as a shared VPC host project. (projects.disableXpnHost)
|
---|
46 | *
|
---|
47 | * @param string $project Project ID for this request.
|
---|
48 | * @param array $optParams Optional parameters.
|
---|
49 | *
|
---|
50 | * @opt_param string requestId An optional request ID to identify requests.
|
---|
51 | * Specify a unique request ID so that if you must retry your request, the
|
---|
52 | * server will know to ignore the request if it has already been completed. For
|
---|
53 | * example, consider a situation where you make an initial request and the
|
---|
54 | * request times out. If you make the request again with the same request ID,
|
---|
55 | * the server can check if original operation with the same request ID was
|
---|
56 | * received, and if so, will ignore the second request. This prevents clients
|
---|
57 | * from accidentally creating duplicate commitments. The request ID must be a
|
---|
58 | * valid UUID with the exception that zero UUID is not supported (
|
---|
59 | * 00000000-0000-0000-0000-000000000000).
|
---|
60 | * @return Operation
|
---|
61 | * @throws \Google\Service\Exception
|
---|
62 | */
|
---|
63 | public function disableXpnHost($project, $optParams = [])
|
---|
64 | {
|
---|
65 | $params = ['project' => $project];
|
---|
66 | $params = array_merge($params, $optParams);
|
---|
67 | return $this->call('disableXpnHost', [$params], Operation::class);
|
---|
68 | }
|
---|
69 | /**
|
---|
70 | * Disable a service resource (also known as service project) associated with
|
---|
71 | * this host project. (projects.disableXpnResource)
|
---|
72 | *
|
---|
73 | * @param string $project Project ID for this request.
|
---|
74 | * @param ProjectsDisableXpnResourceRequest $postBody
|
---|
75 | * @param array $optParams Optional parameters.
|
---|
76 | *
|
---|
77 | * @opt_param string requestId An optional request ID to identify requests.
|
---|
78 | * Specify a unique request ID so that if you must retry your request, the
|
---|
79 | * server will know to ignore the request if it has already been completed. For
|
---|
80 | * example, consider a situation where you make an initial request and the
|
---|
81 | * request times out. If you make the request again with the same request ID,
|
---|
82 | * the server can check if original operation with the same request ID was
|
---|
83 | * received, and if so, will ignore the second request. This prevents clients
|
---|
84 | * from accidentally creating duplicate commitments. The request ID must be a
|
---|
85 | * valid UUID with the exception that zero UUID is not supported (
|
---|
86 | * 00000000-0000-0000-0000-000000000000).
|
---|
87 | * @return Operation
|
---|
88 | * @throws \Google\Service\Exception
|
---|
89 | */
|
---|
90 | public function disableXpnResource($project, ProjectsDisableXpnResourceRequest $postBody, $optParams = [])
|
---|
91 | {
|
---|
92 | $params = ['project' => $project, 'postBody' => $postBody];
|
---|
93 | $params = array_merge($params, $optParams);
|
---|
94 | return $this->call('disableXpnResource', [$params], Operation::class);
|
---|
95 | }
|
---|
96 | /**
|
---|
97 | * Enable this project as a shared VPC host project. (projects.enableXpnHost)
|
---|
98 | *
|
---|
99 | * @param string $project Project ID for this request.
|
---|
100 | * @param array $optParams Optional parameters.
|
---|
101 | *
|
---|
102 | * @opt_param string requestId An optional request ID to identify requests.
|
---|
103 | * Specify a unique request ID so that if you must retry your request, the
|
---|
104 | * server will know to ignore the request if it has already been completed. For
|
---|
105 | * example, consider a situation where you make an initial request and the
|
---|
106 | * request times out. If you make the request again with the same request ID,
|
---|
107 | * the server can check if original operation with the same request ID was
|
---|
108 | * received, and if so, will ignore the second request. This prevents clients
|
---|
109 | * from accidentally creating duplicate commitments. The request ID must be a
|
---|
110 | * valid UUID with the exception that zero UUID is not supported (
|
---|
111 | * 00000000-0000-0000-0000-000000000000).
|
---|
112 | * @return Operation
|
---|
113 | * @throws \Google\Service\Exception
|
---|
114 | */
|
---|
115 | public function enableXpnHost($project, $optParams = [])
|
---|
116 | {
|
---|
117 | $params = ['project' => $project];
|
---|
118 | $params = array_merge($params, $optParams);
|
---|
119 | return $this->call('enableXpnHost', [$params], Operation::class);
|
---|
120 | }
|
---|
121 | /**
|
---|
122 | * Enable service resource (a.k.a service project) for a host project, so that
|
---|
123 | * subnets in the host project can be used by instances in the service project.
|
---|
124 | * (projects.enableXpnResource)
|
---|
125 | *
|
---|
126 | * @param string $project Project ID for this request.
|
---|
127 | * @param ProjectsEnableXpnResourceRequest $postBody
|
---|
128 | * @param array $optParams Optional parameters.
|
---|
129 | *
|
---|
130 | * @opt_param string requestId An optional request ID to identify requests.
|
---|
131 | * Specify a unique request ID so that if you must retry your request, the
|
---|
132 | * server will know to ignore the request if it has already been completed. For
|
---|
133 | * example, consider a situation where you make an initial request and the
|
---|
134 | * request times out. If you make the request again with the same request ID,
|
---|
135 | * the server can check if original operation with the same request ID was
|
---|
136 | * received, and if so, will ignore the second request. This prevents clients
|
---|
137 | * from accidentally creating duplicate commitments. The request ID must be a
|
---|
138 | * valid UUID with the exception that zero UUID is not supported (
|
---|
139 | * 00000000-0000-0000-0000-000000000000).
|
---|
140 | * @return Operation
|
---|
141 | * @throws \Google\Service\Exception
|
---|
142 | */
|
---|
143 | public function enableXpnResource($project, ProjectsEnableXpnResourceRequest $postBody, $optParams = [])
|
---|
144 | {
|
---|
145 | $params = ['project' => $project, 'postBody' => $postBody];
|
---|
146 | $params = array_merge($params, $optParams);
|
---|
147 | return $this->call('enableXpnResource', [$params], Operation::class);
|
---|
148 | }
|
---|
149 | /**
|
---|
150 | * Returns the specified Project resource. To decrease latency for this method,
|
---|
151 | * you can optionally omit any unneeded information from the response by using a
|
---|
152 | * field mask. This practice is especially recommended for unused quota
|
---|
153 | * information (the `quotas` field). To exclude one or more fields, set your
|
---|
154 | * request's `fields` query parameter to only include the fields you need. For
|
---|
155 | * example, to only include the `id` and `selfLink` fields, add the query
|
---|
156 | * parameter `?fields=id,selfLink` to your request. (projects.get)
|
---|
157 | *
|
---|
158 | * @param string $project Project ID for this request.
|
---|
159 | * @param array $optParams Optional parameters.
|
---|
160 | * @return Project
|
---|
161 | * @throws \Google\Service\Exception
|
---|
162 | */
|
---|
163 | public function get($project, $optParams = [])
|
---|
164 | {
|
---|
165 | $params = ['project' => $project];
|
---|
166 | $params = array_merge($params, $optParams);
|
---|
167 | return $this->call('get', [$params], Project::class);
|
---|
168 | }
|
---|
169 | /**
|
---|
170 | * Gets the shared VPC host project that this project links to. May be empty if
|
---|
171 | * no link exists. (projects.getXpnHost)
|
---|
172 | *
|
---|
173 | * @param string $project Project ID for this request.
|
---|
174 | * @param array $optParams Optional parameters.
|
---|
175 | * @return Project
|
---|
176 | * @throws \Google\Service\Exception
|
---|
177 | */
|
---|
178 | public function getXpnHost($project, $optParams = [])
|
---|
179 | {
|
---|
180 | $params = ['project' => $project];
|
---|
181 | $params = array_merge($params, $optParams);
|
---|
182 | return $this->call('getXpnHost', [$params], Project::class);
|
---|
183 | }
|
---|
184 | /**
|
---|
185 | * Gets service resources (a.k.a service project) associated with this host
|
---|
186 | * project. (projects.getXpnResources)
|
---|
187 | *
|
---|
188 | * @param string $project Project ID for this request.
|
---|
189 | * @param array $optParams Optional parameters.
|
---|
190 | *
|
---|
191 | * @opt_param string filter A filter expression that filters resources listed in
|
---|
192 | * the response. Most Compute resources support two types of filter expressions:
|
---|
193 | * expressions that support regular expressions and expressions that follow API
|
---|
194 | * improvement proposal AIP-160. These two types of filter expressions cannot be
|
---|
195 | * mixed in one request. If you want to use AIP-160, your expression must
|
---|
196 | * specify the field name, an operator, and the value that you want to use for
|
---|
197 | * filtering. The value must be a string, a number, or a boolean. The operator
|
---|
198 | * must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you
|
---|
199 | * are filtering Compute Engine instances, you can exclude instances named
|
---|
200 | * `example-instance` by specifying `name != example-instance`. The `:*`
|
---|
201 | * comparison can be used to test whether a key has been defined. For example,
|
---|
202 | * to find all objects with `owner` label use: ``` labels.owner:* ``` You can
|
---|
203 | * also filter nested fields. For example, you could specify
|
---|
204 | * `scheduling.automaticRestart = false` to include instances only if they are
|
---|
205 | * not scheduled for automatic restarts. You can use filtering on nested fields
|
---|
206 | * to filter based on resource labels. To filter on multiple expressions,
|
---|
207 | * provide each separate expression within parentheses. For example: ```
|
---|
208 | * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By
|
---|
209 | * default, each expression is an `AND` expression. However, you can include
|
---|
210 | * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel
|
---|
211 | * Skylake") OR (cpuPlatform = "Intel Broadwell") AND
|
---|
212 | * (scheduling.automaticRestart = true) ``` If you want to use a regular
|
---|
213 | * expression, use the `eq` (equal) or `ne` (not equal) operator against a
|
---|
214 | * single un-parenthesized expression with or without quotes or against multiple
|
---|
215 | * parenthesized expressions. Examples: `fieldname eq unquoted literal`
|
---|
216 | * `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"`
|
---|
217 | * `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is
|
---|
218 | * interpreted as a regular expression using Google RE2 library syntax. The
|
---|
219 | * literal value must match the entire field. For example, to filter for
|
---|
220 | * instances that do not end with name "instance", you would use `name ne
|
---|
221 | * .*instance`. You cannot combine constraints on multiple fields using regular
|
---|
222 | * expressions.
|
---|
223 | * @opt_param string maxResults The maximum number of results per page that
|
---|
224 | * should be returned. If the number of available results is larger than
|
---|
225 | * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
|
---|
226 | * get the next page of results in subsequent list requests. Acceptable values
|
---|
227 | * are `0` to `500`, inclusive. (Default: `500`)
|
---|
228 | * @opt_param string orderBy Sorts list results by a certain order. By default,
|
---|
229 | * results are returned in alphanumerical order based on the resource name. You
|
---|
230 | * can also sort results in descending order based on the creation timestamp
|
---|
231 | * using `orderBy="creationTimestamp desc"`. This sorts results based on the
|
---|
232 | * `creationTimestamp` field in reverse chronological order (newest result
|
---|
233 | * first). Use this to sort resources like operations so that the newest
|
---|
234 | * operation is returned first. Currently, only sorting by `name` or
|
---|
235 | * `creationTimestamp desc` is supported.
|
---|
236 | * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
|
---|
237 | * the `nextPageToken` returned by a previous list request to get the next page
|
---|
238 | * of results.
|
---|
239 | * @opt_param bool returnPartialSuccess Opt-in for partial success behavior
|
---|
240 | * which provides partial results in case of failure. The default value is
|
---|
241 | * false. For example, when partial success behavior is enabled, aggregatedList
|
---|
242 | * for a single zone scope either returns all resources in the zone or no
|
---|
243 | * resources, with an error code.
|
---|
244 | * @return ProjectsGetXpnResources
|
---|
245 | * @throws \Google\Service\Exception
|
---|
246 | */
|
---|
247 | public function getXpnResources($project, $optParams = [])
|
---|
248 | {
|
---|
249 | $params = ['project' => $project];
|
---|
250 | $params = array_merge($params, $optParams);
|
---|
251 | return $this->call('getXpnResources', [$params], ProjectsGetXpnResources::class);
|
---|
252 | }
|
---|
253 | /**
|
---|
254 | * Lists all shared VPC host projects visible to the user in an organization.
|
---|
255 | * (projects.listXpnHosts)
|
---|
256 | *
|
---|
257 | * @param string $project Project ID for this request.
|
---|
258 | * @param ProjectsListXpnHostsRequest $postBody
|
---|
259 | * @param array $optParams Optional parameters.
|
---|
260 | *
|
---|
261 | * @opt_param string filter A filter expression that filters resources listed in
|
---|
262 | * the response. Most Compute resources support two types of filter expressions:
|
---|
263 | * expressions that support regular expressions and expressions that follow API
|
---|
264 | * improvement proposal AIP-160. These two types of filter expressions cannot be
|
---|
265 | * mixed in one request. If you want to use AIP-160, your expression must
|
---|
266 | * specify the field name, an operator, and the value that you want to use for
|
---|
267 | * filtering. The value must be a string, a number, or a boolean. The operator
|
---|
268 | * must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you
|
---|
269 | * are filtering Compute Engine instances, you can exclude instances named
|
---|
270 | * `example-instance` by specifying `name != example-instance`. The `:*`
|
---|
271 | * comparison can be used to test whether a key has been defined. For example,
|
---|
272 | * to find all objects with `owner` label use: ``` labels.owner:* ``` You can
|
---|
273 | * also filter nested fields. For example, you could specify
|
---|
274 | * `scheduling.automaticRestart = false` to include instances only if they are
|
---|
275 | * not scheduled for automatic restarts. You can use filtering on nested fields
|
---|
276 | * to filter based on resource labels. To filter on multiple expressions,
|
---|
277 | * provide each separate expression within parentheses. For example: ```
|
---|
278 | * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By
|
---|
279 | * default, each expression is an `AND` expression. However, you can include
|
---|
280 | * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel
|
---|
281 | * Skylake") OR (cpuPlatform = "Intel Broadwell") AND
|
---|
282 | * (scheduling.automaticRestart = true) ``` If you want to use a regular
|
---|
283 | * expression, use the `eq` (equal) or `ne` (not equal) operator against a
|
---|
284 | * single un-parenthesized expression with or without quotes or against multiple
|
---|
285 | * parenthesized expressions. Examples: `fieldname eq unquoted literal`
|
---|
286 | * `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"`
|
---|
287 | * `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is
|
---|
288 | * interpreted as a regular expression using Google RE2 library syntax. The
|
---|
289 | * literal value must match the entire field. For example, to filter for
|
---|
290 | * instances that do not end with name "instance", you would use `name ne
|
---|
291 | * .*instance`. You cannot combine constraints on multiple fields using regular
|
---|
292 | * expressions.
|
---|
293 | * @opt_param string maxResults The maximum number of results per page that
|
---|
294 | * should be returned. If the number of available results is larger than
|
---|
295 | * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
|
---|
296 | * get the next page of results in subsequent list requests. Acceptable values
|
---|
297 | * are `0` to `500`, inclusive. (Default: `500`)
|
---|
298 | * @opt_param string orderBy Sorts list results by a certain order. By default,
|
---|
299 | * results are returned in alphanumerical order based on the resource name. You
|
---|
300 | * can also sort results in descending order based on the creation timestamp
|
---|
301 | * using `orderBy="creationTimestamp desc"`. This sorts results based on the
|
---|
302 | * `creationTimestamp` field in reverse chronological order (newest result
|
---|
303 | * first). Use this to sort resources like operations so that the newest
|
---|
304 | * operation is returned first. Currently, only sorting by `name` or
|
---|
305 | * `creationTimestamp desc` is supported.
|
---|
306 | * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
|
---|
307 | * the `nextPageToken` returned by a previous list request to get the next page
|
---|
308 | * of results.
|
---|
309 | * @opt_param bool returnPartialSuccess Opt-in for partial success behavior
|
---|
310 | * which provides partial results in case of failure. The default value is
|
---|
311 | * false. For example, when partial success behavior is enabled, aggregatedList
|
---|
312 | * for a single zone scope either returns all resources in the zone or no
|
---|
313 | * resources, with an error code.
|
---|
314 | * @return XpnHostList
|
---|
315 | * @throws \Google\Service\Exception
|
---|
316 | */
|
---|
317 | public function listXpnHosts($project, ProjectsListXpnHostsRequest $postBody, $optParams = [])
|
---|
318 | {
|
---|
319 | $params = ['project' => $project, 'postBody' => $postBody];
|
---|
320 | $params = array_merge($params, $optParams);
|
---|
321 | return $this->call('listXpnHosts', [$params], XpnHostList::class);
|
---|
322 | }
|
---|
323 | /**
|
---|
324 | * Moves a persistent disk from one zone to another. (projects.moveDisk)
|
---|
325 | *
|
---|
326 | * @param string $project Project ID for this request.
|
---|
327 | * @param DiskMoveRequest $postBody
|
---|
328 | * @param array $optParams Optional parameters.
|
---|
329 | *
|
---|
330 | * @opt_param string requestId An optional request ID to identify requests.
|
---|
331 | * Specify a unique request ID so that if you must retry your request, the
|
---|
332 | * server will know to ignore the request if it has already been completed. For
|
---|
333 | * example, consider a situation where you make an initial request and the
|
---|
334 | * request times out. If you make the request again with the same request ID,
|
---|
335 | * the server can check if original operation with the same request ID was
|
---|
336 | * received, and if so, will ignore the second request. This prevents clients
|
---|
337 | * from accidentally creating duplicate commitments. The request ID must be a
|
---|
338 | * valid UUID with the exception that zero UUID is not supported (
|
---|
339 | * 00000000-0000-0000-0000-000000000000).
|
---|
340 | * @return Operation
|
---|
341 | * @throws \Google\Service\Exception
|
---|
342 | */
|
---|
343 | public function moveDisk($project, DiskMoveRequest $postBody, $optParams = [])
|
---|
344 | {
|
---|
345 | $params = ['project' => $project, 'postBody' => $postBody];
|
---|
346 | $params = array_merge($params, $optParams);
|
---|
347 | return $this->call('moveDisk', [$params], Operation::class);
|
---|
348 | }
|
---|
349 | /**
|
---|
350 | * Moves an instance and its attached persistent disks from one zone to another.
|
---|
351 | * *Note*: Moving VMs or disks by using this method might cause unexpected
|
---|
352 | * behavior. For more information, see the [known
|
---|
353 | * issue](/compute/docs/troubleshooting/known-issues#moving_vms_or_disks_using_t
|
---|
354 | * he_moveinstance_api_or_the_causes_unexpected_behavior). [Deprecated] This
|
---|
355 | * method is deprecated. See [moving instance across
|
---|
356 | * zones](/compute/docs/instances/moving-instance-across-zones) instead.
|
---|
357 | * (projects.moveInstance)
|
---|
358 | *
|
---|
359 | * @param string $project Project ID for this request.
|
---|
360 | * @param InstanceMoveRequest $postBody
|
---|
361 | * @param array $optParams Optional parameters.
|
---|
362 | *
|
---|
363 | * @opt_param string requestId An optional request ID to identify requests.
|
---|
364 | * Specify a unique request ID so that if you must retry your request, the
|
---|
365 | * server will know to ignore the request if it has already been completed. For
|
---|
366 | * example, consider a situation where you make an initial request and the
|
---|
367 | * request times out. If you make the request again with the same request ID,
|
---|
368 | * the server can check if original operation with the same request ID was
|
---|
369 | * received, and if so, will ignore the second request. This prevents clients
|
---|
370 | * from accidentally creating duplicate commitments. The request ID must be a
|
---|
371 | * valid UUID with the exception that zero UUID is not supported (
|
---|
372 | * 00000000-0000-0000-0000-000000000000).
|
---|
373 | * @return Operation
|
---|
374 | * @throws \Google\Service\Exception
|
---|
375 | */
|
---|
376 | public function moveInstance($project, InstanceMoveRequest $postBody, $optParams = [])
|
---|
377 | {
|
---|
378 | $params = ['project' => $project, 'postBody' => $postBody];
|
---|
379 | $params = array_merge($params, $optParams);
|
---|
380 | return $this->call('moveInstance', [$params], Operation::class);
|
---|
381 | }
|
---|
382 | /**
|
---|
383 | * Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the
|
---|
384 | * billing account of the project must be subscribed to Cloud Armor Enterprise.
|
---|
385 | * See Subscribing to Cloud Armor Enterprise for more information.
|
---|
386 | * (projects.setCloudArmorTier)
|
---|
387 | *
|
---|
388 | * @param string $project Project ID for this request.
|
---|
389 | * @param ProjectsSetCloudArmorTierRequest $postBody
|
---|
390 | * @param array $optParams Optional parameters.
|
---|
391 | *
|
---|
392 | * @opt_param string requestId An optional request ID to identify requests.
|
---|
393 | * Specify a unique request ID so that if you must retry your request, the
|
---|
394 | * server will know to ignore the request if it has already been completed. For
|
---|
395 | * example, consider a situation where you make an initial request and the
|
---|
396 | * request times out. If you make the request again with the same request ID,
|
---|
397 | * the server can check if original operation with the same request ID was
|
---|
398 | * received, and if so, will ignore the second request. This prevents clients
|
---|
399 | * from accidentally creating duplicate commitments. The request ID must be a
|
---|
400 | * valid UUID with the exception that zero UUID is not supported (
|
---|
401 | * 00000000-0000-0000-0000-000000000000).
|
---|
402 | * @return Operation
|
---|
403 | * @throws \Google\Service\Exception
|
---|
404 | */
|
---|
405 | public function setCloudArmorTier($project, ProjectsSetCloudArmorTierRequest $postBody, $optParams = [])
|
---|
406 | {
|
---|
407 | $params = ['project' => $project, 'postBody' => $postBody];
|
---|
408 | $params = array_merge($params, $optParams);
|
---|
409 | return $this->call('setCloudArmorTier', [$params], Operation::class);
|
---|
410 | }
|
---|
411 | /**
|
---|
412 | * Sets metadata common to all instances within the specified project using the
|
---|
413 | * data included in the request. (projects.setCommonInstanceMetadata)
|
---|
414 | *
|
---|
415 | * @param string $project Project ID for this request.
|
---|
416 | * @param Metadata $postBody
|
---|
417 | * @param array $optParams Optional parameters.
|
---|
418 | *
|
---|
419 | * @opt_param string requestId An optional request ID to identify requests.
|
---|
420 | * Specify a unique request ID so that if you must retry your request, the
|
---|
421 | * server will know to ignore the request if it has already been completed. For
|
---|
422 | * example, consider a situation where you make an initial request and the
|
---|
423 | * request times out. If you make the request again with the same request ID,
|
---|
424 | * the server can check if original operation with the same request ID was
|
---|
425 | * received, and if so, will ignore the second request. This prevents clients
|
---|
426 | * from accidentally creating duplicate commitments. The request ID must be a
|
---|
427 | * valid UUID with the exception that zero UUID is not supported (
|
---|
428 | * 00000000-0000-0000-0000-000000000000).
|
---|
429 | * @return Operation
|
---|
430 | * @throws \Google\Service\Exception
|
---|
431 | */
|
---|
432 | public function setCommonInstanceMetadata($project, Metadata $postBody, $optParams = [])
|
---|
433 | {
|
---|
434 | $params = ['project' => $project, 'postBody' => $postBody];
|
---|
435 | $params = array_merge($params, $optParams);
|
---|
436 | return $this->call('setCommonInstanceMetadata', [$params], Operation::class);
|
---|
437 | }
|
---|
438 | /**
|
---|
439 | * Sets the default network tier of the project. The default network tier is
|
---|
440 | * used when an address/forwardingRule/instance is created without specifying
|
---|
441 | * the network tier field. (projects.setDefaultNetworkTier)
|
---|
442 | *
|
---|
443 | * @param string $project Project ID for this request.
|
---|
444 | * @param ProjectsSetDefaultNetworkTierRequest $postBody
|
---|
445 | * @param array $optParams Optional parameters.
|
---|
446 | *
|
---|
447 | * @opt_param string requestId An optional request ID to identify requests.
|
---|
448 | * Specify a unique request ID so that if you must retry your request, the
|
---|
449 | * server will know to ignore the request if it has already been completed. For
|
---|
450 | * example, consider a situation where you make an initial request and the
|
---|
451 | * request times out. If you make the request again with the same request ID,
|
---|
452 | * the server can check if original operation with the same request ID was
|
---|
453 | * received, and if so, will ignore the second request. This prevents clients
|
---|
454 | * from accidentally creating duplicate commitments. The request ID must be a
|
---|
455 | * valid UUID with the exception that zero UUID is not supported (
|
---|
456 | * 00000000-0000-0000-0000-000000000000).
|
---|
457 | * @return Operation
|
---|
458 | * @throws \Google\Service\Exception
|
---|
459 | */
|
---|
460 | public function setDefaultNetworkTier($project, ProjectsSetDefaultNetworkTierRequest $postBody, $optParams = [])
|
---|
461 | {
|
---|
462 | $params = ['project' => $project, 'postBody' => $postBody];
|
---|
463 | $params = array_merge($params, $optParams);
|
---|
464 | return $this->call('setDefaultNetworkTier', [$params], Operation::class);
|
---|
465 | }
|
---|
466 | /**
|
---|
467 | * Enables the usage export feature and sets the usage export bucket where
|
---|
468 | * reports are stored. If you provide an empty request body using this method,
|
---|
469 | * the usage export feature will be disabled. (projects.setUsageExportBucket)
|
---|
470 | *
|
---|
471 | * @param string $project Project ID for this request.
|
---|
472 | * @param UsageExportLocation $postBody
|
---|
473 | * @param array $optParams Optional parameters.
|
---|
474 | *
|
---|
475 | * @opt_param string requestId An optional request ID to identify requests.
|
---|
476 | * Specify a unique request ID so that if you must retry your request, the
|
---|
477 | * server will know to ignore the request if it has already been completed. For
|
---|
478 | * example, consider a situation where you make an initial request and the
|
---|
479 | * request times out. If you make the request again with the same request ID,
|
---|
480 | * the server can check if original operation with the same request ID was
|
---|
481 | * received, and if so, will ignore the second request. This prevents clients
|
---|
482 | * from accidentally creating duplicate commitments. The request ID must be a
|
---|
483 | * valid UUID with the exception that zero UUID is not supported (
|
---|
484 | * 00000000-0000-0000-0000-000000000000).
|
---|
485 | * @return Operation
|
---|
486 | * @throws \Google\Service\Exception
|
---|
487 | */
|
---|
488 | public function setUsageExportBucket($project, UsageExportLocation $postBody, $optParams = [])
|
---|
489 | {
|
---|
490 | $params = ['project' => $project, 'postBody' => $postBody];
|
---|
491 | $params = array_merge($params, $optParams);
|
---|
492 | return $this->call('setUsageExportBucket', [$params], Operation::class);
|
---|
493 | }
|
---|
494 | }
|
---|
495 |
|
---|
496 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
497 | class_alias(Projects::class, 'Google_Service_Compute_Resource_Projects');
|
---|