Validate

Runs static validation for the UrlMap

25 variables
9 variables

Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap

Authorization

To use this building block you will have to grant access to at least one of the following scopes:

  • View and manage your data across Google Cloud Platform services
  • View and manage your Google Compute Engine resources

Input

This building block consumes 25 input parameters

  = Parameter name
  = Format

project STRING Required

Project ID for this request

urlMap STRING Required

Name of the UrlMap resource to be validated as

resource OBJECT

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

resource.creationTimestamp STRING

[Output Only] Creation timestamp in RFC3339 text format

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

resource.description STRING

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

resource.fingerprint BINARY

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

resource.hostRules[] OBJECT

UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService

resource.hostRules[].description STRING

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

resource.hostRules[].hosts[] STRING

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

resource.id INTEGER

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

resource.kind STRING

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

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

resource.pathMatchers[] OBJECT

A matcher for the path portion of the URL. The BackendService from the longest-matched rule will serve the URL. If no rule was matched, the default service will be used

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:

  • https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
  • compute/v1/projects/project/global/backendServices/backendService
  • global/backendServices/backendService 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 default_service:
  • compute.backendBuckets.use
  • compute.backendServices.use

resource.pathMatchers[].description STRING

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

resource.pathMatchers[].name STRING

The name to which this PathMatcher is referred by the HostRule

resource.pathMatchers[].pathRules[] OBJECT

A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL

resource.selfLink STRING

[Output Only] Server-defined URL for the resource

resource.tests[] OBJECT

Message for the expected URL mappings

resource.tests[].description STRING

Description of this test case

resource.tests[].host STRING

Host portion of the URL

resource.tests[].path STRING

Path portion of the URL

resource.tests[].service STRING

Expected BackendService resource the given URL should be mapped to

Output

This building block provides 9 output parameters

  = Parameter name
  = Format

result OBJECT

Message representing the validation result for a UrlMap

result.loadErrors[] STRING

result.loadSucceeded BOOLEAN

Whether the given UrlMap can be successfully loaded. If false, 'loadErrors' indicates the reasons

result.testFailures[] OBJECT

result.testFailures[].actualService STRING

result.testFailures[].expectedService STRING

result.testFailures[].host STRING

result.testFailures[].path STRING

result.testPassed BOOLEAN

If successfully loaded, this field indicates whether the test passed. If false, 'testFailures's indicate the reason of failure