REST Resource: projects.locations.serviceLbPolicies

Resource: ServiceLbPolicy

ServiceLbPolicy holds global load balancing and traffic distribution configuration that can be applied to a BackendService.

JSON representation
{
  "name": string,
  "createTime": string,
  "updateTime": string,
  "labels": {
    string: string,
    ...
  },
  "description": string,
  "loadBalancingAlgorithm": enum (LoadBalancingAlgorithm),
  "autoCapacityDrain": {
    object (AutoCapacityDrain)
  },
  "failoverConfig": {
    object (FailoverConfig)
  },
  "isolationConfig": {
    object (IsolationConfig)
  }
}
Fields
name

string

Identifier. Name of the ServiceLbPolicy resource. It matches pattern projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}.

createTime

string (Timestamp format)

Output only. The timestamp when this resource was created.

Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

Output only. The timestamp when this resource was last updated.

Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

labels

map (key: string, value: string)

Optional. Set of label tags associated with the ServiceLbPolicy resource.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

description

string

Optional. A free-text description of the resource. Max length 1024 characters.

loadBalancingAlgorithm

enum (LoadBalancingAlgorithm)

Optional. The type of load balancing algorithm to be used. The default behavior is WATERFALL_BY_REGION.

autoCapacityDrain

object (AutoCapacityDrain)

Optional. Configuration to automatically move traffic away for unhealthy IG/NEG for the associated Backend Service.

failoverConfig

object (FailoverConfig)

Optional. Configuration related to health based failover.

isolationConfig

object (IsolationConfig)

Optional. Configuration to provide isolation support for the associated Backend Service.

LoadBalancingAlgorithm

The global load balancing algorithm to be used.

Enums
LOAD_BALANCING_ALGORITHM_UNSPECIFIED The type of the loadbalancing algorithm is unspecified.
SPRAY_TO_WORLD Balance traffic across all backends across the world proportionally based on capacity.
SPRAY_TO_REGION Direct traffic to the nearest region with endpoints and capacity before spilling over to other regions and spread the traffic from each client to all the MIGs/NEGs in a region.
WATERFALL_BY_REGION Direct traffic to the nearest region with endpoints and capacity before spilling over to other regions. All MIGs/NEGs within a region are evenly loaded but each client might not spread the traffic to all the MIGs/NEGs in the region.
WATERFALL_BY_ZONE Attempt to keep traffic in a single zone closest to the client, before spilling over to other zones.

AutoCapacityDrain

Option to specify if an unhealthy IG/NEG should be considered for global load balancing and traffic routing.

JSON representation
{
  "enable": boolean
}
Fields
enable

boolean

Optional. If set to 'True', an unhealthy IG/NEG will be set as drained. - An IG/NEG is considered unhealthy if less than 25% of the instances/endpoints in the IG/NEG are healthy. - This option will never result in draining more than 50% of the configured IGs/NEGs for the Backend Service.

FailoverConfig

Option to specify health based failover behavior. This is not related to Network load balancer FailoverPolicy.

JSON representation
{
  "failoverHealthThreshold": integer
}
Fields
failoverHealthThreshold

integer

Optional. The percentage threshold that a load balancer will begin to send traffic to failover backends. If the percentage of endpoints in a MIG/NEG is smaller than this value, traffic would be sent to failover backends if possible. This field should be set to a value between 1 and 99. The default value is 50 for Global external HTTP(S) load balancer (classic) and Proxyless service mesh, and 70 for others.

IsolationConfig

Configuration to provide isolation support for the associated Backend Service.

JSON representation
{
  "isolationGranularity": enum (IsolationGranularity)
}
Fields
isolationGranularity

enum (IsolationGranularity)

Optional. The isolation granularity of the load balancer.

IsolationGranularity

The granularity of this isolation restriction.

Enums
ISOLATION_GRANULARITY_UNSPECIFIED No isolation is configured for the backend service. Traffic can overflow based on the load balancing algorithm.
REGION Traffic for this service will be isolated at the nearest cloud region.

Methods

create

Creates a new ServiceLbPolicy in a given project and location.

delete

Deletes a single ServiceLbPolicy.

get

Gets details of a single ServiceLbPolicy.

getIamPolicy

Gets the access control policy for a resource.

list

Lists ServiceLbPolicies in a given project and location.

patch

Updates the parameters of a single ServiceLbPolicy.

setIamPolicy

Sets the access control policy on the specified resource.

testIamPermissions

Returns permissions that a caller has on the specified resource.