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