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()
If set to 0, the cookie is non-persistent and lasts only until the end of the browser session
(or equivalent).
|
List<Backend> |
getBackendsList()
The list of backends that serve this BackendService.
|
BackendServiceCdnPolicy |
getCdnPolicy()
Cloud CDN configuration for this BackendService.
|
CircuitBreakers |
getCircuitBreakers()
Settings controlling the volume of connections to a backend service.
|
ConnectionDraining |
getConnectionDraining() |
ConsistentHashLoadBalancerSettings |
getConsistentHash()
Consistent Hash-based load balancing can be used to provide soft session affinity based on
HTTP headers, cookies or other properties.
|
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, enables Cloud CDN for the backend service.
|
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 |
getLocalityLbPolicy()
The load balancing algorithm used within the scope of the locality.
|
String |
getName()
Name of the resource.
|
OutlierDetection |
getOutlierDetection()
Settings controlling eviction of unhealthy hosts from the load balancing pool.
|
Integer |
getPort()
Deprecated in favor of portName.
|
String |
getPortName()
A named port on a backend instance group representing the port for communication to the
backend VMs in that group.
|
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()
The backend service timeout has a different meaning depending on the type of load balancer.
|
BackendService.Builder |
mergeFrom(BackendService other) |
BackendService.Builder |
setAffinityCookieTtlSec(Integer affinityCookieTtlSec)
If set to 0, the cookie is non-persistent and lasts only until the end of the browser session
(or equivalent).
|
BackendService.Builder |
setCdnPolicy(BackendServiceCdnPolicy cdnPolicy)
Cloud CDN configuration for this BackendService.
|
BackendService.Builder |
setCircuitBreakers(CircuitBreakers circuitBreakers)
Settings controlling the volume of connections to a backend service.
|
BackendService.Builder |
setConnectionDraining(ConnectionDraining connectionDraining) |
BackendService.Builder |
setConsistentHash(ConsistentHashLoadBalancerSettings consistentHash)
Consistent Hash-based load balancing can be used to provide soft session affinity based on
HTTP headers, cookies or other properties.
|
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, enables Cloud CDN for the backend service.
|
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 |
setLocalityLbPolicy(String localityLbPolicy)
The load balancing algorithm used within the scope of the locality.
|
BackendService.Builder |
setName(String name)
Name of the resource.
|
BackendService.Builder |
setOutlierDetection(OutlierDetection outlierDetection)
Settings controlling eviction of unhealthy hosts from the load balancing pool.
|
BackendService.Builder |
setPort(Integer port)
Deprecated in favor of portName.
|
BackendService.Builder |
setPortName(String portName)
A named port on a backend instance group representing the port for communication to the
backend VMs in that group.
|
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)
The backend service timeout has a different meaning depending on the type of load balancer.
|
public BackendService.Builder mergeFrom(BackendService other)
public Integer getAffinityCookieTtlSec()
public BackendService.Builder setAffinityCookieTtlSec(Integer affinityCookieTtlSec)
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 CircuitBreakers getCircuitBreakers()
This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
public BackendService.Builder setCircuitBreakers(CircuitBreakers circuitBreakers)
This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
public ConnectionDraining getConnectionDraining()
public BackendService.Builder setConnectionDraining(ConnectionDraining connectionDraining)
public ConsistentHashLoadBalancerSettings getConsistentHash()
This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
public BackendService.Builder setConsistentHash(ConsistentHashLoadBalancerSettings consistentHash)
This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
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()
public BackendService.Builder setEnableCDN(Boolean enableCDN)
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 getLocalityLbPolicy()
This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
public BackendService.Builder setLocalityLbPolicy(String localityLbPolicy)
This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
public String getName()
public BackendService.Builder setName(String name)
public OutlierDetection getOutlierDetection()
public BackendService.Builder setOutlierDetection(OutlierDetection outlierDetection)
public Integer getPort()
This cannot be used if the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
public BackendService.Builder setPort(Integer port)
This cannot be used if the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
public String getPortName()
Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Blaancing).
public BackendService.Builder setPortName(String portName)
Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Blaancing).
public String getProtocol()
Possible values are HTTP, HTTPS, TCP, SSL, or UDP, depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancer or for Traffic director for more information.
public BackendService.Builder setProtocol(String protocol)
Possible values are HTTP, HTTPS, TCP, SSL, or UDP, depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancer or for Traffic director for more information.
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 loadBalancingScheme is EXTERNAL, possible values are NONE, CLIENT_IP, or GENERATED_COOKIE. You can use GENERATED_COOKIE if the protocol is HTTP or HTTPS.
When the loadBalancingScheme is INTERNAL, possible values are NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
When the loadBalancingScheme is INTERNAL_SELF_MANAGED, possible values are NONE, CLIENT_IP, GENERATED_COOKIE, HEADER_FIELD, or HTTP_COOKIE.
public BackendService.Builder setSessionAffinity(String sessionAffinity)
When the loadBalancingScheme is EXTERNAL, possible values are NONE, CLIENT_IP, or GENERATED_COOKIE. You can use GENERATED_COOKIE if the protocol is HTTP or HTTPS.
When the loadBalancingScheme is INTERNAL, possible values are NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
When the loadBalancingScheme is INTERNAL_SELF_MANAGED, possible values are NONE, CLIENT_IP, GENERATED_COOKIE, HEADER_FIELD, or HTTP_COOKIE.
public Integer getTimeoutSec()
public BackendService.Builder setTimeoutSec(Integer timeoutSec)
public BackendService build()
public BackendService.Builder clone()
Copyright © 2019 Google LLC. All rights reserved.