Method: backendServices.update

Updates the specified BackendService resource with the data included in the request. For more information, see Backend services overview.

HTTP request

PUT https://compute.googleapis.com/compute/v1/projects/{project}/global/backendServices/{resourceId}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
project

string

Project ID for this request.

resourceId

string

Name of the BackendService resource to update.

Query parameters

Parameters
requestId

string

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

Request body

The request body contains data with the following structure:

JSON representation
{
  "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
}
Fields
id

string (uint64 format)

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

creationTimestamp

string

[Output Only] Creation timestamp in RFC3339 text format.

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.

description

string

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

backends[]

object

The list of backends that serve this BackendService.

backends[].description

string

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

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.

Authorization requires one or more of the following IAM permissions on the specified resource group:

  • compute.instanceGroups.use
  • compute.networkEndpointGroups.use
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.

Backends must use compatible balancing modes. For more information, see Supported balancing modes and target capacity settings and Restrictions and guidance for instance groups.

Note: Currently, if you use the API to configure incompatible balancing modes, the configuration might be accepted even though it has no impact and is ignored. Specifically, Backend.maxUtilization is ignored when Backend.balancingMode is RATE. In the future, this incompatible combination will be rejected.

backends[].maxUtilization

number

Optional parameter to define a target capacity for the UTILIZATIONbalancing mode. The valid range is [0.0, 1.0].

For usage guidelines, see Utilization balancing mode.

backends[].maxRate

integer

Defines a maximum number of HTTP requests per second (RPS). For usage guidelines, see Rate balancing mode and