source: vendor/google/apiclient-services/src/Compute/Resource/RegionNetworkEndpointGroups.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 10 days ago

Upload new project files

  • Property mode set to 100644
File size: 18.7 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\NetworkEndpointGroup;
21use Google\Service\Compute\NetworkEndpointGroupList;
22use Google\Service\Compute\NetworkEndpointGroupsListNetworkEndpoints;
23use Google\Service\Compute\Operation;
24use Google\Service\Compute\RegionNetworkEndpointGroupsAttachEndpointsRequest;
25use Google\Service\Compute\RegionNetworkEndpointGroupsDetachEndpointsRequest;
26
27/**
28 * The "regionNetworkEndpointGroups" collection of methods.
29 * Typical usage is:
30 * <code>
31 * $computeService = new Google\Service\Compute(...);
32 * $regionNetworkEndpointGroups = $computeService->regionNetworkEndpointGroups;
33 * </code>
34 */
35class RegionNetworkEndpointGroups extends \Google\Service\Resource
36{
37 /**
38 * Attach a list of network endpoints to the specified network endpoint group.
39 * (regionNetworkEndpointGroups.attachNetworkEndpoints)
40 *
41 * @param string $project Project ID for this request.
42 * @param string $region The name of the region where you want to create the
43 * network endpoint group. It should comply with RFC1035.
44 * @param string $networkEndpointGroup The name of the network endpoint group
45 * where you are attaching network endpoints to. It should comply with RFC1035.
46 * @param RegionNetworkEndpointGroupsAttachEndpointsRequest $postBody
47 * @param array $optParams Optional parameters.
48 *
49 * @opt_param string requestId An optional request ID to identify requests.
50 * Specify a unique request ID so that if you must retry your request, the
51 * server will know to ignore the request if it has already been completed. For
52 * example, consider a situation where you make an initial request and the
53 * request times out. If you make the request again with the same request ID,
54 * the server can check if original operation with the same request ID was
55 * received, and if so, will ignore the second request. This prevents clients
56 * from accidentally creating duplicate commitments. The request ID must be a
57 * valid UUID with the exception that zero UUID is not supported (
58 * 00000000-0000-0000-0000-000000000000).
59 * @return Operation
60 * @throws \Google\Service\Exception
61 */
62 public function attachNetworkEndpoints($project, $region, $networkEndpointGroup, RegionNetworkEndpointGroupsAttachEndpointsRequest $postBody, $optParams = [])
63 {
64 $params = ['project' => $project, 'region' => $region, 'networkEndpointGroup' => $networkEndpointGroup, 'postBody' => $postBody];
65 $params = array_merge($params, $optParams);
66 return $this->call('attachNetworkEndpoints', [$params], Operation::class);
67 }
68 /**
69 * Deletes the specified network endpoint group. Note that the NEG cannot be
70 * deleted if it is configured as a backend of a backend service.
71 * (regionNetworkEndpointGroups.delete)
72 *
73 * @param string $project Project ID for this request.
74 * @param string $region The name of the region where the network endpoint group
75 * is located. It should comply with RFC1035.
76 * @param string $networkEndpointGroup The name of the network endpoint group to
77 * delete. It should comply with RFC1035.
78 * @param array $optParams Optional parameters.
79 *
80 * @opt_param string requestId An optional request ID to identify requests.
81 * Specify a unique request ID so that if you must retry your request, the
82 * server will know to ignore the request if it has already been completed. For
83 * example, consider a situation where you make an initial request and the
84 * request times out. If you make the request again with the same request ID,
85 * the server can check if original operation with the same request ID was
86 * received, and if so, will ignore the second request. This prevents clients
87 * from accidentally creating duplicate commitments. The request ID must be a
88 * valid UUID with the exception that zero UUID is not supported (
89 * 00000000-0000-0000-0000-000000000000).
90 * @return Operation
91 * @throws \Google\Service\Exception
92 */
93 public function delete($project, $region, $networkEndpointGroup, $optParams = [])
94 {
95 $params = ['project' => $project, 'region' => $region, 'networkEndpointGroup' => $networkEndpointGroup];
96 $params = array_merge($params, $optParams);
97 return $this->call('delete', [$params], Operation::class);
98 }
99 /**
100 * Detach the network endpoint from the specified network endpoint group.
101 * (regionNetworkEndpointGroups.detachNetworkEndpoints)
102 *
103 * @param string $project Project ID for this request.
104 * @param string $region The name of the region where the network endpoint group
105 * is located. It should comply with RFC1035.
106 * @param string $networkEndpointGroup The name of the network endpoint group
107 * you are detaching network endpoints from. It should comply with RFC1035.
108 * @param RegionNetworkEndpointGroupsDetachEndpointsRequest $postBody
109 * @param array $optParams Optional parameters.
110 *
111 * @opt_param string requestId An optional request ID to identify requests.
112 * Specify a unique request ID so that if you must retry your request, the
113 * server will know to ignore the request if it has already been completed. For
114 * example, consider a situation where you make an initial request and the
115 * request times out. If you make the request again with the same request ID,
116 * the server can check if original operation with the same request ID was
117 * received, and if so, will ignore the second request. This prevents clients
118 * from accidentally creating duplicate commitments. The request ID must be a
119 * valid UUID with the exception that zero UUID is not supported (
120 * 00000000-0000-0000-0000-000000000000). end_interface:
121 * MixerMutationRequestBuilder
122 * @return Operation
123 * @throws \Google\Service\Exception
124 */
125 public function detachNetworkEndpoints($project, $region, $networkEndpointGroup, RegionNetworkEndpointGroupsDetachEndpointsRequest $postBody, $optParams = [])
126 {
127 $params = ['project' => $project, 'region' => $region, 'networkEndpointGroup' => $networkEndpointGroup, 'postBody' => $postBody];
128 $params = array_merge($params, $optParams);
129 return $this->call('detachNetworkEndpoints', [$params], Operation::class);
130 }
131 /**
132 * Returns the specified network endpoint group.
133 * (regionNetworkEndpointGroups.get)
134 *
135 * @param string $project Project ID for this request.
136 * @param string $region The name of the region where the network endpoint group
137 * is located. It should comply with RFC1035.
138 * @param string $networkEndpointGroup The name of the network endpoint group.
139 * It should comply with RFC1035.
140 * @param array $optParams Optional parameters.
141 * @return NetworkEndpointGroup
142 * @throws \Google\Service\Exception
143 */
144 public function get($project, $region, $networkEndpointGroup, $optParams = [])
145 {
146 $params = ['project' => $project, 'region' => $region, 'networkEndpointGroup' => $networkEndpointGroup];
147 $params = array_merge($params, $optParams);
148 return $this->call('get', [$params], NetworkEndpointGroup::class);
149 }
150 /**
151 * Creates a network endpoint group in the specified project using the
152 * parameters that are included in the request.
153 * (regionNetworkEndpointGroups.insert)
154 *
155 * @param string $project Project ID for this request.
156 * @param string $region The name of the region where you want to create the
157 * network endpoint group. It should comply with RFC1035.
158 * @param NetworkEndpointGroup $postBody
159 * @param array $optParams Optional parameters.
160 *
161 * @opt_param string requestId An optional request ID to identify requests.
162 * Specify a unique request ID so that if you must retry your request, the
163 * server will know to ignore the request if it has already been completed. For
164 * example, consider a situation where you make an initial request and the
165 * request times out. If you make the request again with the same request ID,
166 * the server can check if original operation with the same request ID was
167 * received, and if so, will ignore the second request. This prevents clients
168 * from accidentally creating duplicate commitments. The request ID must be a
169 * valid UUID with the exception that zero UUID is not supported (
170 * 00000000-0000-0000-0000-000000000000).
171 * @return Operation
172 * @throws \Google\Service\Exception
173 */
174 public function insert($project, $region, NetworkEndpointGroup $postBody, $optParams = [])
175 {
176 $params = ['project' => $project, 'region' => $region, 'postBody' => $postBody];
177 $params = array_merge($params, $optParams);
178 return $this->call('insert', [$params], Operation::class);
179 }
180 /**
181 * Retrieves the list of regional network endpoint groups available to the
182 * specified project in the given region.
183 * (regionNetworkEndpointGroups.listRegionNetworkEndpointGroups)
184 *
185 * @param string $project Project ID for this request.
186 * @param string $region The name of the region where the network endpoint group
187 * is located. It should comply with RFC1035.
188 * @param array $optParams Optional parameters.
189 *
190 * @opt_param string filter A filter expression that filters resources listed in
191 * the response. Most Compute resources support two types of filter expressions:
192 * expressions that support regular expressions and expressions that follow API
193 * improvement proposal AIP-160. These two types of filter expressions cannot be
194 * mixed in one request. If you want to use AIP-160, your expression must
195 * specify the field name, an operator, and the value that you want to use for
196 * filtering. The value must be a string, a number, or a boolean. The operator
197 * must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you
198 * are filtering Compute Engine instances, you can exclude instances named
199 * `example-instance` by specifying `name != example-instance`. The `:*`
200 * comparison can be used to test whether a key has been defined. For example,
201 * to find all objects with `owner` label use: ``` labels.owner:* ``` You can
202 * also filter nested fields. For example, you could specify
203 * `scheduling.automaticRestart = false` to include instances only if they are
204 * not scheduled for automatic restarts. You can use filtering on nested fields
205 * to filter based on resource labels. To filter on multiple expressions,
206 * provide each separate expression within parentheses. For example: ```
207 * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By
208 * default, each expression is an `AND` expression. However, you can include
209 * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel
210 * Skylake") OR (cpuPlatform = "Intel Broadwell") AND
211 * (scheduling.automaticRestart = true) ``` If you want to use a regular
212 * expression, use the `eq` (equal) or `ne` (not equal) operator against a
213 * single un-parenthesized expression with or without quotes or against multiple
214 * parenthesized expressions. Examples: `fieldname eq unquoted literal`
215 * `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"`
216 * `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is
217 * interpreted as a regular expression using Google RE2 library syntax. The
218 * literal value must match the entire field. For example, to filter for
219 * instances that do not end with name "instance", you would use `name ne
220 * .*instance`. You cannot combine constraints on multiple fields using regular
221 * expressions.
222 * @opt_param string maxResults The maximum number of results per page that
223 * should be returned. If the number of available results is larger than
224 * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
225 * get the next page of results in subsequent list requests. Acceptable values
226 * are `0` to `500`, inclusive. (Default: `500`)
227 * @opt_param string orderBy Sorts list results by a certain order. By default,
228 * results are returned in alphanumerical order based on the resource name. You
229 * can also sort results in descending order based on the creation timestamp
230 * using `orderBy="creationTimestamp desc"`. This sorts results based on the
231 * `creationTimestamp` field in reverse chronological order (newest result
232 * first). Use this to sort resources like operations so that the newest
233 * operation is returned first. Currently, only sorting by `name` or
234 * `creationTimestamp desc` is supported.
235 * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
236 * the `nextPageToken` returned by a previous list request to get the next page
237 * of results.
238 * @opt_param bool returnPartialSuccess Opt-in for partial success behavior
239 * which provides partial results in case of failure. The default value is
240 * false. For example, when partial success behavior is enabled, aggregatedList
241 * for a single zone scope either returns all resources in the zone or no
242 * resources, with an error code.
243 * @return NetworkEndpointGroupList
244 * @throws \Google\Service\Exception
245 */
246 public function listRegionNetworkEndpointGroups($project, $region, $optParams = [])
247 {
248 $params = ['project' => $project, 'region' => $region];
249 $params = array_merge($params, $optParams);
250 return $this->call('list', [$params], NetworkEndpointGroupList::class);
251 }
252 /**
253 * Lists the network endpoints in the specified network endpoint group.
254 * (regionNetworkEndpointGroups.listNetworkEndpoints)
255 *
256 * @param string $project Project ID for this request.
257 * @param string $region The name of the region where the network endpoint group
258 * is located. It should comply with RFC1035.
259 * @param string $networkEndpointGroup The name of the network endpoint group
260 * from which you want to generate a list of included network endpoints. It
261 * should comply with RFC1035.
262 * @param array $optParams Optional parameters.
263 *
264 * @opt_param string filter A filter expression that filters resources listed in
265 * the response. Most Compute resources support two types of filter expressions:
266 * expressions that support regular expressions and expressions that follow API
267 * improvement proposal AIP-160. These two types of filter expressions cannot be
268 * mixed in one request. If you want to use AIP-160, your expression must
269 * specify the field name, an operator, and the value that you want to use for
270 * filtering. The value must be a string, a number, or a boolean. The operator
271 * must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you
272 * are filtering Compute Engine instances, you can exclude instances named
273 * `example-instance` by specifying `name != example-instance`. The `:*`
274 * comparison can be used to test whether a key has been defined. For example,
275 * to find all objects with `owner` label use: ``` labels.owner:* ``` You can
276 * also filter nested fields. For example, you could specify
277 * `scheduling.automaticRestart = false` to include instances only if they are
278 * not scheduled for automatic restarts. You can use filtering on nested fields
279 * to filter based on resource labels. To filter on multiple expressions,
280 * provide each separate expression within parentheses. For example: ```
281 * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By
282 * default, each expression is an `AND` expression. However, you can include
283 * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel
284 * Skylake") OR (cpuPlatform = "Intel Broadwell") AND
285 * (scheduling.automaticRestart = true) ``` If you want to use a regular
286 * expression, use the `eq` (equal) or `ne` (not equal) operator against a
287 * single un-parenthesized expression with or without quotes or against multiple
288 * parenthesized expressions. Examples: `fieldname eq unquoted literal`
289 * `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"`
290 * `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is
291 * interpreted as a regular expression using Google RE2 library syntax. The
292 * literal value must match the entire field. For example, to filter for
293 * instances that do not end with name "instance", you would use `name ne
294 * .*instance`. You cannot combine constraints on multiple fields using regular
295 * expressions.
296 * @opt_param string maxResults The maximum number of results per page that
297 * should be returned. If the number of available results is larger than
298 * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
299 * get the next page of results in subsequent list requests. Acceptable values
300 * are `0` to `500`, inclusive. (Default: `500`)
301 * @opt_param string orderBy Sorts list results by a certain order. By default,
302 * results are returned in alphanumerical order based on the resource name. You
303 * can also sort results in descending order based on the creation timestamp
304 * using `orderBy="creationTimestamp desc"`. This sorts results based on the
305 * `creationTimestamp` field in reverse chronological order (newest result
306 * first). Use this to sort resources like operations so that the newest
307 * operation is returned first. Currently, only sorting by `name` or
308 * `creationTimestamp desc` is supported.
309 * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
310 * the `nextPageToken` returned by a previous list request to get the next page
311 * of results.
312 * @opt_param bool returnPartialSuccess Opt-in for partial success behavior
313 * which provides partial results in case of failure. The default value is
314 * false. For example, when partial success behavior is enabled, aggregatedList
315 * for a single zone scope either returns all resources in the zone or no
316 * resources, with an error code.
317 * @return NetworkEndpointGroupsListNetworkEndpoints
318 * @throws \Google\Service\Exception
319 */
320 public function listNetworkEndpoints($project, $region, $networkEndpointGroup, $optParams = [])
321 {
322 $params = ['project' => $project, 'region' => $region, 'networkEndpointGroup' => $networkEndpointGroup];
323 $params = array_merge($params, $optParams);
324 return $this->call('listNetworkEndpoints', [$params], NetworkEndpointGroupsListNetworkEndpoints::class);
325 }
326}
327
328// Adding a class alias for backwards compatibility with the previous class name.
329class_alias(RegionNetworkEndpointGroups::class, 'Google_Service_Compute_Resource_RegionNetworkEndpointGroups');
Note: See TracBrowser for help on using the repository browser.