blob: 7a82649acbdc9b3a564b3f3ccd6a88e1405b89d5 [file] [log] [blame]
Craig Citro065b5302014-08-14 00:47:23 -07001<html><body>
2<style>
3
4body, 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
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, 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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="#delete">delete(project, urlMap, requestId=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070079<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>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.</p>
Craig Citro065b5302014-08-14 00:47:23 -070083<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070084 <code><a href="#insert">insert(project, body, requestId=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070085<p class="firstline">Creates a UrlMap resource in the specified project using the data included in the request.</p>
86<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087 <code><a href="#invalidateCache">invalidateCache(project, urlMap, body, requestId=None)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070088<p class="firstline">Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.</p>
89<p class="toc_element">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070090 <code><a href="#list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070091<p class="firstline">Retrieves the list of UrlMap resources available to the specified project.</p>
92<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070096 <code><a href="#patch">patch(project, urlMap, body, requestId=None)</a></code></p>
97<p class="firstline">Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Craig Citro065b5302014-08-14 00:47:23 -070098<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070099 <code><a href="#update">update(project, urlMap, body, requestId=None)</a></code></p>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700100<p class="firstline">Updates the specified UrlMap resource with the data included in the request.</p>
Craig Citro065b5302014-08-14 00:47:23 -0700101<p class="toc_element">
102 <code><a href="#validate">validate(project, urlMap, body)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800103<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 Citro065b5302014-08-14 00:47:23 -0700104<h3>Method Details</h3>
105<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106 <code class="details" id="delete">delete(project, urlMap, requestId=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700107 <pre>Deletes the specified UrlMap resource.
108
109Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800110 project: string, Project ID for this request. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700111 urlMap: string, Name of the UrlMap resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
113
114For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
115
116The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Craig Citro065b5302014-08-14 00:47:23 -0700117
118Returns:
119 An object of the form:
120
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700121 { # Represents an Operation resource.
122 #
123 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
124 #
125 # Operations can be global, regional or zonal.
126 # - For global operations, use the globalOperations resource.
127 # - For regional operations, use the regionOperations resource.
128 # - For zonal operations, use the zonalOperations resource.
129 #
130 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800131 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700132 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400133 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800134 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700135 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800136 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
137 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000138 "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 Parrott36e41bc2016-02-19 16:02:29 -0800139 "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.
140 "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 Citroe633be12015-03-02 13:40:36 -0800141 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800142 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
143 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000144 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
Craig Citro065b5302014-08-14 00:47:23 -0700145 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800146 "message": "A String", # [Output Only] A human-readable description of the warning code.
147 "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.
148 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
149 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citro065b5302014-08-14 00:47:23 -0700150 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000151 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700152 "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 Citro065b5302014-08-14 00:47:23 -0700153 },
154 ],
155 },
156 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000157 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800158 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
159 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000160 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700161 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000162 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800163 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -0700164 {
Craig Citroe633be12015-03-02 13:40:36 -0800165 "message": "A String", # [Output Only] An optional, human-readable error message.
166 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700167 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Craig Citro065b5302014-08-14 00:47:23 -0700168 },
169 ],
170 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800171 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700172 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800173 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Craig Citro065b5302014-08-14 00:47:23 -0700174 }</pre>
175</div>
176
177<div class="method">
178 <code class="details" id="get">get(project, urlMap)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700179 <pre>Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.
Craig Citro065b5302014-08-14 00:47:23 -0700180
181Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800182 project: string, Project ID for this request. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700183 urlMap: string, Name of the UrlMap resource to return. (required)
184
185Returns:
186 An object of the form:
187
188 { # 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 Parrott36e41bc2016-02-19 16:02:29 -0800189 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
190 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700191 "defaultService": "A 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.
192 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
193 "tests": [ # The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap.
Craig Citro065b5302014-08-14 00:47:23 -0700194 { # Message for the expected URL mappings.
195 "path": "A String", # Path portion of the URL.
196 "host": "A String", # Host portion of the URL.
197 "description": "A String", # Description of this test case.
198 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
199 },
200 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700201 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700202 "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, otherwise the request will fail with error 412 conditionNotMet.
203 #
204 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Craig Citro065b5302014-08-14 00:47:23 -0700205 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800206 { # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700207 "defaultService": "A 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:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800208 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
209 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700210 # - 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.
211 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
212 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
213 # - compute.backendBuckets.use
214 # - compute.backendServices.use
215 "pathRules": [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.
216 # For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list.
217 # Only one of pathRules or routeRules must be set.
Craig Citro065b5302014-08-14 00:47:23 -0700218 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
219 "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.
220 "A String",
221 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700222 "service": "A String", # The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified.
223 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Craig Citro065b5302014-08-14 00:47:23 -0700224 },
225 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800226 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Craig Citro065b5302014-08-14 00:47:23 -0700227 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
228 },
229 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700230 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800231 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Craig Citro065b5302014-08-14 00:47:23 -0700232 "hostRules": [ # The list of HostRules to use against the URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700233 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800234 "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 Citro065b5302014-08-14 00:47:23 -0700235 "A String",
236 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800237 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
238 "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 Citro065b5302014-08-14 00:47:23 -0700239 },
240 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700241 "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 Citro065b5302014-08-14 00:47:23 -0700242 }</pre>
243</div>
244
245<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700246 <code class="details" id="insert">insert(project, body, requestId=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700247 <pre>Creates a UrlMap resource in the specified project using the data included in the request.
248
249Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800250 project: string, Project ID for this request. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700251 body: object, The request body. (required)
252 The object takes the form of:
253
254{ # 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 Parrott36e41bc2016-02-19 16:02:29 -0800255 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
256 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700257 "defaultService": "A 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.
258 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
259 "tests": [ # The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap.
Craig Citro065b5302014-08-14 00:47:23 -0700260 { # Message for the expected URL mappings.
261 "path": "A String", # Path portion of the URL.
262 "host": "A String", # Host portion of the URL.
263 "description": "A String", # Description of this test case.
264 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
265 },
266 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700267 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700268 "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, otherwise the request will fail with error 412 conditionNotMet.
269 #
270 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Craig Citro065b5302014-08-14 00:47:23 -0700271 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800272 { # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700273 "defaultService": "A 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:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800274 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
275 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700276 # - 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.
277 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
278 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
279 # - compute.backendBuckets.use
280 # - compute.backendServices.use
281 "pathRules": [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.
282 # For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list.
283 # Only one of pathRules or routeRules must be set.
Craig Citro065b5302014-08-14 00:47:23 -0700284 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
285 "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.
286 "A String",
287 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700288 "service": "A String", # The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified.
289 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Craig Citro065b5302014-08-14 00:47:23 -0700290 },
291 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800292 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Craig Citro065b5302014-08-14 00:47:23 -0700293 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
294 },
295 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700296 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800297 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Craig Citro065b5302014-08-14 00:47:23 -0700298 "hostRules": [ # The list of HostRules to use against the URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700299 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800300 "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 Citro065b5302014-08-14 00:47:23 -0700301 "A String",
302 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800303 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
304 "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 Citro065b5302014-08-14 00:47:23 -0700305 },
306 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700307 "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 Citro065b5302014-08-14 00:47:23 -0700308 }
309
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700310 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
311
312For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
313
314The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Craig Citro065b5302014-08-14 00:47:23 -0700315
316Returns:
317 An object of the form:
318
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700319 { # Represents an Operation resource.
320 #
321 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
322 #
323 # Operations can be global, regional or zonal.
324 # - For global operations, use the globalOperations resource.
325 # - For regional operations, use the regionOperations resource.
326 # - For zonal operations, use the zonalOperations resource.
327 #
328 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800329 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700330 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400331 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800332 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700333 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800334 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
335 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000336 "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 Parrott36e41bc2016-02-19 16:02:29 -0800337 "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.
338 "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 Citroe633be12015-03-02 13:40:36 -0800339 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800340 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
341 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000342 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
Craig Citro065b5302014-08-14 00:47:23 -0700343 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800344 "message": "A String", # [Output Only] A human-readable description of the warning code.
345 "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.
346 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
347 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citro065b5302014-08-14 00:47:23 -0700348 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000349 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700350 "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 Citro065b5302014-08-14 00:47:23 -0700351 },
352 ],
353 },
354 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000355 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800356 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
357 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000358 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700359 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000360 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800361 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -0700362 {
Craig Citroe633be12015-03-02 13:40:36 -0800363 "message": "A String", # [Output Only] An optional, human-readable error message.
364 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700365 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Craig Citro065b5302014-08-14 00:47:23 -0700366 },
367 ],
368 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800369 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700370 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800371 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Craig Citro065b5302014-08-14 00:47:23 -0700372 }</pre>
373</div>
374
375<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700376 <code class="details" id="invalidateCache">invalidateCache(project, urlMap, body, requestId=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700377 <pre>Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.
378
379Args:
380 project: string, Project ID for this request. (required)
381 urlMap: string, Name of the UrlMap scoping this request. (required)
382 body: object, The request body. (required)
383 The object takes the form of:
384
385{
386 "path": "A String",
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800387 "host": "A String", # If set, this invalidation rule will only apply to requests with a Host header matching host.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700388 }
389
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700390 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
391
392For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
393
394The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700395
396Returns:
397 An object of the form:
398
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700399 { # Represents an Operation resource.
400 #
401 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
402 #
403 # Operations can be global, regional or zonal.
404 # - For global operations, use the globalOperations resource.
405 # - For regional operations, use the regionOperations resource.
406 # - For zonal operations, use the zonalOperations resource.
407 #
408 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700409 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700410 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400411 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700412 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700413 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700414 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
415 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
416 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
417 "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.
418 "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.
419 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
420 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
421 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
422 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
423 {
424 "message": "A String", # [Output Only] A human-readable description of the warning code.
425 "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.
426 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
427 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
428 {
429 "value": "A String", # [Output Only] A warning data value corresponding to the key.
430 "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).
431 },
432 ],
433 },
434 ],
435 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
436 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
437 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
438 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700439 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700440 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
441 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
442 {
443 "message": "A String", # [Output Only] An optional, human-readable error message.
444 "code": "A String", # [Output Only] The error type identifier for this error.
445 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
446 },
447 ],
448 },
449 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
450 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800451 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700452 }</pre>
453</div>
454
455<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700456 <code class="details" id="list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700457 <pre>Retrieves the list of UrlMap resources available to the specified project.
458
459Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800460 project: string, Project ID for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700461 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
462
463You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
464
465Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400466 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. Acceptable values are 0 to 500, inclusive. (Default: 500)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800467 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700468 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
Takashi Matsuo06694102015-09-11 13:55:40 -0700469
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700470For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700471
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700472You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800473
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700474To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
Craig Citro065b5302014-08-14 00:47:23 -0700475
476Returns:
477 An object of the form:
478
479 { # Contains a list of UrlMap resources.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800480 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700481 "kind": "compute#urlMapList", # Type of resource.
Craig Citroe633be12015-03-02 13:40:36 -0800482 "items": [ # A list of UrlMap resources.
Craig Citro065b5302014-08-14 00:47:23 -0700483 { # 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 Parrott36e41bc2016-02-19 16:02:29 -0800484 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
485 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700486 "defaultService": "A 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.
487 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
488 "tests": [ # The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap.
Craig Citro065b5302014-08-14 00:47:23 -0700489 { # Message for the expected URL mappings.
490 "path": "A String", # Path portion of the URL.
491 "host": "A String", # Host portion of the URL.
492 "description": "A String", # Description of this test case.
493 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
494 },
495 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700496 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700497 "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, otherwise the request will fail with error 412 conditionNotMet.
498 #
499 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Craig Citro065b5302014-08-14 00:47:23 -0700500 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800501 { # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700502 "defaultService": "A 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:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800503 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
504 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700505 # - 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.
506 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
507 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
508 # - compute.backendBuckets.use
509 # - compute.backendServices.use
510 "pathRules": [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.
511 # For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list.
512 # Only one of pathRules or routeRules must be set.
Craig Citro065b5302014-08-14 00:47:23 -0700513 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
514 "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.
515 "A String",
516 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700517 "service": "A String", # The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified.
518 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Craig Citro065b5302014-08-14 00:47:23 -0700519 },
520 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800521 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Craig Citro065b5302014-08-14 00:47:23 -0700522 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
523 },
524 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700525 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800526 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Craig Citro065b5302014-08-14 00:47:23 -0700527 "hostRules": [ # The list of HostRules to use against the URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700528 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800529 "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 Citro065b5302014-08-14 00:47:23 -0700530 "A String",
531 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800532 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
533 "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 Citro065b5302014-08-14 00:47:23 -0700534 },
535 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700536 "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 Citro065b5302014-08-14 00:47:23 -0700537 },
538 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700539 "warning": { # [Output Only] Informational warning message.
540 "message": "A String", # [Output Only] A human-readable description of the warning code.
541 "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.
542 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
543 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
544 {
545 "value": "A String", # [Output Only] A warning data value corresponding to the key.
546 "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).
547 },
548 ],
549 },
550 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700551 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Craig Citro065b5302014-08-14 00:47:23 -0700552 }</pre>
553</div>
554
555<div class="method">
556 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
557 <pre>Retrieves the next page of results.
558
559Args:
560 previous_request: The request for the previous page. (required)
561 previous_response: The response from the request for the previous page. (required)
562
563Returns:
564 A request object that you can call 'execute()' on to request the next
565 page. Returns None if there are no more items in the collection.
566 </pre>
567</div>
568
569<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700570 <code class="details" id="patch">patch(project, urlMap, body, requestId=None)</code>
571 <pre>Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Craig Citro065b5302014-08-14 00:47:23 -0700572
573Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800574 project: string, Project ID for this request. (required)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400575 urlMap: string, Name of the UrlMap resource to patch. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700576 body: object, The request body. (required)
577 The object takes the form of:
578
579{ # 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 Parrott36e41bc2016-02-19 16:02:29 -0800580 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
581 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700582 "defaultService": "A 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.
583 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
584 "tests": [ # The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap.
Craig Citro065b5302014-08-14 00:47:23 -0700585 { # Message for the expected URL mappings.
586 "path": "A String", # Path portion of the URL.
587 "host": "A String", # Host portion of the URL.
588 "description": "A String", # Description of this test case.
589 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
590 },
591 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700592 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700593 "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, otherwise the request will fail with error 412 conditionNotMet.
594 #
595 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Craig Citro065b5302014-08-14 00:47:23 -0700596 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800597 { # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700598 "defaultService": "A 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:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800599 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
600 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700601 # - 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.
602 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
603 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
604 # - compute.backendBuckets.use
605 # - compute.backendServices.use
606 "pathRules": [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.
607 # For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list.
608 # Only one of pathRules or routeRules must be set.
Craig Citro065b5302014-08-14 00:47:23 -0700609 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
610 "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.
611 "A String",
612 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700613 "service": "A String", # The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified.
614 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Craig Citro065b5302014-08-14 00:47:23 -0700615 },
616 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800617 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Craig Citro065b5302014-08-14 00:47:23 -0700618 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
619 },
620 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700621 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800622 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Craig Citro065b5302014-08-14 00:47:23 -0700623 "hostRules": [ # The list of HostRules to use against the URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700624 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800625 "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 Citro065b5302014-08-14 00:47:23 -0700626 "A String",
627 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800628 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
629 "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 Citro065b5302014-08-14 00:47:23 -0700630 },
631 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700632 "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 Citro065b5302014-08-14 00:47:23 -0700633 }
634
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700635 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
636
637For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
638
639The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Craig Citro065b5302014-08-14 00:47:23 -0700640
641Returns:
642 An object of the form:
643
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700644 { # Represents an Operation resource.
645 #
646 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
647 #
648 # Operations can be global, regional or zonal.
649 # - For global operations, use the globalOperations resource.
650 # - For regional operations, use the regionOperations resource.
651 # - For zonal operations, use the zonalOperations resource.
652 #
653 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800654 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700655 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400656 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800657 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700658 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800659 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
660 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000661 "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 Parrott36e41bc2016-02-19 16:02:29 -0800662 "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.
663 "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 Citroe633be12015-03-02 13:40:36 -0800664 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800665 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
666 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000667 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
Craig Citro065b5302014-08-14 00:47:23 -0700668 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800669 "message": "A String", # [Output Only] A human-readable description of the warning code.
670 "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.
671 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
672 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citro065b5302014-08-14 00:47:23 -0700673 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000674 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700675 "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 Citro065b5302014-08-14 00:47:23 -0700676 },
677 ],
678 },
679 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000680 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800681 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
682 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000683 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700684 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000685 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800686 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -0700687 {
Craig Citroe633be12015-03-02 13:40:36 -0800688 "message": "A String", # [Output Only] An optional, human-readable error message.
689 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700690 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Craig Citro065b5302014-08-14 00:47:23 -0700691 },
692 ],
693 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800694 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700695 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800696 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Craig Citro065b5302014-08-14 00:47:23 -0700697 }</pre>
698</div>
699
700<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700701 <code class="details" id="update">update(project, urlMap, body, requestId=None)</code>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700702 <pre>Updates the specified UrlMap resource with the data included in the request.
Craig Citro065b5302014-08-14 00:47:23 -0700703
704Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800705 project: string, Project ID for this request. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700706 urlMap: string, Name of the UrlMap resource to update. (required)
707 body: object, The request body. (required)
708 The object takes the form of:
709
710{ # 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 Parrott36e41bc2016-02-19 16:02:29 -0800711 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
712 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700713 "defaultService": "A 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.
714 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
715 "tests": [ # The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap.
Craig Citro065b5302014-08-14 00:47:23 -0700716 { # Message for the expected URL mappings.
717 "path": "A String", # Path portion of the URL.
718 "host": "A String", # Host portion of the URL.
719 "description": "A String", # Description of this test case.
720 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
721 },
722 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700723 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700724 "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, otherwise the request will fail with error 412 conditionNotMet.
725 #
726 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Craig Citro065b5302014-08-14 00:47:23 -0700727 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800728 { # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700729 "defaultService": "A 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:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800730 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
731 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700732 # - 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.
733 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
734 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
735 # - compute.backendBuckets.use
736 # - compute.backendServices.use
737 "pathRules": [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.
738 # For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list.
739 # Only one of pathRules or routeRules must be set.
Craig Citro065b5302014-08-14 00:47:23 -0700740 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
741 "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.
742 "A String",
743 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700744 "service": "A String", # The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified.
745 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Craig Citro065b5302014-08-14 00:47:23 -0700746 },
747 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800748 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Craig Citro065b5302014-08-14 00:47:23 -0700749 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
750 },
751 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700752 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800753 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Craig Citro065b5302014-08-14 00:47:23 -0700754 "hostRules": [ # The list of HostRules to use against the URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700755 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800756 "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 Citro065b5302014-08-14 00:47:23 -0700757 "A String",
758 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800759 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
760 "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 Citro065b5302014-08-14 00:47:23 -0700761 },
762 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700763 "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 Citro065b5302014-08-14 00:47:23 -0700764 }
765
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700766 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
767
768For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
769
770The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Craig Citro065b5302014-08-14 00:47:23 -0700771
772Returns:
773 An object of the form:
774
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700775 { # Represents an Operation resource.
776 #
777 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
778 #
779 # Operations can be global, regional or zonal.
780 # - For global operations, use the globalOperations resource.
781 # - For regional operations, use the regionOperations resource.
782 # - For zonal operations, use the zonalOperations resource.
783 #
784 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800785 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700786 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400787 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800788 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700789 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800790 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
791 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000792 "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 Parrott36e41bc2016-02-19 16:02:29 -0800793 "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.
794 "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 Citroe633be12015-03-02 13:40:36 -0800795 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800796 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
797 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000798 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
Craig Citro065b5302014-08-14 00:47:23 -0700799 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800800 "message": "A String", # [Output Only] A human-readable description of the warning code.
801 "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.
802 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
803 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citro065b5302014-08-14 00:47:23 -0700804 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000805 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700806 "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 Citro065b5302014-08-14 00:47:23 -0700807 },
808 ],
809 },
810 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000811 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800812 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
813 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000814 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700815 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000816 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800817 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -0700818 {
Craig Citroe633be12015-03-02 13:40:36 -0800819 "message": "A String", # [Output Only] An optional, human-readable error message.
820 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700821 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Craig Citro065b5302014-08-14 00:47:23 -0700822 },
823 ],
824 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800825 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700826 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800827 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Craig Citro065b5302014-08-14 00:47:23 -0700828 }</pre>
829</div>
830
831<div class="method">
832 <code class="details" id="validate">validate(project, urlMap, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800833 <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 Citro065b5302014-08-14 00:47:23 -0700834
835Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800836 project: string, Project ID for this request. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700837 urlMap: string, Name of the UrlMap resource to be validated as. (required)
838 body: object, The request body. (required)
839 The object takes the form of:
840
841{
842 "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 Parrott36e41bc2016-02-19 16:02:29 -0800843 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
844 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700845 "defaultService": "A 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.
846 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
847 "tests": [ # The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap.
Craig Citro065b5302014-08-14 00:47:23 -0700848 { # Message for the expected URL mappings.
849 "path": "A String", # Path portion of the URL.
850 "host": "A String", # Host portion of the URL.
851 "description": "A String", # Description of this test case.
852 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
853 },
854 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700855 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700856 "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, otherwise the request will fail with error 412 conditionNotMet.
857 #
858 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Craig Citro065b5302014-08-14 00:47:23 -0700859 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800860 { # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700861 "defaultService": "A 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:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800862 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
863 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700864 # - 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.
865 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
866 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
867 # - compute.backendBuckets.use
868 # - compute.backendServices.use
869 "pathRules": [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.
870 # For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list.
871 # Only one of pathRules or routeRules must be set.
Craig Citro065b5302014-08-14 00:47:23 -0700872 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
873 "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.
874 "A String",
875 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700876 "service": "A String", # The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified.
877 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Craig Citro065b5302014-08-14 00:47:23 -0700878 },
879 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800880 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Craig Citro065b5302014-08-14 00:47:23 -0700881 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
882 },
883 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700884 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800885 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Craig Citro065b5302014-08-14 00:47:23 -0700886 "hostRules": [ # The list of HostRules to use against the URL.
Takashi Matsuo06694102015-09-11 13:55:40 -0700887 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800888 "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 Citro065b5302014-08-14 00:47:23 -0700889 "A String",
890 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800891 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
892 "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 Citro065b5302014-08-14 00:47:23 -0700893 },
894 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700895 "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 Citro065b5302014-08-14 00:47:23 -0700896 },
897 }
898
899
900Returns:
901 An object of the form:
902
903 {
904 "result": { # Message representing the validation result for a UrlMap.
905 "testFailures": [
906 {
907 "path": "A String",
908 "actualService": "A String",
909 "host": "A String",
910 "expectedService": "A String",
911 },
912 ],
913 "loadErrors": [
914 "A String",
915 ],
916 "testPassed": True or False, # If successfully loaded, this field indicates whether the test passed. If false, 'testFailures's indicate the reason of failure.
917 "loadSucceeded": True or False, # Whether the given UrlMap can be successfully loaded. If false, 'loadErrors' indicates the reasons.
918 },
919 }</pre>
920</div>
921
922</body></html>