Validate
|
|||||
|
|
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
Name | Format | Description |
---|---|---|
project Required |
STRING |
Project ID for this request |
urlMap Required |
STRING |
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 |
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:
|
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 |
= 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 |
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:
|
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
Name | Format | Description |
---|---|---|
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 |
= 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 |