Method: urlMaps.update

Updates the specified UrlMap resource with the data included in the request.

HTTP request

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

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
project

string

Project ID for this request.

resourceId

string

Name of the UrlMap 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,
  "hostRules": [
    {
      "description": string,
      "hosts": [
        string
      ],
      "pathMatcher": string
    }
  ],
  "pathMatchers": [
    {
      "name": string,
      "description": string,
      "defaultService": string,
      "defaultRouteAction": ,
      "defaultUrlRedirect": ,
      "pathRules": [
        
      ],
      "routeRules": [
        
      ],
      "headerAction": 
    }
  ],
  "tests": [
    {
      "description": string,
      "host": string,
      "path": string,
      "service": string
    }
  ],
  "defaultService": string,
  "defaultRouteAction": {
    "weightedBackendServices": [
      
    ],
    "urlRewrite": ,
    "timeout": ,
    "retryPolicy": ,
    "requestMirrorPolicy": ,
    "corsPolicy": ,
    "faultInjectionPolicy": 
  },
  "defaultUrlRedirect": {
    "hostRedirect": string,
    "pathRedirect": string,
    "prefixRedirect": string,
    "redirectResponseCode": enum,
    "httpsRedirect": boolean,
    "stripQuery": boolean
  },
  "headerAction": {
    "requestHeadersToRemove": [
      string
    ],
    "requestHeadersToAdd": [
      
    ],
    "responseHeadersToRemove": [
      string
    ],
    "responseHeadersToAdd": [
      
    ]
  },
  "fingerprint": string,
  "region": string,
  "kind": string
}
Fields
id

