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)
  }
}
Fields
name

string

Required. 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.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

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

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

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.

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.

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.