Idem.GCP.COMPUTE.BACKEND_SERVICE
{
"account": "string",
"affinity_cookie_ttl_sec": 0,
"backends": [
{
"balancing_mode": "string",
"description": "string",
"failover": false,
"group": "string",
"max_connections": 0,
"max_connections_per_endpoint": 0,
"max_connections_per_instance": 0,
"max_rate": 0
}
],
"cdn_policy": {
"bypass_cache_on_request_headers": [
{
"header_name": "string"
}
],
"cache_key_policy": {
"include_host": false,
"include_http_headers": [
"string"
],
"include_named_cookies": [
"string"
],
"include_protocol": false,
"include_query_string": false,
"query_string_blacklist": [
"string"
],
"query_string_whitelist": [
"string"
]
},
"cache_mode": "string",
"client_ttl": 0,
"default_ttl": 0,
"max_ttl": 0,
"negative_caching": false,
"negative_caching_policy": [
{
"code": 0,
"ttl": 0
}
],
"request_coalescing": false,
"serve_while_stale": 0,
"signed_url_cache_max_age_sec": "string",
"signed_url_key_names": [
"string"
]
},
"circuit_breakers": {
"max_connections": 0,
"max_pending_requests": 0,
"max_requests": 0,
"max_requests_per_connection": 0,
"max_retries": 0
},
"compression_mode": "string",
"connection_draining": {
"draining_timeout_sec": 0
},
"connection_tracking_policy": {
"connection_persistence_on_unhealthy_backends": "string",
"enable_strong_affinity": false,
"idle_timeout_sec": 0,
"tracking_mode": "string"
},
"consistent_hash": {
"http_cookie": {
"name": "string",
"path": "string",
"ttl": {
"nanos": 0,
"seconds": "string"
}
},
"http_header_name": "string",
"minimum_ring_size": "string"
},
"count": 0,
"custom_request_headers": [
"string"
],
"custom_response_headers": [
"string"
],
"description": "string",
"enable_cdn": false,
"failover_policy": {
"disable_connection_drain_on_failover": false,
"drop_traffic_if_unhealthy": false
},
"fingerprint": "string",
"health_checks": [
"string"
],
"iap": {
"enabled": false,
"oauth2_client_id": "string",
"oauth2_client_secret": "string",
"oauth2_client_secret_sha256": "string"
},
"load_balancing_scheme": "string",
"locality_lb_policies": [
{
"custom_policy": {
"data": "string",
"name": "string"
},
"policy": {
"name": "string"
}
}
],
"locality_lb_policy": "string",
"log_config": {
"enable": false
},
"max_stream_duration": {
"nanos": 0,
"seconds": "string"
},
"name": "string",
"network": "string",
"outlier_detection": {
"base_ejection_time": {
"nanos": 0,
"seconds": "string"
},
"consecutive_errors": 0,
"consecutive_gateway_failure": 0,
"enforcing_consecutive_errors": 0,
"enforcing_consecutive_gateway_failure": 0,
"enforcing_success_rate": 0,
"interval": {
"nanos": 0,
"seconds": "string"
},
"max_ejection_percent": 0,
"success_rate_minimum_hosts": 0,
"success_rate_request_volume": 0,
"success_rate_stdev_factor": 0
},
"port": 0,
"port_name": "string",
"project": "string",
"protocol": "string",
"region": "string",
"request_id": "string",
"resource_id": "string",
"security_settings": {
"client_tls_policy": "string",
"subject_alt_names": [
"string"
]
},
"service_bindings": [
"string"
],
"session_affinity": "string",
"subsetting": {
"policy": "string"
},
"timeout_sec": 0
}
The name of the vRA cloud account to use during provisioning
Lifetime of cookies in seconds. This setting is applicable to external and internal HTTP(S) load balancers and Traffic Director and requires GENERATED_COOKIE or HTTP_COOKIE session affinity. 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 is two weeks (1,209,600). Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. Defaults to None.
The list of backends that serve this BackendService. Defaults to None.
- max_connections (int, Optional): Defines a target maximum number of simultaneous connections. For usage guidelines, see Connection balancing mode and Utilization balancing mode. Not available if the backend's balancingMode is RATE.
- max_connections_per_instance (int, Optional): Defines a target maximum number of simultaneous connections. For usage guidelines, see Connection balancing mode and Utilization balancing mode. Not available if the backend's balancingMode is RATE.
- max_rate_per_endpoint (float, Optional): Defines a maximum target for requests per second (RPS). For usage guidelines, see Rate balancing mode and Utilization balancing mode. Not available if the backend's balancingMode is CONNECTION.
- max_utilization (float, Optional): Optional parameter to define a target capacity for the UTILIZATION balancing mode. The valid range is [0.0, 1.0]. For usage guidelines, see Utilization balancing mode.
- max_rate (int, Optional): Defines a maximum number of HTTP requests per second (RPS). For usage guidelines, see Rate balancing mode and Utilization balancing mode. Not available if the backend's balancingMode is CONNECTION.
- capacity_scaler (float, Optional): A multiplier applied to the backend's target capacity of its balancing mode. The default value is 1, which means the group serves up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available capacity. The valid ranges are 0.0 and [0.1,1.0]. You cannot configure a setting larger than 0 and smaller than 0.1. You cannot configure a setting of 0 when there is only one backend attached to the backend service.
- group (str, Optional): The fully-qualified URL of an instance group or network endpoint group (NEG) resource. To determine what types of backends a load balancer supports, see the Backend services overview. You must use the fully-qualified URL (starting with https://www.googleapis.com/) to specify the instance group or NEG. Partial URLs are not supported.
Cloud CDN configuration for this BackendService. Only available for specified load balancer types. BackendServiceCdnPolicy: Message containing Cloud CDN configuration for a backend service. Defaults to None.
- request_coalescing (bool, Optional): If true then Cloud CDN will combine multiple concurrent cache fill requests into a small number of requests to the origin.
- default_ttl (int, Optional): Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). Setting a TTL of "0" means "always revalidate". The value of defaultTTL cannot be set to a value greater than that of maxTTL, but can be equal. When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will overwrite the TTL set in all responses. The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
- bypass_cache_on_request_headers (List[Dict[str, Any]], Optional): Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings.
- header_name (str, Optional): The header field name to match on when bypassing cache. Values are case-insensitive.
CircuitBreakers: Settings controlling the volume of requests, connections and retries to this backend service. Defaults to None.
- max_requests_per_connection (int, Optional): Maximum requests for a single connection to the backend service. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
- max_connections (int, Optional): The maximum number of connections to the backend service. If not specified, there is no limit. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
- max_requests (int, Optional): The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
- max_retries (int, Optional): The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
- max_pending_requests (int, Optional): The maximum number of pending requests allowed to the backend service. If not specified, there is no limit. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header. Enum type. Allowed values: "AUTOMATIC" - Automatically uses the best compression based on the Accept-Encoding header sent by the client. "DISABLED" - Disables compression. Existing compressed responses cached by Cloud CDN will not be served to clients. Defaults to None.
ConnectionDraining: Message containing connection draining configuration. Defaults to None.
- draining_timeout_sec (int, Optional): Configures a duration timeout for existing requests on a removed backend instance. For supported load balancers and protocols, as described in Enabling connection draining.
Connection Tracking configuration for this BackendService. Connection tracking policy settings are only available for Network Load Balancing and Internal TCP/UDP Load Balancing. BackendServiceConnectionTrackingPolicy: Connection Tracking configuration for this BackendService. Defaults to None.
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 is only applicable when localityLbPolicy is set to MAGLEV or RING_HASH. 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. ConsistentHashLoadBalancerSettings: This message defines settings for a consistent hash style load balancer. Defaults to None.
The number of resource instances to be created.
Headers that the load balancer adds to proxied requests. See Creating custom headers. Defaults to None.
Headers that the load balancer adds to proxied responses. See Creating custom headers. Defaults to None.
An optional description of this resource. Provide this property when you create the resource. Defaults to None.
If true, enables Cloud CDN for the backend service of an external HTTP(S) load balancer. Defaults to None.
Requires at least one backend instance group to be defined as a backup (failover) backend. For load balancers that have configurable failover: Internal TCP/UDP Load Balancing and external TCP/UDP Load Balancing. BackendServiceFailoverPolicy: For load balancers that have configurable failover: Internal TCP/UDP Load Balancing and external TCP/UDP Load Balancing. On failover or failback, this field indicates whether connection draining will be honored. Google Cloud has a fixed connection draining timeout of 10 minutes. A setting of true terminates existing TCP connections to the active pool during failover and failback, immediately draining traffic. A setting of false allows existing TCP connections to persist, even on VMs no longer in the active pool, for up to the duration of the connection draining timeout (10 minutes). Defaults to None.
- drop_traffic_if_unhealthy (bool, Optional): If set to true, connections to the load balancer are dropped when all primary and all backup backend VMs are unhealthy.If set to false, connections are distributed among all primary VMs when all primary and all backup backend VMs are unhealthy. For load balancers that have configurable failover: Internal TCP/UDP Load Balancing and external TCP/UDP Load Balancing. The default is false.
- disable_connection_drain_on_failover (bool, Optional): This can be set to true only if the protocol is TCP. The default is false.
- failover_ratio (float, Optional): The value of the field must be in the range [0, 1]. If the value is 0, the load balancer performs a failover when the number of healthy primary VMs equals zero. For all other values, the load balancer performs a failover when the total number of healthy primary VMs is less than this ratio. For load balancers that have configurable failover: Internal TCP/UDP Load Balancing and external TCP/UDP Load Balancing.
Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a BackendService. Defaults to None.
The list of URLs to the healthChecks, httpHealthChecks (legacy), or httpsHealthChecks (legacy) resource for health checking this backend service. Not all backend services support legacy health checks. See Load balancer guide. Currently, at most one health check can be specified for each backend service. Backend services with instance group or zonal NEG backends must have a health check. Backend services with internet or serverless NEG backends must not have a health check. Defaults to None.
The configurations for Identity-Aware Proxy on this resource. Not available for Internal TCP/UDP Load Balancing and Network Load Balancing. BackendServiceIAP: Identity-Aware Proxy. Defaults to None.
- oauth2_client_id (str, Optional): OAuth2 client ID to use for the authentication flow.
- oauth2_client_secret (str, Optional): OAuth2 client secret to use for the authentication flow. For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2ClientSecretSha256 field. @InputOnly
- enabled (bool, Optional): Whether the serving infrastructure will authenticate and authorize all incoming requests. If true, the oauth2ClientId and oauth2ClientSecret fields must be non-empty.
- oauth2_client_secret_sha256 (str, Optional): [Output Only] SHA256 hash value for the field oauth2_client_secret above.
Specifies the load balancer type. A backend service created for one type of load balancer cannot be used with another. For more information, refer to Choosing a load balancer. Enum type. Allowed values: "EXTERNAL" - Signifies that this will be used for external HTTP(S), SSL Proxy, TCP Proxy, or Network Load Balancing "EXTERNAL_MANAGED" - Signifies that this will be used for External Managed HTTP(S) Load Balancing. "INTERNAL" - Signifies that this will be used for Internal TCP/UDP Load Balancing. "INTERNAL_MANAGED" - Signifies that this will be used for Internal HTTP(S) Load Balancing. "INTERNAL_SELF_MANAGED" - Signifies that this will be used by Traffic Director. "INVALID_LOAD_BALANCING_SCHEME". Defaults to None.
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. Defaults to None.
- custom_policy (Dict[str, Any], Optional): BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy: The configuration for a custom policy implemented by the user and deployed with the client.
- name (str, Optional): Identifies the custom policy. The value should match the type the custom implementation is registered with on the gRPC clients. It should follow protocol buffer message naming conventions and include the full path (e.g. myorg.CustomLbPolicy). The maximum length is 256 characters. Note that specifying the same custom policy more than once for a backend is not a valid configuration and will be rejected.
- data (str, Optional): An optional, arbitrary JSON object with configuration data, understood by a locally installed custom policy implementation.
- policy (Dict[str, Any], Optional): BackendServiceLocalityLoadBalancingPolicyConfigPolicy: The configuration for a built-in load balancing policy.
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. This is the default. - 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, see https://ai.google/research/pubs/pub44824 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. If sessionAffinity is not NONE, and this field is not set to 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 validateForProxyless field set to true. Enum type. Allowed values: "INVALID_LB_POLICY" "LEAST_REQUEST" - An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. "MAGLEV" - This algorithm implements consistent hashing to backends. Maglev can be 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, see https://ai.google/research/pubs/pub44824 "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. "RANDOM" - The load balancer selects a random healthy host. "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. "ROUND_ROBIN" - This is a simple policy in which each healthy backend is selected in round robin order. This is the default. Defaults to None.
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. BackendServiceLogConfig: The available logging options for the load balancer traffic served by this backend service. Defaults to None.
- enable (bool, Optional): Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
- sample_rate (float, Optional): This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0.
Specifies the default maximum duration (timeout) for streams to this service. Duration is computed from the beginning of the stream until the response has been completely processed, including all retries. A stream that does not complete in this duration is closed. If not specified, there will be no timeout limit, i.e. the maximum duration is infinite. This value can be overridden in the PathMatcher configuration of the UrlMap that references this backend service. This field is only allowed when the loadBalancingScheme of the backend service is INTERNAL_SELF_MANAGED. Duration: A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. Defaults to None.
- nanos (int, Optional): Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0
seconds
field and a positivenanos
field. Must be from 0 to 999,999,999 inclusive. - seconds (str, Optional): Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
An Idem name of the resource.
The URL of the network to which this backend service belongs. This field can only be specified when the load balancing scheme is set to INTERNAL. Defaults to None.
Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. If not set, this feature is considered disabled. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2, or GRPC, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. OutlierDetection: Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. Defaults to None.
Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80. For Internal TCP/UDP Load Balancing and Network Load Balancing, omit port. Defaults to None.
A named port on a backend instance group representing the port for communication to the backend VMs in that group. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs. For Internal TCP/UDP Load Balancing and Network Load Balancing, omit port_name. Defaults to None.
Project ID for this request.
The protocol this BackendService uses to communicate with backends. Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, UDP or GRPC. depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancers or for Traffic Director for more information. Must be set to GRPC when the backend service is referenced by a URL map that is bound to target gRPC proxy. Enum type. Allowed values: "GRPC" - gRPC (available for Traffic Director). "HTTP" "HTTP2" - HTTP/2 with SSL. "HTTPS" "SSL" - TCP proxying with SSL. "TCP" - TCP proxying or TCP pass-through. "UDP" - UDP. "UNSPECIFIED" - If a Backend Service has UNSPECIFIED as its protocol, it can be used with any L3/L4 Forwarding Rules. Defaults to None.
The region where the regional backend service resides.
An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). Defaults to None.
An identifier of the resource in the provider. Defaults to None.
This field specifies the security settings that apply to this backend service. This field is applicable to a global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. SecuritySettings: The authentication and authorization settings for a BackendService. Defaults to None.
- client_tls_policy (str, Optional): Optional. A URL referring to a networksecurity.ClientTlsPolicy resource that describes how clients should authenticate with this service's backends. clientTlsPolicy only applies to a global BackendService with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. If left blank, communications are not encrypted. Note: This field currently has no impact.
- subject_alt_names (List[str], Optional): Optional. A list of Subject Alternative Names (SANs) that the client verifies during a mutual TLS handshake with an server/endpoint for this BackendService. When the server presents its X.509 certificate to the client, the client inspects the certificate's subjectAltName field. If the field contains one of the specified values, the communication continues. Otherwise, it fails. This additional check enables the client to verify that the server is authorized to run the requested service. Note that the contents of the server certificate's subjectAltName field are configured by the Public Key Infrastructure which provisions server identities. Only applies to a global BackendService with loadBalancingScheme set to INTERNAL_SELF_MANAGED. Only applies when BackendService has an attached clientTlsPolicy with clientCertificate (mTLS mode). Note: This field currently has no impact.
URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty. Defaults to None.
Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: Session Affinity. Enum type. Allowed values: "CLIENT_IP" - 2-tuple hash on packet's source and destination IP addresses. Connections from the same source IP address to the same destination IP address will be served by the same backend VM while that VM remains healthy. "CLIENT_IP_NO_DESTINATION" - 1-tuple hash only on packet's source IP address. Connections from the same source IP address will be served by the same backend VM while that VM remains healthy. This option can only be used for Internal TCP/UDP Load Balancing. "CLIENT_IP_PORT_PROTO" - 5-tuple hash on packet's source and destination IP addresses, IP protocol, and source and destination ports. Connections for the same IP protocol from the same source IP address and port to the same destination IP address and port will be served by the same backend VM while that VM remains healthy. This option cannot be used for HTTP(S) load balancing. "CLIENT_IP_PROTO" - 3-tuple hash on packet's source and destination IP addresses, and IP protocol. Connections for the same IP protocol from the same source IP address to the same destination IP address will be served by the same backend VM while that VM remains healthy. This option cannot be used for HTTP(S) load balancing. "GENERATED_COOKIE" - Hash based on a cookie generated by the L7 loadbalancer. Only valid for HTTP(S) load balancing. "HEADER_FIELD" - The hash is based on a user specified header field. "HTTP_COOKIE" - The hash is based on a user provided cookie. "NONE" - No session affinity. Connections from the same client IP may go to any instance in the pool. Defaults to None.
Subsetting: Subsetting configuration for this BackendService. Currently this is applicable only for Internal TCP/UDP load balancing, Internal HTTP(S) load balancing and Traffic Director. Defaults to None.
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. This value can be overridden in the PathMatcher configuration of the UrlMap that references this backend service. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. Instead, use maxStreamDuration. Defaults to None.