public static class BackendService.Builder extends Object
Modifier and Type | Method and Description |
---|---|
BackendService.Builder |
addAllBackends(List<Backend> backends)
The list of backends that serve this BackendService.
|
BackendService.Builder |
addAllCustomRequestHeaders(List<String> customRequestHeaders)
Headers that the HTTP/S load balancer should add to proxied requests.
|
BackendService.Builder |
addAllHealthChecks(List<String> healthChecks)
The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this
BackendService.
|
BackendService.Builder |
addBackends(Backend backends)
The list of backends that serve this BackendService.
|
BackendService.Builder |
addCustomRequestHeaders(String customRequestHeaders)
Headers that the HTTP/S load balancer should add to proxied requests.
|
BackendService.Builder |
addHealthChecks(String healthChecks)
The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this
BackendService.
|
BackendService |
build() |
BackendService.Builder |
clone() |
Integer |
getAffinityCookieTtlSec()
Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE.
|
List<Backend> |
getBackendsList()
The list of backends that serve this BackendService.
|
BackendServiceCdnPolicy |
getCdnPolicy()
Cloud CDN configuration for this BackendService.
|
ConnectionDraining |
getConnectionDraining() |
String |
getCreationTimestamp()
[Output Only] Creation timestamp in RFC3339 text format.
|
List<String> |
getCustomRequestHeadersList()
Headers that the HTTP/S load balancer should add to proxied requests.
|
String |
getDescription()
An optional description of this resource.
|
Boolean |
getEnableCDN()
If true, enable Cloud CDN for this BackendService.
|
String |
getFingerprint()
Fingerprint of this resource.
|
List<String> |
getHealthChecksList()
The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this
BackendService.
|
BackendServiceIAP |
getIap() |
String |
getId()
[Output Only] The unique identifier for the resource.
|
String |
getKind()
[Output Only] Type of resource.
|
String |
getLoadBalancingScheme()
Indicates whether the backend service will be used with internal or external load balancing.
|
String |
getName()
Name of the resource.
|
Integer |
getPort()
Deprecated in favor of portName.
|
String |
getPortName()
Name of backend port.
|
String |
getProtocol()
The protocol this BackendService uses to communicate with backends.
|
String |
getRegion()
[Output Only] URL of the region where the regional backend service resides.
|
String |
getSecurityPolicy()
[Output Only] The resource URL for the security policy associated with this backend service.
|
String |
getSelfLink()
[Output Only] Server-defined URL for the resource.
|
String |
getSessionAffinity()
Type of session affinity to use.
|
Integer |
getTimeoutSec()
How many seconds to wait for the backend before considering it a failed request.
|
BackendService.Builder |
mergeFrom(BackendService other) |
BackendService.Builder |
setAffinityCookieTtlSec(Integer affinityCookieTtlSec)
Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE.
|
BackendService.Builder |
setCdnPolicy(BackendServiceCdnPolicy cdnPolicy)
Cloud CDN configuration for this BackendService.
|
BackendService.Builder |
setConnectionDraining(ConnectionDraining connectionDraining) |
BackendService.Builder |
setCreationTimestamp(String creationTimestamp)
[Output Only] Creation timestamp in RFC3339 text format.
|
BackendService.Builder |
setDescription(String description)
An optional description of this resource.
|
BackendService.Builder |
setEnableCDN(Boolean enableCDN)
If true, enable Cloud CDN for this BackendService.
|
BackendService.Builder |
setFingerprint(String fingerprint)
Fingerprint of this resource.
|
BackendService.Builder |
setIap(BackendServiceIAP iap) |
BackendService.Builder |
setId(String id)
[Output Only] The unique identifier for the resource.
|
BackendService.Builder |
setKind(String kind)
[Output Only] Type of resource.
|
BackendService.Builder |
setLoadBalancingScheme(String loadBalancingScheme)
Indicates whether the backend service will be used with internal or external load balancing.
|
BackendService.Builder |
setName(String name)
Name of the resource.
|
BackendService.Builder |
setPort(Integer port)
Deprecated in favor of portName.
|
BackendService.Builder |
setPortName(String portName)
Name of backend port.
|
BackendService.Builder |
setProtocol(String protocol)
The protocol this BackendService uses to communicate with backends.
|
BackendService.Builder |
setRegion(String region)
[Output Only] URL of the region where the regional backend service resides.
|
BackendService.Builder |
setSecurityPolicy(String securityPolicy)
[Output Only] The resource URL for the security policy associated with this backend service.
|
BackendService.Builder |
setSelfLink(String selfLink)
[Output Only] Server-defined URL for the resource.
|
BackendService.Builder |
setSessionAffinity(String sessionAffinity)
Type of session affinity to use.
|
BackendService.Builder |
setTimeoutSec(Integer timeoutSec)
How many seconds to wait for the backend before considering it a failed request.
|
public BackendService.Builder mergeFrom(BackendService other)
public Integer getAffinityCookieTtlSec()
When the load balancing scheme is INTERNAL, this field is not used.
public BackendService.Builder setAffinityCookieTtlSec(Integer affinityCookieTtlSec)
When the load balancing scheme is INTERNAL, this field is not used.
public List<Backend> getBackendsList()
public BackendService.Builder addAllBackends(List<Backend> backends)
public BackendService.Builder addBackends(Backend backends)
public BackendServiceCdnPolicy getCdnPolicy()
public BackendService.Builder setCdnPolicy(BackendServiceCdnPolicy cdnPolicy)
public ConnectionDraining getConnectionDraining()
public BackendService.Builder setConnectionDraining(ConnectionDraining connectionDraining)
public String getCreationTimestamp()
public BackendService.Builder setCreationTimestamp(String creationTimestamp)
public List<String> getCustomRequestHeadersList()
public BackendService.Builder addAllCustomRequestHeaders(List<String> customRequestHeaders)
public BackendService.Builder addCustomRequestHeaders(String customRequestHeaders)
public String getDescription()
public BackendService.Builder setDescription(String description)
public Boolean getEnableCDN()
When the load balancing scheme is INTERNAL, this field is not used.
public BackendService.Builder setEnableCDN(Boolean enableCDN)
When the load balancing scheme is INTERNAL, this field is not used.
public String getFingerprint()
To see the latest fingerprint, make a get() request to retrieve a BackendService.
public BackendService.Builder setFingerprint(String fingerprint)
To see the latest fingerprint, make a get() request to retrieve a BackendService.
public List<String> getHealthChecksList()
For internal load balancing, a URL to a HealthCheck resource must be specified instead.
public BackendService.Builder addAllHealthChecks(List<String> healthChecks)
For internal load balancing, a URL to a HealthCheck resource must be specified instead.
public BackendService.Builder addHealthChecks(String healthChecks)
For internal load balancing, a URL to a HealthCheck resource must be specified instead.
public BackendServiceIAP getIap()
public BackendService.Builder setIap(BackendServiceIAP iap)
public String getId()
public BackendService.Builder setId(String id)
public String getKind()
public BackendService.Builder setKind(String kind)
public String getLoadBalancingScheme()
public BackendService.Builder setLoadBalancingScheme(String loadBalancingScheme)
public String getName()
public BackendService.Builder setName(String name)
public Integer getPort()
This cannot be used for internal load balancing.
public BackendService.Builder setPort(Integer port)
This cannot be used for internal load balancing.
public String getPortName()
When the load balancing scheme is INTERNAL, this field is not used.
public BackendService.Builder setPortName(String portName)
When the load balancing scheme is INTERNAL, this field is not used.
public String getProtocol()
Possible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP.
For internal load balancing, the possible values are TCP and UDP, and the default is TCP.
public BackendService.Builder setProtocol(String protocol)
Possible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP.
For internal load balancing, the possible values are TCP and UDP, and the default is TCP.
public String getRegion()
public BackendService.Builder setRegion(String region)
public String getSecurityPolicy()
public BackendService.Builder setSecurityPolicy(String securityPolicy)
public String getSelfLink()
public BackendService.Builder setSelfLink(String selfLink)
public String getSessionAffinity()
When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.
When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
When the protocol is UDP, this field is not used.
public BackendService.Builder setSessionAffinity(String sessionAffinity)
When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.
When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
When the protocol is UDP, this field is not used.
public Integer getTimeoutSec()
public BackendService.Builder setTimeoutSec(Integer timeoutSec)
public BackendService build()
public BackendService.Builder clone()
Copyright © 2019 Google LLC. All rights reserved.