source: vendor/google/apiclient-services/src/Compute/Resource/RegionBackendServices.php

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