A TargetPool resource. This resource defines a pool of VMs, associated HttpHealthCheck resources, and the fallback TargetPool. For more information, see Load Balancing .
For a list of methods for this resource, see the end of this page.
Resource representations
A TargetPool resource.
{ "kind": "compute#targetPool", "id": unsigned long, "creationTimestamp": string, "name": string, "description": string, "region": string, "healthChecks": [ string ], "instances": [ string ], "sessionAffinity": string, "failoverRatio": float, "backupPool": string, "selfLink": string }
Property name | Value | Description | Notes |
---|---|---|---|
backupPool
|
string
|
This field is applicable only when the target pool is serving a forwarding rule as the primary pool (e.g. not as a backup pool to some other target pool). Must be a fully-qualified URL to a target pool that is in the same region as the primary target pool.
If set, failoverRatio must also be set. Together, they define the fallback behavior of the primary target pool. If the ratio of the healthy VMs in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where
failoverRatio
is not set or all the VMs in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the
force
mode, where traffic will be spread to the healthy VMs with the best effort, or to all VMs when no VM is healthy.
|
|
creationTimestamp
|
string
|
[Output Only] Creation timestamp in RFC3339 text format. | |
description
|
string
|
An optional textual description of the resource; provided by the client when the resource is created. | |
failoverRatio
|
float
|
This field is applicable only when the target pool is serving a forwarding rule as the primary pool (e.g. not as a backup pool to some other target pool). The value of the a float between [0, 1].
If set,
backupPool
must also be set. Together, they define the fallback behavior of the primary target pool. If the ratio of the healthy VMs in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool.
In case where
failoverRatio
is not set or all the VMs in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the
force
mode, where traffic will be spread to the healthy VMs with the best effort, or to all VMs when no VM is healthy.
|
|
healthChecks[]
|
list
|
A URL to one HttpHealthCheck resource. A member VM in this pool is considered healthy if and only if the specified health checks pass. An empty list means all member virtual machines will be considered healthy at all times but the health status of this target pool will be marked as
unhealthy
to indicate that no health checks are being performed.
|
|
id
|
unsigned long
|
[Output Only] Unique identifier for the resource; defined by the server. | |
instances[]
|
list
|
A list of resource URLs to the member VMs serving this pool. They must live in zones contained in the same region as this pool. | |
kind
|
string
|
[Output Only]
Type of the resource. Always
compute#targetPool
.
|
|
name
|
string
|
Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply
with RFC1035 . Specifically, the name must be 1-63 characters long and match the regular expression
[a-z]([-a-z0-9]*[a-z0-9])?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
|
region
|
string
|
[Output Only]
URL of the region where the forwarding pool resides. In the format:
https://www.googleapis.com/compute/v1/projects/project/regions/region |
|
selfLink
|
string
|
[Output Only] Server defined URL for the resource. | |
sessionAffinity
|
string
|
Defines the session affinity option. Session affinity determines the hash method that Google Compute Engine uses to distribute traffic.
Acceptable values are:
|
Methods
The following are valid TargetPool resource methods:
- addHealthCheck
- Adds health check URL to targetPool.
- addInstance
- Adds instance url to targetPool.
- aggregatedList
- Retrieves the list of target pools grouped by scope.
- delete
- Deletes the specified TargetPool resource.
- get
- Returns the specified TargetPool resource.
- getHealth
- Gets the most recent health check results for each IP for the given instance that is referenced by given TargetPool.
- insert
- Creates a TargetPool resource in the specified project and region using the data included in the request.
- list
- Retrieves the list of TargetPool resources available to the specified project and region.
- removeHealthCheck
- Removes health check URL from targetPool.
- removeInstance
- Removes instance URL from targetPool.
- setBackup
- Changes backup pool configurations. For more information, see backup pools.