Method: regionBackendServices.list

Retrieves the list of regional BackendService resources available to the specified project in the given region.

HTTP request

GET https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
project

string

Project ID for this request.

region

string

Name of the region scoping this request.

Query parameters

Parameters
maxResults

integer (uint32 format)

The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)

pageToken

string

Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.

filter

string

A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.

For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.

You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.

To filter on multiple expressions, provide each separate expression within parentheses. For example:

(scheduling.automaticRestart = true)
(cpuPlatform = "Intel Skylake")

By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example:

(cpuPlatform = "Intel Skylake") OR
(cpuPlatform = "Intel Broadwell") AND
(scheduling.automaticRestart = true)
orderBy

string

Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.

You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.

Currently, only sorting by name or creationTimestamp desc is supported.

returnPartialSuccess

boolean

Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

Contains a list of BackendService resources.

JSON representation
{
  "id": string,
  "items": [
    {
      "id": string,
      "creationTimestamp": string,
      "name": string,
      "description": string,
      "selfLink": string,
      "backends": [
        {
          "description": string,
          "group": string,
          "balancingMode": enum,
          "maxUtilization": number,
          "maxRate": integer,
          "maxRatePerInstance": number,
          "maxRatePerEndpoint": number,
          "maxConnections": integer,
          "maxConnectionsPerInstance": integer,
          "maxConnectionsPerEndpoint": integer,
          "capacityScaler": number,
          "failover": boolean
        }
      ],
      "healthChecks": [
        string
      ],
      "timeoutSec": integer,
      "port": integer,
      "protocol": enum,
      "fingerprint": string,
      "portName": string,
      "enableCDN": boolean,
      "sessionAffinity": enum,
      "affinityCookieTtlSec": integer,
      "region": string,
      "failoverPolicy": {
        "disableConnectionDrainOnFailover": boolean,
        "dropTrafficIfUnhealthy": boolean,
        "failoverRatio": number
      },
      "loadBalancingScheme": enum,
      "connectionDraining": {
        "drainingTimeoutSec": integer
      },
      "iap": {
        "enabled": boolean,
        "oauth2ClientId": string,
        "oauth2ClientSecret": string,
        "oauth2ClientSecretSha256": string
      },
      "cdnPolicy": {
        "cacheKeyPolicy": {
          "includeProtocol": boolean,
          "includeHost": boolean,
          "includeQueryString": boolean,
          "queryStringWhitelist": [
            string
          ],
          "queryStringBlacklist": [
            string
          ]
        },
        "signedUrlKeyNames": [
          string
        ],
        "signedUrlCacheMaxAgeSec": string,
        "requestCoalescing": boolean,
        "cacheMode": enum,
        "defaultTtl": integer,
        "maxTtl": integer,
        "clientTtl": integer,
        "negativeCaching": boolean,
        "negativeCachingPolicy": [
          {
            "code": integer,
            "ttl": integer
          }
        ],
        "bypassCacheOnRequestHeaders": [
          {
            "headerName": string
          }
        ],
        "serveWhileStale": integer
      },
      "customRequestHeaders": [
        string
      ],
      "customResponseHeaders": [
        string
      ],
      "securityPolicy": string,
      "logConfig": {
        "enable": boolean,
        "sampleRate": number
      },
      "securitySettings": {
        "clientTlsPolicy": string,
        "subjectAltNames": [
          string
        ]
      },
      "localityLbPolicy": enum,
      "consistentHash": {
        "httpCookie": {
          "name": string,
          "path": string,
          "ttl": {
            "seconds": string,
            "nanos": integer
          }
        },
        "httpHeaderName": string,
        "minimumRingSize": string
      },
      "circuitBreakers": {
        "maxRequestsPerConnection": integer,
        "maxConnections": integer,
        "maxPendingRequests": integer,
        "maxRequests": integer,
        "maxRetries": integer
      },
      "outlierDetection": {
        "consecutiveErrors": integer,
        "interval": {
          "seconds": string,
          "nanos": integer
        },
        "baseEjectionTime": {
          "seconds": string,
          "nanos": integer
        },
        "maxEjectionPercent": integer,
        "enforcingConsecutiveErrors": integer,
        "enforcingSuccessRate": integer,
        "successRateMinimumHosts": integer,
        "successRateRequestVolume": integer,
        "successRateStdevFactor": integer,
        "consecutiveGatewayFailure": integer,
        "enforcingConsecutiveGatewayFailure": integer
      },
      "network": string,
      "maxStreamDuration": {
        "seconds": string,
        "nanos": integer
      },
      "kind": string
    }
  ],
  "nextPageToken": string,
  "selfLink": string,
  "warning": {
    "code": enum,
    "message": string,
    "data": [
      {
        "key": string,
        "value": string
      }
    ]
  },
  "kind": string
}
Fields
id

string

[Output Only] Unique identifier for the resource; defined by the server.

items[]

object

A list of BackendService resources.

items[].id

string (fixed64 format)

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

items[].creationTimestamp

string

[Output Only] Creation timestamp in RFC3339 text format.

items[].name

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]([-a-z0-9]*[a-z0-9])? 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.

items[].description

string

An optional description of this resource. Provide this property when you create the resource.

items[].selfLink

string

[Output Only] Server-defined URL for the resource.

items[].backends[]

object

The list of backends that serve this BackendService.

items[].backends[].description

string

An optional description of this resource. Provide this property when you create the resource.

items[].backends[].group

string

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.

items[].backends[].balancingMode

enum

Specifies how to determine whether the backend of a load balancer can handle additional traffic or is fully loaded. For usage guidelines, see Connection balancing mode.

items[].backends[].maxUtilization

number

items[].backends[].maxRate

integer

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.

items[].backends[].maxRatePerInstance

number

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.

items[].backends[].maxRatePerEndpoint

number

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.

items[].backends[].maxConnections

integer

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.

items[].backends[].maxConnectionsPerInstance

integer

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.

items[].backends[].maxConnectionsPerEndpoint

integer

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.

items[].backends[].capacityScaler

number

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.

items[].backends[].failover

boolean

This field designates whether this is a failover backend. More than one failover backend can be configured for a given BackendService.

items[].healthChecks[]

string

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.

items[].timeoutSec

integer

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.

items[].port
(deprecated)

integer

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.

items[].protocol

enum

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.

items[].fingerprint

string (bytes format)

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.

A base64-encoded string.

items[].portName

string

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

items[].enableCDN

boolean

If true, enables Cloud CDN for the backend service of an external HTTP(S) load balancer.

items[].sessionAffinity

enum

Type of session affinity to use. The default is NONE. For a detailed description of session affinity options, see: Session affinity.

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.

items[].affinityCookieTtlSec

integer

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 one day (86,400).

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.

items[].region

string

[Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

items[].failoverPolicy

object

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.

items[].failoverPolicy.disableConnectionDrainOnFailover

boolean

This can be set to true only if the protocol is TCP.

The default is false.

items[].failoverPolicy.dropTrafficIfUnhealthy

boolean

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.

items[].failoverPolicy.failoverRatio

number

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.

items[].loadBalancingScheme

enum

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