Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
| 75 | <h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.urlMaps.html">urlMaps</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="#delete">delete(project, urlMap)</a></code></p> |
| 79 | <p class="firstline">Deletes the specified UrlMap resource.</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#get">get(project, urlMap)</a></code></p> |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 82 | <p class="firstline">Returns the specified UrlMap resource. Get a list of available URL maps by making a list() request.</p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 83 | <p class="toc_element"> |
| 84 | <code><a href="#insert">insert(project, body)</a></code></p> |
| 85 | <p class="firstline">Creates a UrlMap resource in the specified project using the data included in the request.</p> |
| 86 | <p class="toc_element"> |
| 87 | <code><a href="#list">list(project, maxResults=None, pageToken=None, filter=None)</a></code></p> |
| 88 | <p class="firstline">Retrieves the list of UrlMap resources available to the specified project.</p> |
| 89 | <p class="toc_element"> |
| 90 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 91 | <p class="firstline">Retrieves the next page of results.</p> |
| 92 | <p class="toc_element"> |
| 93 | <code><a href="#patch">patch(project, urlMap, body)</a></code></p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 94 | <p class="firstline">Updates the entire content of the UrlMap resource. This method supports patch semantics.</p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 95 | <p class="toc_element"> |
| 96 | <code><a href="#update">update(project, urlMap, body)</a></code></p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 97 | <p class="firstline">Updates the entire content of the UrlMap resource.</p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 98 | <p class="toc_element"> |
| 99 | <code><a href="#validate">validate(project, urlMap, body)</a></code></p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 100 | <p class="firstline">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.</p> |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 101 | <h3>Method Details</h3> |
| 102 | <div class="method"> |
| 103 | <code class="details" id="delete">delete(project, urlMap)</code> |
| 104 | <pre>Deletes the specified UrlMap resource. |
| 105 | |
| 106 | Args: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 107 | project: string, Project ID for this request. (required) |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 108 | urlMap: string, Name of the UrlMap resource to delete. (required) |
| 109 | |
| 110 | Returns: |
| 111 | An object of the form: |
| 112 | |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 113 | { # An Operation resource, used to manage asynchronous API requests. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 114 | "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| 115 | "clientOperationId": "A String", # [Output Only] Reserved for future use. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 116 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 117 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| 118 | "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. |
| 119 | "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. |
| 120 | "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 121 | "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 122 | "progress": 42, # [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. |
| 123 | "httpErrorStatusCode": 42, # [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. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 124 | "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 125 | "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. |
| 126 | "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 127 | "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 128 | { |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 129 | "message": "A String", # [Output Only] A human-readable description of the warning code. |
| 130 | "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. |
| 131 | "data": [ # [Output Only] Metadata about this warning in key: value format. For example: |
| 132 | # "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 133 | { |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 134 | "value": "A String", # [Output Only] A warning data value corresponding to the key. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 135 | "key": "A 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). |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 136 | }, |
| 137 | ], |
| 138 | }, |
| 139 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 140 | "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 141 | "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. |
| 142 | "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 143 | "name": "A String", # [Output Only] Name of the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 144 | "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 145 | "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 146 | "errors": [ # [Output Only] The array of errors encountered while processing this operation. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 147 | { |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 148 | "message": "A String", # [Output Only] An optional, human-readable error message. |
| 149 | "code": "A String", # [Output Only] The error type identifier for this error. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 150 | "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 151 | }, |
| 152 | ], |
| 153 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 154 | "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 155 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 156 | "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 157 | }</pre> |
| 158 | </div> |
| 159 | |
| 160 | <div class="method"> |
| 161 | <code class="details" id="get">get(project, urlMap)</code> |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 162 | <pre>Returns the specified UrlMap resource. Get a list of available URL maps by making a list() request. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 163 | |
| 164 | Args: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 165 | project: string, Project ID for this request. (required) |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 166 | urlMap: string, Name of the UrlMap resource to return. (required) |
| 167 | |
| 168 | Returns: |
| 169 | An object of the form: |
| 170 | |
| 171 | { # 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. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 172 | "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps. |
| 173 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 174 | "defaultService": "A String", # The URL of the BackendService resource if none of the hostRules match. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 175 | "tests": [ # The list of expected URL mappings. Request to update this UrlMap will succeed only if all of the test cases pass. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 176 | { # Message for the expected URL mappings. |
| 177 | "path": "A String", # Path portion of the URL. |
| 178 | "host": "A String", # Host portion of the URL. |
| 179 | "description": "A String", # Description of this test case. |
| 180 | "service": "A String", # Expected BackendService resource the given URL should be mapped to. |
| 181 | }, |
| 182 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 183 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 184 | "fingerprint": "A String", # 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. |
| 185 | "pathMatchers": [ # The list of named PathMatchers to use against the URL. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 186 | { # 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. |
| 187 | "defaultService": "A 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: |
| 188 | # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService |
| 189 | # - compute/v1/projects/project/global/backendServices/backendService |
| 190 | # - global/backendServices/backendService |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 191 | "pathRules": [ # The list of path rules. |
| 192 | { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL. |
| 193 | "paths": [ # 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. |
| 194 | "A String", |
| 195 | ], |
| 196 | "service": "A String", # The URL of the BackendService resource if this rule is matched. |
| 197 | }, |
| 198 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 199 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 200 | "name": "A String", # The name to which this PathMatcher is referred by the HostRule. |
| 201 | }, |
| 202 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 203 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 204 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 205 | "hostRules": [ # The list of HostRules to use against the URL. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 206 | { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 207 | "hosts": [ # 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 .. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 208 | "A String", |
| 209 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 210 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
| 211 | "pathMatcher": "A 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. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 212 | }, |
| 213 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 214 | "name": "A 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. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 215 | }</pre> |
| 216 | </div> |
| 217 | |
| 218 | <div class="method"> |
| 219 | <code class="details" id="insert">insert(project, body)</code> |
| 220 | <pre>Creates a UrlMap resource in the specified project using the data included in the request. |
| 221 | |
| 222 | Args: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 223 | project: string, Project ID for this request. (required) |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 224 | body: object, The request body. (required) |
| 225 | The object takes the form of: |
| 226 | |
| 227 | { # 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. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 228 | "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps. |
| 229 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 230 | "defaultService": "A String", # The URL of the BackendService resource if none of the hostRules match. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 231 | "tests": [ # The list of expected URL mappings. Request to update this UrlMap will succeed only if all of the test cases pass. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 232 | { # Message for the expected URL mappings. |
| 233 | "path": "A String", # Path portion of the URL. |
| 234 | "host": "A String", # Host portion of the URL. |
| 235 | "description": "A String", # Description of this test case. |
| 236 | "service": "A String", # Expected BackendService resource the given URL should be mapped to. |
| 237 | }, |
| 238 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 239 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 240 | "fingerprint": "A String", # 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. |
| 241 | "pathMatchers": [ # The list of named PathMatchers to use against the URL. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 242 | { # 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. |
| 243 | "defaultService": "A 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: |
| 244 | # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService |
| 245 | # - compute/v1/projects/project/global/backendServices/backendService |
| 246 | # - global/backendServices/backendService |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 247 | "pathRules": [ # The list of path rules. |
| 248 | { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL. |
| 249 | "paths": [ # 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. |
| 250 | "A String", |
| 251 | ], |
| 252 | "service": "A String", # The URL of the BackendService resource if this rule is matched. |
| 253 | }, |
| 254 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 255 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 256 | "name": "A String", # The name to which this PathMatcher is referred by the HostRule. |
| 257 | }, |
| 258 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 259 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 260 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 261 | "hostRules": [ # The list of HostRules to use against the URL. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 262 | { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 263 | "hosts": [ # 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 .. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 264 | "A String", |
| 265 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 266 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
| 267 | "pathMatcher": "A 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. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 268 | }, |
| 269 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 270 | "name": "A 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. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 271 | } |
| 272 | |
| 273 | |
| 274 | Returns: |
| 275 | An object of the form: |
| 276 | |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 277 | { # An Operation resource, used to manage asynchronous API requests. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 278 | "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| 279 | "clientOperationId": "A String", # [Output Only] Reserved for future use. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 280 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 281 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| 282 | "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. |
| 283 | "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. |
| 284 | "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 285 | "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 286 | "progress": 42, # [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. |
| 287 | "httpErrorStatusCode": 42, # [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. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 288 | "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 289 | "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. |
| 290 | "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 291 | "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 292 | { |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 293 | "message": "A String", # [Output Only] A human-readable description of the warning code. |
| 294 | "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. |
| 295 | "data": [ # [Output Only] Metadata about this warning in key: value format. For example: |
| 296 | # "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 297 | { |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 298 | "value": "A String", # [Output Only] A warning data value corresponding to the key. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 299 | "key": "A 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). |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 300 | }, |
| 301 | ], |
| 302 | }, |
| 303 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 304 | "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 305 | "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. |
| 306 | "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 307 | "name": "A String", # [Output Only] Name of the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 308 | "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 309 | "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 310 | "errors": [ # [Output Only] The array of errors encountered while processing this operation. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 311 | { |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 312 | "message": "A String", # [Output Only] An optional, human-readable error message. |
| 313 | "code": "A String", # [Output Only] The error type identifier for this error. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 314 | "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 315 | }, |
| 316 | ], |
| 317 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 318 | "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 319 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 320 | "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 321 | }</pre> |
| 322 | </div> |
| 323 | |
| 324 | <div class="method"> |
| 325 | <code class="details" id="list">list(project, maxResults=None, pageToken=None, filter=None)</code> |
| 326 | <pre>Retrieves the list of UrlMap resources available to the specified project. |
| 327 | |
| 328 | Args: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 329 | project: string, Project ID for this request. (required) |
| 330 | maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. |
| 331 | pageToken: string, Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. |
| 332 | filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 333 | |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 334 | The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 335 | |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 336 | For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 337 | |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 338 | Compute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 339 | |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 340 | The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 341 | |
| 342 | Returns: |
| 343 | An object of the form: |
| 344 | |
| 345 | { # Contains a list of UrlMap resources. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 346 | "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 347 | "items": [ # A list of UrlMap resources. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 348 | { # 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. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 349 | "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps. |
| 350 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 351 | "defaultService": "A String", # The URL of the BackendService resource if none of the hostRules match. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 352 | "tests": [ # The list of expected URL mappings. Request to update this UrlMap will succeed only if all of the test cases pass. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 353 | { # Message for the expected URL mappings. |
| 354 | "path": "A String", # Path portion of the URL. |
| 355 | "host": "A String", # Host portion of the URL. |
| 356 | "description": "A String", # Description of this test case. |
| 357 | "service": "A String", # Expected BackendService resource the given URL should be mapped to. |
| 358 | }, |
| 359 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 360 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 361 | "fingerprint": "A String", # 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. |
| 362 | "pathMatchers": [ # The list of named PathMatchers to use against the URL. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 363 | { # 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. |
| 364 | "defaultService": "A 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: |
| 365 | # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService |
| 366 | # - compute/v1/projects/project/global/backendServices/backendService |
| 367 | # - global/backendServices/backendService |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 368 | "pathRules": [ # The list of path rules. |
| 369 | { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL. |
| 370 | "paths": [ # 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. |
| 371 | "A String", |
| 372 | ], |
| 373 | "service": "A String", # The URL of the BackendService resource if this rule is matched. |
| 374 | }, |
| 375 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 376 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 377 | "name": "A String", # The name to which this PathMatcher is referred by the HostRule. |
| 378 | }, |
| 379 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 380 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 381 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 382 | "hostRules": [ # The list of HostRules to use against the URL. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 383 | { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 384 | "hosts": [ # 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 .. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 385 | "A String", |
| 386 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 387 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
| 388 | "pathMatcher": "A 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. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 389 | }, |
| 390 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 391 | "name": "A 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. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 392 | }, |
| 393 | ], |
| 394 | "kind": "compute#urlMapList", # Type of resource. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 395 | "id": "A String", # [Output Only] Unique identifier for the resource. Set by the server. |
| 396 | "selfLink": "A String", # [Output Only] Server-defined URL for this resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 397 | }</pre> |
| 398 | </div> |
| 399 | |
| 400 | <div class="method"> |
| 401 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 402 | <pre>Retrieves the next page of results. |
| 403 | |
| 404 | Args: |
| 405 | previous_request: The request for the previous page. (required) |
| 406 | previous_response: The response from the request for the previous page. (required) |
| 407 | |
| 408 | Returns: |
| 409 | A request object that you can call 'execute()' on to request the next |
| 410 | page. Returns None if there are no more items in the collection. |
| 411 | </pre> |
| 412 | </div> |
| 413 | |
| 414 | <div class="method"> |
| 415 | <code class="details" id="patch">patch(project, urlMap, body)</code> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 416 | <pre>Updates the entire content of the UrlMap resource. This method supports patch semantics. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 417 | |
| 418 | Args: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 419 | project: string, Project ID for this request. (required) |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 420 | urlMap: string, Name of the UrlMap resource to update. (required) |
| 421 | body: object, The request body. (required) |
| 422 | The object takes the form of: |
| 423 | |
| 424 | { # 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. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 425 | "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps. |
| 426 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 427 | "defaultService": "A String", # The URL of the BackendService resource if none of the hostRules match. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 428 | "tests": [ # The list of expected URL mappings. Request to update this UrlMap will succeed only if all of the test cases pass. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 429 | { # Message for the expected URL mappings. |
| 430 | "path": "A String", # Path portion of the URL. |
| 431 | "host": "A String", # Host portion of the URL. |
| 432 | "description": "A String", # Description of this test case. |
| 433 | "service": "A String", # Expected BackendService resource the given URL should be mapped to. |
| 434 | }, |
| 435 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 436 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 437 | "fingerprint": "A String", # 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. |
| 438 | "pathMatchers": [ # The list of named PathMatchers to use against the URL. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 439 | { # 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. |
| 440 | "defaultService": "A 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: |
| 441 | # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService |
| 442 | # - compute/v1/projects/project/global/backendServices/backendService |
| 443 | # - global/backendServices/backendService |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 444 | "pathRules": [ # The list of path rules. |
| 445 | { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL. |
| 446 | "paths": [ # 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. |
| 447 | "A String", |
| 448 | ], |
| 449 | "service": "A String", # The URL of the BackendService resource if this rule is matched. |
| 450 | }, |
| 451 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 452 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 453 | "name": "A String", # The name to which this PathMatcher is referred by the HostRule. |
| 454 | }, |
| 455 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 456 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 457 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 458 | "hostRules": [ # The list of HostRules to use against the URL. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 459 | { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 460 | "hosts": [ # 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 .. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 461 | "A String", |
| 462 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 463 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
| 464 | "pathMatcher": "A 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. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 465 | }, |
| 466 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 467 | "name": "A 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. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 468 | } |
| 469 | |
| 470 | |
| 471 | Returns: |
| 472 | An object of the form: |
| 473 | |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 474 | { # An Operation resource, used to manage asynchronous API requests. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 475 | "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| 476 | "clientOperationId": "A String", # [Output Only] Reserved for future use. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 477 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 478 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| 479 | "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. |
| 480 | "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. |
| 481 | "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 482 | "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 483 | "progress": 42, # [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. |
| 484 | "httpErrorStatusCode": 42, # [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. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 485 | "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 486 | "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. |
| 487 | "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 488 | "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 489 | { |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 490 | "message": "A String", # [Output Only] A human-readable description of the warning code. |
| 491 | "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. |
| 492 | "data": [ # [Output Only] Metadata about this warning in key: value format. For example: |
| 493 | # "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 494 | { |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 495 | "value": "A String", # [Output Only] A warning data value corresponding to the key. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 496 | "key": "A 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). |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 497 | }, |
| 498 | ], |
| 499 | }, |
| 500 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 501 | "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 502 | "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. |
| 503 | "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 504 | "name": "A String", # [Output Only] Name of the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 505 | "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 506 | "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 507 | "errors": [ # [Output Only] The array of errors encountered while processing this operation. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 508 | { |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 509 | "message": "A String", # [Output Only] An optional, human-readable error message. |
| 510 | "code": "A String", # [Output Only] The error type identifier for this error. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 511 | "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 512 | }, |
| 513 | ], |
| 514 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 515 | "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 516 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 517 | "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 518 | }</pre> |
| 519 | </div> |
| 520 | |
| 521 | <div class="method"> |
| 522 | <code class="details" id="update">update(project, urlMap, body)</code> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 523 | <pre>Updates the entire content of the UrlMap resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 524 | |
| 525 | Args: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 526 | project: string, Project ID for this request. (required) |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 527 | urlMap: string, Name of the UrlMap resource to update. (required) |
| 528 | body: object, The request body. (required) |
| 529 | The object takes the form of: |
| 530 | |
| 531 | { # 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. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 532 | "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps. |
| 533 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 534 | "defaultService": "A String", # The URL of the BackendService resource if none of the hostRules match. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 535 | "tests": [ # The list of expected URL mappings. Request to update this UrlMap will succeed only if all of the test cases pass. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 536 | { # Message for the expected URL mappings. |
| 537 | "path": "A String", # Path portion of the URL. |
| 538 | "host": "A String", # Host portion of the URL. |
| 539 | "description": "A String", # Description of this test case. |
| 540 | "service": "A String", # Expected BackendService resource the given URL should be mapped to. |
| 541 | }, |
| 542 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 543 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 544 | "fingerprint": "A String", # 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. |
| 545 | "pathMatchers": [ # The list of named PathMatchers to use against the URL. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 546 | { # 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. |
| 547 | "defaultService": "A 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: |
| 548 | # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService |
| 549 | # - compute/v1/projects/project/global/backendServices/backendService |
| 550 | # - global/backendServices/backendService |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 551 | "pathRules": [ # The list of path rules. |
| 552 | { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL. |
| 553 | "paths": [ # 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. |
| 554 | "A String", |
| 555 | ], |
| 556 | "service": "A String", # The URL of the BackendService resource if this rule is matched. |
| 557 | }, |
| 558 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 559 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 560 | "name": "A String", # The name to which this PathMatcher is referred by the HostRule. |
| 561 | }, |
| 562 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 563 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 564 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 565 | "hostRules": [ # The list of HostRules to use against the URL. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 566 | { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 567 | "hosts": [ # 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 .. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 568 | "A String", |
| 569 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 570 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
| 571 | "pathMatcher": "A 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. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 572 | }, |
| 573 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 574 | "name": "A 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. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 575 | } |
| 576 | |
| 577 | |
| 578 | Returns: |
| 579 | An object of the form: |
| 580 | |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 581 | { # An Operation resource, used to manage asynchronous API requests. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 582 | "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| 583 | "clientOperationId": "A String", # [Output Only] Reserved for future use. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 584 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 585 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| 586 | "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. |
| 587 | "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. |
| 588 | "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 589 | "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 590 | "progress": 42, # [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. |
| 591 | "httpErrorStatusCode": 42, # [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. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 592 | "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 593 | "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. |
| 594 | "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 595 | "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 596 | { |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 597 | "message": "A String", # [Output Only] A human-readable description of the warning code. |
| 598 | "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. |
| 599 | "data": [ # [Output Only] Metadata about this warning in key: value format. For example: |
| 600 | # "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 601 | { |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 602 | "value": "A String", # [Output Only] A warning data value corresponding to the key. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 603 | "key": "A 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). |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 604 | }, |
| 605 | ], |
| 606 | }, |
| 607 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 608 | "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 609 | "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. |
| 610 | "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 611 | "name": "A String", # [Output Only] Name of the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 612 | "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 613 | "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 614 | "errors": [ # [Output Only] The array of errors encountered while processing this operation. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 615 | { |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 616 | "message": "A String", # [Output Only] An optional, human-readable error message. |
| 617 | "code": "A String", # [Output Only] The error type identifier for this error. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 618 | "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 619 | }, |
| 620 | ], |
| 621 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 622 | "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 623 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 624 | "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 625 | }</pre> |
| 626 | </div> |
| 627 | |
| 628 | <div class="method"> |
| 629 | <code class="details" id="validate">validate(project, urlMap, body)</code> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 630 | <pre>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. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 631 | |
| 632 | Args: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 633 | project: string, Project ID for this request. (required) |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 634 | urlMap: string, Name of the UrlMap resource to be validated as. (required) |
| 635 | body: object, The request body. (required) |
| 636 | The object takes the form of: |
| 637 | |
| 638 | { |
| 639 | "resource": { # 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. # Content of the UrlMap to be validated. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 640 | "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps. |
| 641 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 642 | "defaultService": "A String", # The URL of the BackendService resource if none of the hostRules match. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 643 | "tests": [ # The list of expected URL mappings. Request to update this UrlMap will succeed only if all of the test cases pass. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 644 | { # Message for the expected URL mappings. |
| 645 | "path": "A String", # Path portion of the URL. |
| 646 | "host": "A String", # Host portion of the URL. |
| 647 | "description": "A String", # Description of this test case. |
| 648 | "service": "A String", # Expected BackendService resource the given URL should be mapped to. |
| 649 | }, |
| 650 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 651 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 652 | "fingerprint": "A String", # 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. |
| 653 | "pathMatchers": [ # The list of named PathMatchers to use against the URL. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 654 | { # 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. |
| 655 | "defaultService": "A 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: |
| 656 | # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService |
| 657 | # - compute/v1/projects/project/global/backendServices/backendService |
| 658 | # - global/backendServices/backendService |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 659 | "pathRules": [ # The list of path rules. |
| 660 | { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL. |
| 661 | "paths": [ # 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. |
| 662 | "A String", |
| 663 | ], |
| 664 | "service": "A String", # The URL of the BackendService resource if this rule is matched. |
| 665 | }, |
| 666 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 667 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 668 | "name": "A String", # The name to which this PathMatcher is referred by the HostRule. |
| 669 | }, |
| 670 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 671 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 672 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 673 | "hostRules": [ # The list of HostRules to use against the URL. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 674 | { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 675 | "hosts": [ # 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 .. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 676 | "A String", |
| 677 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 678 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
| 679 | "pathMatcher": "A 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. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 680 | }, |
| 681 | ], |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 682 | "name": "A 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. |
Craig Citro | 065b530 | 2014-08-14 00:47:23 -0700 | [diff] [blame] | 683 | }, |
| 684 | } |
| 685 | |
| 686 | |
| 687 | Returns: |
| 688 | An object of the form: |
| 689 | |
| 690 | { |
| 691 | "result": { # Message representing the validation result for a UrlMap. |
| 692 | "testFailures": [ |
| 693 | { |
| 694 | "path": "A String", |
| 695 | "actualService": "A String", |
| 696 | "host": "A String", |
| 697 | "expectedService": "A String", |
| 698 | }, |
| 699 | ], |
| 700 | "loadErrors": [ |
| 701 | "A String", |
| 702 | ], |
| 703 | "testPassed": True or False, # If successfully loaded, this field indicates whether the test passed. If false, 'testFailures's indicate the reason of failure. |
| 704 | "loadSucceeded": True or False, # Whether the given UrlMap can be successfully loaded. If false, 'loadErrors' indicates the reasons. |
| 705 | }, |
| 706 | }</pre> |
| 707 | </div> |
| 708 | |
| 709 | </body></html> |