public static class TargetPool.Builder extends Object
Modifier and Type | Method and Description |
---|---|
TargetPool.Builder |
addAllHealthChecks(List<String> healthChecks)
The URL of the HttpHealthCheck resource.
|
TargetPool.Builder |
addAllInstances(List<String> instances)
A list of resource URLs to the virtual machine instances serving this pool.
|
TargetPool.Builder |
addHealthChecks(String healthChecks)
The URL of the HttpHealthCheck resource.
|
TargetPool.Builder |
addInstances(String instances)
A list of resource URLs to the virtual machine instances serving this pool.
|
TargetPool |
build() |
TargetPool.Builder |
clone() |
String |
getBackupPool()
This field is applicable only when the containing target pool is serving a forwarding rule as
the primary pool, and its failoverRatio field is properly set to a value between [0, 1].
|
String |
getCreationTimestamp()
[Output Only] Creation timestamp in RFC3339 text format.
|
String |
getDescription()
An optional description of this resource.
|
Float |
getFailoverRatio()
This field is applicable only when the containing target pool is serving a forwarding rule as
the primary pool (i.e., not as a backup pool to some other target pool).
|
List<String> |
getHealthChecksList()
The URL of the HttpHealthCheck resource.
|
String |
getId()
[Output Only] The unique identifier for the resource.
|
List<String> |
getInstancesList()
A list of resource URLs to the virtual machine instances serving this pool.
|
String |
getKind()
[Output Only] Type of the resource.
|
String |
getName()
Name of the resource.
|
String |
getRegion()
[Output Only] URL of the region where the target pool resides.
|
String |
getSelfLink()
[Output Only] Server-defined URL for the resource.
|
String |
getSessionAffinity()
Session affinity option, must be one of the following values: NONE: Connections from the same
client IP may go to any instance in the pool.
|
TargetPool.Builder |
mergeFrom(TargetPool other) |
TargetPool.Builder |
setBackupPool(String backupPool)
This field is applicable only when the containing target pool is serving a forwarding rule as
the primary pool, and its failoverRatio field is properly set to a value between [0, 1].
|
TargetPool.Builder |
setCreationTimestamp(String creationTimestamp)
[Output Only] Creation timestamp in RFC3339 text format.
|
TargetPool.Builder |
setDescription(String description)
An optional description of this resource.
|
TargetPool.Builder |
setFailoverRatio(Float failoverRatio)
This field is applicable only when the containing target pool is serving a forwarding rule as
the primary pool (i.e., not as a backup pool to some other target pool).
|
TargetPool.Builder |
setId(String id)
[Output Only] The unique identifier for the resource.
|
TargetPool.Builder |
setKind(String kind)
[Output Only] Type of the resource.
|
TargetPool.Builder |
setName(String name)
Name of the resource.
|
TargetPool.Builder |
setRegion(String region)
[Output Only] URL of the region where the target pool resides.
|
TargetPool.Builder |
setSelfLink(String selfLink)
[Output Only] Server-defined URL for the resource.
|
TargetPool.Builder |
setSessionAffinity(String sessionAffinity)
Session affinity option, must be one of the following values: NONE: Connections from the same
client IP may go to any instance in the pool.
|
public TargetPool.Builder mergeFrom(TargetPool other)
public String getBackupPool()
backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool.
In case where failoverRatio and backupPool are not set, or all the instances 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 instances with the best effort, or to all instances when no instance is healthy.
public TargetPool.Builder setBackupPool(String backupPool)
backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool.
In case where failoverRatio and backupPool are not set, or all the instances 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 instances with the best effort, or to all instances when no instance is healthy.
public String getCreationTimestamp()
public TargetPool.Builder setCreationTimestamp(String creationTimestamp)
public String getDescription()
public TargetPool.Builder setDescription(String description)
public Float getFailoverRatio()
If set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances 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 instances 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 instances with the best effort, or to all instances when no instance is healthy.
public TargetPool.Builder setFailoverRatio(Float failoverRatio)
If set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances 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 instances 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 instances with the best effort, or to all instances when no instance is healthy.
public List<String> getHealthChecksList()
public TargetPool.Builder addAllHealthChecks(List<String> healthChecks)
public TargetPool.Builder addHealthChecks(String healthChecks)
public String getId()
public TargetPool.Builder setId(String id)
public List<String> getInstancesList()
public TargetPool.Builder addAllInstances(List<String> instances)
public TargetPool.Builder addInstances(String instances)
public String getKind()
public TargetPool.Builder setKind(String kind)
public String getName()
public TargetPool.Builder setName(String name)
public String getRegion()
public TargetPool.Builder setRegion(String region)
public String getSelfLink()
public TargetPool.Builder setSelfLink(String selfLink)
public String getSessionAffinity()
public TargetPool.Builder setSessionAffinity(String sessionAffinity)
public TargetPool build()
public TargetPool.Builder clone()
Copyright © 2019 Google LLC. All rights reserved.