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