pub struct BackendServiceArgs {Show 30 fields
pub affinity_cookie_ttl_sec: Output<Option<i32>>,
pub backends: Output<Option<Vec<BackendServiceBackend>>>,
pub cdn_policy: Output<Option<BackendServiceCdnPolicy>>,
pub circuit_breakers: Output<Option<BackendServiceCircuitBreakers>>,
pub compression_mode: Output<Option<String>>,
pub connection_draining_timeout_sec: Output<Option<i32>>,
pub consistent_hash: Output<Option<BackendServiceConsistentHash>>,
pub custom_request_headers: Output<Option<Vec<String>>>,
pub custom_response_headers: Output<Option<Vec<String>>>,
pub description: Output<Option<String>>,
pub edge_security_policy: Output<Option<String>>,
pub enable_cdn: Output<Option<bool>>,
pub health_checks: Output<Option<String>>,
pub iap: Output<Option<BackendServiceIap>>,
pub ip_address_selection_policy: Output<Option<String>>,
pub load_balancing_scheme: Output<Option<String>>,
pub locality_lb_policies: Output<Option<Vec<BackendServiceLocalityLbPolicy>>>,
pub locality_lb_policy: Output<Option<String>>,
pub log_config: Output<Option<BackendServiceLogConfig>>,
pub name: Output<Option<String>>,
pub outlier_detection: Output<Option<BackendServiceOutlierDetection>>,
pub port_name: Output<Option<String>>,
pub project: Output<Option<String>>,
pub protocol: Output<Option<String>>,
pub security_policy: Output<Option<String>>,
pub security_settings: Output<Option<BackendServiceSecuritySettings>>,
pub service_lb_policy: Output<Option<String>>,
pub session_affinity: Output<Option<String>>,
pub strong_session_affinity_cookie: Output<Option<BackendServiceStrongSessionAffinityCookie>>,
pub timeout_sec: Output<Option<i32>>,
}
Fields§
Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day. When the load balancing scheme is INTERNAL, this field is not used.
backends: Output<Option<Vec<BackendServiceBackend>>>
The set of backends that serve this BackendService. Structure is documented below.
cdn_policy: Output<Option<BackendServiceCdnPolicy>>
Cloud CDN configuration for this BackendService. Structure is documented below.
circuit_breakers: Output<Option<BackendServiceCircuitBreakers>>
Settings controlling the volume of connections to a backend service. This field is applicable only when the load_balancing_scheme is set to INTERNAL_SELF_MANAGED. Structure is documented below.
compression_mode: Output<Option<String>>
Compress text responses using Brotli or gzip compression, based on the client’s Accept-Encoding header.
Possible values are: AUTOMATIC
, DISABLED
.
connection_draining_timeout_sec: Output<Option<i32>>
Time for which instance will be drained (not accept new connections, but still work to finish started).
consistent_hash: Output<Option<BackendServiceConsistentHash>>
Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field only applies if the load_balancing_scheme is set to INTERNAL_SELF_MANAGED. This field is only applicable when locality_lb_policy is set to MAGLEV or RING_HASH. Structure is documented below.
custom_request_headers: Output<Option<Vec<String>>>
Headers that the HTTP/S load balancer should add to proxied requests.
custom_response_headers: Output<Option<Vec<String>>>
Headers that the HTTP/S load balancer should add to proxied responses.
description: Output<Option<String>>
An optional description of this resource.
edge_security_policy: Output<Option<String>>
The resource URL for the edge security policy associated with this backend service.
enable_cdn: Output<Option<bool>>
If true, enable Cloud CDN for this BackendService.
health_checks: Output<Option<String>>
The set of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified. A health check must be specified unless the backend service uses an internet or serverless NEG as a backend. For internal load balancing, a URL to a HealthCheck resource must be specified instead.
iap: Output<Option<BackendServiceIap>>
Settings for enabling Cloud Identity Aware Proxy Structure is documented below.
ip_address_selection_policy: Output<Option<String>>
Specifies preference of traffic to the backend (from the proxy and from the client for proxyless gRPC).
Possible values are: IPV4_ONLY
, PREFER_IPV6
, IPV6_ONLY
.
load_balancing_scheme: Output<Option<String>>
Indicates whether the backend service will be used with internal or
external load balancing. A backend service created for one type of
load balancing cannot be used with the other. For more information, refer to
Choosing a load balancer.
Default value is EXTERNAL
.
Possible values are: EXTERNAL
, INTERNAL_SELF_MANAGED
, INTERNAL_MANAGED
, EXTERNAL_MANAGED
.
locality_lb_policies: Output<Option<Vec<BackendServiceLocalityLbPolicy>>>
A list of locality load balancing policies to be used in order of preference. Either the policy or the customPolicy field should be set. Overrides any value set in the localityLbPolicy field. localityLbPolicies is only supported when the BackendService is referenced by a URL Map that is referenced by a target gRPC proxy that has the validateForProxyless field set to true. Structure is documented below.
locality_lb_policy: Output<Option<String>>
The load balancing algorithm used within the scope of the locality. The possible values are:
ROUND_ROBIN
: This is a simple policy in which each healthy backend is selected in round robin order.LEAST_REQUEST
: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.RING_HASH
: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests.RANDOM
: The load balancer selects a random healthy host.ORIGINAL_DESTINATION
: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer.MAGLEV
: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, refer to https://ai.google/research/pubs/pub44824WEIGHTED_MAGLEV
: Per-instance weighted Load Balancing via health check reported weights. Only applicable to loadBalancingScheme EXTERNAL. If set, the Backend Service must configure a non legacy HTTP-based Health Check, and health check replies are expected to contain non-standard HTTP response header field X-Load-Balancing-Endpoint-Weight to specify the per-instance weights. If set, Load Balancing is weight based on the per-instance weights reported in the last processed health check replies, as long as every instance either reported a valid weight or had UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains equal-weight. locality_lb_policy is applicable to either:- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and loadBalancingScheme set to INTERNAL_MANAGED.
- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
- A regional backend service with loadBalancingScheme set to EXTERNAL (External Network
Load Balancing). Only MAGLEV and WEIGHTED_MAGLEV values are possible for External
Network Load Balancing. The default is MAGLEV.
If session_affinity is not NONE, and locality_lb_policy is not set to MAGLEV, WEIGHTED_MAGLEV,
or RING_HASH, session affinity settings will not take effect.
Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced
by a URL map that is bound to target gRPC proxy that has validate_for_proxyless
field set to true.
Possible values are:
ROUND_ROBIN
,LEAST_REQUEST
,RING_HASH
,RANDOM
,ORIGINAL_DESTINATION
,MAGLEV
,WEIGHTED_MAGLEV
.
log_config: Output<Option<BackendServiceLogConfig>>
This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver. Structure is documented below.
name: Output<Option<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?
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.
outlier_detection: Output<Option<BackendServiceOutlierDetection>>
Settings controlling eviction of unhealthy hosts from the load balancing pool. Applicable backend service types can be a global backend service with the loadBalancingScheme set to INTERNAL_SELF_MANAGED or EXTERNAL_MANAGED. Structure is documented below.
port_name: Output<Option<String>>
Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL.
project: Output<Option<String>>
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
protocol: Output<Option<String>>
The protocol this BackendService uses to communicate with backends.
The default is HTTP. NOTE: HTTP2 is only valid for beta HTTP/2 load balancer
types and may result in errors if used with the GA API. NOTE: With protocol “UNSPECIFIED”,
the backend service can be used by Layer 4 Internal Load Balancing or Network Load Balancing
with TCP/UDP/L3_DEFAULT Forwarding Rule protocol.
Possible values are: HTTP
, HTTPS
, HTTP2
, TCP
, SSL
, GRPC
, UNSPECIFIED
.
security_policy: Output<Option<String>>
The security policy associated with this backend service.
security_settings: Output<Option<BackendServiceSecuritySettings>>
The security settings that apply to this backend service. 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; or a global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. Structure is documented below.
service_lb_policy: Output<Option<String>>
URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
session_affinity: Output<Option<String>>
Type of session affinity to use. The default is NONE. Session affinity is
not applicable if the protocol is UDP.
Possible values are: NONE
, CLIENT_IP
, CLIENT_IP_PORT_PROTO
, CLIENT_IP_PROTO
, GENERATED_COOKIE
, HEADER_FIELD
, HTTP_COOKIE
, STRONG_COOKIE_AFFINITY
.
Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY. Structure is documented below.
timeout_sec: Output<Option<i32>>
The backend service timeout has a different meaning depending on the type of load balancer. For more information see, Backend service settings. The default is 30 seconds. The full range of timeout values allowed goes from 1 through 2,147,483,647 seconds.
Implementations§
source§impl BackendServiceArgs
impl BackendServiceArgs
sourcepub fn builder() -> BackendServiceArgsBuilder
pub fn builder() -> BackendServiceArgsBuilder
Create an instance of BackendServiceArgs
using the builder syntax
Trait Implementations§
source§impl Clone for BackendServiceArgs
impl Clone for BackendServiceArgs
source§fn clone(&self) -> BackendServiceArgs
fn clone(&self) -> BackendServiceArgs
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for BackendServiceArgs
impl RefUnwindSafe for BackendServiceArgs
impl Send for BackendServiceArgs
impl Sync for BackendServiceArgs
impl Unpin for BackendServiceArgs
impl UnwindSafe for BackendServiceArgs
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)