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