string (fixed64 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.

hostRules[]

object

The list of HostRules to use against the URL.

hostRules[].description

string

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

hostRules[].hosts[]

string

The list of host patterns to match. They must be valid hostnames, except * will match any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or ..

hostRules[].pathMatcher

string

The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion.

pathMatchers[]

object

The list of named PathMatchers to use against the URL.

pathMatchers[].name

string

The name to which this PathMatcher is referred by the HostRule.

pathMatchers[].description

string

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

pathMatchers[].defaultService

string

The full or partial URL to the BackendService resource. This will be used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource:

If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified.

Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.

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

  • compute.backendBuckets.use
  • compute.backendServices.use

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

  • compute.backendBuckets.use
  • compute.backendServices.use

pathMatchers[].defaultRouteAction

object

defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.

Only one of defaultRouteAction or defaultUrlRedirect must be set.

pathMatchers[].defaultRouteAction.weightedBackendServices[]

object

A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.

Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.

pathMatchers[].defaultRouteAction.weightedBackendServices[].backendService

string

The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.

Authorization requires the following Google IAM permission on the specified resource backendService:

  • compute.backendServices.use

pathMatchers[].defaultRouteAction.weightedBackendServices[].weight

number (uint32 format)

Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .

The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.

The value must be between 0 and 1000

pathMatchers[].defaultRouteAction.weightedBackendServices[].headerAction

object

Specifies changes to request and response headers that need to take effect for the selected backendService.

headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.

pathMatchers[].defaultRouteAction.weightedBackendServices[].headerAction.requestHeadersToRemove[]

string

A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.

pathMatchers[].defaultRouteAction.weightedBackendServices[].headerAction.requestHeadersToAdd[]

object

Headers to add to a matching request prior to forwarding the request to the backendService.

pathMatchers[].defaultRouteAction.weightedBackendServices[].headerAction.requestHeadersToAdd[].headerName

string

The name of the header.

pathMatchers[].defaultRouteAction.weightedBackendServices[].headerAction.requestHeadersToAdd[].headerValue

string

The value of the header to add.

pathMatchers[].defaultRouteAction.weightedBackendServices[].headerAction.requestHeadersToAdd[].replace

boolean

If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.

The default value is false.

pathMatchers[].defaultRouteAction.weightedBackendServices[].headerAction.responseHeadersToRemove[]

string

A list of header names for headers that need to be removed from the response prior to sending the response back to the client.

pathMatchers[].defaultRouteAction.weightedBackendServices[].headerAction.responseHeadersToAdd[]

object

Headers to add the response prior to sending the response back to the client.

pathMatchers[].defaultRouteAction.weightedBackendServices[].headerAction.responseHeadersToAdd[].headerName

string

The name of the header.

pathMatchers[].defaultRouteAction.weightedBackendServices[].headerAction.responseHeadersToAdd[].headerValue

string

The value of the header to add.

pathMatchers[].defaultRouteAction.weightedBackendServices[].headerAction.responseHeadersToAdd[].replace

boolean

If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.

The default value is false.

pathMatchers[].defaultRouteAction.urlRewrite

object

The spec to modify the URL of the request, prior to forwarding the request to the matched service

pathMatchers[].defaultRouteAction.urlRewrite.pathPrefixRewrite

string

Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.

The value must be between 1 and 1024 characters.

pathMatchers[].defaultRouteAction.urlRewrite.hostRewrite

string

Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.

The value must be between 1 and 255 characters.

pathMatchers[].defaultRouteAction.timeout

object

Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.

If not specified, will use the largest timeout among all backend services associated with the route.

pathMatchers[].defaultRouteAction.timeout.seconds

string (int64 format)

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

pathMatchers[].defaultRouteAction.timeout.nanos

number

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 positive nanos field. Must be from 0 to 999,999,999 inclusive.

pathMatchers[].defaultRouteAction.retryPolicy

object

Specifies the retry policy associated with this route.

pathMatchers[].defaultRouteAction.retryPolicy.retryConditions[]

string

Specfies one or more conditions when this retry rule applies. Valid values are:

  • 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
  • gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
  • connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
  • retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
  • refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
  • cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
  • deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
  • resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
  • unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable

pathMatchers[].defaultRouteAction.retryPolicy.numRetries

number (uint32 format)

Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1.

pathMatchers[].defaultRouteAction.retryPolicy.perTryTimeout

object

Specifies a non-zero timeout per retry attempt.

If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.

pathMatchers[].defaultRouteAction.retryPolicy.perTryTimeout.seconds

string (int64 format)

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

pathMatchers[].defaultRouteAction.retryPolicy.perTryTimeout.nanos

number

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 positive nanos field. Must be from 0 to 999,999,999 inclusive.

pathMatchers[].defaultRouteAction.requestMirrorPolicy

object

Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.

pathMatchers[].defaultRouteAction.requestMirrorPolicy.backendService

string

The full or partial URL to the BackendService resource being mirrored to.

Authorization requires the following Google IAM permission on the specified resource backendService:

  • compute.backendServices.use

pathMatchers[].defaultRouteAction.corsPolicy

object

The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing

pathMatchers[].defaultRouteAction.corsPolicy.allowOrigins[]

string

Specifies the list of origins that will be allowed to do CORS requests.

An origin is allowed if it matches either allow_origins or allowOriginRegex.

pathMatchers[].defaultRouteAction.corsPolicy.allowOriginRegexes[]

string

Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript

An origin is allowed if it matches either allow_origins or allowOriginRegex.

pathMatchers[].defaultRouteAction.corsPolicy.allowMethods[]

string

Specifies the content for the Access-Control-Allow-Methods header.

pathMatchers[].defaultRouteAction.corsPolicy.allowHeaders[]

string

Specifies the content for the Access-Control-Allow-Headers header.

pathMatchers[].defaultRouteAction.corsPolicy.exposeHeaders[]

string

Specifies the content for the Access-Control-Expose-Headers header.

pathMatchers[].defaultRouteAction.corsPolicy.maxAge

number

Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header.

pathMatchers[].defaultRouteAction.corsPolicy.allowCredentials

boolean

In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.

Default is false.

pathMatchers[].defaultRouteAction.corsPolicy.disabled

boolean

If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.

pathMatchers[].defaultRouteAction.faultInjectionPolicy

object

The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.

timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy.

pathMatchers[].defaultRouteAction.faultInjectionPolicy.delay

object

The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.

pathMatchers[].defaultRouteAction.faultInjectionPolicy.delay.fixedDelay

object

Specifies the value of the fixed delay interval.

pathMatchers[].defaultRouteAction.faultInjectionPolicy.delay.fixedDelay.seconds

string (int64 format)

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

pathMatchers[].defaultRouteAction.faultInjectionPolicy.delay.fixedDelay.nanos

number

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 positive nanos field. Must be from 0 to 999,999,999 inclusive.

pathMatchers[].defaultRouteAction.faultInjectionPolicy.delay.percentage

number

The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.

The value must be between 0.0 and 100.0 inclusive.

pathMatchers[].defaultRouteAction.faultInjectionPolicy.abort

object

The specification for how client requests are aborted as part of fault injection.

pathMatchers[].defaultRouteAction.faultInjectionPolicy.abort.httpStatus

number (uint32 format)

The HTTP status code used to abort the request.

The value must be between 200 and 599 inclusive.

pathMatchers[].defaultRouteAction.faultInjectionPolicy.abort.percentage

number

The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.

The value must be between 0.0 and 100.0 inclusive.

pathMatchers[].defaultUrlRedirect

object

When when none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect.

If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.

pathMatchers[].defaultUrlRedirect.hostRedirect

string

The host that will be used in the redirect response instead of the one that was supplied in the request.

The value must be between 1 and 255 characters.

pathMatchers[].defaultUrlRedirect.pathRedirect

string

The path that will be used in the redirect response instead of the one that was supplied in the request.

Only one of pathRedirect or prefixRedirect must be specified.

The value must be between 1 and 1024 characters.

pathMatchers[].defaultUrlRedirect.prefixRedirect

string

The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.

pathMatchers[].defaultUrlRedirect.redirectResponseCode

enum

The HTTP Status code to use for this RedirectAction.

Supported values are:

  • MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
  • FOUND, which corresponds to 302.
  • SEE_OTHER which corresponds to 303.
  • TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
  • PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.

pathMatchers[].defaultUrlRedirect.httpsRedirect

boolean

If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.

This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.

The default is set to false.

pathMatchers[].defaultUrlRedirect.stripQuery

boolean

If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.

The default is set to false.

pathMatchers[].pathRules[]

object

The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.

For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list.

Within a given pathMatcher, only one of pathRules or routeRules must be set.

pathMatchers[].pathRules[].service

string

The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified.

Only one of urlRedirect, service or routeAction.weightedBackendService must be set.

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

  • compute.backendBuckets.use
  • compute.backendServices.use

pathMatchers[].pathRules[].routeAction

object

In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.

Only one of routeAction or urlRedirect must be set.

pathMatchers[].pathRules[].routeAction.weightedBackendServices[]

object

A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.

Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.

pathMatchers[].pathRules[].routeAction.weightedBackendServices[].backendService

string

The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.

Authorization requires the following Google IAM permission on the specified resource backendService:

  • compute.backendServices.use

pathMatchers[].pathRules[].routeAction.weightedBackendServices[].weight

number (uint32 format)

Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .

The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.

The value must be between 0 and 1000

pathMatchers[].pathRules[].routeAction.weightedBackendServices[].headerAction

object

Specifies changes to request and response headers that need to take effect for the selected backendService.

headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.

pathMatchers[].pathRules[].routeAction.weightedBackendServices[].headerAction.requestHeadersToRemove[]

string

A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.

pathMatchers[].pathRules[].routeAction.weightedBackendServices[].headerAction.requestHeadersToAdd[]

object

Headers to add to a matching request prior to forwarding the request to the backendService.

pathMatchers[].pathRules[].routeAction.weightedBackendServices[].headerAction.requestHeadersToAdd[].headerName

string

The name of the header.

pathMatchers[].pathRules[].routeAction.weightedBackendServices[].headerAction.requestHeadersToAdd[].headerValue

string

The value of the header to add.

pathMatchers[].pathRules[].routeAction.weightedBackendServices[].headerAction.requestHeadersToAdd[].replace

boolean

If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.

The default value is false.

pathMatchers[].pathRules[].routeAction.weightedBackendServices[].headerAction.responseHeadersToRemove[]

string

A list of header names for headers that need to be removed from the response prior to sending the response back to the client.

pathMatchers[].pathRules[].routeAction.weightedBackendServices[].headerAction.responseHeadersToAdd[]

object

Headers to add the response prior to sending the response back to the client.

pathMatchers[].pathRules[].routeAction.weightedBackendServices[].headerAction.responseHeadersToAdd[].headerName

string

The name of the header.

pathMatchers[].pathRules[].routeAction.weightedBackendServices[].headerAction.responseHeadersToAdd[].headerValue

string

The value of the header to add.

pathMatchers[].pathRules[].routeAction.weightedBackendServices[].headerAction.responseHeadersToAdd[].replace

boolean

If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.

The default value is false.

pathMatchers[].pathRules[].routeAction.urlRewrite

object

The spec to modify the URL of the request, prior to forwarding the request to the matched service

pathMatchers[].pathRules[].routeAction.urlRewrite.pathPrefixRewrite

string

Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.

The value must be between 1 and 1024 characters.

pathMatchers[].pathRules[].routeAction.urlRewrite.hostRewrite

string

Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.

The value must be between 1 and 255 characters.

pathMatchers[].pathRules[].routeAction.timeout

object

Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.

If not specified, will use the largest timeout among all backend services associated with the route.

pathMatchers[].pathRules[].routeAction.timeout.seconds

string (int64 format)

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

pathMatchers[].pathRules[].routeAction.timeout.nanos

number

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 positive nanos field. Must be from 0 to 999,999,999 inclusive.

pathMatchers[].pathRules[].routeAction.retryPolicy

object

Specifies the retry policy associated with this route.

pathMatchers[].pathRules[].routeAction.retryPolicy.retryConditions[]

string

Specfies one or more conditions when this retry rule applies. Valid values are:

  • 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
  • gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
  • connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
  • retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
  • refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
  • cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
  • deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
  • resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
  • unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable

pathMatchers[].pathRules[].routeAction.retryPolicy.numRetries

number (uint32 format)

Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1.

pathMatchers[].pathRules[].routeAction.retryPolicy.perTryTimeout

object

Specifies a non-zero timeout per retry attempt.

If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.

pathMatchers[].pathRules[].routeAction.retryPolicy.perTryTimeout.seconds

string (int64 format)

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

pathMatchers[].pathRules[].routeAction.retryPolicy.perTryTimeout.nanos

number

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 positive nanos field. Must be from 0 to 999,999,999 inclusive.

pathMatchers[].pathRules[].routeAction.requestMirrorPolicy

object

Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.

pathMatchers[].pathRules[].routeAction.requestMirrorPolicy.backendService

string

The full or partial URL to the BackendService resource being mirrored to.

Authorization requires the following Google IAM permission on the specified resource backendService:

  • compute.backendServices.use

pathMatchers[].pathRules[].routeAction.corsPolicy

object

The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing

pathMatchers[].pathRules[].routeAction.corsPolicy.allowOrigins[]

string

Specifies the list of origins that will be allowed to do CORS requests.

An origin is allowed if it matches either allow_origins or allowOriginRegex.

pathMatchers[].pathRules[].routeAction.corsPolicy.allowOriginRegexes[]

string

Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript

An origin is allowed if it matches either allow_origins or allowOriginRegex.

pathMatchers[].pathRules[].routeAction.corsPolicy.allowMethods[]

string

Specifies the content for the Access-Control-Allow-Methods header.

pathMatchers[].pathRules[].routeAction.corsPolicy.allowHeaders[]

string

Specifies the content for the Access-Control-Allow-Headers header.

pathMatchers[].pathRules[].routeAction.corsPolicy.exposeHeaders[]

string

Specifies the content for the Access-Control-Expose-Headers header.

pathMatchers[].pathRules[].routeAction.corsPolicy.maxAge

number

Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header.

pathMatchers[].pathRules[].routeAction.corsPolicy.allowCredentials

boolean

In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.

Default is false.

pathMatchers[].pathRules[].routeAction.corsPolicy.disabled

boolean

If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.

pathMatchers[].pathRules[].routeAction.faultInjectionPolicy

object

The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.

timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy.

pathMatchers[].pathRules[].routeAction.faultInjectionPolicy.delay

object

The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.

pathMatchers[].pathRules[].routeAction.faultInjectionPolicy.delay.fixedDelay

object

Specifies the value of the fixed delay interval.

pathMatchers[].pathRules[].routeAction.faultInjectionPolicy.delay.fixedDelay.seconds

string (int64 format)

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

pathMatchers[].pathRules[].routeAction.faultInjectionPolicy.delay.fixedDelay.nanos

number

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 positive nanos field. Must be from 0 to 999,999,999 inclusive.

pathMatchers[].pathRules[].routeAction.faultInjectionPolicy.delay.percentage

number

The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.

The value must be between 0.0 and 100.0 inclusive.

pathMatchers[].pathRules[].routeAction.faultInjectionPolicy.abort

object

The specification for how client requests are aborted as part of fault injection.

pathMatchers[].pathRules[].routeAction.faultInjectionPolicy.abort.httpStatus

number (uint32 format)

The HTTP status code used to abort the request.

The value must be between 200 and 599 inclusive.

pathMatchers[].pathRules[].routeAction.faultInjectionPolicy.abort.percentage

number

The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.

The value must be between 0.0 and 100.0 inclusive.

pathMatchers[].pathRules[].urlRedirect

object

When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.

If urlRedirect is specified, service or routeAction must not be set.

pathMatchers[].pathRules[].urlRedirect.hostRedirect

string

The host that will be used in the redirect response instead of the one that was supplied in the request.

The value must be between 1 and 255 characters.

pathMatchers[].pathRules[].urlRedirect.pathRedirect

string

The path that will be used in the redirect response instead of the one that was supplied in the request.

Only one of pathRedirect or prefixRedirect must be specified.

The value must be between 1 and 1024 characters.

pathMatchers[].pathRules[].urlRedirect.prefixRedirect

string

The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.

pathMatchers[].pathRules[].urlRedirect.redirectResponseCode

enum

The HTTP Status code to use for this RedirectAction.

Supported values are:

  • MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
  • FOUND, which corresponds to 302.
  • SEE_OTHER which corresponds to 303.
  • TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
  • PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.

pathMatchers[].pathRules[].urlRedirect.httpsRedirect

boolean

If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.

This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.

The default is set to false.

pathMatchers[].pathRules[].urlRedirect.stripQuery

boolean

If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.

The default is set to false.

pathMatchers[].pathRules[].paths[]

string

The list of path patterns to match. Each must start with / and the only place a * is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here.

pathMatchers[].routeRules[]

object

The list of ordered HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. The order of specifying routeRules matters: the first rule that matches will cause its specified routing action to take effect.

Within a given pathMatcher, only one of pathRules or routeRules must be set.

routeRules are not supported in UrlMaps intended for External Load balancers.

pathMatchers[].routeRules[].priority

number

For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied.

You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive.

Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.

pathMatchers[].routeRules[].description

string

The short description conveying the intent of this routeRule.

The description can have a maximum length of 1024 characters.

pathMatchers[].routeRules[].matchRules[]

object

pathMatchers[].routeRules[].matchRules[].prefixMatch

string

For satifying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /.

The value must be between 1 and 1024 characters.

Only one of prefixMatch, fullPathMatch or regexMatch must be specified.

pathMatchers[].routeRules[].matchRules[].fullPathMatch

string

For satifying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL.

FullPathMatch must be between 1 and 1024 characters.

Only one of prefixMatch, fullPathMatch or regexMatch must be specified.

pathMatchers[].routeRules[].matchRules[].regexMatch

string

For satifying the matchRule condition, the path of the request must satisfy the regular expression specified in regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript

Only one of prefixMatch, fullPathMatch or regexMatch must be specified.

pathMatchers[].routeRules[].matchRules[].ignoreCase

boolean

Specifies that prefixMatch and fullPathMatch matches are case sensitive.

The default value is false.

caseSensitive must not be used with regexMatch.

pathMatchers[].routeRules[].matchRules[].headerMatches[]

object

Specifies a list of header match criteria, all of which must match corresponding headers in the request.

pathMatchers[].routeRules[].matchRules[].headerMatches[].headerName

string

The name of the HTTP header to match.

For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".

For matching a request's method, use the headerName ":method".

pathMatchers[].routeRules[].matchRules[].headerMatches[].exactMatch

string

The value should exactly match contents of exactMatch.

Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.

pathMatchers[].routeRules[].matchRules[].headerMatches[].regexMatch

string

The value of the header must match the regualar expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/cpp/regex/ecmascript

For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier.

Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.

pathMatchers[].routeRules[].matchRules[].headerMatches[].rangeMatch

object

The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails.

For example for a range [-5, 0]

  • -3 will match.
  • 0 will not match.
  • 0.25 will not match.
  • -3someString will not match.

Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.

pathMatchers[].routeRules[].matchRules[].headerMatches[].rangeMatch.rangeStart

string (int64 format)

The start of the range (inclusive) in signed long integer format.

pathMatchers[].routeRules[].matchRules[].headerMatches[].rangeMatch.rangeEnd

string (int64 format)

The end of the range (exclusive) in signed long integer format.

pathMatchers[].routeRules[].matchRules[].headerMatches[].presentMatch

boolean

A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value or not.

Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.

pathMatchers[].routeRules[].matchRules[].headerMatches[].prefixMatch

string

The value of the header must start with the contents of prefixMatch.

Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.

pathMatchers[].routeRules[].matchRules[].headerMatches[].suffixMatch

string

The value of the header must end with the contents of suffixMatch.

Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.

pathMatchers[].routeRules[].matchRules[].headerMatches[].invertMatch

boolean

If set to false, the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met.

The default setting is false.

pathMatchers[].routeRules[].matchRules[].queryParameterMatches[]

object

Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.

pathMatchers[].routeRules[].matchRules[].queryParameterMatches[].name

string

The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.

pathMatchers[].routeRules[].matchRules[].queryParameterMatches[].presentMatch

boolean

Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not.

Only one of presentMatch, exactMatch and regexMatch must be set.

pathMatchers[].routeRules[].matchRules[].queryParameterMatches[].exactMatch

string

The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.

Only one of presentMatch, exactMatch and regexMatch must be set.

pathMatchers[].routeRules[].matchRules[].queryParameterMatches[].regexMatch

string

The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript

Only one of presentMatch, exactMatch and regexMatch must be set.

pathMatchers[].routeRules[].matchRules[].metadataFilters[]

object

Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies.

For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata.

metadataFilters specified here can be overrides those specified in ForwardingRule that refers to this UrlMap.

metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.

pathMatchers[].routeRules[].matchRules[].metadataFilters[].filterMatchCriteria

enum

Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.

Supported values are:

  • MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
  • MATCH_ALL: All filterLabels must have matching labels in the provided metadata.

pathMatchers[].routeRules[].matchRules[].metadataFilters[].filterLabels[]

object

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria

This list must not be empty and can have at the most 64 entries.

pathMatchers[].routeRules[].matchRules[].metadataFilters[].filterLabels[].name

string

Name of metadata label.

The name can have a maximum length of 1024 characters and must be at least 1 character long.

pathMatchers[].routeRules[].matchRules[].metadataFilters[].filterLabels[].value

string

The value of the label must match the specified value.

value can have a maximum length of 1024 characters.

pathMatchers[].routeRules[].service

string

The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified.

Only one of urlRedirect, service or routeAction.weightedBackendService must be set.

Authorization requires the following Google IAM permission on the specified resource service:

  • compute.backendServices.use

pathMatchers[].routeRules[].routeAction

object

In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.

Only one of routeAction or urlRedirect must be set.

pathMatchers[].routeRules[].routeAction.weightedBackendServices[]

object

A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.

Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.

pathMatchers[].routeRules[].routeAction.weightedBackendServices[].backendService

string

The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.

Authorization requires the following Google IAM permission on the specified resource backendService:

  • compute.backendServices.use

pathMatchers[].routeRules[].routeAction.weightedBackendServices[].weight

number (uint32 format)

Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .

The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.

The value must be between 0 and 1000

pathMatchers[].routeRules[].routeAction.weightedBackendServices[].headerAction

object

Specifies changes to request and response headers that need to take effect for the selected backendService.

headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.

pathMatchers[].routeRules[].routeAction.weightedBackendServices[].headerAction.requestHeadersToRemove[]

string

A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.

pathMatchers[].routeRules[].routeAction.weightedBackendServices[].headerAction.requestHeadersToAdd[]

object

Headers to add to a matching request prior to forwarding the request to the backendService.

pathMatchers[].routeRules[].routeAction.weightedBackendServices[].headerAction.requestHeadersToAdd[].headerName

string

The name of the header.

pathMatchers[].routeRules[].routeAction.weightedBackendServices[].headerAction.requestHeadersToAdd[].headerValue

string

The value of the header to add.

pathMatchers[].routeRules[].routeAction.weightedBackendServices[].headerAction.requestHeadersToAdd[].replace

boolean

If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.

The default value is false.

pathMatchers[].routeRules[].routeAction.weightedBackendServices[].headerAction.responseHeadersToRemove[]

string

A list of header names for headers that need to be removed from the response prior to sending the response back to the client.

pathMatchers[].routeRules[].routeAction.weightedBackendServices[].headerAction.responseHeadersToAdd[]

object

Headers to add the response prior to sending the response back to the client.

pathMatchers[].routeRules[].routeAction.weightedBackendServices[].headerAction.responseHeadersToAdd[].headerName

string

The name of the header.

pathMatchers[].routeRules[].routeAction.weightedBackendServices[].headerAction.responseHeadersToAdd[].headerValue

string

The value of the header to add.

pathMatchers[].routeRules[].routeAction.weightedBackendServices[].headerAction.responseHeadersToAdd[].replace

boolean

If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.

The default value is false.

pathMatchers[].routeRules[].routeAction.urlRewrite

object

The spec to modify the URL of the request, prior to forwarding the request to the matched service

pathMatchers[].routeRules[].routeAction.urlRewrite.pathPrefixRewrite

string

Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.

The value must be between 1 and 1024 characters.

pathMatchers[].routeRules[].routeAction.urlRewrite.hostRewrite

string

Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.

The value must be between 1 and 255 characters.

pathMatchers[].routeRules[].routeAction.timeout

object

Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.

If not specified, will use the largest timeout among all backend services associated with the route.

pathMatchers[].routeRules[].routeAction.timeout.seconds

string (int64 format)

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

pathMatchers[].routeRules[].routeAction.timeout.nanos

number

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 positive nanos field. Must be from 0 to 999,999,999 inclusive.

pathMatchers[].routeRules[].routeAction.retryPolicy

object

Specifies the retry policy associated with this route.

pathMatchers[].routeRules[].routeAction.retryPolicy.retryConditions[]

string

Specfies one or more conditions when this retry rule applies. Valid values are:

  • 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
  • gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
  • connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
  • retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
  • refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
  • cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
  • deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
  • resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
  • unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable

pathMatchers[].routeRules[].routeAction.retryPolicy.numRetries

number (uint32 format)

Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1.

pathMatchers[].routeRules[].routeAction.retryPolicy.perTryTimeout

object

Specifies a non-zero timeout per retry attempt.

If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.

pathMatchers[].routeRules[].routeAction.retryPolicy.perTryTimeout.seconds

string (int64 format)

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

pathMatchers[].routeRules[].routeAction.retryPolicy.perTryTimeout.nanos

number

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 positive nanos field. Must be from 0 to 999,999,999 inclusive.

pathMatchers[].routeRules[].routeAction.requestMirrorPolicy

object

Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.

pathMatchers[].routeRules[].routeAction.requestMirrorPolicy.backendService

string

The full or partial URL to the BackendService resource being mirrored to.

Authorization requires the following Google IAM permission on the specified resource backendService:

  • compute.backendServices.use

pathMatchers[].routeRules[].routeAction.corsPolicy

object

The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing

pathMatchers[].routeRules[].routeAction.corsPolicy.allowOrigins[]

string

Specifies the list of origins that will be allowed to do CORS requests.

An origin is allowed if it matches either allow_origins or allowOriginRegex.

pathMatchers[].routeRules[].routeAction.corsPolicy.allowOriginRegexes[]

string

Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript

An origin is allowed if it matches either allow_origins or allowOriginRegex.

pathMatchers[].routeRules[].routeAction.corsPolicy.allowMethods[]

string

Specifies the content for the Access-Control-Allow-Methods header.

pathMatchers[].routeRules[].routeAction.corsPolicy.allowHeaders[]

string

Specifies the content for the Access-Control-Allow-Headers header.

pathMatchers[].routeRules[].routeAction.corsPolicy.exposeHeaders[]

string

Specifies the content for the Access-Control-Expose-Headers header.

pathMatchers[].routeRules[].routeAction.corsPolicy.maxAge

number

Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header.

pathMatchers[].routeRules[].routeAction.corsPolicy.allowCredentials

boolean

In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.

Default is false.

pathMatchers[].routeRules[].routeAction.corsPolicy.disabled

boolean

If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.

pathMatchers[].routeRules[].routeAction.faultInjectionPolicy

object

The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.

timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy.

pathMatchers[].routeRules[].routeAction.faultInjectionPolicy.delay

object

The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.

pathMatchers[].routeRules[].routeAction.faultInjectionPolicy.delay.fixedDelay

object

Specifies the value of the fixed delay interval.

pathMatchers[].routeRules[].routeAction.faultInjectionPolicy.delay.fixedDelay.seconds

string (int64 format)

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

pathMatchers[].routeRules[].routeAction.faultInjectionPolicy.delay.fixedDelay.nanos

number

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 positive nanos field. Must be from 0 to 999,999,999 inclusive.

pathMatchers[].routeRules[].routeAction.faultInjectionPolicy.delay.percentage

number

The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.

The value must be between 0.0 and 100.0 inclusive.

pathMatchers[].routeRules[].routeAction.faultInjectionPolicy.abort

object

The specification for how client requests are aborted as part of fault injection.

pathMatchers[].routeRules[].routeAction.faultInjectionPolicy.abort.httpStatus

number (uint32 format)

The HTTP status code used to abort the request.

The value must be between 200 and 599 inclusive.

pathMatchers[].routeRules[].routeAction.faultInjectionPolicy.abort.percentage

number

The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.

The value must be between 0.0 and 100.0 inclusive.

pathMatchers[].routeRules[].urlRedirect

object

When this rule is matched, the request is redirected to a URL specified by urlRedirect.

If urlRedirect is specified, service or routeAction must not be set.

pathMatchers[].routeRules[].urlRedirect.hostRedirect

string

The host that will be used in the redirect response instead of the one that was supplied in the request.

The value must be between 1 and 255 characters.

pathMatchers[].routeRules[].urlRedirect.pathRedirect

string

The path that will be used in the redirect response instead of the one that was supplied in the request.

Only one of pathRedirect or prefixRedirect must be specified.

The value must be between 1 and 1024 characters.

pathMatchers[].routeRules[].urlRedirect.prefixRedirect

string

The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.

pathMatchers[].routeRules[].urlRedirect.redirectResponseCode

enum

The HTTP Status code to use for this RedirectAction.

Supported values are:

  • MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
  • FOUND, which corresponds to 302.
  • SEE_OTHER which corresponds to 303.
  • TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
  • PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.

pathMatchers[].routeRules[].urlRedirect.httpsRedirect

boolean

If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.

This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.

The default is set to false.

pathMatchers[].routeRules[].urlRedirect.stripQuery

boolean

If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.

The default is set to false.

pathMatchers[].routeRules[].headerAction

object

Specifies changes to request and response headers that need to take effect for the selected backendService.

The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction

pathMatchers[].routeRules[].headerAction.requestHeadersToRemove[]

string

A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.

pathMatchers[].routeRules[].headerAction.requestHeadersToAdd[]

object

Headers to add to a matching request prior to forwarding the request to the backendService.

pathMatchers[].routeRules[].headerAction.requestHeadersToAdd[].headerName

string

The name of the header.

pathMatchers[].routeRules[].headerAction.requestHeadersToAdd[].headerValue

string

The value of the header to add.

pathMatchers[].routeRules[].headerAction.requestHeadersToAdd[].replace

boolean

If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.

The default value is false.

pathMatchers[].routeRules[].headerAction.responseHeadersToRemove[]

string

A list of header names for headers that need to be removed from the response prior to sending the response back to the client.

pathMatchers[].routeRules[].headerAction.responseHeadersToAdd[]

object

Headers to add the response prior to sending the response back to the client.

pathMatchers[].routeRules[].headerAction.responseHeadersToAdd[].headerName

string

The name of the header.

pathMatchers[].routeRules[].headerAction.responseHeadersToAdd[].headerValue

string

The value of the header to add.

pathMatchers[].routeRules[].headerAction.responseHeadersToAdd[].replace

boolean

If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.

The default value is false.

pathMatchers[].headerAction

object

Specifies changes to request and response headers that need to take effect for the selected backendService.

HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap

pathMatchers[].headerAction.requestHeadersToRemove[]

string

A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.

pathMatchers[].headerAction.requestHeadersToAdd[]

object

Headers to add to a matching request prior to forwarding the request to the backendService.

pathMatchers[].headerAction.requestHeadersToAdd[].headerName

string

The name of the header.

pathMatchers[].headerAction.requestHeadersToAdd[].headerValue

string

The value of the header to add.

pathMatchers[].headerAction.requestHeadersToAdd[].replace

boolean

If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.

The default value is false.

pathMatchers[].headerAction.responseHeadersToRemove[]

string

A list of header names for headers that need to be removed from the response prior to sending the response back to the client.

pathMatchers[].headerAction.responseHeadersToAdd[]

object

Headers to add the response prior to sending the response back to the client.

pathMatchers[].headerAction.responseHeadersToAdd[].headerName

string

The name of the header.

pathMatchers[].headerAction.responseHeadersToAdd[].headerValue

string

The value of the header to add.

pathMatchers[].headerAction.responseHeadersToAdd[].replace

boolean

If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.

The default value is false.

tests[]

object

The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap.

tests[].description

string

Description of this test case.

tests[].host

string

Host portion of the URL.

tests[].path

string

Path portion of the URL.

tests[].service

string

Expected BackendService resource the given URL should be mapped to.

defaultService

string

The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified.

Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.

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

  • compute.backendBuckets.use
  • compute.backendServices.use

defaultRouteAction

object

defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.

Only one of defaultRouteAction or defaultUrlRedirect must be set.

defaultRouteAction.weightedBackendServices[]

object

A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.

Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.

defaultRouteAction.weightedBackendServices[].backendService

string

The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.

Authorization requires the following Google IAM permission on the specified resource backendService:

  • compute.backendServices.use

defaultRouteAction.weightedBackendServices[].weight

number (uint32 format)

Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .

The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.

The value must be between 0 and 1000

defaultRouteAction.weightedBackendServices[].headerAction

object

Specifies changes to request and response headers that need to take effect for the selected backendService.

headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.

defaultRouteAction.weightedBackendServices[].headerAction.requestHeadersToRemove[]

string

A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.

defaultRouteAction.weightedBackendServices[].headerAction.requestHeadersToAdd[]

object

Headers to add to a matching request prior to forwarding the request to the backendService.

defaultRouteAction.weightedBackendServices[].headerAction.requestHeadersToAdd[].headerName

string

The name of the header.

defaultRouteAction.weightedBackendServices[].headerAction.requestHeadersToAdd[].headerValue

string

The value of the header to add.

defaultRouteAction.weightedBackendServices[].headerAction.requestHeadersToAdd[].replace

boolean

If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.

The default value is false.

defaultRouteAction.weightedBackendServices[].headerAction.responseHeadersToRemove[]

string

A list of header names for headers that need to be removed from the response prior to sending the response back to the client.

defaultRouteAction.weightedBackendServices[].headerAction.responseHeadersToAdd[]

object

Headers to add the response prior to sending the response back to the client.

defaultRouteAction.weightedBackendServices[].headerAction.responseHeadersToAdd[].headerName

string

The name of the header.

defaultRouteAction.weightedBackendServices[].headerAction.responseHeadersToAdd[].headerValue

string

The value of the header to add.

defaultRouteAction.weightedBackendServices[].headerAction.responseHeadersToAdd[].replace

boolean

If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.

The default value is false.

defaultRouteAction.urlRewrite

object

The spec to modify the URL of the request, prior to forwarding the request to the matched service

defaultRouteAction.urlRewrite.pathPrefixRewrite

string

Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.

The value must be between 1 and 1024 characters.

defaultRouteAction.urlRewrite.hostRewrite

string

Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.

The value must be between 1 and 255 characters.

defaultRouteAction.timeout

object

Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.

If not specified, will use the largest timeout among all backend services associated with the route.

defaultRouteAction.timeout.seconds

string (int64 format)

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

defaultRouteAction.timeout.nanos

number

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 positive nanos field. Must be from 0 to 999,999,999 inclusive.

defaultRouteAction.retryPolicy

object

Specifies the retry policy associated with this route.

defaultRouteAction.retryPolicy.retryConditions[]

string

Specfies one or more conditions when this retry rule applies. Valid values are:

  • 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
  • gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
  • connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
  • retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
  • refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
  • cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
  • deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
  • resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
  • unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable

defaultRouteAction.retryPolicy.numRetries

number (uint32 format)

Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1.

defaultRouteAction.retryPolicy.perTryTimeout

object

Specifies a non-zero timeout per retry attempt.

If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.

defaultRouteAction.retryPolicy.perTryTimeout.seconds

string (int64 format)

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

defaultRouteAction.retryPolicy.perTryTimeout.nanos

number

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 positive nanos field. Must be from 0 to 999,999,999 inclusive.

defaultRouteAction.requestMirrorPolicy

object

Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.

defaultRouteAction.requestMirrorPolicy.backendService

string

The full or partial URL to the BackendService resource being mirrored to.

Authorization requires the following Google IAM permission on the specified resource backendService:

  • compute.backendServices.use

defaultRouteAction.corsPolicy

object

The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing

defaultRouteAction.corsPolicy.allowOrigins[]

string

Specifies the list of origins that will be allowed to do CORS requests.

An origin is allowed if it matches either allow_origins or allowOriginRegex.

defaultRouteAction.corsPolicy.allowOriginRegexes[]

string

Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript

An origin is allowed if it matches either allow_origins or allowOriginRegex.

defaultRouteAction.corsPolicy.allowMethods[]

string

Specifies the content for the Access-Control-Allow-Methods header.

defaultRouteAction.corsPolicy.allowHeaders[]

string

Specifies the content for the Access-Control-Allow-Headers header.

defaultRouteAction.corsPolicy.exposeHeaders[]

string

Specifies the content for the Access-Control-Expose-Headers header.

defaultRouteAction.corsPolicy.maxAge

number

Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header.

defaultRouteAction.corsPolicy.allowCredentials

boolean

In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.

Default is false.

defaultRouteAction.corsPolicy.disabled

boolean

If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.

defaultRouteAction.faultInjectionPolicy

object

The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.

timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy.

defaultRouteAction.faultInjectionPolicy.delay

object

The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.

defaultRouteAction.faultInjectionPolicy.delay.fixedDelay

object

Specifies the value of the fixed delay interval.

defaultRouteAction.faultInjectionPolicy.delay.fixedDelay.seconds

string (int64 format)

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

defaultRouteAction.faultInjectionPolicy.delay.fixedDelay.nanos

number

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 positive nanos field. Must be from 0 to 999,999,999 inclusive.

defaultRouteAction.faultInjectionPolicy.delay.percentage

number

The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.

The value must be between 0.0 and 100.0 inclusive.

defaultRouteAction.faultInjectionPolicy.abort

object

The specification for how client requests are aborted as part of fault injection.

defaultRouteAction.faultInjectionPolicy.abort.httpStatus

number (uint32 format)

The HTTP status code used to abort the request.

The value must be between 200 and 599 inclusive.

defaultRouteAction.faultInjectionPolicy.abort.percentage

number

The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.

The value must be between 0.0 and 100.0 inclusive.

defaultUrlRedirect

object

When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.

If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.

defaultUrlRedirect.hostRedirect

string

The host that will be used in the redirect response instead of the one that was supplied in the request.

The value must be between 1 and 255 characters.

defaultUrlRedirect.pathRedirect

string

The path that will be used in the redirect response instead of the one that was supplied in the request.

Only one of pathRedirect or prefixRedirect must be specified.

The value must be between 1 and 1024 characters.

defaultUrlRedirect.prefixRedirect

string

The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.

defaultUrlRedirect.redirectResponseCode

enum

The HTTP Status code to use for this RedirectAction.

Supported values are:

  • MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
  • FOUND, which corresponds to 302.
  • SEE_OTHER which corresponds to 303.
  • TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
  • PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.

defaultUrlRedirect.httpsRedirect

boolean

If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.

This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.

The default is set to false.

defaultUrlRedirect.stripQuery

boolean

If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.

The default is set to false.

headerAction

object

Specifies changes to request and response headers that need to take effect for the selected backendService.

The headerAction specified here take effect after headerAction specified under pathMatcher.

headerAction.requestHeadersToRemove[]

string

A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.

headerAction.requestHeadersToAdd[]

object

Headers to add to a matching request prior to forwarding the request to the backendService.

headerAction.requestHeadersToAdd[].headerName

string

The name of the header.

headerAction.requestHeadersToAdd[].headerValue

string

The value of the header to add.

headerAction.requestHeadersToAdd[].replace

boolean

If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.

The default value is false.

headerAction.responseHeadersToRemove[]

string

A list of header names for headers that need to be removed from the response prior to sending the response back to the client.

headerAction.responseHeadersToAdd[]

object

Headers to add the response prior to sending the response back to the client.

headerAction.responseHeadersToAdd[].headerName

string

The name of the header.

headerAction.responseHeadersToAdd[].headerValue

string

The value of the header to add.

headerAction.responseHeadersToAdd[].replace

boolean

If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.

The default value is false.

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 UrlMap. An up-to-date fingerprint must be provided in order to update the UrlMap, otherwise the request will fail with error 412 conditionNotMet.

To see the latest fingerprint, make a get() request to retrieve a UrlMap.

A base64-encoded string.

region

string

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

kind

string

[Output Only] Type of the resource. Always compute#urlMaps for url maps.

Response body

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

JSON representation
{
  "id": string,
  "creationTimestamp": string,
  "name": string,
  "zone": string,
  "clientOperationId": string,
  "operationType": string,
  "targetLink": string,
  "targetId": string,
  "status": enum,
  "statusMessage": string,
  "user": string,
  "progress": number,
  "insertTime": string,
  "startTime": string,
  "endTime": string,
  "error": {
    "errors": [
      {
        "code": string,
        "location": string,
        "message": string
      }
    ]
  },
  "warnings": [
    {
      "code": enum,
      "message": string,
      "data": [
        {
          "key": string,
          "value": string
        }
      ]
    }
  ],
  "httpErrorStatusCode": number,
  "httpErrorMessage": string,
  "selfLink": string,
  "region": string,
  "description": string,
  "kind": string
}
Fields
id

string (fixed64 format)

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

creationTimestamp

string

[Deprecated] This field is deprecated.

name

string

[Output Only] Name of the operation.

zone

string

[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.

clientOperationId

string

[Output Only] The value of requestId if you provided it in the request. Not present otherwise.

operationType

string

[Output Only] The type of operation, such as insert, update, or delete, and so on.

targetId

string (fixed64 format)

[Output Only] The unique target ID, which identifies a specific incarnation of the target resource.

status

enum

[Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.

statusMessage

string

[Output Only] An optional textual description of the current status of the operation.

user

string

[Output Only] User who requested the operation, for example: user@example.com.

progress

number

[Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.

insertTime

string

[Output Only] The time that this operation was requested. This value is in RFC3339 text format.

startTime

string

[Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.

endTime

string

[Output Only] The time that this operation was completed. This value is in RFC3339 text format.

error

object

[Output Only] If errors are generated during processing of the operation, this field will be populated.

error.errors[]

object

[Output Only] The array of errors encountered while processing this operation.

error.errors[].code

string

[Output Only] The error type identifier for this error.

error.errors[].location

string

[Output Only] Indicates the field in the request that caused the error. This property is optional.

error.errors[].message

string

[Output Only] An optional, human-readable error message.

warnings[]

object

[Output Only] If warning messages are generated during processing of the operation, this field will be populated.

warnings[].code

enum

[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.

warnings[].message

string

[Output Only] A human-readable description of the warning code.

warnings[].data[]

object

[Output Only] Metadata about this warning in key: value format. For example:

"data": [  {  "key": "scope",  "value": "zones/us-east1-d"  }

warnings[].data[].key

string

[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).

warnings[].data[].value

string

[Output Only] A warning data value corresponding to the key.

httpErrorStatusCode

number

[Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.

httpErrorMessage

string

[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.

region

string

[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.

description

string

[Output Only] A textual description of the operation, which is set when the operation is created.

kind

string

[Output Only] Type of the resource. Always compute#operation for Operation resources.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/compute
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

In addition to any permissions specified on the fields above, authorization requires one or more of the following Google IAM permissions:

  • compute.urlMaps.update
¿Te ha resultado útil esta página? Enviar comentarios:

Enviar comentarios sobre...

Compute Engine Documentation