For a list of methods for this resource, see the end of this page.
Resource representations
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.
{ "kind": "compute#urlMap", "id": unsigned long, "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": bytes }
Property name | Value | Description | Notes |
---|---|---|---|
creationTimestamp
|
string
|
Creation timestamp in RFC3339 text format (output only). | |
defaultService
|
string
|
The URL of the BackendService resource if none of the hostRules match. | |
description
|
string
|
An optional textual description of the resource; provided by the client when the resource is created. | |
fingerprint
|
bytes
|
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. | |
hostRules[]
|
list
|
The list of HostRules to use against the URL. | |
hostRules[].
description
|
string
|
||
hostRules[].
hosts[]
|
list
|
The list of host patterns to match. They must be FQDN except that it may start with ?*.? or ?*-?. The ?*? acts like a glob and will match any string of atoms (separated by .?s and -?s) to the left. | |
hostRules[].
pathMatcher
|
string
|
The name of the PathMatcher to match the path portion of the URL, if the this HostRule matches the URL's host portion. | |
id
|
unsigned long
|
Unique identifier for the resource; defined by the server (output only). | |
kind
|
string
|
Type of the resource. | |
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. | |
pathMatchers[]
|
list
|
The list of named PathMatchers to use against the URL. | |
pathMatchers[].
defaultService
|
string
|
The URL to the BackendService resource. This will be used if none of the 'pathRules' defined by this PathMatcher is met by the URL's path portion. | |
pathMatchers[].
description
|
string
|
||
pathMatchers[].
name
|
string
|
The name to which this PathMatcher is referred by the HostRule. | |
pathMatchers[].
pathRules[]
|
list
|
The list of path rules. | |
pathMatchers[].pathRules[].
paths[]
|
list
|
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[].pathRules[].
service
|
string
|
The URL of the BackendService resource if this rule is matched. | |
selfLink
|
string
|
Server defined URL for the resource (output only). | |
tests[]
|
list
|
The list of expected URL mappings. Request to update this UrlMap will succeed only all of the test cases pass. | |
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. |
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.
- list
- Retrieves the list of UrlMap resources available to the specified project.
- patch
- Update the entire content of the UrlMap resource. This method supports patch semantics.
- update
- Update the entire content of the UrlMap resource.
- validate
- Run static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.