REST Resource: urlMaps

Resource: UrlMap

A UrlMap resource. This resource defines the mapping from URL to the BackendService resource, based on the "longest-match" of the URL's host and path.

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,
      "pathRules": [
        {
          "service": string,
          "paths": [
            string
          ]
        }
      ]
    }
  ],
  "tests": [
    {
      "description": string,
      "host": string,
      "path": string,
      "service": string
    }
  ],
  "defaultService": string,
  "fingerprint": 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 defined by this PathMatcher is matched by the URL's path portion. For example, the following are all valid URLs to a BackendService resource:

pathMatchers[].pathRules[]

object

The list of path rules.

pathMatchers[].pathRules[].service

string

The URL of the BackendService resource if this rule is matched.

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.

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 URL of the BackendService resource if none of the hostRules match.

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.

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

A base64-encoded string.

kind

string

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

Methods

delete

Deletes the specified UrlMap resource.

get

Returns the specified UrlMap resource.

insert

Creates a UrlMap resource in the specified project using the data included in the request.

invalidateCache

Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.

list

Retrieves the list of UrlMap resources available to the specified project.

patch

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

testIamPermissions

Returns permissions that a caller has on the specified resource.

update

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

validate

Runs static validation for the UrlMap.
Was this page helpful? Let us know how we did:

Send feedback about...

Compute Engine