blob: 136bb49e17e3ebdbc5d5d393499fe20d50cea13f [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">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None, includeAllScopes=None)</a></code></p>
79<p class="firstline">Retrieves the list of all UrlMap resources, regional and global, available to the specified project.</p>
80<p class="toc_element">
81 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070084 <code><a href="#delete">delete(project, urlMap, requestId=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070085<p class="firstline">Deletes the specified UrlMap resource.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, urlMap)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<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 -070089<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#insert">insert(project, body=None, requestId=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070091<p class="firstline">Creates a UrlMap resource in the specified project using the data included in the request.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#invalidateCache">invalidateCache(project, urlMap, body=None, requestId=None)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070094<p class="firstline">Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.</p>
95<p class="toc_element">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070096 <code><a href="#list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070097<p class="firstline">Retrieves the list of UrlMap resources available to the specified project.</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#patch">patch(project, urlMap, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<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 -0700104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#update">update(project, urlMap, body=None, requestId=None)</a></code></p>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700106<p class="firstline">Updates the specified UrlMap resource with the data included in the request.</p>
Craig Citro065b5302014-08-14 00:47:23 -0700107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#validate">validate(project, urlMap, body=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800109<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 -0700110<h3>Method Details</h3>
111<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700112 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None, includeAllScopes=None)</code>
113 <pre>Retrieves the list of all UrlMap resources, regional and global, available to the specified project.
114
115Args:
116 project: string, Name of the project scoping this request. (required)
117 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
118
119You 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.
120
121Currently, only sorting by `name` or `creationTimestamp desc` is supported.
122 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`)
123 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.
124 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 `=`, `!=`, `&gt;`, or `&lt;`.
125
126For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
127
128You 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.
129
130To 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) ```
131 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
132
133Returns:
134 An object of the form:
135
136 {
137 "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.
138 "kind": "compute#urlMapsAggregatedList", # Type of resource.
139 "items": { # A list of UrlMapsScopedList resources.
140 "a_key": { # Name of the scope containing this set of UrlMaps.
141 "urlMaps": [ # A list of UrlMaps contained in this scope.
142 { # Represents a URL Map resource.
143 #
144 # Google Compute Engine has two URL Map resources:
145 #
146 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
147 #
148 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
149 #
150 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
151 #
152 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
153 #
154 # To use the global urlMaps resource, the backend service must have a loadBalancingScheme of either EXTERNAL or INTERNAL_SELF_MANAGED. To use the regionUrlMaps resource, the backend service must have a loadBalancingScheme of INTERNAL_MANAGED. For more information, read URL Map Concepts.
155 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
156 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
157 "defaultRouteAction": { # defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.
158 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
159 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
160 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
161 },
162 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
163 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
164 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
165 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
166 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
167 },
168 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
169 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
170 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
171 # -
172 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
173 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
174 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
175 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
176 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
177 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
178 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
179 "A String",
180 ],
181 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
182 },
183 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
184 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
185 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
186 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
187 # The value must be between 0.0 and 100.0 inclusive.
188 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
189 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
190 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
191 },
192 },
193 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
194 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
195 # The value must be between 0.0 and 100.0 inclusive.
196 "httpStatus": 42, # The HTTP status code used to abort the request.
197 # The value must be between 200 and 599 inclusive.
198 },
199 },
200 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
201 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
202 "A String",
203 ],
204 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
205 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
206 "A String",
207 ],
208 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
209 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
210 "A String",
211 ],
212 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
213 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
214 # Default is false.
215 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
216 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
217 "A String",
218 ],
219 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
220 "A String",
221 ],
222 },
223 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
224 # If not specified, will use the largest timeout among all backend services associated with the route.
225 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
226 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
227 },
228 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
229 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
230 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
231 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
232 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
233 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
234 "A String",
235 ],
236 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
237 "A String",
238 ],
239 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
240 { # Specification determining how headers are added to requests or responses.
241 "headerName": "A String", # The name of the header.
242 "headerValue": "A String", # The value of the header to add.
243 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
244 # The default value is false.
245 },
246 ],
247 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
248 { # Specification determining how headers are added to requests or responses.
249 "headerName": "A String", # The name of the header.
250 "headerValue": "A String", # The value of the header to add.
251 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
252 # The default value is false.
253 },
254 ],
255 },
256 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
257 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
258 # The value must be between 0 and 1000
259 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
260 },
261 ],
262 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
263 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
264 # The value must be between 1 and 255 characters.
265 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
266 # The value must be between 1 and 1024 characters.
267 },
268 },
269 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
270 "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.
271 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
272 "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.
273 { # Message for the expected URL mappings.
274 "path": "A String", # Path portion of the URL.
275 "host": "A String", # Host portion of the URL.
276 "description": "A String", # Description of this test case.
277 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
278 },
279 ],
280 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
281 "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.
282 #
283 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
284 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
285 { # 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.
286 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
287 "defaultRouteAction": { # defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.
288 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
289 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
290 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
291 },
292 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
293 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
294 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
295 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
296 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
297 },
298 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
299 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
300 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
301 # -
302 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
303 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
304 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
305 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
306 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
307 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
308 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
309 "A String",
310 ],
311 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
312 },
313 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
314 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
315 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
316 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
317 # The value must be between 0.0 and 100.0 inclusive.
318 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
319 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
320 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
321 },
322 },
323 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
324 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
325 # The value must be between 0.0 and 100.0 inclusive.
326 "httpStatus": 42, # The HTTP status code used to abort the request.
327 # The value must be between 200 and 599 inclusive.
328 },
329 },
330 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
331 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
332 "A String",
333 ],
334 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
335 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
336 "A String",
337 ],
338 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
339 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
340 "A String",
341 ],
342 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
343 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
344 # Default is false.
345 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
346 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
347 "A String",
348 ],
349 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
350 "A String",
351 ],
352 },
353 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
354 # If not specified, will use the largest timeout among all backend services associated with the route.
355 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
356 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
357 },
358 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
359 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
360 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
361 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
362 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
363 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
364 "A String",
365 ],
366 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
367 "A String",
368 ],
369 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
370 { # Specification determining how headers are added to requests or responses.
371 "headerName": "A String", # The name of the header.
372 "headerValue": "A String", # The value of the header to add.
373 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
374 # The default value is false.
375 },
376 ],
377 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
378 { # Specification determining how headers are added to requests or responses.
379 "headerName": "A String", # The name of the header.
380 "headerValue": "A String", # The value of the header to add.
381 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
382 # The default value is false.
383 },
384 ],
385 },
386 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
387 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
388 # The value must be between 0 and 1000
389 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
390 },
391 ],
392 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
393 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
394 # The value must be between 1 and 255 characters.
395 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
396 # The value must be between 1 and 1024 characters.
397 },
398 },
399 "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:
400 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
401 # - compute/v1/projects/project/global/backendServices/backendService
402 # - 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.
403 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
404 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
405 # - compute.backendBuckets.use
406 # - compute.backendServices.use
407 "routeRules": [ # The list of HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. routeRules are evaluated in order of priority, from the lowest to highest number.
408 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
409 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
410 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
411 # If urlRedirect is specified, service or routeAction must not be set.
412 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
413 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
414 # The value must be between 1 and 1024 characters.
415 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
416 # The default is set to false.
417 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
418 # Supported values are:
419 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
420 # - FOUND, which corresponds to 302.
421 # - SEE_OTHER which corresponds to 303.
422 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
423 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
424 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
425 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
426 # The default is set to false.
427 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
428 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
429 # The value must be between 1 and 1024 characters.
430 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
431 # The value must be between 1 and 255 characters.
432 },
433 "description": "A String", # The short description conveying the intent of this routeRule.
434 # The description can have a maximum length of 1024 characters.
435 "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.
436 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
437 "priority": 42, # For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied.
438 # You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive.
439 # Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.
440 "routeAction": { # In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.
441 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
442 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
443 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
444 },
445 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
446 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
447 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
448 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
449 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
450 },
451 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
452 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
453 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
454 # -
455 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
456 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
457 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
458 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
459 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
460 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
461 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
462 "A String",
463 ],
464 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
465 },
466 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
467 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
468 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
469 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
470 # The value must be between 0.0 and 100.0 inclusive.
471 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
472 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
473 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
474 },
475 },
476 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
477 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
478 # The value must be between 0.0 and 100.0 inclusive.
479 "httpStatus": 42, # The HTTP status code used to abort the request.
480 # The value must be between 200 and 599 inclusive.
481 },
482 },
483 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
484 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
485 "A String",
486 ],
487 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
488 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
489 "A String",
490 ],
491 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
492 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
493 "A String",
494 ],
495 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
496 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
497 # Default is false.
498 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
499 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
500 "A String",
501 ],
502 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
503 "A String",
504 ],
505 },
506 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
507 # If not specified, will use the largest timeout among all backend services associated with the route.
508 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
509 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
510 },
511 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
512 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
513 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
514 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
515 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
516 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
517 "A String",
518 ],
519 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
520 "A String",
521 ],
522 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
523 { # Specification determining how headers are added to requests or responses.
524 "headerName": "A String", # The name of the header.
525 "headerValue": "A String", # The value of the header to add.
526 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
527 # The default value is false.
528 },
529 ],
530 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
531 { # Specification determining how headers are added to requests or responses.
532 "headerName": "A String", # The name of the header.
533 "headerValue": "A String", # The value of the header to add.
534 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
535 # The default value is false.
536 },
537 ],
538 },
539 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
540 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
541 # The value must be between 0 and 1000
542 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
543 },
544 ],
545 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
546 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
547 # The value must be between 1 and 255 characters.
548 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
549 # The value must be between 1 and 1024 characters.
550 },
551 },
552 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
553 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
554 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
555 "A String",
556 ],
557 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
558 "A String",
559 ],
560 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
561 { # Specification determining how headers are added to requests or responses.
562 "headerName": "A String", # The name of the header.
563 "headerValue": "A String", # The value of the header to add.
564 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
565 # The default value is false.
566 },
567 ],
568 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
569 { # Specification determining how headers are added to requests or responses.
570 "headerName": "A String", # The name of the header.
571 "headerValue": "A String", # The value of the header to add.
572 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
573 # The default value is false.
574 },
575 ],
576 },
577 "matchRules": [
578 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
579 "regexMatch": "A String", # For satisfying the matchRule condition, the path of the request must satisfy the regular expression specified in regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
580 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
581 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
582 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
583 { # matchRule criteria for request header matches.
584 "regexMatch": "A String", # The value of the header must match the regular expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/cpp/regex/ecmascript
585 # For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier.
586 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
587 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
588 "invertMatch": True or False, # If set to false, the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met.
589 # The default setting is false.
590 "headerName": "A String", # The name of the HTTP header to match.
591 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
592 # For matching a request's method, use the headerName ":method".
593 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
594 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
595 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
596 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
597 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
598 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
599 "presentMatch": True or False, # A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value.
600 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
601 "rangeMatch": { # HttpRouteRuleMatch criteria for field values that must stay within the specified integer range. # The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails.
602 # For example for a range [-5, 0]
603 # - -3 will match.
604 # - 0 will not match.
605 # - 0.25 will not match.
606 # - -3someString will not match.
607 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
608 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
609 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
610 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
611 },
612 },
613 ],
614 "fullPathMatch": "A String", # For satisfying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL.
615 # fullPathMatch must be between 1 and 1024 characters.
616 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
617 "prefixMatch": "A String", # For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /.
618 # The value must be between 1 and 1024 characters.
619 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
620 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
621 # The default value is false.
622 # ignoreCase must not be used with regexMatch.
623 "metadataFilters": [ # Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set of xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies.
624 # For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata.
625 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
626 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
627 { # Opaque filter criteria used by loadbalancers to restrict routing configuration to a limited set of loadbalancing proxies. Proxies and sidecars involved in loadbalancing would typically present metadata to the loadbalancers which need to match criteria specified here. If a match takes place, the relevant configuration is made available to those proxies.
628 # For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata.
629 # An example for using metadataFilters would be: if loadbalancing involves Envoys, they will only receive routing configuration when values in metadataFilters match values supplied in &lt;a href="https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/base.proto#envoy-api-msg-core-node" Node metadata of their XDS requests to loadbalancers.
630 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
631 # Supported values are:
632 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
633 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
634 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
635 # This list must not be empty and can have at the most 64 entries.
636 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
637 "name": "A String", # Name of metadata label.
638 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
639 "value": "A String", # The value of the label must match the specified value.
640 # value can have a maximum length of 1024 characters.
641 },
642 ],
643 },
644 ],
645 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
646 { # HttpRouteRuleMatch criteria for a request's query parameter.
647 "presentMatch": True or False, # Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not.
648 # Only one of presentMatch, exactMatch or regexMatch must be set.
649 "regexMatch": "A String", # The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript
650 # Only one of presentMatch, exactMatch or regexMatch must be set.
651 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
652 "name": "A String", # The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.
653 "exactMatch": "A String", # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
654 # Only one of presentMatch, exactMatch or regexMatch must be set.
655 },
656 ],
657 },
658 ],
659 },
660 ],
661 "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.
662 # 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.
663 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
664 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
665 "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.
666 "A String",
667 ],
668 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
669 # If urlRedirect is specified, service or routeAction must not be set.
670 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
671 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
672 # The value must be between 1 and 1024 characters.
673 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
674 # The default is set to false.
675 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
676 # Supported values are:
677 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
678 # - FOUND, which corresponds to 302.
679 # - SEE_OTHER which corresponds to 303.
680 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
681 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
682 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
683 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
684 # The default is set to false.
685 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
686 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
687 # The value must be between 1 and 1024 characters.
688 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
689 # The value must be between 1 and 255 characters.
690 },
691 "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.
692 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
693 "routeAction": { # In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.
694 # Only one of routeAction or urlRedirect must be set.
695 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
696 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
697 },
698 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
699 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
700 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
701 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
702 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
703 },
704 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
705 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
706 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
707 # -
708 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
709 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
710 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
711 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
712 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
713 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
714 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
715 "A String",
716 ],
717 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
718 },
719 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
720 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
721 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
722 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
723 # The value must be between 0.0 and 100.0 inclusive.
724 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
725 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
726 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
727 },
728 },
729 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
730 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
731 # The value must be between 0.0 and 100.0 inclusive.
732 "httpStatus": 42, # The HTTP status code used to abort the request.
733 # The value must be between 200 and 599 inclusive.
734 },
735 },
736 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
737 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
738 "A String",
739 ],
740 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
741 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
742 "A String",
743 ],
744 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
745 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
746 "A String",
747 ],
748 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
749 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
750 # Default is false.
751 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
752 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
753 "A String",
754 ],
755 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
756 "A String",
757 ],
758 },
759 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
760 # If not specified, will use the largest timeout among all backend services associated with the route.
761 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
762 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
763 },
764 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
765 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
766 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
767 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
768 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
769 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
770 "A String",
771 ],
772 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
773 "A String",
774 ],
775 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
776 { # Specification determining how headers are added to requests or responses.
777 "headerName": "A String", # The name of the header.
778 "headerValue": "A String", # The value of the header to add.
779 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
780 # The default value is false.
781 },
782 ],
783 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
784 { # Specification determining how headers are added to requests or responses.
785 "headerName": "A String", # The name of the header.
786 "headerValue": "A String", # The value of the header to add.
787 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
788 # The default value is false.
789 },
790 ],
791 },
792 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
793 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
794 # The value must be between 0 and 1000
795 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
796 },
797 ],
798 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
799 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
800 # The value must be between 1 and 255 characters.
801 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
802 # The value must be between 1 and 1024 characters.
803 },
804 },
805 },
806 ],
807 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
808 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
809 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
810 "A String",
811 ],
812 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
813 "A String",
814 ],
815 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
816 { # Specification determining how headers are added to requests or responses.
817 "headerName": "A String", # The name of the header.
818 "headerValue": "A String", # The value of the header to add.
819 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
820 # The default value is false.
821 },
822 ],
823 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
824 { # Specification determining how headers are added to requests or responses.
825 "headerName": "A String", # The name of the header.
826 "headerValue": "A String", # The value of the header to add.
827 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
828 # The default value is false.
829 },
830 ],
831 },
832 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect.
833 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
834 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
835 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
836 # The value must be between 1 and 1024 characters.
837 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
838 # The default is set to false.
839 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
840 # Supported values are:
841 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
842 # - FOUND, which corresponds to 302.
843 # - SEE_OTHER which corresponds to 303.
844 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
845 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
846 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
847 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
848 # The default is set to false.
849 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
850 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
851 # The value must be between 1 and 1024 characters.
852 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
853 # The value must be between 1 and 255 characters.
854 },
855 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
856 },
857 ],
858 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
859 # The headerAction specified here take effect after headerAction specified under pathMatcher.
860 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
861 "A String",
862 ],
863 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
864 "A String",
865 ],
866 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
867 { # Specification determining how headers are added to requests or responses.
868 "headerName": "A String", # The name of the header.
869 "headerValue": "A String", # The value of the header to add.
870 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
871 # The default value is false.
872 },
873 ],
874 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
875 { # Specification determining how headers are added to requests or responses.
876 "headerName": "A String", # The name of the header.
877 "headerValue": "A String", # The value of the header to add.
878 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
879 # The default value is false.
880 },
881 ],
882 },
883 "region": "A String", # [Output Only] URL of the region where the regional URL map resides. This field is not applicable to global URL maps. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
884 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
885 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
886 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
887 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
888 # The value must be between 1 and 1024 characters.
889 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
890 # The default is set to false.
891 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
892 # Supported values are:
893 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
894 # - FOUND, which corresponds to 302.
895 # - SEE_OTHER which corresponds to 303.
896 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
897 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
898 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
899 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
900 # The default is set to false.
901 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
902 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
903 # The value must be between 1 and 1024 characters.
904 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
905 # The value must be between 1 and 255 characters.
906 },
907 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
908 "hostRules": [ # The list of HostRules to use against the URL.
909 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
910 "hosts": [ # The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or ..
911 "A String",
912 ],
913 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
914 "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.
915 },
916 ],
917 "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.
918 },
919 ],
920 "warning": { # Informational warning which replaces the list of backend services when the list is empty.
921 "message": "A String", # [Output Only] A human-readable description of the warning code.
922 "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.
923 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
924 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
925 {
926 "value": "A String", # [Output Only] A warning data value corresponding to the key.
927 "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).
928 },
929 ],
930 },
931 },
932 },
933 "warning": { # [Output Only] Informational warning message.
934 "message": "A String", # [Output Only] A human-readable description of the warning code.
935 "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.
936 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
937 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
938 {
939 "value": "A String", # [Output Only] A warning data value corresponding to the key.
940 "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).
941 },
942 ],
943 },
944 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
945 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
946 }</pre>
947</div>
948
949<div class="method">
950 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
951 <pre>Retrieves the next page of results.
952
953Args:
954 previous_request: The request for the previous page. (required)
955 previous_response: The response from the request for the previous page. (required)
956
957Returns:
958 A request object that you can call 'execute()' on to request the next
959 page. Returns None if there are no more items in the collection.
960 </pre>
961</div>
962
963<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700964 <code class="details" id="delete">delete(project, urlMap, requestId=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700965 <pre>Deletes the specified UrlMap resource.
966
967Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800968 project: string, Project ID for this request. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700969 urlMap: string, Name of the UrlMap resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700970 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.
971
972For 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.
973
974The 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 -0700975
976Returns:
977 An object of the form:
978
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700979 { # Represents an Operation resource.
980 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700981 # Google Compute Engine has three Operation resources:
982 #
983 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
984 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700985 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
986 #
987 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700988 # - For global operations, use the `globalOperations` resource.
989 # - For regional operations, use the `regionOperations` resource.
990 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700991 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700992 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800993 "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 -0700994 "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 -0400995 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700996 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700997 "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 -0800998 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700999 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1000 "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 -08001001 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001002 "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 -08001003 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001004 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001005 "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 +00001006 "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 -07001007 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001008 "message": "A String", # [Output Only] A human-readable description of the warning code.
1009 "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.
1010 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1011 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citro065b5302014-08-14 00:47:23 -07001012 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001013 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001014 "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 -07001015 },
1016 ],
1017 },
1018 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001019 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001020 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001021 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1022 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001023 "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 +00001024 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001025 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -07001026 {
Craig Citroe633be12015-03-02 13:40:36 -08001027 "message": "A String", # [Output Only] An optional, human-readable error message.
1028 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001029 "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 -07001030 },
1031 ],
1032 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001033 "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 -07001034 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001035 "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 -07001036 }</pre>
1037</div>
1038
1039<div class="method">
1040 <code class="details" id="get">get(project, urlMap)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001041 <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 -07001042
1043Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001044 project: string, Project ID for this request. (required)
Craig Citro065b5302014-08-14 00:47:23 -07001045 urlMap: string, Name of the UrlMap resource to return. (required)
1046
1047Returns:
1048 An object of the form:
1049
Dan O'Mearadd494642020-05-01 07:42:23 -07001050 { # Represents a URL Map resource.
1051 #
1052 # Google Compute Engine has two URL Map resources:
1053 #
1054 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
1055 #
1056 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
1057 #
1058 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
1059 #
1060 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
1061 #
1062 # To use the global urlMaps resource, the backend service must have a loadBalancingScheme of either EXTERNAL or INTERNAL_SELF_MANAGED. To use the regionUrlMaps resource, the backend service must have a loadBalancingScheme of INTERNAL_MANAGED. For more information, read URL Map Concepts.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001063 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
1064 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001065 "defaultRouteAction": { # defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.
1066 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
1067 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
1068 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1069 },
1070 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1071 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
1072 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
1073 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1074 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1075 },
1076 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1077 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
1078 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1079 # -
1080 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1081 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1082 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
1083 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1084 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1085 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1086 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1087 "A String",
1088 ],
1089 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1090 },
1091 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
1092 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1093 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
1094 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1095 # The value must be between 0.0 and 100.0 inclusive.
1096 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
1097 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1098 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1099 },
1100 },
1101 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
1102 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1103 # The value must be between 0.0 and 100.0 inclusive.
1104 "httpStatus": 42, # The HTTP status code used to abort the request.
1105 # The value must be between 200 and 599 inclusive.
1106 },
1107 },
1108 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
1109 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1110 "A String",
1111 ],
1112 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1113 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1114 "A String",
1115 ],
1116 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1117 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1118 "A String",
1119 ],
1120 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
1121 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
1122 # Default is false.
1123 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
1124 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
1125 "A String",
1126 ],
1127 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
1128 "A String",
1129 ],
1130 },
1131 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
1132 # If not specified, will use the largest timeout among all backend services associated with the route.
1133 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1134 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1135 },
1136 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
1137 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
1138 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
1139 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
1140 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1141 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1142 "A String",
1143 ],
1144 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
1145 "A String",
1146 ],
1147 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1148 { # Specification determining how headers are added to requests or responses.
1149 "headerName": "A String", # The name of the header.
1150 "headerValue": "A String", # The value of the header to add.
1151 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1152 # The default value is false.
1153 },
1154 ],
1155 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1156 { # Specification determining how headers are added to requests or responses.
1157 "headerName": "A String", # The name of the header.
1158 "headerValue": "A String", # The value of the header to add.
1159 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1160 # The default value is false.
1161 },
1162 ],
1163 },
1164 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1165 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
1166 # The value must be between 0 and 1000
1167 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
1168 },
1169 ],
1170 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
1171 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
1172 # The value must be between 1 and 255 characters.
1173 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
1174 # The value must be between 1 and 1024 characters.
1175 },
1176 },
1177 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001178 "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.
1179 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
1180 "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 -07001181 { # Message for the expected URL mappings.
1182 "path": "A String", # Path portion of the URL.
1183 "host": "A String", # Host portion of the URL.
1184 "description": "A String", # Description of this test case.
1185 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
1186 },
1187 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07001188 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001189 "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.
1190 #
1191 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Craig Citro065b5302014-08-14 00:47:23 -07001192 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001193 { # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001194 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1195 "defaultRouteAction": { # defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.
1196 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
1197 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
1198 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1199 },
1200 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1201 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
1202 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
1203 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1204 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1205 },
1206 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1207 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
1208 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1209 # -
1210 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1211 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1212 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
1213 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1214 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1215 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1216 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1217 "A String",
1218 ],
1219 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1220 },
1221 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
1222 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1223 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
1224 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1225 # The value must be between 0.0 and 100.0 inclusive.
1226 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
1227 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1228 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1229 },
1230 },
1231 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
1232 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1233 # The value must be between 0.0 and 100.0 inclusive.
1234 "httpStatus": 42, # The HTTP status code used to abort the request.
1235 # The value must be between 200 and 599 inclusive.
1236 },
1237 },
1238 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
1239 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1240 "A String",
1241 ],
1242 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1243 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1244 "A String",
1245 ],
1246 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1247 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1248 "A String",
1249 ],
1250 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
1251 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
1252 # Default is false.
1253 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
1254 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
1255 "A String",
1256 ],
1257 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
1258 "A String",
1259 ],
1260 },
1261 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
1262 # If not specified, will use the largest timeout among all backend services associated with the route.
1263 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1264 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1265 },
1266 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
1267 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
1268 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
1269 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
1270 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1271 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1272 "A String",
1273 ],
1274 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
1275 "A String",
1276 ],
1277 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1278 { # Specification determining how headers are added to requests or responses.
1279 "headerName": "A String", # The name of the header.
1280 "headerValue": "A String", # The value of the header to add.
1281 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1282 # The default value is false.
1283 },
1284 ],
1285 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1286 { # Specification determining how headers are added to requests or responses.
1287 "headerName": "A String", # The name of the header.
1288 "headerValue": "A String", # The value of the header to add.
1289 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1290 # The default value is false.
1291 },
1292 ],
1293 },
1294 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1295 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
1296 # The value must be between 0 and 1000
1297 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
1298 },
1299 ],
1300 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
1301 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
1302 # The value must be between 1 and 255 characters.
1303 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
1304 # The value must be between 1 and 1024 characters.
1305 },
1306 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001307 "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 -08001308 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
1309 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001310 # - 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.
1311 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
1312 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
1313 # - compute.backendBuckets.use
1314 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07001315 "routeRules": [ # The list of HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. routeRules are evaluated in order of priority, from the lowest to highest number.
1316 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
1317 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
1318 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
1319 # If urlRedirect is specified, service or routeAction must not be set.
1320 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
1321 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
1322 # The value must be between 1 and 1024 characters.
1323 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
1324 # The default is set to false.
1325 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
1326 # Supported values are:
1327 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1328 # - FOUND, which corresponds to 302.
1329 # - SEE_OTHER which corresponds to 303.
1330 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1331 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1332 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
1333 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1334 # The default is set to false.
1335 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
1336 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
1337 # The value must be between 1 and 1024 characters.
1338 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
1339 # The value must be between 1 and 255 characters.
1340 },
1341 "description": "A String", # The short description conveying the intent of this routeRule.
1342 # The description can have a maximum length of 1024 characters.
1343 "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.
1344 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1345 "priority": 42, # For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied.
1346 # You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive.
1347 # Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.
1348 "routeAction": { # In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.
1349 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1350 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
1351 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1352 },
1353 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1354 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
1355 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
1356 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1357 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1358 },
1359 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1360 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
1361 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1362 # -
1363 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1364 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1365 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
1366 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1367 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1368 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1369 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1370 "A String",
1371 ],
1372 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1373 },
1374 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
1375 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1376 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
1377 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1378 # The value must be between 0.0 and 100.0 inclusive.
1379 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
1380 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1381 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1382 },
1383 },
1384 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
1385 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1386 # The value must be between 0.0 and 100.0 inclusive.
1387 "httpStatus": 42, # The HTTP status code used to abort the request.
1388 # The value must be between 200 and 599 inclusive.
1389 },
1390 },
1391 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
1392 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1393 "A String",
1394 ],
1395 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1396 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1397 "A String",
1398 ],
1399 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1400 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1401 "A String",
1402 ],
1403 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
1404 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
1405 # Default is false.
1406 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
1407 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
1408 "A String",
1409 ],
1410 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
1411 "A String",
1412 ],
1413 },
1414 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
1415 # If not specified, will use the largest timeout among all backend services associated with the route.
1416 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1417 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1418 },
1419 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
1420 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
1421 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
1422 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
1423 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1424 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1425 "A String",
1426 ],
1427 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
1428 "A String",
1429 ],
1430 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1431 { # Specification determining how headers are added to requests or responses.
1432 "headerName": "A String", # The name of the header.
1433 "headerValue": "A String", # The value of the header to add.
1434 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1435 # The default value is false.
1436 },
1437 ],
1438 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1439 { # Specification determining how headers are added to requests or responses.
1440 "headerName": "A String", # The name of the header.
1441 "headerValue": "A String", # The value of the header to add.
1442 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1443 # The default value is false.
1444 },
1445 ],
1446 },
1447 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1448 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
1449 # The value must be between 0 and 1000
1450 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
1451 },
1452 ],
1453 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
1454 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
1455 # The value must be between 1 and 255 characters.
1456 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
1457 # The value must be between 1 and 1024 characters.
1458 },
1459 },
1460 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
1461 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
1462 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1463 "A String",
1464 ],
1465 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
1466 "A String",
1467 ],
1468 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1469 { # Specification determining how headers are added to requests or responses.
1470 "headerName": "A String", # The name of the header.
1471 "headerValue": "A String", # The value of the header to add.
1472 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1473 # The default value is false.
1474 },
1475 ],
1476 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1477 { # Specification determining how headers are added to requests or responses.
1478 "headerName": "A String", # The name of the header.
1479 "headerValue": "A String", # The value of the header to add.
1480 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1481 # The default value is false.
1482 },
1483 ],
1484 },
1485 "matchRules": [
1486 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
1487 "regexMatch": "A String", # For satisfying the matchRule condition, the path of the request must satisfy the regular expression specified in regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1488 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
1489 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
1490 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
1491 { # matchRule criteria for request header matches.
1492 "regexMatch": "A String", # The value of the header must match the regular expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/cpp/regex/ecmascript
1493 # For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier.
1494 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1495 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
1496 "invertMatch": True or False, # If set to false, the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met.
1497 # The default setting is false.
1498 "headerName": "A String", # The name of the HTTP header to match.
1499 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
1500 # For matching a request's method, use the headerName ":method".
1501 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
1502 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1503 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
1504 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1505 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
1506 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1507 "presentMatch": True or False, # A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value.
1508 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1509 "rangeMatch": { # HttpRouteRuleMatch criteria for field values that must stay within the specified integer range. # The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails.
1510 # For example for a range [-5, 0]
1511 # - -3 will match.
1512 # - 0 will not match.
1513 # - 0.25 will not match.
1514 # - -3someString will not match.
1515 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1516 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1517 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
1518 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
1519 },
1520 },
1521 ],
1522 "fullPathMatch": "A String", # For satisfying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL.
1523 # fullPathMatch must be between 1 and 1024 characters.
1524 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
1525 "prefixMatch": "A String", # For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /.
1526 # The value must be between 1 and 1024 characters.
1527 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
1528 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
1529 # The default value is false.
1530 # ignoreCase must not be used with regexMatch.
1531 "metadataFilters": [ # Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set of xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies.
1532 # For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata.
1533 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
1534 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
1535 { # Opaque filter criteria used by loadbalancers to restrict routing configuration to a limited set of loadbalancing proxies. Proxies and sidecars involved in loadbalancing would typically present metadata to the loadbalancers which need to match criteria specified here. If a match takes place, the relevant configuration is made available to those proxies.
1536 # For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata.
1537 # An example for using metadataFilters would be: if loadbalancing involves Envoys, they will only receive routing configuration when values in metadataFilters match values supplied in &lt;a href="https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/base.proto#envoy-api-msg-core-node" Node metadata of their XDS requests to loadbalancers.
1538 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
1539 # Supported values are:
1540 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
1541 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
1542 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
1543 # This list must not be empty and can have at the most 64 entries.
1544 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
1545 "name": "A String", # Name of metadata label.
1546 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
1547 "value": "A String", # The value of the label must match the specified value.
1548 # value can have a maximum length of 1024 characters.
1549 },
1550 ],
1551 },
1552 ],
1553 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
1554 { # HttpRouteRuleMatch criteria for a request's query parameter.
1555 "presentMatch": True or False, # Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not.
1556 # Only one of presentMatch, exactMatch or regexMatch must be set.
1557 "regexMatch": "A String", # The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript
1558 # Only one of presentMatch, exactMatch or regexMatch must be set.
1559 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
1560 "name": "A String", # The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.
1561 "exactMatch": "A String", # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
1562 # Only one of presentMatch, exactMatch or regexMatch must be set.
1563 },
1564 ],
1565 },
1566 ],
1567 },
1568 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001569 "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.
1570 # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001571 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Craig Citro065b5302014-08-14 00:47:23 -07001572 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
1573 "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.
1574 "A String",
1575 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001576 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
1577 # If urlRedirect is specified, service or routeAction must not be set.
1578 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
1579 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
1580 # The value must be between 1 and 1024 characters.
1581 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
1582 # The default is set to false.
1583 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
1584 # Supported values are:
1585 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1586 # - FOUND, which corresponds to 302.
1587 # - SEE_OTHER which corresponds to 303.
1588 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1589 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1590 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
1591 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1592 # The default is set to false.
1593 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
1594 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
1595 # The value must be between 1 and 1024 characters.
1596 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
1597 # The value must be between 1 and 255 characters.
1598 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001599 "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.
1600 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07001601 "routeAction": { # In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.
1602 # Only one of routeAction or urlRedirect must be set.
1603 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
1604 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1605 },
1606 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1607 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
1608 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
1609 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1610 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1611 },
1612 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1613 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
1614 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1615 # -
1616 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1617 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1618 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
1619 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1620 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1621 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1622 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1623 "A String",
1624 ],
1625 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1626 },
1627 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
1628 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1629 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
1630 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1631 # The value must be between 0.0 and 100.0 inclusive.
1632 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
1633 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1634 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1635 },
1636 },
1637 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
1638 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1639 # The value must be between 0.0 and 100.0 inclusive.
1640 "httpStatus": 42, # The HTTP status code used to abort the request.
1641 # The value must be between 200 and 599 inclusive.
1642 },
1643 },
1644 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
1645 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1646 "A String",
1647 ],
1648 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1649 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1650 "A String",
1651 ],
1652 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1653 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1654 "A String",
1655 ],
1656 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
1657 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
1658 # Default is false.
1659 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
1660 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
1661 "A String",
1662 ],
1663 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
1664 "A String",
1665 ],
1666 },
1667 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
1668 # If not specified, will use the largest timeout among all backend services associated with the route.
1669 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1670 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1671 },
1672 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
1673 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
1674 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
1675 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
1676 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1677 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1678 "A String",
1679 ],
1680 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
1681 "A String",
1682 ],
1683 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1684 { # Specification determining how headers are added to requests or responses.
1685 "headerName": "A String", # The name of the header.
1686 "headerValue": "A String", # The value of the header to add.
1687 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1688 # The default value is false.
1689 },
1690 ],
1691 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1692 { # Specification determining how headers are added to requests or responses.
1693 "headerName": "A String", # The name of the header.
1694 "headerValue": "A String", # The value of the header to add.
1695 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1696 # The default value is false.
1697 },
1698 ],
1699 },
1700 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1701 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
1702 # The value must be between 0 and 1000
1703 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
1704 },
1705 ],
1706 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
1707 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
1708 # The value must be between 1 and 255 characters.
1709 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
1710 # The value must be between 1 and 1024 characters.
1711 },
1712 },
Craig Citro065b5302014-08-14 00:47:23 -07001713 },
1714 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001715 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
1716 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
1717 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1718 "A String",
1719 ],
1720 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
1721 "A String",
1722 ],
1723 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1724 { # Specification determining how headers are added to requests or responses.
1725 "headerName": "A String", # The name of the header.
1726 "headerValue": "A String", # The value of the header to add.
1727 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1728 # The default value is false.
1729 },
1730 ],
1731 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1732 { # Specification determining how headers are added to requests or responses.
1733 "headerName": "A String", # The name of the header.
1734 "headerValue": "A String", # The value of the header to add.
1735 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1736 # The default value is false.
1737 },
1738 ],
1739 },
1740 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect.
1741 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
1742 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
1743 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
1744 # The value must be between 1 and 1024 characters.
1745 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
1746 # The default is set to false.
1747 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
1748 # Supported values are:
1749 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1750 # - FOUND, which corresponds to 302.
1751 # - SEE_OTHER which corresponds to 303.
1752 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1753 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1754 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
1755 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1756 # The default is set to false.
1757 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
1758 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
1759 # The value must be between 1 and 1024 characters.
1760 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
1761 # The value must be between 1 and 255 characters.
1762 },
Craig Citro065b5302014-08-14 00:47:23 -07001763 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
1764 },
1765 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001766 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
1767 # The headerAction specified here take effect after headerAction specified under pathMatcher.
1768 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1769 "A String",
1770 ],
1771 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
1772 "A String",
1773 ],
1774 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1775 { # Specification determining how headers are added to requests or responses.
1776 "headerName": "A String", # The name of the header.
1777 "headerValue": "A String", # The value of the header to add.
1778 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1779 # The default value is false.
1780 },
1781 ],
1782 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1783 { # Specification determining how headers are added to requests or responses.
1784 "headerName": "A String", # The name of the header.
1785 "headerValue": "A String", # The value of the header to add.
1786 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1787 # The default value is false.
1788 },
1789 ],
1790 },
1791 "region": "A String", # [Output Only] URL of the region where the regional URL map resides. This field is not applicable to global URL maps. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
1792 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
1793 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
1794 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
1795 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
1796 # The value must be between 1 and 1024 characters.
1797 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
1798 # The default is set to false.
1799 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
1800 # Supported values are:
1801 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1802 # - FOUND, which corresponds to 302.
1803 # - SEE_OTHER which corresponds to 303.
1804 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1805 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1806 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
1807 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1808 # The default is set to false.
1809 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
1810 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
1811 # The value must be between 1 and 1024 characters.
1812 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
1813 # The value must be between 1 and 255 characters.
1814 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001815 "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 -07001816 "hostRules": [ # The list of HostRules to use against the URL.
Takashi Matsuo06694102015-09-11 13:55:40 -07001817 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
Dan O'Mearadd494642020-05-01 07:42:23 -07001818 "hosts": [ # The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches 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 -07001819 "A String",
1820 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001821 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1822 "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 -07001823 },
1824 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001825 "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 -07001826 }</pre>
1827</div>
1828
1829<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001830 <code class="details" id="insert">insert(project, body=None, requestId=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -07001831 <pre>Creates a UrlMap resource in the specified project using the data included in the request.
1832
1833Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001834 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001835 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -07001836 The object takes the form of:
1837
Dan O'Mearadd494642020-05-01 07:42:23 -07001838{ # Represents a URL Map resource.
1839 #
1840 # Google Compute Engine has two URL Map resources:
1841 #
1842 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
1843 #
1844 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
1845 #
1846 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
1847 #
1848 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
1849 #
1850 # To use the global urlMaps resource, the backend service must have a loadBalancingScheme of either EXTERNAL or INTERNAL_SELF_MANAGED. To use the regionUrlMaps resource, the backend service must have a loadBalancingScheme of INTERNAL_MANAGED. For more information, read URL Map Concepts.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001851 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
1852 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001853 "defaultRouteAction": { # defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.
1854 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
1855 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
1856 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1857 },
1858 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1859 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
1860 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
1861 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1862 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1863 },
1864 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1865 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
1866 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1867 # -
1868 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1869 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1870 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
1871 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1872 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1873 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1874 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1875 "A String",
1876 ],
1877 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1878 },
1879 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
1880 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1881 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
1882 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1883 # The value must be between 0.0 and 100.0 inclusive.
1884 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
1885 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1886 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1887 },
1888 },
1889 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
1890 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1891 # The value must be between 0.0 and 100.0 inclusive.
1892 "httpStatus": 42, # The HTTP status code used to abort the request.
1893 # The value must be between 200 and 599 inclusive.
1894 },
1895 },
1896 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
1897 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1898 "A String",
1899 ],
1900 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1901 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1902 "A String",
1903 ],
1904 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1905 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1906 "A String",
1907 ],
1908 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
1909 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
1910 # Default is false.
1911 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
1912 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
1913 "A String",
1914 ],
1915 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
1916 "A String",
1917 ],
1918 },
1919 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
1920 # If not specified, will use the largest timeout among all backend services associated with the route.
1921 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1922 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1923 },
1924 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
1925 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
1926 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
1927 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
1928 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1929 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1930 "A String",
1931 ],
1932 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
1933 "A String",
1934 ],
1935 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1936 { # Specification determining how headers are added to requests or responses.
1937 "headerName": "A String", # The name of the header.
1938 "headerValue": "A String", # The value of the header to add.
1939 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1940 # The default value is false.
1941 },
1942 ],
1943 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1944 { # Specification determining how headers are added to requests or responses.
1945 "headerName": "A String", # The name of the header.
1946 "headerValue": "A String", # The value of the header to add.
1947 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1948 # The default value is false.
1949 },
1950 ],
1951 },
1952 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1953 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
1954 # The value must be between 0 and 1000
1955 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
1956 },
1957 ],
1958 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
1959 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
1960 # The value must be between 1 and 255 characters.
1961 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
1962 # The value must be between 1 and 1024 characters.
1963 },
1964 },
1965 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001966 "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.
1967 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
1968 "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 -07001969 { # Message for the expected URL mappings.
1970 "path": "A String", # Path portion of the URL.
1971 "host": "A String", # Host portion of the URL.
1972 "description": "A String", # Description of this test case.
1973 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
1974 },
1975 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07001976 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001977 "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.
1978 #
1979 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Craig Citro065b5302014-08-14 00:47:23 -07001980 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001981 { # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001982 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1983 "defaultRouteAction": { # defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.
1984 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
1985 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
1986 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1987 },
1988 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1989 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
1990 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
1991 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1992 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1993 },
1994 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1995 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
1996 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1997 # -
1998 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1999 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2000 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
2001 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2002 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2003 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2004 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2005 "A String",
2006 ],
2007 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2008 },
2009 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
2010 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2011 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
2012 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2013 # The value must be between 0.0 and 100.0 inclusive.
2014 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
2015 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2016 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2017 },
2018 },
2019 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
2020 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2021 # The value must be between 0.0 and 100.0 inclusive.
2022 "httpStatus": 42, # The HTTP status code used to abort the request.
2023 # The value must be between 200 and 599 inclusive.
2024 },
2025 },
2026 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
2027 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2028 "A String",
2029 ],
2030 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2031 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2032 "A String",
2033 ],
2034 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2035 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2036 "A String",
2037 ],
2038 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
2039 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
2040 # Default is false.
2041 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
2042 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
2043 "A String",
2044 ],
2045 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
2046 "A String",
2047 ],
2048 },
2049 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
2050 # If not specified, will use the largest timeout among all backend services associated with the route.
2051 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2052 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2053 },
2054 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
2055 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
2056 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
2057 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
2058 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2059 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2060 "A String",
2061 ],
2062 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
2063 "A String",
2064 ],
2065 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2066 { # Specification determining how headers are added to requests or responses.
2067 "headerName": "A String", # The name of the header.
2068 "headerValue": "A String", # The value of the header to add.
2069 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2070 # The default value is false.
2071 },
2072 ],
2073 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2074 { # Specification determining how headers are added to requests or responses.
2075 "headerName": "A String", # The name of the header.
2076 "headerValue": "A String", # The value of the header to add.
2077 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2078 # The default value is false.
2079 },
2080 ],
2081 },
2082 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2083 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
2084 # The value must be between 0 and 1000
2085 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
2086 },
2087 ],
2088 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
2089 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
2090 # The value must be between 1 and 255 characters.
2091 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
2092 # The value must be between 1 and 1024 characters.
2093 },
2094 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002095 "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 -08002096 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
2097 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002098 # - 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.
2099 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
2100 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
2101 # - compute.backendBuckets.use
2102 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07002103 "routeRules": [ # The list of HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. routeRules are evaluated in order of priority, from the lowest to highest number.
2104 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
2105 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
2106 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
2107 # If urlRedirect is specified, service or routeAction must not be set.
2108 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
2109 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
2110 # The value must be between 1 and 1024 characters.
2111 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
2112 # The default is set to false.
2113 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
2114 # Supported values are:
2115 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2116 # - FOUND, which corresponds to 302.
2117 # - SEE_OTHER which corresponds to 303.
2118 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2119 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2120 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
2121 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2122 # The default is set to false.
2123 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
2124 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
2125 # The value must be between 1 and 1024 characters.
2126 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
2127 # The value must be between 1 and 255 characters.
2128 },
2129 "description": "A String", # The short description conveying the intent of this routeRule.
2130 # The description can have a maximum length of 1024 characters.
2131 "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.
2132 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2133 "priority": 42, # For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied.
2134 # You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive.
2135 # Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.
2136 "routeAction": { # In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.
2137 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2138 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
2139 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
2140 },
2141 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2142 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
2143 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
2144 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2145 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2146 },
2147 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2148 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
2149 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2150 # -
2151 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2152 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2153 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
2154 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2155 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2156 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2157 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2158 "A String",
2159 ],
2160 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2161 },
2162 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
2163 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2164 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
2165 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2166 # The value must be between 0.0 and 100.0 inclusive.
2167 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
2168 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2169 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2170 },
2171 },
2172 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
2173 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2174 # The value must be between 0.0 and 100.0 inclusive.
2175 "httpStatus": 42, # The HTTP status code used to abort the request.
2176 # The value must be between 200 and 599 inclusive.
2177 },
2178 },
2179 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
2180 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2181 "A String",
2182 ],
2183 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2184 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2185 "A String",
2186 ],
2187 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2188 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2189 "A String",
2190 ],
2191 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
2192 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
2193 # Default is false.
2194 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
2195 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
2196 "A String",
2197 ],
2198 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
2199 "A String",
2200 ],
2201 },
2202 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
2203 # If not specified, will use the largest timeout among all backend services associated with the route.
2204 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2205 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2206 },
2207 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
2208 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
2209 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
2210 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
2211 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2212 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2213 "A String",
2214 ],
2215 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
2216 "A String",
2217 ],
2218 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2219 { # Specification determining how headers are added to requests or responses.
2220 "headerName": "A String", # The name of the header.
2221 "headerValue": "A String", # The value of the header to add.
2222 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2223 # The default value is false.
2224 },
2225 ],
2226 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2227 { # Specification determining how headers are added to requests or responses.
2228 "headerName": "A String", # The name of the header.
2229 "headerValue": "A String", # The value of the header to add.
2230 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2231 # The default value is false.
2232 },
2233 ],
2234 },
2235 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2236 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
2237 # The value must be between 0 and 1000
2238 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
2239 },
2240 ],
2241 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
2242 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
2243 # The value must be between 1 and 255 characters.
2244 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
2245 # The value must be between 1 and 1024 characters.
2246 },
2247 },
2248 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
2249 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
2250 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2251 "A String",
2252 ],
2253 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
2254 "A String",
2255 ],
2256 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2257 { # Specification determining how headers are added to requests or responses.
2258 "headerName": "A String", # The name of the header.
2259 "headerValue": "A String", # The value of the header to add.
2260 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2261 # The default value is false.
2262 },
2263 ],
2264 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2265 { # Specification determining how headers are added to requests or responses.
2266 "headerName": "A String", # The name of the header.
2267 "headerValue": "A String", # The value of the header to add.
2268 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2269 # The default value is false.
2270 },
2271 ],
2272 },
2273 "matchRules": [
2274 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
2275 "regexMatch": "A String", # For satisfying the matchRule condition, the path of the request must satisfy the regular expression specified in regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2276 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2277 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
2278 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
2279 { # matchRule criteria for request header matches.
2280 "regexMatch": "A String", # The value of the header must match the regular expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/cpp/regex/ecmascript
2281 # For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier.
2282 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2283 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
2284 "invertMatch": True or False, # If set to false, the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met.
2285 # The default setting is false.
2286 "headerName": "A String", # The name of the HTTP header to match.
2287 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
2288 # For matching a request's method, use the headerName ":method".
2289 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
2290 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2291 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
2292 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2293 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
2294 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2295 "presentMatch": True or False, # A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value.
2296 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2297 "rangeMatch": { # HttpRouteRuleMatch criteria for field values that must stay within the specified integer range. # The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails.
2298 # For example for a range [-5, 0]
2299 # - -3 will match.
2300 # - 0 will not match.
2301 # - 0.25 will not match.
2302 # - -3someString will not match.
2303 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2304 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2305 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
2306 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
2307 },
2308 },
2309 ],
2310 "fullPathMatch": "A String", # For satisfying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL.
2311 # fullPathMatch must be between 1 and 1024 characters.
2312 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2313 "prefixMatch": "A String", # For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /.
2314 # The value must be between 1 and 1024 characters.
2315 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2316 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
2317 # The default value is false.
2318 # ignoreCase must not be used with regexMatch.
2319 "metadataFilters": [ # Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set of xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies.
2320 # For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata.
2321 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
2322 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
2323 { # Opaque filter criteria used by loadbalancers to restrict routing configuration to a limited set of loadbalancing proxies. Proxies and sidecars involved in loadbalancing would typically present metadata to the loadbalancers which need to match criteria specified here. If a match takes place, the relevant configuration is made available to those proxies.
2324 # For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata.
2325 # An example for using metadataFilters would be: if loadbalancing involves Envoys, they will only receive routing configuration when values in metadataFilters match values supplied in &lt;a href="https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/base.proto#envoy-api-msg-core-node" Node metadata of their XDS requests to loadbalancers.
2326 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
2327 # Supported values are:
2328 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
2329 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
2330 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
2331 # This list must not be empty and can have at the most 64 entries.
2332 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
2333 "name": "A String", # Name of metadata label.
2334 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
2335 "value": "A String", # The value of the label must match the specified value.
2336 # value can have a maximum length of 1024 characters.
2337 },
2338 ],
2339 },
2340 ],
2341 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
2342 { # HttpRouteRuleMatch criteria for a request's query parameter.
2343 "presentMatch": True or False, # Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not.
2344 # Only one of presentMatch, exactMatch or regexMatch must be set.
2345 "regexMatch": "A String", # The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript
2346 # Only one of presentMatch, exactMatch or regexMatch must be set.
2347 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
2348 "name": "A String", # The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.
2349 "exactMatch": "A String", # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
2350 # Only one of presentMatch, exactMatch or regexMatch must be set.
2351 },
2352 ],
2353 },
2354 ],
2355 },
2356 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002357 "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.
2358 # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002359 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Craig Citro065b5302014-08-14 00:47:23 -07002360 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
2361 "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.
2362 "A String",
2363 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002364 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
2365 # If urlRedirect is specified, service or routeAction must not be set.
2366 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
2367 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
2368 # The value must be between 1 and 1024 characters.
2369 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
2370 # The default is set to false.
2371 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
2372 # Supported values are:
2373 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2374 # - FOUND, which corresponds to 302.
2375 # - SEE_OTHER which corresponds to 303.
2376 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2377 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2378 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
2379 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2380 # The default is set to false.
2381 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
2382 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
2383 # The value must be between 1 and 1024 characters.
2384 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
2385 # The value must be between 1 and 255 characters.
2386 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002387 "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.
2388 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07002389 "routeAction": { # In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.
2390 # Only one of routeAction or urlRedirect must be set.
2391 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
2392 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
2393 },
2394 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2395 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
2396 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
2397 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2398 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2399 },
2400 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2401 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
2402 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2403 # -
2404 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2405 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2406 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
2407 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2408 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2409 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2410 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2411 "A String",
2412 ],
2413 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2414 },
2415 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
2416 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2417 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
2418 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2419 # The value must be between 0.0 and 100.0 inclusive.
2420 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
2421 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2422 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2423 },
2424 },
2425 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
2426 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2427 # The value must be between 0.0 and 100.0 inclusive.
2428 "httpStatus": 42, # The HTTP status code used to abort the request.
2429 # The value must be between 200 and 599 inclusive.
2430 },
2431 },
2432 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
2433 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2434 "A String",
2435 ],
2436 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2437 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2438 "A String",
2439 ],
2440 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2441 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2442 "A String",
2443 ],
2444 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
2445 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
2446 # Default is false.
2447 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
2448 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
2449 "A String",
2450 ],
2451 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
2452 "A String",
2453 ],
2454 },
2455 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
2456 # If not specified, will use the largest timeout among all backend services associated with the route.
2457 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2458 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2459 },
2460 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
2461 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
2462 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
2463 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
2464 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2465 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2466 "A String",
2467 ],
2468 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
2469 "A String",
2470 ],
2471 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2472 { # Specification determining how headers are added to requests or responses.
2473 "headerName": "A String", # The name of the header.
2474 "headerValue": "A String", # The value of the header to add.
2475 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2476 # The default value is false.
2477 },
2478 ],
2479 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2480 { # Specification determining how headers are added to requests or responses.
2481 "headerName": "A String", # The name of the header.
2482 "headerValue": "A String", # The value of the header to add.
2483 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2484 # The default value is false.
2485 },
2486 ],
2487 },
2488 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2489 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
2490 # The value must be between 0 and 1000
2491 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
2492 },
2493 ],
2494 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
2495 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
2496 # The value must be between 1 and 255 characters.
2497 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
2498 # The value must be between 1 and 1024 characters.
2499 },
2500 },
Craig Citro065b5302014-08-14 00:47:23 -07002501 },
2502 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002503 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
2504 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
2505 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2506 "A String",
2507 ],
2508 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
2509 "A String",
2510 ],
2511 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2512 { # Specification determining how headers are added to requests or responses.
2513 "headerName": "A String", # The name of the header.
2514 "headerValue": "A String", # The value of the header to add.
2515 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2516 # The default value is false.
2517 },
2518 ],
2519 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2520 { # Specification determining how headers are added to requests or responses.
2521 "headerName": "A String", # The name of the header.
2522 "headerValue": "A String", # The value of the header to add.
2523 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2524 # The default value is false.
2525 },
2526 ],
2527 },
2528 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect.
2529 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
2530 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
2531 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
2532 # The value must be between 1 and 1024 characters.
2533 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
2534 # The default is set to false.
2535 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
2536 # Supported values are:
2537 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2538 # - FOUND, which corresponds to 302.
2539 # - SEE_OTHER which corresponds to 303.
2540 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2541 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2542 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
2543 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2544 # The default is set to false.
2545 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
2546 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
2547 # The value must be between 1 and 1024 characters.
2548 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
2549 # The value must be between 1 and 255 characters.
2550 },
Craig Citro065b5302014-08-14 00:47:23 -07002551 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
2552 },
2553 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002554 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
2555 # The headerAction specified here take effect after headerAction specified under pathMatcher.
2556 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2557 "A String",
2558 ],
2559 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
2560 "A String",
2561 ],
2562 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2563 { # Specification determining how headers are added to requests or responses.
2564 "headerName": "A String", # The name of the header.
2565 "headerValue": "A String", # The value of the header to add.
2566 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2567 # The default value is false.
2568 },
2569 ],
2570 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2571 { # Specification determining how headers are added to requests or responses.
2572 "headerName": "A String", # The name of the header.
2573 "headerValue": "A String", # The value of the header to add.
2574 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2575 # The default value is false.
2576 },
2577 ],
2578 },
2579 "region": "A String", # [Output Only] URL of the region where the regional URL map resides. This field is not applicable to global URL maps. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
2580 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
2581 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
2582 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
2583 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
2584 # The value must be between 1 and 1024 characters.
2585 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
2586 # The default is set to false.
2587 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
2588 # Supported values are:
2589 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2590 # - FOUND, which corresponds to 302.
2591 # - SEE_OTHER which corresponds to 303.
2592 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2593 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2594 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
2595 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2596 # The default is set to false.
2597 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
2598 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
2599 # The value must be between 1 and 1024 characters.
2600 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
2601 # The value must be between 1 and 255 characters.
2602 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002603 "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 -07002604 "hostRules": [ # The list of HostRules to use against the URL.
Takashi Matsuo06694102015-09-11 13:55:40 -07002605 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
Dan O'Mearadd494642020-05-01 07:42:23 -07002606 "hosts": [ # The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches 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 -07002607 "A String",
2608 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002609 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
2610 "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 -07002611 },
2612 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002613 "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 -07002614 }
2615
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002616 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.
2617
2618For 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.
2619
2620The 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 -07002621
2622Returns:
2623 An object of the form:
2624
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002625 { # Represents an Operation resource.
2626 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002627 # Google Compute Engine has three Operation resources:
2628 #
2629 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2630 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002631 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2632 #
2633 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002634 # - For global operations, use the `globalOperations` resource.
2635 # - For regional operations, use the `regionOperations` resource.
2636 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002637 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002638 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002639 "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 -07002640 "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 -04002641 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07002642 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002643 "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 -08002644 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07002645 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2646 "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 -08002647 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002648 "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 -08002649 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002650 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002651 "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 +00002652 "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 -07002653 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002654 "message": "A String", # [Output Only] A human-readable description of the warning code.
2655 "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.
2656 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2657 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citro065b5302014-08-14 00:47:23 -07002658 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002659 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002660 "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 -07002661 },
2662 ],
2663 },
2664 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002665 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002666 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07002667 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2668 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002669 "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 +00002670 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08002671 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -07002672 {
Craig Citroe633be12015-03-02 13:40:36 -08002673 "message": "A String", # [Output Only] An optional, human-readable error message.
2674 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002675 "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 -07002676 },
2677 ],
2678 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002679 "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 -07002680 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002681 "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 -07002682 }</pre>
2683</div>
2684
2685<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002686 <code class="details" id="invalidateCache">invalidateCache(project, urlMap, body=None, requestId=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002687 <pre>Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.
2688
2689Args:
2690 project: string, Project ID for this request. (required)
2691 urlMap: string, Name of the UrlMap scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002692 body: object, The request body.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002693 The object takes the form of:
2694
2695{
2696 "path": "A String",
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002697 "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 -07002698 }
2699
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002700 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.
2701
2702For 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.
2703
2704The 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 -07002705
2706Returns:
2707 An object of the form:
2708
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002709 { # Represents an Operation resource.
2710 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002711 # Google Compute Engine has three Operation resources:
2712 #
2713 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2714 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002715 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2716 #
2717 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002718 # - For global operations, use the `globalOperations` resource.
2719 # - For regional operations, use the `regionOperations` resource.
2720 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002721 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002722 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002723 "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 -07002724 "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 -04002725 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07002726 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002727 "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 -07002728 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07002729 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2730 "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 Parrott7d5badb2016-08-16 12:44:29 -07002731 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002732 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002733 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002734 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002735 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2736 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2737 {
2738 "message": "A String", # [Output Only] A human-readable description of the warning code.
2739 "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.
2740 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2741 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2742 {
2743 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2744 "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).
2745 },
2746 ],
2747 },
2748 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002749 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002750 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07002751 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2752 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002753 "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 -07002754 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2755 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2756 {
2757 "message": "A String", # [Output Only] An optional, human-readable error message.
2758 "code": "A String", # [Output Only] The error type identifier for this error.
2759 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2760 },
2761 ],
2762 },
2763 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2764 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002765 "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 -07002766 }</pre>
2767</div>
2768
2769<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07002770 <code class="details" id="list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -07002771 <pre>Retrieves the list of UrlMap resources available to the specified project.
2772
2773Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002774 project: string, Project ID for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07002775 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
2776
Dan O'Mearadd494642020-05-01 07:42:23 -07002777You 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.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07002778
Dan O'Mearadd494642020-05-01 07:42:23 -07002779Currently, only sorting by `name` or `creationTimestamp desc` is supported.
2780 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`)
2781 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.
2782 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 `=`, `!=`, `&gt;`, or `&lt;`.
Takashi Matsuo06694102015-09-11 13:55:40 -07002783
Dan O'Mearadd494642020-05-01 07:42:23 -07002784For 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 -07002785
Dan O'Mearadd494642020-05-01 07:42:23 -07002786You 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 -08002787
Dan O'Mearadd494642020-05-01 07:42:23 -07002788To 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 -07002789
2790Returns:
2791 An object of the form:
2792
2793 { # Contains a list of UrlMap resources.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002794 "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 -07002795 "kind": "compute#urlMapList", # Type of resource.
Craig Citroe633be12015-03-02 13:40:36 -08002796 "items": [ # A list of UrlMap resources.
Dan O'Mearadd494642020-05-01 07:42:23 -07002797 { # Represents a URL Map resource.
2798 #
2799 # Google Compute Engine has two URL Map resources:
2800 #
2801 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
2802 #
2803 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
2804 #
2805 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
2806 #
2807 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
2808 #
2809 # To use the global urlMaps resource, the backend service must have a loadBalancingScheme of either EXTERNAL or INTERNAL_SELF_MANAGED. To use the regionUrlMaps resource, the backend service must have a loadBalancingScheme of INTERNAL_MANAGED. For more information, read URL Map Concepts.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002810 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
2811 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07002812 "defaultRouteAction": { # defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.
2813 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
2814 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
2815 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
2816 },
2817 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2818 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
2819 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
2820 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2821 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2822 },
2823 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2824 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
2825 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2826 # -
2827 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2828 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2829 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
2830 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2831 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2832 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2833 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2834 "A String",
2835 ],
2836 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2837 },
2838 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
2839 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2840 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
2841 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2842 # The value must be between 0.0 and 100.0 inclusive.
2843 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
2844 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2845 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2846 },
2847 },
2848 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
2849 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2850 # The value must be between 0.0 and 100.0 inclusive.
2851 "httpStatus": 42, # The HTTP status code used to abort the request.
2852 # The value must be between 200 and 599 inclusive.
2853 },
2854 },
2855 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
2856 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2857 "A String",
2858 ],
2859 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2860 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2861 "A String",
2862 ],
2863 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2864 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2865 "A String",
2866 ],
2867 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
2868 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
2869 # Default is false.
2870 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
2871 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
2872 "A String",
2873 ],
2874 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
2875 "A String",
2876 ],
2877 },
2878 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
2879 # If not specified, will use the largest timeout among all backend services associated with the route.
2880 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2881 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2882 },
2883 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
2884 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
2885 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
2886 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
2887 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2888 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2889 "A String",
2890 ],
2891 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
2892 "A String",
2893 ],
2894 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2895 { # Specification determining how headers are added to requests or responses.
2896 "headerName": "A String", # The name of the header.
2897 "headerValue": "A String", # The value of the header to add.
2898 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2899 # The default value is false.
2900 },
2901 ],
2902 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2903 { # Specification determining how headers are added to requests or responses.
2904 "headerName": "A String", # The name of the header.
2905 "headerValue": "A String", # The value of the header to add.
2906 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2907 # The default value is false.
2908 },
2909 ],
2910 },
2911 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2912 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
2913 # The value must be between 0 and 1000
2914 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
2915 },
2916 ],
2917 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
2918 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
2919 # The value must be between 1 and 255 characters.
2920 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
2921 # The value must be between 1 and 1024 characters.
2922 },
2923 },
2924 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002925 "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.
2926 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
2927 "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 -07002928 { # Message for the expected URL mappings.
2929 "path": "A String", # Path portion of the URL.
2930 "host": "A String", # Host portion of the URL.
2931 "description": "A String", # Description of this test case.
2932 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
2933 },
2934 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07002935 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002936 "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.
2937 #
2938 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Craig Citro065b5302014-08-14 00:47:23 -07002939 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002940 { # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002941 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
2942 "defaultRouteAction": { # defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.
2943 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
2944 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
2945 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
2946 },
2947 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2948 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
2949 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
2950 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2951 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2952 },
2953 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2954 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
2955 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2956 # -
2957 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2958 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2959 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
2960 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2961 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2962 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2963 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2964 "A String",
2965 ],
2966 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2967 },
2968 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
2969 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2970 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
2971 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2972 # The value must be between 0.0 and 100.0 inclusive.
2973 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
2974 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2975 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2976 },
2977 },
2978 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
2979 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2980 # The value must be between 0.0 and 100.0 inclusive.
2981 "httpStatus": 42, # The HTTP status code used to abort the request.
2982 # The value must be between 200 and 599 inclusive.
2983 },
2984 },
2985 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
2986 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2987 "A String",
2988 ],
2989 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2990 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2991 "A String",
2992 ],
2993 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2994 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2995 "A String",
2996 ],
2997 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
2998 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
2999 # Default is false.
3000 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
3001 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3002 "A String",
3003 ],
3004 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3005 "A String",
3006 ],
3007 },
3008 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
3009 # If not specified, will use the largest timeout among all backend services associated with the route.
3010 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3011 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3012 },
3013 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
3014 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
3015 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
3016 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
3017 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3018 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3019 "A String",
3020 ],
3021 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3022 "A String",
3023 ],
3024 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3025 { # Specification determining how headers are added to requests or responses.
3026 "headerName": "A String", # The name of the header.
3027 "headerValue": "A String", # The value of the header to add.
3028 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3029 # The default value is false.
3030 },
3031 ],
3032 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3033 { # Specification determining how headers are added to requests or responses.
3034 "headerName": "A String", # The name of the header.
3035 "headerValue": "A String", # The value of the header to add.
3036 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3037 # The default value is false.
3038 },
3039 ],
3040 },
3041 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3042 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
3043 # The value must be between 0 and 1000
3044 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
3045 },
3046 ],
3047 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
3048 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3049 # The value must be between 1 and 255 characters.
3050 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
3051 # The value must be between 1 and 1024 characters.
3052 },
3053 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003054 "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 -08003055 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
3056 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003057 # - 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.
3058 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3059 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
3060 # - compute.backendBuckets.use
3061 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07003062 "routeRules": [ # The list of HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. routeRules are evaluated in order of priority, from the lowest to highest number.
3063 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
3064 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
3065 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
3066 # If urlRedirect is specified, service or routeAction must not be set.
3067 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
3068 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
3069 # The value must be between 1 and 1024 characters.
3070 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
3071 # The default is set to false.
3072 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3073 # Supported values are:
3074 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3075 # - FOUND, which corresponds to 302.
3076 # - SEE_OTHER which corresponds to 303.
3077 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3078 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3079 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
3080 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3081 # The default is set to false.
3082 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
3083 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
3084 # The value must be between 1 and 1024 characters.
3085 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3086 # The value must be between 1 and 255 characters.
3087 },
3088 "description": "A String", # The short description conveying the intent of this routeRule.
3089 # The description can have a maximum length of 1024 characters.
3090 "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.
3091 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3092 "priority": 42, # For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied.
3093 # You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive.
3094 # Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.
3095 "routeAction": { # In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.
3096 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3097 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
3098 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3099 },
3100 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3101 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
3102 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
3103 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3104 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3105 },
3106 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3107 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
3108 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3109 # -
3110 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3111 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3112 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
3113 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3114 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3115 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3116 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3117 "A String",
3118 ],
3119 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3120 },
3121 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
3122 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3123 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
3124 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3125 # The value must be between 0.0 and 100.0 inclusive.
3126 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
3127 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3128 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3129 },
3130 },
3131 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
3132 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3133 # The value must be between 0.0 and 100.0 inclusive.
3134 "httpStatus": 42, # The HTTP status code used to abort the request.
3135 # The value must be between 200 and 599 inclusive.
3136 },
3137 },
3138 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
3139 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3140 "A String",
3141 ],
3142 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3143 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3144 "A String",
3145 ],
3146 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3147 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3148 "A String",
3149 ],
3150 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
3151 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
3152 # Default is false.
3153 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
3154 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3155 "A String",
3156 ],
3157 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3158 "A String",
3159 ],
3160 },
3161 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
3162 # If not specified, will use the largest timeout among all backend services associated with the route.
3163 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3164 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3165 },
3166 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
3167 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
3168 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
3169 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
3170 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3171 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3172 "A String",
3173 ],
3174 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3175 "A String",
3176 ],
3177 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3178 { # Specification determining how headers are added to requests or responses.
3179 "headerName": "A String", # The name of the header.
3180 "headerValue": "A String", # The value of the header to add.
3181 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3182 # The default value is false.
3183 },
3184 ],
3185 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3186 { # Specification determining how headers are added to requests or responses.
3187 "headerName": "A String", # The name of the header.
3188 "headerValue": "A String", # The value of the header to add.
3189 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3190 # The default value is false.
3191 },
3192 ],
3193 },
3194 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3195 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
3196 # The value must be between 0 and 1000
3197 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
3198 },
3199 ],
3200 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
3201 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3202 # The value must be between 1 and 255 characters.
3203 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
3204 # The value must be between 1 and 1024 characters.
3205 },
3206 },
3207 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
3208 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
3209 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3210 "A String",
3211 ],
3212 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3213 "A String",
3214 ],
3215 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3216 { # Specification determining how headers are added to requests or responses.
3217 "headerName": "A String", # The name of the header.
3218 "headerValue": "A String", # The value of the header to add.
3219 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3220 # The default value is false.
3221 },
3222 ],
3223 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3224 { # Specification determining how headers are added to requests or responses.
3225 "headerName": "A String", # The name of the header.
3226 "headerValue": "A String", # The value of the header to add.
3227 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3228 # The default value is false.
3229 },
3230 ],
3231 },
3232 "matchRules": [
3233 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
3234 "regexMatch": "A String", # For satisfying the matchRule condition, the path of the request must satisfy the regular expression specified in regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3235 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3236 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
3237 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
3238 { # matchRule criteria for request header matches.
3239 "regexMatch": "A String", # The value of the header must match the regular expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/cpp/regex/ecmascript
3240 # For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier.
3241 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3242 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
3243 "invertMatch": True or False, # If set to false, the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met.
3244 # The default setting is false.
3245 "headerName": "A String", # The name of the HTTP header to match.
3246 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
3247 # For matching a request's method, use the headerName ":method".
3248 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
3249 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3250 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
3251 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3252 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
3253 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3254 "presentMatch": True or False, # A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value.
3255 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3256 "rangeMatch": { # HttpRouteRuleMatch criteria for field values that must stay within the specified integer range. # The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails.
3257 # For example for a range [-5, 0]
3258 # - -3 will match.
3259 # - 0 will not match.
3260 # - 0.25 will not match.
3261 # - -3someString will not match.
3262 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3263 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3264 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
3265 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
3266 },
3267 },
3268 ],
3269 "fullPathMatch": "A String", # For satisfying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL.
3270 # fullPathMatch must be between 1 and 1024 characters.
3271 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3272 "prefixMatch": "A String", # For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /.
3273 # The value must be between 1 and 1024 characters.
3274 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3275 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
3276 # The default value is false.
3277 # ignoreCase must not be used with regexMatch.
3278 "metadataFilters": [ # Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set of xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies.
3279 # For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata.
3280 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
3281 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
3282 { # Opaque filter criteria used by loadbalancers to restrict routing configuration to a limited set of loadbalancing proxies. Proxies and sidecars involved in loadbalancing would typically present metadata to the loadbalancers which need to match criteria specified here. If a match takes place, the relevant configuration is made available to those proxies.
3283 # For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata.
3284 # An example for using metadataFilters would be: if loadbalancing involves Envoys, they will only receive routing configuration when values in metadataFilters match values supplied in &lt;a href="https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/base.proto#envoy-api-msg-core-node" Node metadata of their XDS requests to loadbalancers.
3285 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
3286 # Supported values are:
3287 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
3288 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
3289 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
3290 # This list must not be empty and can have at the most 64 entries.
3291 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
3292 "name": "A String", # Name of metadata label.
3293 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
3294 "value": "A String", # The value of the label must match the specified value.
3295 # value can have a maximum length of 1024 characters.
3296 },
3297 ],
3298 },
3299 ],
3300 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
3301 { # HttpRouteRuleMatch criteria for a request's query parameter.
3302 "presentMatch": True or False, # Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not.
3303 # Only one of presentMatch, exactMatch or regexMatch must be set.
3304 "regexMatch": "A String", # The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript
3305 # Only one of presentMatch, exactMatch or regexMatch must be set.
3306 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
3307 "name": "A String", # The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.
3308 "exactMatch": "A String", # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
3309 # Only one of presentMatch, exactMatch or regexMatch must be set.
3310 },
3311 ],
3312 },
3313 ],
3314 },
3315 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003316 "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.
3317 # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07003318 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Craig Citro065b5302014-08-14 00:47:23 -07003319 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
3320 "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.
3321 "A String",
3322 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003323 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
3324 # If urlRedirect is specified, service or routeAction must not be set.
3325 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
3326 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
3327 # The value must be between 1 and 1024 characters.
3328 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
3329 # The default is set to false.
3330 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3331 # Supported values are:
3332 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3333 # - FOUND, which corresponds to 302.
3334 # - SEE_OTHER which corresponds to 303.
3335 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3336 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3337 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
3338 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3339 # The default is set to false.
3340 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
3341 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
3342 # The value must be between 1 and 1024 characters.
3343 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3344 # The value must be between 1 and 255 characters.
3345 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003346 "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.
3347 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07003348 "routeAction": { # In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.
3349 # Only one of routeAction or urlRedirect must be set.
3350 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
3351 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3352 },
3353 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3354 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
3355 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
3356 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3357 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3358 },
3359 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3360 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
3361 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3362 # -
3363 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3364 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3365 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
3366 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3367 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3368 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3369 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3370 "A String",
3371 ],
3372 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3373 },
3374 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
3375 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3376 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
3377 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3378 # The value must be between 0.0 and 100.0 inclusive.
3379 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
3380 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3381 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3382 },
3383 },
3384 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
3385 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3386 # The value must be between 0.0 and 100.0 inclusive.
3387 "httpStatus": 42, # The HTTP status code used to abort the request.
3388 # The value must be between 200 and 599 inclusive.
3389 },
3390 },
3391 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
3392 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3393 "A String",
3394 ],
3395 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3396 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3397 "A String",
3398 ],
3399 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3400 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3401 "A String",
3402 ],
3403 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
3404 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
3405 # Default is false.
3406 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
3407 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3408 "A String",
3409 ],
3410 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3411 "A String",
3412 ],
3413 },
3414 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
3415 # If not specified, will use the largest timeout among all backend services associated with the route.
3416 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3417 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3418 },
3419 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
3420 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
3421 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
3422 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
3423 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3424 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3425 "A String",
3426 ],
3427 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3428 "A String",
3429 ],
3430 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3431 { # Specification determining how headers are added to requests or responses.
3432 "headerName": "A String", # The name of the header.
3433 "headerValue": "A String", # The value of the header to add.
3434 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3435 # The default value is false.
3436 },
3437 ],
3438 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3439 { # Specification determining how headers are added to requests or responses.
3440 "headerName": "A String", # The name of the header.
3441 "headerValue": "A String", # The value of the header to add.
3442 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3443 # The default value is false.
3444 },
3445 ],
3446 },
3447 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3448 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
3449 # The value must be between 0 and 1000
3450 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
3451 },
3452 ],
3453 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
3454 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3455 # The value must be between 1 and 255 characters.
3456 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
3457 # The value must be between 1 and 1024 characters.
3458 },
3459 },
Craig Citro065b5302014-08-14 00:47:23 -07003460 },
3461 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003462 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
3463 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
3464 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3465 "A String",
3466 ],
3467 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3468 "A String",
3469 ],
3470 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3471 { # Specification determining how headers are added to requests or responses.
3472 "headerName": "A String", # The name of the header.
3473 "headerValue": "A String", # The value of the header to add.
3474 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3475 # The default value is false.
3476 },
3477 ],
3478 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3479 { # Specification determining how headers are added to requests or responses.
3480 "headerName": "A String", # The name of the header.
3481 "headerValue": "A String", # The value of the header to add.
3482 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3483 # The default value is false.
3484 },
3485 ],
3486 },
3487 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect.
3488 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
3489 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
3490 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
3491 # The value must be between 1 and 1024 characters.
3492 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
3493 # The default is set to false.
3494 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3495 # Supported values are:
3496 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3497 # - FOUND, which corresponds to 302.
3498 # - SEE_OTHER which corresponds to 303.
3499 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3500 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3501 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
3502 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3503 # The default is set to false.
3504 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
3505 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
3506 # The value must be between 1 and 1024 characters.
3507 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3508 # The value must be between 1 and 255 characters.
3509 },
Craig Citro065b5302014-08-14 00:47:23 -07003510 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
3511 },
3512 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003513 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
3514 # The headerAction specified here take effect after headerAction specified under pathMatcher.
3515 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3516 "A String",
3517 ],
3518 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3519 "A String",
3520 ],
3521 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3522 { # Specification determining how headers are added to requests or responses.
3523 "headerName": "A String", # The name of the header.
3524 "headerValue": "A String", # The value of the header to add.
3525 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3526 # The default value is false.
3527 },
3528 ],
3529 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3530 { # Specification determining how headers are added to requests or responses.
3531 "headerName": "A String", # The name of the header.
3532 "headerValue": "A String", # The value of the header to add.
3533 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3534 # The default value is false.
3535 },
3536 ],
3537 },
3538 "region": "A String", # [Output Only] URL of the region where the regional URL map resides. This field is not applicable to global URL maps. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
3539 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
3540 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
3541 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
3542 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
3543 # The value must be between 1 and 1024 characters.
3544 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
3545 # The default is set to false.
3546 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3547 # Supported values are:
3548 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3549 # - FOUND, which corresponds to 302.
3550 # - SEE_OTHER which corresponds to 303.
3551 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3552 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3553 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
3554 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3555 # The default is set to false.
3556 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
3557 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
3558 # The value must be between 1 and 1024 characters.
3559 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3560 # The value must be between 1 and 255 characters.
3561 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003562 "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 -07003563 "hostRules": [ # The list of HostRules to use against the URL.
Takashi Matsuo06694102015-09-11 13:55:40 -07003564 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
Dan O'Mearadd494642020-05-01 07:42:23 -07003565 "hosts": [ # The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches 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 -07003566 "A String",
3567 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003568 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
3569 "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 -07003570 },
3571 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003572 "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 -07003573 },
3574 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003575 "warning": { # [Output Only] Informational warning message.
3576 "message": "A String", # [Output Only] A human-readable description of the warning code.
3577 "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.
3578 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3579 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3580 {
3581 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3582 "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).
3583 },
3584 ],
3585 },
3586 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -07003587 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Craig Citro065b5302014-08-14 00:47:23 -07003588 }</pre>
3589</div>
3590
3591<div class="method">
3592 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
3593 <pre>Retrieves the next page of results.
3594
3595Args:
3596 previous_request: The request for the previous page. (required)
3597 previous_response: The response from the request for the previous page. (required)
3598
3599Returns:
3600 A request object that you can call 'execute()' on to request the next
3601 page. Returns None if there are no more items in the collection.
3602 </pre>
3603</div>
3604
3605<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003606 <code class="details" id="patch">patch(project, urlMap, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003607 <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 -07003608
3609Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003610 project: string, Project ID for this request. (required)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003611 urlMap: string, Name of the UrlMap resource to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003612 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -07003613 The object takes the form of:
3614
Dan O'Mearadd494642020-05-01 07:42:23 -07003615{ # Represents a URL Map resource.
3616 #
3617 # Google Compute Engine has two URL Map resources:
3618 #
3619 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
3620 #
3621 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
3622 #
3623 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
3624 #
3625 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
3626 #
3627 # To use the global urlMaps resource, the backend service must have a loadBalancingScheme of either EXTERNAL or INTERNAL_SELF_MANAGED. To use the regionUrlMaps resource, the backend service must have a loadBalancingScheme of INTERNAL_MANAGED. For more information, read URL Map Concepts.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003628 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
3629 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07003630 "defaultRouteAction": { # defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.
3631 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
3632 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
3633 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3634 },
3635 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3636 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
3637 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
3638 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3639 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3640 },
3641 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3642 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
3643 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3644 # -
3645 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3646 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3647 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
3648 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3649 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3650 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3651 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3652 "A String",
3653 ],
3654 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3655 },
3656 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
3657 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3658 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
3659 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3660 # The value must be between 0.0 and 100.0 inclusive.
3661 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
3662 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3663 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3664 },
3665 },
3666 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
3667 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3668 # The value must be between 0.0 and 100.0 inclusive.
3669 "httpStatus": 42, # The HTTP status code used to abort the request.
3670 # The value must be between 200 and 599 inclusive.
3671 },
3672 },
3673 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
3674 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3675 "A String",
3676 ],
3677 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3678 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3679 "A String",
3680 ],
3681 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3682 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3683 "A String",
3684 ],
3685 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
3686 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
3687 # Default is false.
3688 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
3689 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3690 "A String",
3691 ],
3692 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3693 "A String",
3694 ],
3695 },
3696 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
3697 # If not specified, will use the largest timeout among all backend services associated with the route.
3698 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3699 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3700 },
3701 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
3702 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
3703 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
3704 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
3705 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3706 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3707 "A String",
3708 ],
3709 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3710 "A String",
3711 ],
3712 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3713 { # Specification determining how headers are added to requests or responses.
3714 "headerName": "A String", # The name of the header.
3715 "headerValue": "A String", # The value of the header to add.
3716 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3717 # The default value is false.
3718 },
3719 ],
3720 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3721 { # Specification determining how headers are added to requests or responses.
3722 "headerName": "A String", # The name of the header.
3723 "headerValue": "A String", # The value of the header to add.
3724 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3725 # The default value is false.
3726 },
3727 ],
3728 },
3729 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3730 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
3731 # The value must be between 0 and 1000
3732 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
3733 },
3734 ],
3735 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
3736 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3737 # The value must be between 1 and 255 characters.
3738 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
3739 # The value must be between 1 and 1024 characters.
3740 },
3741 },
3742 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003743 "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.
3744 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3745 "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 -07003746 { # Message for the expected URL mappings.
3747 "path": "A String", # Path portion of the URL.
3748 "host": "A String", # Host portion of the URL.
3749 "description": "A String", # Description of this test case.
3750 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
3751 },
3752 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07003753 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003754 "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.
3755 #
3756 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Craig Citro065b5302014-08-14 00:47:23 -07003757 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003758 { # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07003759 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
3760 "defaultRouteAction": { # defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.
3761 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
3762 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
3763 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3764 },
3765 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3766 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
3767 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
3768 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3769 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3770 },
3771 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3772 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
3773 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3774 # -
3775 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3776 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3777 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
3778 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3779 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3780 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3781 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3782 "A String",
3783 ],
3784 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3785 },
3786 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
3787 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3788 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
3789 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3790 # The value must be between 0.0 and 100.0 inclusive.
3791 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
3792 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3793 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3794 },
3795 },
3796 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
3797 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3798 # The value must be between 0.0 and 100.0 inclusive.
3799 "httpStatus": 42, # The HTTP status code used to abort the request.
3800 # The value must be between 200 and 599 inclusive.
3801 },
3802 },
3803 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
3804 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3805 "A String",
3806 ],
3807 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3808 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3809 "A String",
3810 ],
3811 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3812 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3813 "A String",
3814 ],
3815 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
3816 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
3817 # Default is false.
3818 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
3819 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3820 "A String",
3821 ],
3822 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3823 "A String",
3824 ],
3825 },
3826 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
3827 # If not specified, will use the largest timeout among all backend services associated with the route.
3828 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3829 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3830 },
3831 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
3832 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
3833 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
3834 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
3835 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3836 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3837 "A String",
3838 ],
3839 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3840 "A String",
3841 ],
3842 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3843 { # Specification determining how headers are added to requests or responses.
3844 "headerName": "A String", # The name of the header.
3845 "headerValue": "A String", # The value of the header to add.
3846 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3847 # The default value is false.
3848 },
3849 ],
3850 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3851 { # Specification determining how headers are added to requests or responses.
3852 "headerName": "A String", # The name of the header.
3853 "headerValue": "A String", # The value of the header to add.
3854 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3855 # The default value is false.
3856 },
3857 ],
3858 },
3859 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3860 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
3861 # The value must be between 0 and 1000
3862 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
3863 },
3864 ],
3865 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
3866 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3867 # The value must be between 1 and 255 characters.
3868 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
3869 # The value must be between 1 and 1024 characters.
3870 },
3871 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003872 "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 -08003873 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
3874 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003875 # - 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.
3876 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3877 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
3878 # - compute.backendBuckets.use
3879 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07003880 "routeRules": [ # The list of HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. routeRules are evaluated in order of priority, from the lowest to highest number.
3881 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
3882 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
3883 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
3884 # If urlRedirect is specified, service or routeAction must not be set.
3885 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
3886 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
3887 # The value must be between 1 and 1024 characters.
3888 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
3889 # The default is set to false.
3890 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3891 # Supported values are:
3892 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3893 # - FOUND, which corresponds to 302.
3894 # - SEE_OTHER which corresponds to 303.
3895 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3896 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3897 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
3898 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3899 # The default is set to false.
3900 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
3901 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
3902 # The value must be between 1 and 1024 characters.
3903 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3904 # The value must be between 1 and 255 characters.
3905 },
3906 "description": "A String", # The short description conveying the intent of this routeRule.
3907 # The description can have a maximum length of 1024 characters.
3908 "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.
3909 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3910 "priority": 42, # For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied.
3911 # You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive.
3912 # Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.
3913 "routeAction": { # In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.
3914 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3915 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
3916 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3917 },
3918 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3919 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
3920 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
3921 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3922 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3923 },
3924 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3925 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
3926 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3927 # -
3928 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3929 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3930 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
3931 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3932 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3933 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3934 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3935 "A String",
3936 ],
3937 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3938 },
3939 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
3940 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3941 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
3942 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3943 # The value must be between 0.0 and 100.0 inclusive.
3944 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
3945 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3946 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3947 },
3948 },
3949 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
3950 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3951 # The value must be between 0.0 and 100.0 inclusive.
3952 "httpStatus": 42, # The HTTP status code used to abort the request.
3953 # The value must be between 200 and 599 inclusive.
3954 },
3955 },
3956 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
3957 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3958 "A String",
3959 ],
3960 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3961 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3962 "A String",
3963 ],
3964 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3965 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3966 "A String",
3967 ],
3968 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
3969 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
3970 # Default is false.
3971 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
3972 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3973 "A String",
3974 ],
3975 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3976 "A String",
3977 ],
3978 },
3979 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
3980 # If not specified, will use the largest timeout among all backend services associated with the route.
3981 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3982 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3983 },
3984 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
3985 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
3986 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
3987 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
3988 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3989 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3990 "A String",
3991 ],
3992 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3993 "A String",
3994 ],
3995 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3996 { # Specification determining how headers are added to requests or responses.
3997 "headerName": "A String", # The name of the header.
3998 "headerValue": "A String", # The value of the header to add.
3999 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4000 # The default value is false.
4001 },
4002 ],
4003 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4004 { # Specification determining how headers are added to requests or responses.
4005 "headerName": "A String", # The name of the header.
4006 "headerValue": "A String", # The value of the header to add.
4007 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4008 # The default value is false.
4009 },
4010 ],
4011 },
4012 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4013 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
4014 # The value must be between 0 and 1000
4015 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
4016 },
4017 ],
4018 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
4019 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
4020 # The value must be between 1 and 255 characters.
4021 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
4022 # The value must be between 1 and 1024 characters.
4023 },
4024 },
4025 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
4026 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
4027 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4028 "A String",
4029 ],
4030 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
4031 "A String",
4032 ],
4033 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4034 { # Specification determining how headers are added to requests or responses.
4035 "headerName": "A String", # The name of the header.
4036 "headerValue": "A String", # The value of the header to add.
4037 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4038 # The default value is false.
4039 },
4040 ],
4041 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4042 { # Specification determining how headers are added to requests or responses.
4043 "headerName": "A String", # The name of the header.
4044 "headerValue": "A String", # The value of the header to add.
4045 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4046 # The default value is false.
4047 },
4048 ],
4049 },
4050 "matchRules": [
4051 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
4052 "regexMatch": "A String", # For satisfying the matchRule condition, the path of the request must satisfy the regular expression specified in regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4053 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4054 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
4055 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
4056 { # matchRule criteria for request header matches.
4057 "regexMatch": "A String", # The value of the header must match the regular expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/cpp/regex/ecmascript
4058 # For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier.
4059 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4060 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
4061 "invertMatch": True or False, # If set to false, the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met.
4062 # The default setting is false.
4063 "headerName": "A String", # The name of the HTTP header to match.
4064 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
4065 # For matching a request's method, use the headerName ":method".
4066 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
4067 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4068 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
4069 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4070 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
4071 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4072 "presentMatch": True or False, # A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value.
4073 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4074 "rangeMatch": { # HttpRouteRuleMatch criteria for field values that must stay within the specified integer range. # The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails.
4075 # For example for a range [-5, 0]
4076 # - -3 will match.
4077 # - 0 will not match.
4078 # - 0.25 will not match.
4079 # - -3someString will not match.
4080 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4081 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4082 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
4083 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
4084 },
4085 },
4086 ],
4087 "fullPathMatch": "A String", # For satisfying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL.
4088 # fullPathMatch must be between 1 and 1024 characters.
4089 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4090 "prefixMatch": "A String", # For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /.
4091 # The value must be between 1 and 1024 characters.
4092 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4093 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
4094 # The default value is false.
4095 # ignoreCase must not be used with regexMatch.
4096 "metadataFilters": [ # Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set of xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies.
4097 # For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata.
4098 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
4099 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
4100 { # Opaque filter criteria used by loadbalancers to restrict routing configuration to a limited set of loadbalancing proxies. Proxies and sidecars involved in loadbalancing would typically present metadata to the loadbalancers which need to match criteria specified here. If a match takes place, the relevant configuration is made available to those proxies.
4101 # For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata.
4102 # An example for using metadataFilters would be: if loadbalancing involves Envoys, they will only receive routing configuration when values in metadataFilters match values supplied in &lt;a href="https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/base.proto#envoy-api-msg-core-node" Node metadata of their XDS requests to loadbalancers.
4103 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
4104 # Supported values are:
4105 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
4106 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
4107 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
4108 # This list must not be empty and can have at the most 64 entries.
4109 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
4110 "name": "A String", # Name of metadata label.
4111 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
4112 "value": "A String", # The value of the label must match the specified value.
4113 # value can have a maximum length of 1024 characters.
4114 },
4115 ],
4116 },
4117 ],
4118 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
4119 { # HttpRouteRuleMatch criteria for a request's query parameter.
4120 "presentMatch": True or False, # Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not.
4121 # Only one of presentMatch, exactMatch or regexMatch must be set.
4122 "regexMatch": "A String", # The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript
4123 # Only one of presentMatch, exactMatch or regexMatch must be set.
4124 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
4125 "name": "A String", # The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.
4126 "exactMatch": "A String", # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
4127 # Only one of presentMatch, exactMatch or regexMatch must be set.
4128 },
4129 ],
4130 },
4131 ],
4132 },
4133 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004134 "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.
4135 # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07004136 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Craig Citro065b5302014-08-14 00:47:23 -07004137 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
4138 "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.
4139 "A String",
4140 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004141 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
4142 # If urlRedirect is specified, service or routeAction must not be set.
4143 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
4144 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
4145 # The value must be between 1 and 1024 characters.
4146 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
4147 # The default is set to false.
4148 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
4149 # Supported values are:
4150 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4151 # - FOUND, which corresponds to 302.
4152 # - SEE_OTHER which corresponds to 303.
4153 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4154 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4155 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
4156 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4157 # The default is set to false.
4158 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
4159 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
4160 # The value must be between 1 and 1024 characters.
4161 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
4162 # The value must be between 1 and 255 characters.
4163 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004164 "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.
4165 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07004166 "routeAction": { # In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.
4167 # Only one of routeAction or urlRedirect must be set.
4168 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
4169 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
4170 },
4171 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4172 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
4173 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
4174 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4175 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4176 },
4177 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4178 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
4179 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4180 # -
4181 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4182 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4183 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
4184 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4185 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4186 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4187 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4188 "A String",
4189 ],
4190 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4191 },
4192 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
4193 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4194 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
4195 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4196 # The value must be between 0.0 and 100.0 inclusive.
4197 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
4198 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4199 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4200 },
4201 },
4202 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
4203 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4204 # The value must be between 0.0 and 100.0 inclusive.
4205 "httpStatus": 42, # The HTTP status code used to abort the request.
4206 # The value must be between 200 and 599 inclusive.
4207 },
4208 },
4209 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
4210 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
4211 "A String",
4212 ],
4213 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
4214 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4215 "A String",
4216 ],
4217 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4218 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4219 "A String",
4220 ],
4221 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
4222 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
4223 # Default is false.
4224 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
4225 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
4226 "A String",
4227 ],
4228 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
4229 "A String",
4230 ],
4231 },
4232 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
4233 # If not specified, will use the largest timeout among all backend services associated with the route.
4234 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4235 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4236 },
4237 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
4238 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
4239 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
4240 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
4241 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4242 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4243 "A String",
4244 ],
4245 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
4246 "A String",
4247 ],
4248 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4249 { # Specification determining how headers are added to requests or responses.
4250 "headerName": "A String", # The name of the header.
4251 "headerValue": "A String", # The value of the header to add.
4252 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4253 # The default value is false.
4254 },
4255 ],
4256 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4257 { # Specification determining how headers are added to requests or responses.
4258 "headerName": "A String", # The name of the header.
4259 "headerValue": "A String", # The value of the header to add.
4260 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4261 # The default value is false.
4262 },
4263 ],
4264 },
4265 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4266 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
4267 # The value must be between 0 and 1000
4268 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
4269 },
4270 ],
4271 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
4272 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
4273 # The value must be between 1 and 255 characters.
4274 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
4275 # The value must be between 1 and 1024 characters.
4276 },
4277 },
Craig Citro065b5302014-08-14 00:47:23 -07004278 },
4279 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004280 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
4281 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
4282 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4283 "A String",
4284 ],
4285 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
4286 "A String",
4287 ],
4288 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4289 { # Specification determining how headers are added to requests or responses.
4290 "headerName": "A String", # The name of the header.
4291 "headerValue": "A String", # The value of the header to add.
4292 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4293 # The default value is false.
4294 },
4295 ],
4296 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4297 { # Specification determining how headers are added to requests or responses.
4298 "headerName": "A String", # The name of the header.
4299 "headerValue": "A String", # The value of the header to add.
4300 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4301 # The default value is false.
4302 },
4303 ],
4304 },
4305 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect.
4306 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
4307 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
4308 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
4309 # The value must be between 1 and 1024 characters.
4310 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
4311 # The default is set to false.
4312 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
4313 # Supported values are:
4314 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4315 # - FOUND, which corresponds to 302.
4316 # - SEE_OTHER which corresponds to 303.
4317 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4318 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4319 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
4320 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4321 # The default is set to false.
4322 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
4323 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
4324 # The value must be between 1 and 1024 characters.
4325 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
4326 # The value must be between 1 and 255 characters.
4327 },
Craig Citro065b5302014-08-14 00:47:23 -07004328 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
4329 },
4330 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004331 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
4332 # The headerAction specified here take effect after headerAction specified under pathMatcher.
4333 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4334 "A String",
4335 ],
4336 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
4337 "A String",
4338 ],
4339 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4340 { # Specification determining how headers are added to requests or responses.
4341 "headerName": "A String", # The name of the header.
4342 "headerValue": "A String", # The value of the header to add.
4343 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4344 # The default value is false.
4345 },
4346 ],
4347 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4348 { # Specification determining how headers are added to requests or responses.
4349 "headerName": "A String", # The name of the header.
4350 "headerValue": "A String", # The value of the header to add.
4351 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4352 # The default value is false.
4353 },
4354 ],
4355 },
4356 "region": "A String", # [Output Only] URL of the region where the regional URL map resides. This field is not applicable to global URL maps. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
4357 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
4358 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
4359 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
4360 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
4361 # The value must be between 1 and 1024 characters.
4362 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
4363 # The default is set to false.
4364 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
4365 # Supported values are:
4366 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4367 # - FOUND, which corresponds to 302.
4368 # - SEE_OTHER which corresponds to 303.
4369 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4370 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4371 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
4372 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4373 # The default is set to false.
4374 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
4375 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
4376 # The value must be between 1 and 1024 characters.
4377 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
4378 # The value must be between 1 and 255 characters.
4379 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004380 "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 -07004381 "hostRules": [ # The list of HostRules to use against the URL.
Takashi Matsuo06694102015-09-11 13:55:40 -07004382 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
Dan O'Mearadd494642020-05-01 07:42:23 -07004383 "hosts": [ # The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches 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 -07004384 "A String",
4385 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004386 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
4387 "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 -07004388 },
4389 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004390 "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 -07004391 }
4392
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004393 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.
4394
4395For 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.
4396
4397The 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 -07004398
4399Returns:
4400 An object of the form:
4401
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004402 { # Represents an Operation resource.
4403 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004404 # Google Compute Engine has three Operation resources:
4405 #
4406 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4407 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004408 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4409 #
4410 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004411 # - For global operations, use the `globalOperations` resource.
4412 # - For regional operations, use the `regionOperations` resource.
4413 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004414 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004415 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004416 "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 -07004417 "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 -04004418 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004419 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004420 "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 -08004421 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004422 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4423 "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 -08004424 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07004425 "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 -08004426 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004427 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004428 "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 +00004429 "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 -07004430 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004431 "message": "A String", # [Output Only] A human-readable description of the warning code.
4432 "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.
4433 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4434 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citro065b5302014-08-14 00:47:23 -07004435 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00004436 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004437 "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 -07004438 },
4439 ],
4440 },
4441 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004442 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004443 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004444 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4445 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004446 "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 +00004447 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08004448 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -07004449 {
Craig Citroe633be12015-03-02 13:40:36 -08004450 "message": "A String", # [Output Only] An optional, human-readable error message.
4451 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004452 "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 -07004453 },
4454 ],
4455 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004456 "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 -07004457 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004458 "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 -07004459 }</pre>
4460</div>
4461
4462<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004463 <code class="details" id="update">update(project, urlMap, body=None, requestId=None)</code>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07004464 <pre>Updates the specified UrlMap resource with the data included in the request.
Craig Citro065b5302014-08-14 00:47:23 -07004465
4466Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004467 project: string, Project ID for this request. (required)
Craig Citro065b5302014-08-14 00:47:23 -07004468 urlMap: string, Name of the UrlMap resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004469 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -07004470 The object takes the form of:
4471
Dan O'Mearadd494642020-05-01 07:42:23 -07004472{ # Represents a URL Map resource.
4473 #
4474 # Google Compute Engine has two URL Map resources:
4475 #
4476 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
4477 #
4478 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
4479 #
4480 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
4481 #
4482 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
4483 #
4484 # To use the global urlMaps resource, the backend service must have a loadBalancingScheme of either EXTERNAL or INTERNAL_SELF_MANAGED. To use the regionUrlMaps resource, the backend service must have a loadBalancingScheme of INTERNAL_MANAGED. For more information, read URL Map Concepts.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004485 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
4486 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07004487 "defaultRouteAction": { # defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.
4488 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
4489 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
4490 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
4491 },
4492 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4493 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
4494 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
4495 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4496 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4497 },
4498 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4499 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
4500 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4501 # -
4502 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4503 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4504 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
4505 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4506 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4507 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4508 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4509 "A String",
4510 ],
4511 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4512 },
4513 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
4514 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4515 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
4516 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4517 # The value must be between 0.0 and 100.0 inclusive.
4518 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
4519 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4520 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4521 },
4522 },
4523 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
4524 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4525 # The value must be between 0.0 and 100.0 inclusive.
4526 "httpStatus": 42, # The HTTP status code used to abort the request.
4527 # The value must be between 200 and 599 inclusive.
4528 },
4529 },
4530 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
4531 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
4532 "A String",
4533 ],
4534 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
4535 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4536 "A String",
4537 ],
4538 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4539 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4540 "A String",
4541 ],
4542 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
4543 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
4544 # Default is false.
4545 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
4546 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
4547 "A String",
4548 ],
4549 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
4550 "A String",
4551 ],
4552 },
4553 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
4554 # If not specified, will use the largest timeout among all backend services associated with the route.
4555 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4556 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4557 },
4558 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
4559 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
4560 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
4561 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
4562 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4563 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4564 "A String",
4565 ],
4566 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
4567 "A String",
4568 ],
4569 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4570 { # Specification determining how headers are added to requests or responses.
4571 "headerName": "A String", # The name of the header.
4572 "headerValue": "A String", # The value of the header to add.
4573 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4574 # The default value is false.
4575 },
4576 ],
4577 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4578 { # Specification determining how headers are added to requests or responses.
4579 "headerName": "A String", # The name of the header.
4580 "headerValue": "A String", # The value of the header to add.
4581 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4582 # The default value is false.
4583 },
4584 ],
4585 },
4586 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4587 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
4588 # The value must be between 0 and 1000
4589 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
4590 },
4591 ],
4592 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
4593 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
4594 # The value must be between 1 and 255 characters.
4595 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
4596 # The value must be between 1 and 1024 characters.
4597 },
4598 },
4599 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004600 "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.
4601 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
4602 "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 -07004603 { # Message for the expected URL mappings.
4604 "path": "A String", # Path portion of the URL.
4605 "host": "A String", # Host portion of the URL.
4606 "description": "A String", # Description of this test case.
4607 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
4608 },
4609 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07004610 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004611 "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.
4612 #
4613 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Craig Citro065b5302014-08-14 00:47:23 -07004614 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004615 { # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07004616 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
4617 "defaultRouteAction": { # defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.
4618 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
4619 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
4620 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
4621 },
4622 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4623 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
4624 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
4625 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4626 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4627 },
4628 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4629 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
4630 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4631 # -
4632 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4633 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4634 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
4635 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4636 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4637 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4638 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4639 "A String",
4640 ],
4641 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4642 },
4643 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
4644 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4645 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
4646 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4647 # The value must be between 0.0 and 100.0 inclusive.
4648 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
4649 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4650 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4651 },
4652 },
4653 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
4654 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4655 # The value must be between 0.0 and 100.0 inclusive.
4656 "httpStatus": 42, # The HTTP status code used to abort the request.
4657 # The value must be between 200 and 599 inclusive.
4658 },
4659 },
4660 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
4661 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
4662 "A String",
4663 ],
4664 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
4665 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4666 "A String",
4667 ],
4668 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4669 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4670 "A String",
4671 ],
4672 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
4673 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
4674 # Default is false.
4675 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
4676 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
4677 "A String",
4678 ],
4679 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
4680 "A String",
4681 ],
4682 },
4683 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
4684 # If not specified, will use the largest timeout among all backend services associated with the route.
4685 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4686 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4687 },
4688 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
4689 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
4690 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
4691 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
4692 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4693 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4694 "A String",
4695 ],
4696 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
4697 "A String",
4698 ],
4699 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4700 { # Specification determining how headers are added to requests or responses.
4701 "headerName": "A String", # The name of the header.
4702 "headerValue": "A String", # The value of the header to add.
4703 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4704 # The default value is false.
4705 },
4706 ],
4707 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4708 { # Specification determining how headers are added to requests or responses.
4709 "headerName": "A String", # The name of the header.
4710 "headerValue": "A String", # The value of the header to add.
4711 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4712 # The default value is false.
4713 },
4714 ],
4715 },
4716 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4717 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
4718 # The value must be between 0 and 1000
4719 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
4720 },
4721 ],
4722 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
4723 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
4724 # The value must be between 1 and 255 characters.
4725 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
4726 # The value must be between 1 and 1024 characters.
4727 },
4728 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004729 "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 -08004730 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
4731 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004732 # - 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.
4733 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
4734 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
4735 # - compute.backendBuckets.use
4736 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07004737 "routeRules": [ # The list of HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. routeRules are evaluated in order of priority, from the lowest to highest number.
4738 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
4739 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
4740 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
4741 # If urlRedirect is specified, service or routeAction must not be set.
4742 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
4743 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
4744 # The value must be between 1 and 1024 characters.
4745 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
4746 # The default is set to false.
4747 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
4748 # Supported values are:
4749 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4750 # - FOUND, which corresponds to 302.
4751 # - SEE_OTHER which corresponds to 303.
4752 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4753 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4754 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
4755 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4756 # The default is set to false.
4757 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
4758 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
4759 # The value must be between 1 and 1024 characters.
4760 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
4761 # The value must be between 1 and 255 characters.
4762 },
4763 "description": "A String", # The short description conveying the intent of this routeRule.
4764 # The description can have a maximum length of 1024 characters.
4765 "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.
4766 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4767 "priority": 42, # For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied.
4768 # You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive.
4769 # Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.
4770 "routeAction": { # In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.
4771 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4772 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
4773 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
4774 },
4775 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4776 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
4777 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
4778 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4779 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4780 },
4781 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4782 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
4783 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4784 # -
4785 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4786 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4787 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
4788 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4789 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4790 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4791 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4792 "A String",
4793 ],
4794 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4795 },
4796 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
4797 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4798 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
4799 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4800 # The value must be between 0.0 and 100.0 inclusive.
4801 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
4802 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4803 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4804 },
4805 },
4806 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
4807 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4808 # The value must be between 0.0 and 100.0 inclusive.
4809 "httpStatus": 42, # The HTTP status code used to abort the request.
4810 # The value must be between 200 and 599 inclusive.
4811 },
4812 },
4813 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
4814 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
4815 "A String",
4816 ],
4817 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
4818 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4819 "A String",
4820 ],
4821 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4822 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4823 "A String",
4824 ],
4825 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
4826 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
4827 # Default is false.
4828 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
4829 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
4830 "A String",
4831 ],
4832 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
4833 "A String",
4834 ],
4835 },
4836 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
4837 # If not specified, will use the largest timeout among all backend services associated with the route.
4838 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4839 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4840 },
4841 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
4842 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
4843 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
4844 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
4845 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4846 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4847 "A String",
4848 ],
4849 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
4850 "A String",
4851 ],
4852 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4853 { # Specification determining how headers are added to requests or responses.
4854 "headerName": "A String", # The name of the header.
4855 "headerValue": "A String", # The value of the header to add.
4856 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4857 # The default value is false.
4858 },
4859 ],
4860 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4861 { # Specification determining how headers are added to requests or responses.
4862 "headerName": "A String", # The name of the header.
4863 "headerValue": "A String", # The value of the header to add.
4864 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4865 # The default value is false.
4866 },
4867 ],
4868 },
4869 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4870 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
4871 # The value must be between 0 and 1000
4872 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
4873 },
4874 ],
4875 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
4876 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
4877 # The value must be between 1 and 255 characters.
4878 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
4879 # The value must be between 1 and 1024 characters.
4880 },
4881 },
4882 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
4883 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
4884 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4885 "A String",
4886 ],
4887 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
4888 "A String",
4889 ],
4890 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4891 { # Specification determining how headers are added to requests or responses.
4892 "headerName": "A String", # The name of the header.
4893 "headerValue": "A String", # The value of the header to add.
4894 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4895 # The default value is false.
4896 },
4897 ],
4898 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4899 { # Specification determining how headers are added to requests or responses.
4900 "headerName": "A String", # The name of the header.
4901 "headerValue": "A String", # The value of the header to add.
4902 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4903 # The default value is false.
4904 },
4905 ],
4906 },
4907 "matchRules": [
4908 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
4909 "regexMatch": "A String", # For satisfying the matchRule condition, the path of the request must satisfy the regular expression specified in regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4910 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4911 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
4912 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
4913 { # matchRule criteria for request header matches.
4914 "regexMatch": "A String", # The value of the header must match the regular expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/cpp/regex/ecmascript
4915 # For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier.
4916 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4917 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
4918 "invertMatch": True or False, # If set to false, the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met.
4919 # The default setting is false.
4920 "headerName": "A String", # The name of the HTTP header to match.
4921 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
4922 # For matching a request's method, use the headerName ":method".
4923 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
4924 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4925 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
4926 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4927 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
4928 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4929 "presentMatch": True or False, # A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value.
4930 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4931 "rangeMatch": { # HttpRouteRuleMatch criteria for field values that must stay within the specified integer range. # The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails.
4932 # For example for a range [-5, 0]
4933 # - -3 will match.
4934 # - 0 will not match.
4935 # - 0.25 will not match.
4936 # - -3someString will not match.
4937 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4938 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4939 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
4940 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
4941 },
4942 },
4943 ],
4944 "fullPathMatch": "A String", # For satisfying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL.
4945 # fullPathMatch must be between 1 and 1024 characters.
4946 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4947 "prefixMatch": "A String", # For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /.
4948 # The value must be between 1 and 1024 characters.
4949 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4950 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
4951 # The default value is false.
4952 # ignoreCase must not be used with regexMatch.
4953 "metadataFilters": [ # Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set of xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies.
4954 # For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata.
4955 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
4956 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
4957 { # Opaque filter criteria used by loadbalancers to restrict routing configuration to a limited set of loadbalancing proxies. Proxies and sidecars involved in loadbalancing would typically present metadata to the loadbalancers which need to match criteria specified here. If a match takes place, the relevant configuration is made available to those proxies.
4958 # For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata.
4959 # An example for using metadataFilters would be: if loadbalancing involves Envoys, they will only receive routing configuration when values in metadataFilters match values supplied in &lt;a href="https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/base.proto#envoy-api-msg-core-node" Node metadata of their XDS requests to loadbalancers.
4960 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
4961 # Supported values are:
4962 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
4963 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
4964 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
4965 # This list must not be empty and can have at the most 64 entries.
4966 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
4967 "name": "A String", # Name of metadata label.
4968 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
4969 "value": "A String", # The value of the label must match the specified value.
4970 # value can have a maximum length of 1024 characters.
4971 },
4972 ],
4973 },
4974 ],
4975 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
4976 { # HttpRouteRuleMatch criteria for a request's query parameter.
4977 "presentMatch": True or False, # Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not.
4978 # Only one of presentMatch, exactMatch or regexMatch must be set.
4979 "regexMatch": "A String", # The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript
4980 # Only one of presentMatch, exactMatch or regexMatch must be set.
4981 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
4982 "name": "A String", # The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.
4983 "exactMatch": "A String", # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
4984 # Only one of presentMatch, exactMatch or regexMatch must be set.
4985 },
4986 ],
4987 },
4988 ],
4989 },
4990 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004991 "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.
4992 # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07004993 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Craig Citro065b5302014-08-14 00:47:23 -07004994 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
4995 "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.
4996 "A String",
4997 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004998 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
4999 # If urlRedirect is specified, service or routeAction must not be set.
5000 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
5001 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
5002 # The value must be between 1 and 1024 characters.
5003 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
5004 # The default is set to false.
5005 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
5006 # Supported values are:
5007 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5008 # - FOUND, which corresponds to 302.
5009 # - SEE_OTHER which corresponds to 303.
5010 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5011 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5012 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
5013 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5014 # The default is set to false.
5015 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
5016 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
5017 # The value must be between 1 and 1024 characters.
5018 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
5019 # The value must be between 1 and 255 characters.
5020 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005021 "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.
5022 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07005023 "routeAction": { # In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.
5024 # Only one of routeAction or urlRedirect must be set.
5025 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
5026 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
5027 },
5028 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
5029 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
5030 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
5031 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5032 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5033 },
5034 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5035 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
5036 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5037 # -
5038 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5039 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5040 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
5041 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5042 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5043 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5044 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5045 "A String",
5046 ],
5047 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5048 },
5049 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
5050 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
5051 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
5052 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5053 # The value must be between 0.0 and 100.0 inclusive.
5054 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
5055 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5056 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5057 },
5058 },
5059 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
5060 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5061 # The value must be between 0.0 and 100.0 inclusive.
5062 "httpStatus": 42, # The HTTP status code used to abort the request.
5063 # The value must be between 200 and 599 inclusive.
5064 },
5065 },
5066 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
5067 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
5068 "A String",
5069 ],
5070 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
5071 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5072 "A String",
5073 ],
5074 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
5075 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5076 "A String",
5077 ],
5078 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
5079 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
5080 # Default is false.
5081 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
5082 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
5083 "A String",
5084 ],
5085 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
5086 "A String",
5087 ],
5088 },
5089 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
5090 # If not specified, will use the largest timeout among all backend services associated with the route.
5091 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5092 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5093 },
5094 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
5095 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
5096 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
5097 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
5098 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
5099 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5100 "A String",
5101 ],
5102 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
5103 "A String",
5104 ],
5105 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5106 { # Specification determining how headers are added to requests or responses.
5107 "headerName": "A String", # The name of the header.
5108 "headerValue": "A String", # The value of the header to add.
5109 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5110 # The default value is false.
5111 },
5112 ],
5113 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5114 { # Specification determining how headers are added to requests or responses.
5115 "headerName": "A String", # The name of the header.
5116 "headerValue": "A String", # The value of the header to add.
5117 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5118 # The default value is false.
5119 },
5120 ],
5121 },
5122 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5123 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
5124 # The value must be between 0 and 1000
5125 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
5126 },
5127 ],
5128 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
5129 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
5130 # The value must be between 1 and 255 characters.
5131 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
5132 # The value must be between 1 and 1024 characters.
5133 },
5134 },
Craig Citro065b5302014-08-14 00:47:23 -07005135 },
5136 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005137 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
5138 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
5139 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5140 "A String",
5141 ],
5142 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
5143 "A String",
5144 ],
5145 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5146 { # Specification determining how headers are added to requests or responses.
5147 "headerName": "A String", # The name of the header.
5148 "headerValue": "A String", # The value of the header to add.
5149 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5150 # The default value is false.
5151 },
5152 ],
5153 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5154 { # Specification determining how headers are added to requests or responses.
5155 "headerName": "A String", # The name of the header.
5156 "headerValue": "A String", # The value of the header to add.
5157 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5158 # The default value is false.
5159 },
5160 ],
5161 },
5162 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect.
5163 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
5164 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
5165 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
5166 # The value must be between 1 and 1024 characters.
5167 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
5168 # The default is set to false.
5169 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
5170 # Supported values are:
5171 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5172 # - FOUND, which corresponds to 302.
5173 # - SEE_OTHER which corresponds to 303.
5174 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5175 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5176 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
5177 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5178 # The default is set to false.
5179 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
5180 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
5181 # The value must be between 1 and 1024 characters.
5182 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
5183 # The value must be between 1 and 255 characters.
5184 },
Craig Citro065b5302014-08-14 00:47:23 -07005185 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
5186 },
5187 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005188 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
5189 # The headerAction specified here take effect after headerAction specified under pathMatcher.
5190 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5191 "A String",
5192 ],
5193 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
5194 "A String",
5195 ],
5196 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5197 { # Specification determining how headers are added to requests or responses.
5198 "headerName": "A String", # The name of the header.
5199 "headerValue": "A String", # The value of the header to add.
5200 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5201 # The default value is false.
5202 },
5203 ],
5204 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5205 { # Specification determining how headers are added to requests or responses.
5206 "headerName": "A String", # The name of the header.
5207 "headerValue": "A String", # The value of the header to add.
5208 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5209 # The default value is false.
5210 },
5211 ],
5212 },
5213 "region": "A String", # [Output Only] URL of the region where the regional URL map resides. This field is not applicable to global URL maps. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
5214 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
5215 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
5216 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
5217 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
5218 # The value must be between 1 and 1024 characters.
5219 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
5220 # The default is set to false.
5221 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
5222 # Supported values are:
5223 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5224 # - FOUND, which corresponds to 302.
5225 # - SEE_OTHER which corresponds to 303.
5226 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5227 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5228 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
5229 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5230 # The default is set to false.
5231 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
5232 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
5233 # The value must be between 1 and 1024 characters.
5234 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
5235 # The value must be between 1 and 255 characters.
5236 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08005237 "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 -07005238 "hostRules": [ # The list of HostRules to use against the URL.
Takashi Matsuo06694102015-09-11 13:55:40 -07005239 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
Dan O'Mearadd494642020-05-01 07:42:23 -07005240 "hosts": [ # The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches 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 -07005241 "A String",
5242 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08005243 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
5244 "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 -07005245 },
5246 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005247 "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 -07005248 }
5249
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005250 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.
5251
5252For 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.
5253
5254The 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 -07005255
5256Returns:
5257 An object of the form:
5258
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005259 { # Represents an Operation resource.
5260 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005261 # Google Compute Engine has three Operation resources:
5262 #
5263 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5264 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005265 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5266 #
5267 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005268 # - For global operations, use the `globalOperations` resource.
5269 # - For regional operations, use the `regionOperations` resource.
5270 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005271 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005272 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08005273 "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 -07005274 "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 -04005275 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07005276 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005277 "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 -08005278 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07005279 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5280 "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 -08005281 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07005282 "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 -08005283 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005284 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08005285 "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 +00005286 "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 -07005287 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08005288 "message": "A String", # [Output Only] A human-readable description of the warning code.
5289 "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.
5290 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5291 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citro065b5302014-08-14 00:47:23 -07005292 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00005293 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005294 "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 -07005295 },
5296 ],
5297 },
5298 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005299 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08005300 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07005301 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5302 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005303 "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 +00005304 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08005305 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -07005306 {
Craig Citroe633be12015-03-02 13:40:36 -08005307 "message": "A String", # [Output Only] An optional, human-readable error message.
5308 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005309 "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 -07005310 },
5311 ],
5312 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08005313 "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 -07005314 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08005315 "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 -07005316 }</pre>
5317</div>
5318
5319<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005320 <code class="details" id="validate">validate(project, urlMap, body=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08005321 <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 -07005322
5323Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08005324 project: string, Project ID for this request. (required)
Craig Citro065b5302014-08-14 00:47:23 -07005325 urlMap: string, Name of the UrlMap resource to be validated as. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005326 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -07005327 The object takes the form of:
5328
5329{
Dan O'Mearadd494642020-05-01 07:42:23 -07005330 "resource": { # Represents a URL Map resource. # Content of the UrlMap to be validated.
5331 #
5332 # Google Compute Engine has two URL Map resources:
5333 #
5334 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
5335 #
5336 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
5337 #
5338 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
5339 #
5340 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
5341 #
5342 # To use the global urlMaps resource, the backend service must have a loadBalancingScheme of either EXTERNAL or INTERNAL_SELF_MANAGED. To use the regionUrlMaps resource, the backend service must have a loadBalancingScheme of INTERNAL_MANAGED. For more information, read URL Map Concepts.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08005343 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
5344 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07005345 "defaultRouteAction": { # defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.
5346 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
5347 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
5348 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
5349 },
5350 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
5351 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
5352 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
5353 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5354 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5355 },
5356 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5357 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
5358 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5359 # -
5360 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5361 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5362 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
5363 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5364 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5365 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5366 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5367 "A String",
5368 ],
5369 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5370 },
5371 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
5372 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
5373 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
5374 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5375 # The value must be between 0.0 and 100.0 inclusive.
5376 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
5377 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5378 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5379 },
5380 },
5381 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
5382 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5383 # The value must be between 0.0 and 100.0 inclusive.
5384 "httpStatus": 42, # The HTTP status code used to abort the request.
5385 # The value must be between 200 and 599 inclusive.
5386 },
5387 },
5388 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
5389 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
5390 "A String",
5391 ],
5392 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
5393 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5394 "A String",
5395 ],
5396 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
5397 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5398 "A String",
5399 ],
5400 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
5401 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
5402 # Default is false.
5403 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
5404 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
5405 "A String",
5406 ],
5407 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
5408 "A String",
5409 ],
5410 },
5411 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
5412 # If not specified, will use the largest timeout among all backend services associated with the route.
5413 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5414 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5415 },
5416 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
5417 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
5418 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
5419 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
5420 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
5421 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5422 "A String",
5423 ],
5424 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
5425 "A String",
5426 ],
5427 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5428 { # Specification determining how headers are added to requests or responses.
5429 "headerName": "A String", # The name of the header.
5430 "headerValue": "A String", # The value of the header to add.
5431 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5432 # The default value is false.
5433 },
5434 ],
5435 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5436 { # Specification determining how headers are added to requests or responses.
5437 "headerName": "A String", # The name of the header.
5438 "headerValue": "A String", # The value of the header to add.
5439 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5440 # The default value is false.
5441 },
5442 ],
5443 },
5444 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5445 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
5446 # The value must be between 0 and 1000
5447 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
5448 },
5449 ],
5450 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
5451 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
5452 # The value must be between 1 and 255 characters.
5453 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
5454 # The value must be between 1 and 1024 characters.
5455 },
5456 },
5457 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005458 "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.
5459 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
5460 "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 -07005461 { # Message for the expected URL mappings.
5462 "path": "A String", # Path portion of the URL.
5463 "host": "A String", # Host portion of the URL.
5464 "description": "A String", # Description of this test case.
5465 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
5466 },
5467 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07005468 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005469 "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.
5470 #
5471 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Craig Citro065b5302014-08-14 00:47:23 -07005472 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08005473 { # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07005474 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
5475 "defaultRouteAction": { # defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.
5476 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
5477 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
5478 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
5479 },
5480 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
5481 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
5482 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
5483 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5484 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5485 },
5486 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5487 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
5488 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5489 # -
5490 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5491 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5492 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
5493 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5494 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5495 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5496 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5497 "A String",
5498 ],
5499 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5500 },
5501 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
5502 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
5503 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
5504 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5505 # The value must be between 0.0 and 100.0 inclusive.
5506 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
5507 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5508 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5509 },
5510 },
5511 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
5512 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5513 # The value must be between 0.0 and 100.0 inclusive.
5514 "httpStatus": 42, # The HTTP status code used to abort the request.
5515 # The value must be between 200 and 599 inclusive.
5516 },
5517 },
5518 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
5519 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
5520 "A String",
5521 ],
5522 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
5523 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5524 "A String",
5525 ],
5526 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
5527 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5528 "A String",
5529 ],
5530 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
5531 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
5532 # Default is false.
5533 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
5534 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
5535 "A String",
5536 ],
5537 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
5538 "A String",
5539 ],
5540 },
5541 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
5542 # If not specified, will use the largest timeout among all backend services associated with the route.
5543 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5544 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5545 },
5546 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
5547 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
5548 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
5549 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
5550 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
5551 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5552 "A String",
5553 ],
5554 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
5555 "A String",
5556 ],
5557 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5558 { # Specification determining how headers are added to requests or responses.
5559 "headerName": "A String", # The name of the header.
5560 "headerValue": "A String", # The value of the header to add.
5561 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5562 # The default value is false.
5563 },
5564 ],
5565 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5566 { # Specification determining how headers are added to requests or responses.
5567 "headerName": "A String", # The name of the header.
5568 "headerValue": "A String", # The value of the header to add.
5569 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5570 # The default value is false.
5571 },
5572 ],
5573 },
5574 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5575 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
5576 # The value must be between 0 and 1000
5577 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
5578 },
5579 ],
5580 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
5581 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
5582 # The value must be between 1 and 255 characters.
5583 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
5584 # The value must be between 1 and 1024 characters.
5585 },
5586 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005587 "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 -08005588 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
5589 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005590 # - 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.
5591 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
5592 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
5593 # - compute.backendBuckets.use
5594 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07005595 "routeRules": [ # The list of HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. routeRules are evaluated in order of priority, from the lowest to highest number.
5596 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
5597 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
5598 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
5599 # If urlRedirect is specified, service or routeAction must not be set.
5600 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
5601 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
5602 # The value must be between 1 and 1024 characters.
5603 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
5604 # The default is set to false.
5605 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
5606 # Supported values are:
5607 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5608 # - FOUND, which corresponds to 302.
5609 # - SEE_OTHER which corresponds to 303.
5610 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5611 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5612 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
5613 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5614 # The default is set to false.
5615 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
5616 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
5617 # The value must be between 1 and 1024 characters.
5618 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
5619 # The value must be between 1 and 255 characters.
5620 },
5621 "description": "A String", # The short description conveying the intent of this routeRule.
5622 # The description can have a maximum length of 1024 characters.
5623 "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.
5624 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5625 "priority": 42, # For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied.
5626 # You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive.
5627 # Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.
5628 "routeAction": { # In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.
5629 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5630 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
5631 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
5632 },
5633 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
5634 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
5635 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
5636 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5637 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5638 },
5639 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5640 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
5641 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5642 # -
5643 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5644 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5645 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
5646 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5647 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5648 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5649 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5650 "A String",
5651 ],
5652 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5653 },
5654 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
5655 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
5656 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
5657 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5658 # The value must be between 0.0 and 100.0 inclusive.
5659 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
5660 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5661 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5662 },
5663 },
5664 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
5665 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5666 # The value must be between 0.0 and 100.0 inclusive.
5667 "httpStatus": 42, # The HTTP status code used to abort the request.
5668 # The value must be between 200 and 599 inclusive.
5669 },
5670 },
5671 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
5672 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
5673 "A String",
5674 ],
5675 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
5676 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5677 "A String",
5678 ],
5679 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
5680 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5681 "A String",
5682 ],
5683 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
5684 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
5685 # Default is false.
5686 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
5687 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
5688 "A String",
5689 ],
5690 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
5691 "A String",
5692 ],
5693 },
5694 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
5695 # If not specified, will use the largest timeout among all backend services associated with the route.
5696 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5697 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5698 },
5699 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
5700 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
5701 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
5702 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
5703 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
5704 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5705 "A String",
5706 ],
5707 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
5708 "A String",
5709 ],
5710 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5711 { # Specification determining how headers are added to requests or responses.
5712 "headerName": "A String", # The name of the header.
5713 "headerValue": "A String", # The value of the header to add.
5714 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5715 # The default value is false.
5716 },
5717 ],
5718 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5719 { # Specification determining how headers are added to requests or responses.
5720 "headerName": "A String", # The name of the header.
5721 "headerValue": "A String", # The value of the header to add.
5722 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5723 # The default value is false.
5724 },
5725 ],
5726 },
5727 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5728 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
5729 # The value must be between 0 and 1000
5730 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
5731 },
5732 ],
5733 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
5734 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
5735 # The value must be between 1 and 255 characters.
5736 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
5737 # The value must be between 1 and 1024 characters.
5738 },
5739 },
5740 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
5741 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
5742 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5743 "A String",
5744 ],
5745 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
5746 "A String",
5747 ],
5748 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5749 { # Specification determining how headers are added to requests or responses.
5750 "headerName": "A String", # The name of the header.
5751 "headerValue": "A String", # The value of the header to add.
5752 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5753 # The default value is false.
5754 },
5755 ],
5756 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5757 { # Specification determining how headers are added to requests or responses.
5758 "headerName": "A String", # The name of the header.
5759 "headerValue": "A String", # The value of the header to add.
5760 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5761 # The default value is false.
5762 },
5763 ],
5764 },
5765 "matchRules": [
5766 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
5767 "regexMatch": "A String", # For satisfying the matchRule condition, the path of the request must satisfy the regular expression specified in regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
5768 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5769 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
5770 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
5771 { # matchRule criteria for request header matches.
5772 "regexMatch": "A String", # The value of the header must match the regular expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/cpp/regex/ecmascript
5773 # For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier.
5774 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5775 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
5776 "invertMatch": True or False, # If set to false, the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met.
5777 # The default setting is false.
5778 "headerName": "A String", # The name of the HTTP header to match.
5779 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
5780 # For matching a request's method, use the headerName ":method".
5781 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
5782 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5783 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
5784 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5785 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
5786 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5787 "presentMatch": True or False, # A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value.
5788 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5789 "rangeMatch": { # HttpRouteRuleMatch criteria for field values that must stay within the specified integer range. # The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails.
5790 # For example for a range [-5, 0]
5791 # - -3 will match.
5792 # - 0 will not match.
5793 # - 0.25 will not match.
5794 # - -3someString will not match.
5795 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5796 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5797 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
5798 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
5799 },
5800 },
5801 ],
5802 "fullPathMatch": "A String", # For satisfying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL.
5803 # fullPathMatch must be between 1 and 1024 characters.
5804 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5805 "prefixMatch": "A String", # For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /.
5806 # The value must be between 1 and 1024 characters.
5807 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5808 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
5809 # The default value is false.
5810 # ignoreCase must not be used with regexMatch.
5811 "metadataFilters": [ # Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set of xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies.
5812 # For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata.
5813 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
5814 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
5815 { # Opaque filter criteria used by loadbalancers to restrict routing configuration to a limited set of loadbalancing proxies. Proxies and sidecars involved in loadbalancing would typically present metadata to the loadbalancers which need to match criteria specified here. If a match takes place, the relevant configuration is made available to those proxies.
5816 # For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata.
5817 # An example for using metadataFilters would be: if loadbalancing involves Envoys, they will only receive routing configuration when values in metadataFilters match values supplied in &lt;a href="https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/base.proto#envoy-api-msg-core-node" Node metadata of their XDS requests to loadbalancers.
5818 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
5819 # Supported values are:
5820 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
5821 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
5822 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
5823 # This list must not be empty and can have at the most 64 entries.
5824 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
5825 "name": "A String", # Name of metadata label.
5826 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
5827 "value": "A String", # The value of the label must match the specified value.
5828 # value can have a maximum length of 1024 characters.
5829 },
5830 ],
5831 },
5832 ],
5833 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
5834 { # HttpRouteRuleMatch criteria for a request's query parameter.
5835 "presentMatch": True or False, # Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not.
5836 # Only one of presentMatch, exactMatch or regexMatch must be set.
5837 "regexMatch": "A String", # The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript
5838 # Only one of presentMatch, exactMatch or regexMatch must be set.
5839 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
5840 "name": "A String", # The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.
5841 "exactMatch": "A String", # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
5842 # Only one of presentMatch, exactMatch or regexMatch must be set.
5843 },
5844 ],
5845 },
5846 ],
5847 },
5848 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005849 "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.
5850 # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07005851 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Craig Citro065b5302014-08-14 00:47:23 -07005852 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
5853 "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.
5854 "A String",
5855 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005856 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
5857 # If urlRedirect is specified, service or routeAction must not be set.
5858 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
5859 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
5860 # The value must be between 1 and 1024 characters.
5861 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
5862 # The default is set to false.
5863 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
5864 # Supported values are:
5865 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5866 # - FOUND, which corresponds to 302.
5867 # - SEE_OTHER which corresponds to 303.
5868 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5869 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5870 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
5871 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5872 # The default is set to false.
5873 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
5874 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
5875 # The value must be between 1 and 1024 characters.
5876 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
5877 # The value must be between 1 and 255 characters.
5878 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005879 "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.
5880 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07005881 "routeAction": { # In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.
5882 # Only one of routeAction or urlRedirect must be set.
5883 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
5884 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
5885 },
5886 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
5887 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
5888 # If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route.
5889 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5890 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5891 },
5892 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5893 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
5894 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5895 # -
5896 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5897 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5898 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
5899 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5900 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5901 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5902 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5903 "A String",
5904 ],
5905 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5906 },
5907 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
5908 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
5909 "delay": { # Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection. # The specification for how client requests are delayed as part of fault injection, before being sent to a backend service.
5910 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5911 # The value must be between 0.0 and 100.0 inclusive.
5912 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
5913 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5914 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5915 },
5916 },
5917 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
5918 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5919 # The value must be between 0.0 and 100.0 inclusive.
5920 "httpStatus": 42, # The HTTP status code used to abort the request.
5921 # The value must be between 200 and 599 inclusive.
5922 },
5923 },
5924 "corsPolicy": { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
5925 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
5926 "A String",
5927 ],
5928 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
5929 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5930 "A String",
5931 ],
5932 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
5933 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5934 "A String",
5935 ],
5936 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
5937 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
5938 # Default is false.
5939 "disabled": True or False, # If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
5940 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
5941 "A String",
5942 ],
5943 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
5944 "A String",
5945 ],
5946 },
5947 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.
5948 # If not specified, will use the largest timeout among all backend services associated with the route.
5949 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5950 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5951 },
5952 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
5953 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
5954 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
5955 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
5956 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
5957 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5958 "A String",
5959 ],
5960 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
5961 "A String",
5962 ],
5963 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5964 { # Specification determining how headers are added to requests or responses.
5965 "headerName": "A String", # The name of the header.
5966 "headerValue": "A String", # The value of the header to add.
5967 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5968 # The default value is false.
5969 },
5970 ],
5971 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5972 { # Specification determining how headers are added to requests or responses.
5973 "headerName": "A String", # The name of the header.
5974 "headerValue": "A String", # The value of the header to add.
5975 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5976 # The default value is false.
5977 },
5978 ],
5979 },
5980 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5981 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
5982 # The value must be between 0 and 1000
5983 "backendService": "A String", # The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
5984 },
5985 ],
5986 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
5987 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
5988 # The value must be between 1 and 255 characters.
5989 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
5990 # The value must be between 1 and 1024 characters.
5991 },
5992 },
Craig Citro065b5302014-08-14 00:47:23 -07005993 },
5994 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005995 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
5996 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
5997 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5998 "A String",
5999 ],
6000 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
6001 "A String",
6002 ],
6003 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
6004 { # Specification determining how headers are added to requests or responses.
6005 "headerName": "A String", # The name of the header.
6006 "headerValue": "A String", # The value of the header to add.
6007 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
6008 # The default value is false.
6009 },
6010 ],
6011 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
6012 { # Specification determining how headers are added to requests or responses.
6013 "headerName": "A String", # The name of the header.
6014 "headerValue": "A String", # The value of the header to add.
6015 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
6016 # The default value is false.
6017 },
6018 ],
6019 },
6020 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect.
6021 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
6022 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
6023 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
6024 # The value must be between 1 and 1024 characters.
6025 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
6026 # The default is set to false.
6027 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
6028 # Supported values are:
6029 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
6030 # - FOUND, which corresponds to 302.
6031 # - SEE_OTHER which corresponds to 303.
6032 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
6033 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
6034 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
6035 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
6036 # The default is set to false.
6037 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
6038 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
6039 # The value must be between 1 and 1024 characters.
6040 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
6041 # The value must be between 1 and 255 characters.
6042 },
Craig Citro065b5302014-08-14 00:47:23 -07006043 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
6044 },
6045 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07006046 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
6047 # The headerAction specified here take effect after headerAction specified under pathMatcher.
6048 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
6049 "A String",
6050 ],
6051 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
6052 "A String",
6053 ],
6054 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
6055 { # Specification determining how headers are added to requests or responses.
6056 "headerName": "A String", # The name of the header.
6057 "headerValue": "A String", # The value of the header to add.
6058 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
6059 # The default value is false.
6060 },
6061 ],
6062 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
6063 { # Specification determining how headers are added to requests or responses.
6064 "headerName": "A String", # The name of the header.
6065 "headerValue": "A String", # The value of the header to add.
6066 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
6067 # The default value is false.
6068 },
6069 ],
6070 },
6071 "region": "A String", # [Output Only] URL of the region where the regional URL map resides. This field is not applicable to global URL maps. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
6072 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
6073 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
6074 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
6075 # pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
6076 # The value must be between 1 and 1024 characters.
6077 "stripQuery": True or False, # If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
6078 # The default is set to false.
6079 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
6080 # Supported values are:
6081 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
6082 # - FOUND, which corresponds to 302.
6083 # - SEE_OTHER which corresponds to 303.
6084 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
6085 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
6086 "httpsRedirect": True or False, # If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.
6087 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
6088 # The default is set to false.
6089 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
6090 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
6091 # The value must be between 1 and 1024 characters.
6092 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
6093 # The value must be between 1 and 255 characters.
6094 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08006095 "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 -07006096 "hostRules": [ # The list of HostRules to use against the URL.
Takashi Matsuo06694102015-09-11 13:55:40 -07006097 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
Dan O'Mearadd494642020-05-01 07:42:23 -07006098 "hosts": [ # The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches 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 -07006099 "A String",
6100 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08006101 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
6102 "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 -07006103 },
6104 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006105 "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 -07006106 },
6107 }
6108
6109
6110Returns:
6111 An object of the form:
6112
6113 {
6114 "result": { # Message representing the validation result for a UrlMap.
6115 "testFailures": [
6116 {
6117 "path": "A String",
6118 "actualService": "A String",
6119 "host": "A String",
6120 "expectedService": "A String",
6121 },
6122 ],
6123 "loadErrors": [
6124 "A String",
6125 ],
6126 "testPassed": True or False, # If successfully loaded, this field indicates whether the test passed. If false, 'testFailures's indicate the reason of failure.
6127 "loadSucceeded": True or False, # Whether the given UrlMap can be successfully loaded. If false, 'loadErrors' indicates the reasons.
6128 },
6129 }</pre>
6130</div>
6131
6132</body></html>