blob: 7b4818737ec9ab440dddaace14f5764c7ba97bbe [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -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_beta.html">Compute Engine API</a> . <a href="compute_beta.urlMaps.html">urlMaps</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<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">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070084 <code><a href="#close">close()</a></code></p>
85<p class="firstline">Close httplib2 connections.</p>
86<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087 <code><a href="#delete">delete(project, urlMap, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070088<p class="firstline">Deletes the specified UrlMap resource.</p>
89<p class="toc_element">
90 <code><a href="#get">get(project, urlMap)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070092<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#insert">insert(project, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070094<p class="firstline">Creates a UrlMap resource in the specified project using the data included in the request.</p>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#invalidateCache">invalidateCache(project, urlMap, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070097<p class="firstline">Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.</p>
98<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070099 <code><a href="#list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700100<p class="firstline">Retrieves the list of UrlMap resources available to the specified project.</p>
101<p class="toc_element">
102 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
103<p class="firstline">Retrieves the next page of results.</p>
104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#patch">patch(project, urlMap, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106<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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700109<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#update">update(project, urlMap, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700112<p class="firstline">Updates the specified UrlMap resource with the data included in the request.</p>
113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#validate">validate(project, urlMap, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700115<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>
116<h3>Method Details</h3>
117<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700118 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700119 <pre>Retrieves the list of all UrlMap resources, regional and global, available to the specified project.
120
121Args:
122 project: string, Name of the project scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700123 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;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700124
Dan O'Mearadd494642020-05-01 07:42:23 -0700125For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700126
Dan O'Mearadd494642020-05-01 07:42:23 -0700127You 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700128
Bu Sun Kim65020912020-05-20 12:08:20 -0700129To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
Dan O'Mearadd494642020-05-01 07:42:23 -0700130 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700131 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`)
132 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
133
134You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. 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.
135
136Currently, only sorting by `name` or `creationTimestamp desc` is supported.
137 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700138 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700139
140Returns:
141 An object of the form:
142
143 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700144 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
145 &quot;items&quot;: { # A list of UrlMapsScopedList resources.
146 &quot;a_key&quot;: { # Name of the scope containing this set of UrlMaps.
147 &quot;urlMaps&quot;: [ # A list of UrlMaps contained in this scope.
Dan O'Mearadd494642020-05-01 07:42:23 -0700148 { # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700149 #
150 # Google Compute Engine has two URL Map resources:
151 #
152 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
153 #
154 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
155 #
156 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
157 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700158 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
159 #
160 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
161 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700162 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
163 #
164 # 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.
165 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
166 &quot;defaultRouteAction&quot;: { # 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.
167 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700168 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700169 # defaultRouteAction has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700170 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700171 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700172 &quot;allowCredentials&quot;: 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.
173 # Default is false.
174 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
175 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700176 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700177 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
178 &quot;A String&quot;,
179 ],
180 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
181 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
182 &quot;A String&quot;,
183 ],
184 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
185 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
186 &quot;A String&quot;,
187 ],
188 &quot;disabled&quot;: 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.
189 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
190 &quot;A String&quot;,
191 ],
192 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
193 },
194 &quot;faultInjectionPolicy&quot;: { # 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.
195 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700196 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700197 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
198 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
199 # The value must be between 200 and 599 inclusive.
200 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
201 # The value must be between 0.0 and 100.0 inclusive.
202 },
203 &quot;delay&quot;: { # 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.
204 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
205 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
206 &quot;seconds&quot;: &quot;A String&quot;, # 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
207 },
208 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
209 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700210 },
211 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700212 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700213 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700214 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
215 },
216 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700217 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700218 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
219 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
220 # 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.
221 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
222 &quot;seconds&quot;: &quot;A String&quot;, # 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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700223 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700224 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
225 # - 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.
226 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
227 # -
228 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
229 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
230 # - 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.
231 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
232 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
233 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
234 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
235 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700236 ],
237 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700238 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
239 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700240 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700241 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
242 &quot;seconds&quot;: &quot;A String&quot;, # 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
243 },
244 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700245 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700246 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700247 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700248 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700249 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
250 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700251 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700252 &quot;weightedBackendServices&quot;: [ # 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-zero number.
253 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -0700254 { # 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
255 &quot;backendService&quot;: &quot;A String&quot;, # 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.
256 &quot;headerAction&quot;: { # 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.
257 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700258 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
259 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700260 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
261 { # Specification determining how headers are added to requests or responses.
262 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
263 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
264 &quot;replace&quot;: 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.
265 # The default value is false.
266 },
267 ],
268 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
269 &quot;A String&quot;,
270 ],
271 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
272 { # Specification determining how headers are added to requests or responses.
273 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
274 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
275 &quot;replace&quot;: 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.
276 # The default value is false.
277 },
278 ],
279 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
280 &quot;A String&quot;,
281 ],
282 },
283 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
284 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
285 # The value must be between 0 and 1000
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700286 },
287 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700288 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700289 &quot;defaultService&quot;: &quot;A String&quot;, # 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.
290 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700291 # defaultService has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700292 &quot;defaultUrlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
293 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700294 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700295 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
296 # The value must be between 1 and 255 characters.
297 &quot;httpsRedirect&quot;: 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.
298 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
299 # The default is set to false.
300 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
301 # 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.
302 # The value must be between 1 and 1024 characters.
303 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
304 # 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.
305 # The value must be between 1 and 1024 characters.
306 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
307 # Supported values are:
308 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
309 # - FOUND, which corresponds to 302.
310 # - SEE_OTHER which corresponds to 303.
311 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
312 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
313 &quot;stripQuery&quot;: 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.
314 # The default is set to false.
315 },
316 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
317 &quot;fingerprint&quot;: &quot;A String&quot;, # 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.
318 #
319 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
320 &quot;headerAction&quot;: { # 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.
321 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700322 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
323 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700324 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
325 { # Specification determining how headers are added to requests or responses.
326 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
327 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
328 &quot;replace&quot;: 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.
329 # The default value is false.
330 },
331 ],
332 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
333 &quot;A String&quot;,
334 ],
335 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
336 { # Specification determining how headers are added to requests or responses.
337 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
338 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
339 &quot;replace&quot;: 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.
340 # The default value is false.
341 },
342 ],
343 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
344 &quot;A String&quot;,
345 ],
346 },
347 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
348 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
349 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
350 &quot;hosts&quot;: [ # 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 ..
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700351 # * based matching is not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700352 &quot;A String&quot;,
353 ],
354 &quot;pathMatcher&quot;: &quot;A String&quot;, # The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL&#x27;s host portion.
355 },
356 ],
357 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
358 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
359 &quot;name&quot;: &quot;A String&quot;, # 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.
360 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
361 { # 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.
362 &quot;defaultRouteAction&quot;: { # 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.
363 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700364 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathMatcher&#x27;s defaultRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -0700365 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700366 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700367 &quot;allowCredentials&quot;: 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.
368 # Default is false.
369 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
370 &quot;A String&quot;,
371 ],
372 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
373 &quot;A String&quot;,
374 ],
375 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
376 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
377 &quot;A String&quot;,
378 ],
379 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
380 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
381 &quot;A String&quot;,
382 ],
383 &quot;disabled&quot;: 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.
384 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
385 &quot;A String&quot;,
386 ],
387 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
388 },
389 &quot;faultInjectionPolicy&quot;: { # 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.
390 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700391 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700392 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
393 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
394 # The value must be between 200 and 599 inclusive.
395 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
396 # The value must be between 0.0 and 100.0 inclusive.
397 },
398 &quot;delay&quot;: { # 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.
399 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
400 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
401 &quot;seconds&quot;: &quot;A String&quot;, # 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
402 },
403 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
404 # The value must be between 0.0 and 100.0 inclusive.
405 },
406 },
407 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700408 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700409 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
410 },
411 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700412 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700413 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
414 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
415 # 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.
416 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
417 &quot;seconds&quot;: &quot;A String&quot;, # 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
418 },
419 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
420 # - 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.
421 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
422 # -
423 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
424 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
425 # - 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.
426 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
427 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
428 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
429 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
430 &quot;A String&quot;,
431 ],
432 },
433 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
434 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700435 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700436 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
437 &quot;seconds&quot;: &quot;A String&quot;, # 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
438 },
439 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700440 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700441 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700442 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
443 # The value must be between 1 and 255 characters.
444 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
445 # The value must be between 1 and 1024 characters.
446 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700447 &quot;weightedBackendServices&quot;: [ # 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-zero number.
448 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -0700449 { # 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
450 &quot;backendService&quot;: &quot;A String&quot;, # 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.
451 &quot;headerAction&quot;: { # 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.
452 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700453 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
454 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700455 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
456 { # Specification determining how headers are added to requests or responses.
457 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
458 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
459 &quot;replace&quot;: 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.
460 # The default value is false.
461 },
462 ],
463 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
464 &quot;A String&quot;,
465 ],
466 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
467 { # Specification determining how headers are added to requests or responses.
468 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
469 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
470 &quot;replace&quot;: 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.
471 # The default value is false.
472 },
473 ],
474 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
475 &quot;A String&quot;,
476 ],
477 },
478 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
479 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
480 # The value must be between 0 and 1000
481 },
482 ],
483 },
484 &quot;defaultService&quot;: &quot;A String&quot;, # 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:
485 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
486 # - compute/v1/projects/project/global/backendServices/backendService
487 # - 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.
488 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
489 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
490 # - compute.backendBuckets.use
491 # - compute.backendServices.use
492 &quot;defaultUrlRedirect&quot;: { # 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.
493 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700494 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700495 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
496 # The value must be between 1 and 255 characters.
497 &quot;httpsRedirect&quot;: 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.
498 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
499 # The default is set to false.
500 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
501 # 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.
502 # The value must be between 1 and 1024 characters.
503 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
504 # 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.
505 # The value must be between 1 and 1024 characters.
506 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
507 # Supported values are:
508 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
509 # - FOUND, which corresponds to 302.
510 # - SEE_OTHER which corresponds to 303.
511 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
512 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
513 &quot;stripQuery&quot;: 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.
514 # The default is set to false.
515 },
516 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
517 &quot;headerAction&quot;: { # 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.
518 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700519 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
520 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700521 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
522 { # Specification determining how headers are added to requests or responses.
523 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
524 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
525 &quot;replace&quot;: 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.
526 # The default value is false.
527 },
528 ],
529 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
530 &quot;A String&quot;,
531 ],
532 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
533 { # Specification determining how headers are added to requests or responses.
534 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
535 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
536 &quot;replace&quot;: 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.
537 # The default value is false.
538 },
539 ],
540 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
541 &quot;A String&quot;,
542 ],
543 },
544 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
545 &quot;pathRules&quot;: [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that&#x27;s required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.
546 # 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.
547 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
548 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
549 &quot;paths&quot;: [ # 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.
550 &quot;A String&quot;,
551 ],
552 &quot;routeAction&quot;: { # 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.
553 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700554 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -0700555 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700556 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700557 &quot;allowCredentials&quot;: 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.
558 # Default is false.
559 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
560 &quot;A String&quot;,
561 ],
562 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
563 &quot;A String&quot;,
564 ],
565 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
566 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
567 &quot;A String&quot;,
568 ],
569 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
570 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
571 &quot;A String&quot;,
572 ],
573 &quot;disabled&quot;: 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.
574 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
575 &quot;A String&quot;,
576 ],
577 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
578 },
579 &quot;faultInjectionPolicy&quot;: { # 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.
580 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700581 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700582 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
583 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
584 # The value must be between 200 and 599 inclusive.
585 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
586 # The value must be between 0.0 and 100.0 inclusive.
587 },
588 &quot;delay&quot;: { # 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.
589 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
590 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
591 &quot;seconds&quot;: &quot;A String&quot;, # 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
592 },
593 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
594 # The value must be between 0.0 and 100.0 inclusive.
595 },
596 },
597 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700598 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700599 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
600 },
601 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700602 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700603 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
604 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
605 # 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.
606 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
607 &quot;seconds&quot;: &quot;A String&quot;, # 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
608 },
609 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
610 # - 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.
611 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
612 # -
613 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
614 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
615 # - 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.
616 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
617 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
618 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
619 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
620 &quot;A String&quot;,
621 ],
622 },
623 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
624 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700625 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700626 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
627 &quot;seconds&quot;: &quot;A String&quot;, # 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
628 },
629 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700630 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700631 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700632 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
633 # The value must be between 1 and 255 characters.
634 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
635 # The value must be between 1 and 1024 characters.
636 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700637 &quot;weightedBackendServices&quot;: [ # 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-zero number.
638 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -0700639 { # 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
640 &quot;backendService&quot;: &quot;A String&quot;, # 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.
641 &quot;headerAction&quot;: { # 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.
642 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700643 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
644 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700645 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
646 { # Specification determining how headers are added to requests or responses.
647 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
648 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
649 &quot;replace&quot;: 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.
650 # The default value is false.
651 },
652 ],
653 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
654 &quot;A String&quot;,
655 ],
656 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
657 { # Specification determining how headers are added to requests or responses.
658 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
659 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
660 &quot;replace&quot;: 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.
661 # The default value is false.
662 },
663 ],
664 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
665 &quot;A String&quot;,
666 ],
667 },
668 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
669 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
670 # The value must be between 0 and 1000
671 },
672 ],
673 },
674 &quot;service&quot;: &quot;A String&quot;, # 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.
675 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
676 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
677 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700678 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700679 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
680 # The value must be between 1 and 255 characters.
681 &quot;httpsRedirect&quot;: 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.
682 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
683 # The default is set to false.
684 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
685 # 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.
686 # The value must be between 1 and 1024 characters.
687 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
688 # 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.
689 # The value must be between 1 and 1024 characters.
690 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
691 # Supported values are:
692 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
693 # - FOUND, which corresponds to 302.
694 # - SEE_OTHER which corresponds to 303.
695 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
696 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
697 &quot;stripQuery&quot;: 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.
698 # The default is set to false.
699 },
700 },
701 ],
702 &quot;routeRules&quot;: [ # 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.
703 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
704 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
705 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
706 # The description can have a maximum length of 1024 characters.
707 &quot;headerAction&quot;: { # 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.
708 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700709 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
710 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700711 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
712 { # Specification determining how headers are added to requests or responses.
713 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
714 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
715 &quot;replace&quot;: 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.
716 # The default value is false.
717 },
718 ],
719 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
720 &quot;A String&quot;,
721 ],
722 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
723 { # Specification determining how headers are added to requests or responses.
724 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
725 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
726 &quot;replace&quot;: 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.
727 # The default value is false.
728 },
729 ],
730 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
731 &quot;A String&quot;,
732 ],
733 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700734 &quot;httpFilterConfigs&quot;: [ # Outbound route specific configuration for networkservices.HttpFilter resources enabled by Traffic Director. httpFilterConfigs only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
735 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
736 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
737 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
738 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
739 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
740 },
741 ],
742 &quot;httpFilterMetadata&quot;: [ # Outbound route specific metadata supplied to networkservices.HttpFilter resources enabled by Traffic Director. httpFilterMetadata only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
743 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
744 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
745 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
746 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
747 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
748 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
749 },
750 ],
751 &quot;matchRules&quot;: [ # The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
Bu Sun Kim65020912020-05-20 12:08:20 -0700752 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
753 &quot;fullPathMatch&quot;: &quot;A String&quot;, # 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.
754 # fullPathMatch must be between 1 and 1024 characters.
755 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
756 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
757 { # matchRule criteria for request header matches.
758 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
759 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
760 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
761 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
762 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700763 # When the URL map is bound to target gRPC proxy that has validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin.
Bu Sun Kim65020912020-05-20 12:08:20 -0700764 &quot;invertMatch&quot;: 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.
765 # The default setting is false.
766 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
767 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
768 &quot;presentMatch&quot;: True or False, # A header with the contents of headerName must exist. The match takes place whether or not the request&#x27;s header has a value.
769 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
770 &quot;rangeMatch&quot;: { # 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.
771 # For example for a range [-5, 0]
772 # - -3 will match.
773 # - 0 will not match.
774 # - 0.25 will not match.
775 # - -3someString will not match.
776 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
777 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
778 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
779 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
780 },
781 &quot;regexMatch&quot;: &quot;A String&quot;, # 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
782 # 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&#x27;s port specifier.
783 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
784 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
785 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
786 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
787 },
788 ],
789 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
790 # The default value is false.
791 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700792 # Not supported when the URL map is bound to target gRPC proxy.
793 &quot;metadataFilters&quot;: [ # 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. When there is a match, the relevant routing configuration is made available to those proxies.
794 # 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. If multiple metadataFilters are specified, all of them need to be satisfied in order to be considered a match.
Bu Sun Kim65020912020-05-20 12:08:20 -0700795 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
796 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700797 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700798 { # 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.
799 # 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.
800 # 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=&quot;https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/base.proto#envoy-api-msg-core-node&quot; Node metadata of their XDS requests to loadbalancers.
801 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
802 # This list must not be empty and can have at the most 64 entries.
803 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
804 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
805 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
806 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
807 # value can have a maximum length of 1024 characters.
808 },
809 ],
810 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
811 # Supported values are:
812 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
813 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
814 },
815 ],
816 &quot;prefixMatch&quot;: &quot;A String&quot;, # For satisfying the matchRule condition, the request&#x27;s path must begin with the specified prefixMatch. prefixMatch must begin with a /.
817 # The value must be between 1 and 1024 characters.
818 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
819 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700820 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700821 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
822 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
823 # Only one of presentMatch, exactMatch or regexMatch must be set.
824 &quot;name&quot;: &quot;A String&quot;, # 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.
825 &quot;presentMatch&quot;: 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.
826 # Only one of presentMatch, exactMatch or regexMatch must be set.
827 &quot;regexMatch&quot;: &quot;A String&quot;, # 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
828 # Only one of presentMatch, exactMatch or regexMatch must be set.
829 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
830 },
831 ],
832 &quot;regexMatch&quot;: &quot;A String&quot;, # 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
833 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
834 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
835 },
836 ],
837 &quot;priority&quot;: 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.
838 # 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.
839 # 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.
840 &quot;routeAction&quot;: { # 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.
841 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700842 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a routeRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -0700843 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700844 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700845 &quot;allowCredentials&quot;: 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.
846 # Default is false.
847 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
848 &quot;A String&quot;,
849 ],
850 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
851 &quot;A String&quot;,
852 ],
853 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
854 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
855 &quot;A String&quot;,
856 ],
857 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
858 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
859 &quot;A String&quot;,
860 ],
861 &quot;disabled&quot;: 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.
862 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
863 &quot;A String&quot;,
864 ],
865 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
866 },
867 &quot;faultInjectionPolicy&quot;: { # 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.
868 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700869 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700870 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
871 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
872 # The value must be between 200 and 599 inclusive.
873 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
874 # The value must be between 0.0 and 100.0 inclusive.
875 },
876 &quot;delay&quot;: { # 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.
877 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
878 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
879 &quot;seconds&quot;: &quot;A String&quot;, # 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
880 },
881 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
882 # The value must be between 0.0 and 100.0 inclusive.
883 },
884 },
885 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700886 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700887 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
888 },
889 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700890 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700891 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
892 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
893 # 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.
894 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
895 &quot;seconds&quot;: &quot;A String&quot;, # 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
896 },
897 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
898 # - 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.
899 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
900 # -
901 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
902 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
903 # - 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.
904 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
905 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
906 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
907 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
908 &quot;A String&quot;,
909 ],
910 },
911 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
912 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700913 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700914 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
915 &quot;seconds&quot;: &quot;A String&quot;, # 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
916 },
917 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700918 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700919 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700920 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
921 # The value must be between 1 and 255 characters.
922 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
923 # The value must be between 1 and 1024 characters.
924 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700925 &quot;weightedBackendServices&quot;: [ # 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-zero number.
926 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -0700927 { # 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
928 &quot;backendService&quot;: &quot;A String&quot;, # 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.
929 &quot;headerAction&quot;: { # 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.
930 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700931 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
932 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700933 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
934 { # Specification determining how headers are added to requests or responses.
935 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
936 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
937 &quot;replace&quot;: 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.
938 # The default value is false.
939 },
940 ],
941 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
942 &quot;A String&quot;,
943 ],
944 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
945 { # Specification determining how headers are added to requests or responses.
946 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
947 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
948 &quot;replace&quot;: 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.
949 # The default value is false.
950 },
951 ],
952 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
953 &quot;A String&quot;,
954 ],
955 },
956 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
957 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
958 # The value must be between 0 and 1000
959 },
960 ],
961 },
962 &quot;service&quot;: &quot;A String&quot;, # 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.
963 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
964 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
965 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700966 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700967 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
968 # The value must be between 1 and 255 characters.
969 &quot;httpsRedirect&quot;: 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.
970 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
971 # The default is set to false.
972 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
973 # 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.
974 # The value must be between 1 and 1024 characters.
975 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
976 # 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.
977 # The value must be between 1 and 1024 characters.
978 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
979 # Supported values are:
980 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
981 # - FOUND, which corresponds to 302.
982 # - SEE_OTHER which corresponds to 303.
983 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
984 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
985 &quot;stripQuery&quot;: 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.
986 # The default is set to false.
987 },
988 },
989 ],
990 },
991 ],
992 &quot;region&quot;: &quot;A String&quot;, # [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.
993 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
994 &quot;tests&quot;: [ # 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700995 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700996 { # Message for the expected URL mappings.
997 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700998 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL. If headers contains a host header, then host must also match the header value.
Bu Sun Kim65020912020-05-20 12:08:20 -0700999 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001000 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
1001 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07001002 },
1003 ],
1004 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001005 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001006 &quot;warning&quot;: { # Informational warning which replaces the list of backend services when the list is empty.
1007 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1008 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1009 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001010 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001011 &quot;key&quot;: &quot;A String&quot;, # [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).
1012 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001013 },
1014 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001015 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001016 },
1017 },
1018 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001019 &quot;kind&quot;: &quot;compute#urlMapsAggregatedList&quot;, # Type of resource.
1020 &quot;nextPageToken&quot;: &quot;A String&quot;, # [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.
1021 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001022 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
1023 &quot;A String&quot;,
1024 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001025 &quot;warning&quot;: { # [Output Only] Informational warning message.
1026 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1027 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1028 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001029 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001030 &quot;key&quot;: &quot;A String&quot;, # [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).
1031 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001032 },
1033 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001034 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001035 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001036 }</pre>
1037</div>
1038
1039<div class="method">
1040 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
1041 <pre>Retrieves the next page of results.
1042
1043Args:
1044 previous_request: The request for the previous page. (required)
1045 previous_response: The response from the request for the previous page. (required)
1046
1047Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001048 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001049 page. Returns None if there are no more items in the collection.
1050 </pre>
1051</div>
1052
1053<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001054 <code class="details" id="close">close()</code>
1055 <pre>Close httplib2 connections.</pre>
1056</div>
1057
1058<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001059 <code class="details" id="delete">delete(project, urlMap, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001060 <pre>Deletes the specified UrlMap resource.
1061
1062Args:
1063 project: string, Project ID for this request. (required)
1064 urlMap: string, Name of the UrlMap resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001065 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.
1066
1067For 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.
1068
1069The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001070
1071Returns:
1072 An object of the form:
1073
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001074 { # Represents an Operation resource.
1075 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001076 # Google Compute Engine has three Operation resources:
1077 #
1078 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1079 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001080 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1081 #
1082 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001083 # - For global operations, use the `globalOperations` resource.
1084 # - For regional operations, use the `regionOperations` resource.
1085 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001086 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001087 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001088 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1089 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1090 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1091 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1092 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1093 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001094 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001095 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1096 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1097 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001098 },
1099 ],
1100 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001101 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1102 &quot;httpErrorStatusCode&quot;: 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.
1103 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1104 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1105 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1106 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1107 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1108 &quot;progress&quot;: 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.
1109 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1110 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1111 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1112 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1113 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1114 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1115 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
1116 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1117 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1118 {
1119 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1120 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1121 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1122 {
1123 &quot;key&quot;: &quot;A String&quot;, # [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).
1124 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1125 },
1126 ],
1127 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1128 },
1129 ],
1130 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001131 }</pre>
1132</div>
1133
1134<div class="method">
1135 <code class="details" id="get">get(project, urlMap)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001136 <pre>Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001137
1138Args:
1139 project: string, Project ID for this request. (required)
1140 urlMap: string, Name of the UrlMap resource to return. (required)
1141
1142Returns:
1143 An object of the form:
1144
Dan O'Mearadd494642020-05-01 07:42:23 -07001145 { # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001146 #
1147 # Google Compute Engine has two URL Map resources:
1148 #
1149 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
1150 #
1151 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
1152 #
1153 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
1154 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001155 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
1156 #
1157 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
1158 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001159 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
1160 #
1161 # 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.
1162 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1163 &quot;defaultRouteAction&quot;: { # 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.
1164 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001165 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001166 # defaultRouteAction has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001167 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001168 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001169 &quot;allowCredentials&quot;: 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.
1170 # Default is false.
1171 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
1172 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001173 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001174 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
1175 &quot;A String&quot;,
1176 ],
1177 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1178 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1179 &quot;A String&quot;,
1180 ],
1181 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
1182 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1183 &quot;A String&quot;,
1184 ],
1185 &quot;disabled&quot;: 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.
1186 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
1187 &quot;A String&quot;,
1188 ],
1189 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
1190 },
1191 &quot;faultInjectionPolicy&quot;: { # 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.
1192 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001193 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001194 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
1195 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
1196 # The value must be between 200 and 599 inclusive.
1197 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1198 # The value must be between 0.0 and 100.0 inclusive.
1199 },
1200 &quot;delay&quot;: { # 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.
1201 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
1202 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
1203 &quot;seconds&quot;: &quot;A String&quot;, # 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
1204 },
1205 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1206 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001207 },
1208 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001209 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001210 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001211 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
1212 },
1213 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001214 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001215 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1216 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
1217 # 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.
1218 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
1219 &quot;seconds&quot;: &quot;A String&quot;, # 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
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001220 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001221 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1222 # - 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.
1223 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1224 # -
1225 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1226 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1227 # - 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.
1228 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1229 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1230 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1231 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1232 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001233 ],
1234 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001235 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
1236 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001237 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001238 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
1239 &quot;seconds&quot;: &quot;A String&quot;, # 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
1240 },
1241 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001242 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001243 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001244 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001245 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001246 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
1247 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001248 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001249 &quot;weightedBackendServices&quot;: [ # 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-zero number.
1250 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07001251 { # 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
1252 &quot;backendService&quot;: &quot;A String&quot;, # 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.
1253 &quot;headerAction&quot;: { # 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.
1254 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001255 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1256 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001257 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1258 { # Specification determining how headers are added to requests or responses.
1259 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1260 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1261 &quot;replace&quot;: 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.
1262 # The default value is false.
1263 },
1264 ],
1265 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1266 &quot;A String&quot;,
1267 ],
1268 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1269 { # Specification determining how headers are added to requests or responses.
1270 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1271 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1272 &quot;replace&quot;: 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.
1273 # The default value is false.
1274 },
1275 ],
1276 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
1277 &quot;A String&quot;,
1278 ],
1279 },
1280 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1281 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
1282 # The value must be between 0 and 1000
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001283 },
1284 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001285 },
1286 &quot;defaultService&quot;: &quot;A String&quot;, # 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.
1287 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001288 # defaultService has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001289 &quot;defaultUrlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
1290 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001291 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001292 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
1293 # The value must be between 1 and 255 characters.
1294 &quot;httpsRedirect&quot;: 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.
1295 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1296 # The default is set to false.
1297 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
1298 # 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.
1299 # The value must be between 1 and 1024 characters.
1300 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
1301 # 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.
1302 # The value must be between 1 and 1024 characters.
1303 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
1304 # Supported values are:
1305 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1306 # - FOUND, which corresponds to 302.
1307 # - SEE_OTHER which corresponds to 303.
1308 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1309 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1310 &quot;stripQuery&quot;: 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.
1311 # The default is set to false.
1312 },
1313 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1314 &quot;fingerprint&quot;: &quot;A String&quot;, # 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.
1315 #
1316 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
1317 &quot;headerAction&quot;: { # 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.
1318 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001319 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1320 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001321 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1322 { # Specification determining how headers are added to requests or responses.
1323 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1324 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1325 &quot;replace&quot;: 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.
1326 # The default value is false.
1327 },
1328 ],
1329 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1330 &quot;A String&quot;,
1331 ],
1332 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1333 { # Specification determining how headers are added to requests or responses.
1334 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1335 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1336 &quot;replace&quot;: 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.
1337 # The default value is false.
1338 },
1339 ],
1340 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
1341 &quot;A String&quot;,
1342 ],
1343 },
1344 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
1345 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
1346 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1347 &quot;hosts&quot;: [ # 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 ..
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001348 # * based matching is not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001349 &quot;A String&quot;,
1350 ],
1351 &quot;pathMatcher&quot;: &quot;A String&quot;, # The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL&#x27;s host portion.
1352 },
1353 ],
1354 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1355 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
1356 &quot;name&quot;: &quot;A String&quot;, # 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.
1357 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
1358 { # 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.
1359 &quot;defaultRouteAction&quot;: { # 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.
1360 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001361 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathMatcher&#x27;s defaultRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07001362 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001363 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001364 &quot;allowCredentials&quot;: 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.
1365 # Default is false.
1366 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
1367 &quot;A String&quot;,
1368 ],
1369 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
1370 &quot;A String&quot;,
1371 ],
1372 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1373 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1374 &quot;A String&quot;,
1375 ],
1376 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
1377 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1378 &quot;A String&quot;,
1379 ],
1380 &quot;disabled&quot;: 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.
1381 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
1382 &quot;A String&quot;,
1383 ],
1384 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
1385 },
1386 &quot;faultInjectionPolicy&quot;: { # 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.
1387 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001388 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001389 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
1390 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
1391 # The value must be between 200 and 599 inclusive.
1392 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1393 # The value must be between 0.0 and 100.0 inclusive.
1394 },
1395 &quot;delay&quot;: { # 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.
1396 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
1397 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
1398 &quot;seconds&quot;: &quot;A String&quot;, # 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
1399 },
1400 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1401 # The value must be between 0.0 and 100.0 inclusive.
1402 },
1403 },
1404 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001405 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001406 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
1407 },
1408 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001409 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001410 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1411 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
1412 # 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.
1413 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
1414 &quot;seconds&quot;: &quot;A String&quot;, # 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
1415 },
1416 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1417 # - 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.
1418 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1419 # -
1420 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1421 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1422 # - 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.
1423 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1424 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1425 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1426 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1427 &quot;A String&quot;,
1428 ],
1429 },
1430 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
1431 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001432 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001433 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
1434 &quot;seconds&quot;: &quot;A String&quot;, # 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
1435 },
1436 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001437 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001438 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001439 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
1440 # The value must be between 1 and 255 characters.
1441 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
1442 # The value must be between 1 and 1024 characters.
1443 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001444 &quot;weightedBackendServices&quot;: [ # 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-zero number.
1445 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07001446 { # 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
1447 &quot;backendService&quot;: &quot;A String&quot;, # 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.
1448 &quot;headerAction&quot;: { # 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.
1449 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001450 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1451 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001452 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1453 { # Specification determining how headers are added to requests or responses.
1454 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1455 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1456 &quot;replace&quot;: 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.
1457 # The default value is false.
1458 },
1459 ],
1460 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1461 &quot;A String&quot;,
1462 ],
1463 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1464 { # Specification determining how headers are added to requests or responses.
1465 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1466 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1467 &quot;replace&quot;: 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.
1468 # The default value is false.
1469 },
1470 ],
1471 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
1472 &quot;A String&quot;,
1473 ],
1474 },
1475 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1476 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
1477 # The value must be between 0 and 1000
1478 },
1479 ],
1480 },
1481 &quot;defaultService&quot;: &quot;A String&quot;, # 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:
1482 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
1483 # - compute/v1/projects/project/global/backendServices/backendService
1484 # - 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.
1485 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
1486 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
1487 # - compute.backendBuckets.use
1488 # - compute.backendServices.use
1489 &quot;defaultUrlRedirect&quot;: { # 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.
1490 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001491 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001492 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
1493 # The value must be between 1 and 255 characters.
1494 &quot;httpsRedirect&quot;: 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.
1495 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1496 # The default is set to false.
1497 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
1498 # 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.
1499 # The value must be between 1 and 1024 characters.
1500 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
1501 # 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.
1502 # The value must be between 1 and 1024 characters.
1503 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
1504 # Supported values are:
1505 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1506 # - FOUND, which corresponds to 302.
1507 # - SEE_OTHER which corresponds to 303.
1508 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1509 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1510 &quot;stripQuery&quot;: 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.
1511 # The default is set to false.
1512 },
1513 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1514 &quot;headerAction&quot;: { # 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.
1515 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001516 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1517 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001518 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1519 { # Specification determining how headers are added to requests or responses.
1520 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1521 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1522 &quot;replace&quot;: 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.
1523 # The default value is false.
1524 },
1525 ],
1526 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1527 &quot;A String&quot;,
1528 ],
1529 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1530 { # Specification determining how headers are added to requests or responses.
1531 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1532 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1533 &quot;replace&quot;: 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.
1534 # The default value is false.
1535 },
1536 ],
1537 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
1538 &quot;A String&quot;,
1539 ],
1540 },
1541 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
1542 &quot;pathRules&quot;: [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that&#x27;s required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.
1543 # 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.
1544 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
1545 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
1546 &quot;paths&quot;: [ # 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.
1547 &quot;A String&quot;,
1548 ],
1549 &quot;routeAction&quot;: { # 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.
1550 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001551 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07001552 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001553 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001554 &quot;allowCredentials&quot;: 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.
1555 # Default is false.
1556 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
1557 &quot;A String&quot;,
1558 ],
1559 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
1560 &quot;A String&quot;,
1561 ],
1562 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1563 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1564 &quot;A String&quot;,
1565 ],
1566 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
1567 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1568 &quot;A String&quot;,
1569 ],
1570 &quot;disabled&quot;: 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.
1571 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
1572 &quot;A String&quot;,
1573 ],
1574 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
1575 },
1576 &quot;faultInjectionPolicy&quot;: { # 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.
1577 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001578 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001579 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
1580 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
1581 # The value must be between 200 and 599 inclusive.
1582 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1583 # The value must be between 0.0 and 100.0 inclusive.
1584 },
1585 &quot;delay&quot;: { # 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.
1586 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
1587 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
1588 &quot;seconds&quot;: &quot;A String&quot;, # 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
1589 },
1590 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1591 # The value must be between 0.0 and 100.0 inclusive.
1592 },
1593 },
1594 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001595 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001596 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
1597 },
1598 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001599 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001600 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1601 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
1602 # 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.
1603 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
1604 &quot;seconds&quot;: &quot;A String&quot;, # 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
1605 },
1606 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1607 # - 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.
1608 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1609 # -
1610 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1611 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1612 # - 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.
1613 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1614 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1615 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1616 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1617 &quot;A String&quot;,
1618 ],
1619 },
1620 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
1621 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001622 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001623 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
1624 &quot;seconds&quot;: &quot;A String&quot;, # 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
1625 },
1626 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001627 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001628 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001629 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
1630 # The value must be between 1 and 255 characters.
1631 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
1632 # The value must be between 1 and 1024 characters.
1633 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001634 &quot;weightedBackendServices&quot;: [ # 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-zero number.
1635 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07001636 { # 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
1637 &quot;backendService&quot;: &quot;A String&quot;, # 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.
1638 &quot;headerAction&quot;: { # 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.
1639 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001640 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1641 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001642 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1643 { # Specification determining how headers are added to requests or responses.
1644 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1645 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1646 &quot;replace&quot;: 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.
1647 # The default value is false.
1648 },
1649 ],
1650 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1651 &quot;A String&quot;,
1652 ],
1653 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1654 { # Specification determining how headers are added to requests or responses.
1655 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1656 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1657 &quot;replace&quot;: 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.
1658 # The default value is false.
1659 },
1660 ],
1661 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
1662 &quot;A String&quot;,
1663 ],
1664 },
1665 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1666 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
1667 # The value must be between 0 and 1000
1668 },
1669 ],
1670 },
1671 &quot;service&quot;: &quot;A String&quot;, # 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.
1672 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1673 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
1674 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001675 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001676 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
1677 # The value must be between 1 and 255 characters.
1678 &quot;httpsRedirect&quot;: 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.
1679 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1680 # The default is set to false.
1681 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
1682 # 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.
1683 # The value must be between 1 and 1024 characters.
1684 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
1685 # 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.
1686 # The value must be between 1 and 1024 characters.
1687 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
1688 # Supported values are:
1689 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1690 # - FOUND, which corresponds to 302.
1691 # - SEE_OTHER which corresponds to 303.
1692 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1693 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1694 &quot;stripQuery&quot;: 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.
1695 # The default is set to false.
1696 },
1697 },
1698 ],
1699 &quot;routeRules&quot;: [ # 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.
1700 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
1701 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
1702 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
1703 # The description can have a maximum length of 1024 characters.
1704 &quot;headerAction&quot;: { # 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.
1705 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001706 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1707 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001708 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1709 { # Specification determining how headers are added to requests or responses.
1710 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1711 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1712 &quot;replace&quot;: 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.
1713 # The default value is false.
1714 },
1715 ],
1716 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1717 &quot;A String&quot;,
1718 ],
1719 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1720 { # Specification determining how headers are added to requests or responses.
1721 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1722 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1723 &quot;replace&quot;: 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.
1724 # The default value is false.
1725 },
1726 ],
1727 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
1728 &quot;A String&quot;,
1729 ],
1730 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001731 &quot;httpFilterConfigs&quot;: [ # Outbound route specific configuration for networkservices.HttpFilter resources enabled by Traffic Director. httpFilterConfigs only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
1732 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
1733 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
1734 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
1735 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
1736 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
1737 },
1738 ],
1739 &quot;httpFilterMetadata&quot;: [ # Outbound route specific metadata supplied to networkservices.HttpFilter resources enabled by Traffic Director. httpFilterMetadata only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
1740 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
1741 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
1742 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
1743 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
1744 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
1745 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
1746 },
1747 ],
1748 &quot;matchRules&quot;: [ # The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
Bu Sun Kim65020912020-05-20 12:08:20 -07001749 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
1750 &quot;fullPathMatch&quot;: &quot;A String&quot;, # 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.
1751 # fullPathMatch must be between 1 and 1024 characters.
1752 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
1753 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
1754 { # matchRule criteria for request header matches.
1755 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
1756 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1757 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
1758 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
1759 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001760 # When the URL map is bound to target gRPC proxy that has validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin.
Bu Sun Kim65020912020-05-20 12:08:20 -07001761 &quot;invertMatch&quot;: 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.
1762 # The default setting is false.
1763 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
1764 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1765 &quot;presentMatch&quot;: True or False, # A header with the contents of headerName must exist. The match takes place whether or not the request&#x27;s header has a value.
1766 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1767 &quot;rangeMatch&quot;: { # 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.
1768 # For example for a range [-5, 0]
1769 # - -3 will match.
1770 # - 0 will not match.
1771 # - 0.25 will not match.
1772 # - -3someString will not match.
1773 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1774 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1775 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
1776 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
1777 },
1778 &quot;regexMatch&quot;: &quot;A String&quot;, # 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
1779 # 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&#x27;s port specifier.
1780 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1781 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
1782 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
1783 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1784 },
1785 ],
1786 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
1787 # The default value is false.
1788 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001789 # Not supported when the URL map is bound to target gRPC proxy.
1790 &quot;metadataFilters&quot;: [ # 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. When there is a match, the relevant routing configuration is made available to those proxies.
1791 # 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. If multiple metadataFilters are specified, all of them need to be satisfied in order to be considered a match.
Bu Sun Kim65020912020-05-20 12:08:20 -07001792 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
1793 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001794 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001795 { # 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.
1796 # 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.
1797 # 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=&quot;https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/base.proto#envoy-api-msg-core-node&quot; Node metadata of their XDS requests to loadbalancers.
1798 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
1799 # This list must not be empty and can have at the most 64 entries.
1800 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
1801 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
1802 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
1803 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
1804 # value can have a maximum length of 1024 characters.
1805 },
1806 ],
1807 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
1808 # Supported values are:
1809 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
1810 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
1811 },
1812 ],
1813 &quot;prefixMatch&quot;: &quot;A String&quot;, # For satisfying the matchRule condition, the request&#x27;s path must begin with the specified prefixMatch. prefixMatch must begin with a /.
1814 # The value must be between 1 and 1024 characters.
1815 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
1816 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001817 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001818 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
1819 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
1820 # Only one of presentMatch, exactMatch or regexMatch must be set.
1821 &quot;name&quot;: &quot;A String&quot;, # 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.
1822 &quot;presentMatch&quot;: 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.
1823 # Only one of presentMatch, exactMatch or regexMatch must be set.
1824 &quot;regexMatch&quot;: &quot;A String&quot;, # 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
1825 # Only one of presentMatch, exactMatch or regexMatch must be set.
1826 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
1827 },
1828 ],
1829 &quot;regexMatch&quot;: &quot;A String&quot;, # 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
1830 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
1831 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
1832 },
1833 ],
1834 &quot;priority&quot;: 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.
1835 # 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.
1836 # 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.
1837 &quot;routeAction&quot;: { # 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.
1838 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001839 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a routeRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07001840 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001841 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001842 &quot;allowCredentials&quot;: 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.
1843 # Default is false.
1844 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
1845 &quot;A String&quot;,
1846 ],
1847 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
1848 &quot;A String&quot;,
1849 ],
1850 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1851 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1852 &quot;A String&quot;,
1853 ],
1854 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
1855 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1856 &quot;A String&quot;,
1857 ],
1858 &quot;disabled&quot;: 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.
1859 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
1860 &quot;A String&quot;,
1861 ],
1862 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
1863 },
1864 &quot;faultInjectionPolicy&quot;: { # 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.
1865 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001866 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001867 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
1868 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
1869 # The value must be between 200 and 599 inclusive.
1870 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1871 # The value must be between 0.0 and 100.0 inclusive.
1872 },
1873 &quot;delay&quot;: { # 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.
1874 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
1875 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
1876 &quot;seconds&quot;: &quot;A String&quot;, # 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
1877 },
1878 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1879 # The value must be between 0.0 and 100.0 inclusive.
1880 },
1881 },
1882 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001883 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001884 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
1885 },
1886 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001887 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001888 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1889 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
1890 # 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.
1891 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
1892 &quot;seconds&quot;: &quot;A String&quot;, # 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
1893 },
1894 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1895 # - 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.
1896 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1897 # -
1898 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1899 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1900 # - 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.
1901 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1902 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1903 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1904 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1905 &quot;A String&quot;,
1906 ],
1907 },
1908 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
1909 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001910 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001911 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
1912 &quot;seconds&quot;: &quot;A String&quot;, # 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
1913 },
1914 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001915 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001916 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001917 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
1918 # The value must be between 1 and 255 characters.
1919 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
1920 # The value must be between 1 and 1024 characters.
1921 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001922 &quot;weightedBackendServices&quot;: [ # 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-zero number.
1923 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07001924 { # 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
1925 &quot;backendService&quot;: &quot;A String&quot;, # 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.
1926 &quot;headerAction&quot;: { # 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.
1927 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001928 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1929 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001930 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1931 { # Specification determining how headers are added to requests or responses.
1932 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1933 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1934 &quot;replace&quot;: 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.
1935 # The default value is false.
1936 },
1937 ],
1938 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1939 &quot;A String&quot;,
1940 ],
1941 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1942 { # Specification determining how headers are added to requests or responses.
1943 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1944 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1945 &quot;replace&quot;: 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.
1946 # The default value is false.
1947 },
1948 ],
1949 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
1950 &quot;A String&quot;,
1951 ],
1952 },
1953 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1954 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
1955 # The value must be between 0 and 1000
1956 },
1957 ],
1958 },
1959 &quot;service&quot;: &quot;A String&quot;, # 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.
1960 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1961 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
1962 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001963 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001964 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
1965 # The value must be between 1 and 255 characters.
1966 &quot;httpsRedirect&quot;: 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.
1967 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1968 # The default is set to false.
1969 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
1970 # 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.
1971 # The value must be between 1 and 1024 characters.
1972 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
1973 # 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.
1974 # The value must be between 1 and 1024 characters.
1975 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
1976 # Supported values are:
1977 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1978 # - FOUND, which corresponds to 302.
1979 # - SEE_OTHER which corresponds to 303.
1980 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1981 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1982 &quot;stripQuery&quot;: 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.
1983 # The default is set to false.
1984 },
1985 },
1986 ],
1987 },
1988 ],
1989 &quot;region&quot;: &quot;A String&quot;, # [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.
1990 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1991 &quot;tests&quot;: [ # 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001992 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001993 { # Message for the expected URL mappings.
1994 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001995 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL. If headers contains a host header, then host must also match the header value.
Bu Sun Kim65020912020-05-20 12:08:20 -07001996 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001997 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
1998 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07001999 },
2000 ],
2001 }</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002002</div>
2003
2004<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002005 <code class="details" id="insert">insert(project, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002006 <pre>Creates a UrlMap resource in the specified project using the data included in the request.
2007
2008Args:
2009 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002010 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002011 The object takes the form of:
2012
Dan O'Mearadd494642020-05-01 07:42:23 -07002013{ # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002014 #
2015 # Google Compute Engine has two URL Map resources:
2016 #
2017 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
2018 #
2019 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
2020 #
2021 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
2022 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002023 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
2024 #
2025 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
2026 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002027 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
2028 #
2029 # 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.
2030 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2031 &quot;defaultRouteAction&quot;: { # 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.
2032 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002033 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002034 # defaultRouteAction has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002035 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002036 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002037 &quot;allowCredentials&quot;: 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.
2038 # Default is false.
2039 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2040 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002041 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002042 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2043 &quot;A String&quot;,
2044 ],
2045 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2046 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2047 &quot;A String&quot;,
2048 ],
2049 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2050 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2051 &quot;A String&quot;,
2052 ],
2053 &quot;disabled&quot;: 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.
2054 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2055 &quot;A String&quot;,
2056 ],
2057 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
2058 },
2059 &quot;faultInjectionPolicy&quot;: { # 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.
2060 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002061 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002062 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
2063 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2064 # The value must be between 200 and 599 inclusive.
2065 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2066 # The value must be between 0.0 and 100.0 inclusive.
2067 },
2068 &quot;delay&quot;: { # 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.
2069 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
2070 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
2071 &quot;seconds&quot;: &quot;A String&quot;, # 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
2072 },
2073 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2074 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002075 },
2076 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002077 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002078 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002079 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2080 },
2081 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002082 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002083 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2084 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
2085 # 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.
2086 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
2087 &quot;seconds&quot;: &quot;A String&quot;, # 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
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002088 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002089 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2090 # - 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.
2091 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2092 # -
2093 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2094 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2095 # - 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.
2096 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2097 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2098 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2099 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2100 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002101 ],
2102 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002103 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
2104 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002105 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002106 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
2107 &quot;seconds&quot;: &quot;A String&quot;, # 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
2108 },
2109 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002110 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002111 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002112 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002113 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07002114 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
2115 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002116 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002117 &quot;weightedBackendServices&quot;: [ # 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-zero number.
2118 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07002119 { # 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
2120 &quot;backendService&quot;: &quot;A String&quot;, # 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.
2121 &quot;headerAction&quot;: { # 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.
2122 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002123 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2124 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002125 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2126 { # Specification determining how headers are added to requests or responses.
2127 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2128 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2129 &quot;replace&quot;: 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.
2130 # The default value is false.
2131 },
2132 ],
2133 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2134 &quot;A String&quot;,
2135 ],
2136 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2137 { # Specification determining how headers are added to requests or responses.
2138 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2139 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2140 &quot;replace&quot;: 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.
2141 # The default value is false.
2142 },
2143 ],
2144 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
2145 &quot;A String&quot;,
2146 ],
2147 },
2148 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2149 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
2150 # The value must be between 0 and 1000
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002151 },
2152 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002153 },
2154 &quot;defaultService&quot;: &quot;A String&quot;, # 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.
2155 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002156 # defaultService has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002157 &quot;defaultUrlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
2158 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002159 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002160 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
2161 # The value must be between 1 and 255 characters.
2162 &quot;httpsRedirect&quot;: 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.
2163 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2164 # The default is set to false.
2165 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
2166 # 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.
2167 # The value must be between 1 and 1024 characters.
2168 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
2169 # 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.
2170 # The value must be between 1 and 1024 characters.
2171 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2172 # Supported values are:
2173 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2174 # - FOUND, which corresponds to 302.
2175 # - SEE_OTHER which corresponds to 303.
2176 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2177 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2178 &quot;stripQuery&quot;: 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.
2179 # The default is set to false.
2180 },
2181 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2182 &quot;fingerprint&quot;: &quot;A String&quot;, # 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.
2183 #
2184 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
2185 &quot;headerAction&quot;: { # 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.
2186 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002187 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2188 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002189 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2190 { # Specification determining how headers are added to requests or responses.
2191 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2192 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2193 &quot;replace&quot;: 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.
2194 # The default value is false.
2195 },
2196 ],
2197 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2198 &quot;A String&quot;,
2199 ],
2200 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2201 { # Specification determining how headers are added to requests or responses.
2202 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2203 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2204 &quot;replace&quot;: 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.
2205 # The default value is false.
2206 },
2207 ],
2208 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
2209 &quot;A String&quot;,
2210 ],
2211 },
2212 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
2213 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
2214 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2215 &quot;hosts&quot;: [ # 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 ..
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002216 # * based matching is not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002217 &quot;A String&quot;,
2218 ],
2219 &quot;pathMatcher&quot;: &quot;A String&quot;, # The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL&#x27;s host portion.
2220 },
2221 ],
2222 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2223 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
2224 &quot;name&quot;: &quot;A String&quot;, # 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.
2225 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
2226 { # 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.
2227 &quot;defaultRouteAction&quot;: { # 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.
2228 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002229 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathMatcher&#x27;s defaultRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07002230 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002231 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002232 &quot;allowCredentials&quot;: 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.
2233 # Default is false.
2234 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2235 &quot;A String&quot;,
2236 ],
2237 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2238 &quot;A String&quot;,
2239 ],
2240 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2241 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2242 &quot;A String&quot;,
2243 ],
2244 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2245 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2246 &quot;A String&quot;,
2247 ],
2248 &quot;disabled&quot;: 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.
2249 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2250 &quot;A String&quot;,
2251 ],
2252 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
2253 },
2254 &quot;faultInjectionPolicy&quot;: { # 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.
2255 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002256 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002257 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
2258 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2259 # The value must be between 200 and 599 inclusive.
2260 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2261 # The value must be between 0.0 and 100.0 inclusive.
2262 },
2263 &quot;delay&quot;: { # 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.
2264 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
2265 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
2266 &quot;seconds&quot;: &quot;A String&quot;, # 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
2267 },
2268 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2269 # The value must be between 0.0 and 100.0 inclusive.
2270 },
2271 },
2272 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002273 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002274 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2275 },
2276 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002277 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002278 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2279 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
2280 # 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.
2281 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
2282 &quot;seconds&quot;: &quot;A String&quot;, # 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
2283 },
2284 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2285 # - 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.
2286 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2287 # -
2288 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2289 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2290 # - 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.
2291 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2292 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2293 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2294 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2295 &quot;A String&quot;,
2296 ],
2297 },
2298 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
2299 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002300 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002301 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
2302 &quot;seconds&quot;: &quot;A String&quot;, # 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
2303 },
2304 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002305 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002306 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002307 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
2308 # The value must be between 1 and 255 characters.
2309 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
2310 # The value must be between 1 and 1024 characters.
2311 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002312 &quot;weightedBackendServices&quot;: [ # 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-zero number.
2313 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07002314 { # 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
2315 &quot;backendService&quot;: &quot;A String&quot;, # 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.
2316 &quot;headerAction&quot;: { # 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.
2317 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002318 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2319 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002320 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2321 { # Specification determining how headers are added to requests or responses.
2322 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2323 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2324 &quot;replace&quot;: 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.
2325 # The default value is false.
2326 },
2327 ],
2328 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2329 &quot;A String&quot;,
2330 ],
2331 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2332 { # Specification determining how headers are added to requests or responses.
2333 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2334 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2335 &quot;replace&quot;: 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.
2336 # The default value is false.
2337 },
2338 ],
2339 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
2340 &quot;A String&quot;,
2341 ],
2342 },
2343 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2344 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
2345 # The value must be between 0 and 1000
2346 },
2347 ],
2348 },
2349 &quot;defaultService&quot;: &quot;A String&quot;, # 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:
2350 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
2351 # - compute/v1/projects/project/global/backendServices/backendService
2352 # - 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.
2353 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
2354 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
2355 # - compute.backendBuckets.use
2356 # - compute.backendServices.use
2357 &quot;defaultUrlRedirect&quot;: { # 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.
2358 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002359 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002360 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
2361 # The value must be between 1 and 255 characters.
2362 &quot;httpsRedirect&quot;: 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.
2363 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2364 # The default is set to false.
2365 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
2366 # 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.
2367 # The value must be between 1 and 1024 characters.
2368 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
2369 # 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.
2370 # The value must be between 1 and 1024 characters.
2371 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # 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 &quot;stripQuery&quot;: 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.
2379 # The default is set to false.
2380 },
2381 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2382 &quot;headerAction&quot;: { # 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.
2383 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002384 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2385 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002386 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2387 { # Specification determining how headers are added to requests or responses.
2388 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2389 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2390 &quot;replace&quot;: 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.
2391 # The default value is false.
2392 },
2393 ],
2394 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2395 &quot;A String&quot;,
2396 ],
2397 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2398 { # Specification determining how headers are added to requests or responses.
2399 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2400 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2401 &quot;replace&quot;: 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.
2402 # The default value is false.
2403 },
2404 ],
2405 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
2406 &quot;A String&quot;,
2407 ],
2408 },
2409 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
2410 &quot;pathRules&quot;: [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that&#x27;s required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.
2411 # 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.
2412 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
2413 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
2414 &quot;paths&quot;: [ # 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.
2415 &quot;A String&quot;,
2416 ],
2417 &quot;routeAction&quot;: { # 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.
2418 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002419 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07002420 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002421 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002422 &quot;allowCredentials&quot;: 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.
2423 # Default is false.
2424 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2425 &quot;A String&quot;,
2426 ],
2427 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2428 &quot;A String&quot;,
2429 ],
2430 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2431 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2432 &quot;A String&quot;,
2433 ],
2434 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2435 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2436 &quot;A String&quot;,
2437 ],
2438 &quot;disabled&quot;: 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.
2439 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2440 &quot;A String&quot;,
2441 ],
2442 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
2443 },
2444 &quot;faultInjectionPolicy&quot;: { # 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.
2445 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002446 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002447 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
2448 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2449 # The value must be between 200 and 599 inclusive.
2450 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2451 # The value must be between 0.0 and 100.0 inclusive.
2452 },
2453 &quot;delay&quot;: { # 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.
2454 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
2455 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
2456 &quot;seconds&quot;: &quot;A String&quot;, # 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
2457 },
2458 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2459 # The value must be between 0.0 and 100.0 inclusive.
2460 },
2461 },
2462 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002463 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002464 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2465 },
2466 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002467 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002468 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2469 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
2470 # 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.
2471 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
2472 &quot;seconds&quot;: &quot;A String&quot;, # 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
2473 },
2474 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2475 # - 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.
2476 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2477 # -
2478 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2479 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2480 # - 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.
2481 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2482 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2483 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2484 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2485 &quot;A String&quot;,
2486 ],
2487 },
2488 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
2489 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002490 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002491 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
2492 &quot;seconds&quot;: &quot;A String&quot;, # 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
2493 },
2494 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002495 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002496 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002497 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
2498 # The value must be between 1 and 255 characters.
2499 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
2500 # The value must be between 1 and 1024 characters.
2501 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002502 &quot;weightedBackendServices&quot;: [ # 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-zero number.
2503 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07002504 { # 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
2505 &quot;backendService&quot;: &quot;A String&quot;, # 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.
2506 &quot;headerAction&quot;: { # 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.
2507 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002508 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2509 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002510 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2511 { # Specification determining how headers are added to requests or responses.
2512 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2513 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2514 &quot;replace&quot;: 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.
2515 # The default value is false.
2516 },
2517 ],
2518 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2519 &quot;A String&quot;,
2520 ],
2521 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2522 { # Specification determining how headers are added to requests or responses.
2523 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2524 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2525 &quot;replace&quot;: 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.
2526 # The default value is false.
2527 },
2528 ],
2529 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
2530 &quot;A String&quot;,
2531 ],
2532 },
2533 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2534 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
2535 # The value must be between 0 and 1000
2536 },
2537 ],
2538 },
2539 &quot;service&quot;: &quot;A String&quot;, # 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.
2540 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2541 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
2542 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002543 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002544 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
2545 # The value must be between 1 and 255 characters.
2546 &quot;httpsRedirect&quot;: 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.
2547 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2548 # The default is set to false.
2549 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
2550 # 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.
2551 # The value must be between 1 and 1024 characters.
2552 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
2553 # 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.
2554 # The value must be between 1 and 1024 characters.
2555 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2556 # Supported values are:
2557 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2558 # - FOUND, which corresponds to 302.
2559 # - SEE_OTHER which corresponds to 303.
2560 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2561 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2562 &quot;stripQuery&quot;: 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.
2563 # The default is set to false.
2564 },
2565 },
2566 ],
2567 &quot;routeRules&quot;: [ # 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.
2568 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
2569 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
2570 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
2571 # The description can have a maximum length of 1024 characters.
2572 &quot;headerAction&quot;: { # 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.
2573 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002574 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2575 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002576 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2577 { # Specification determining how headers are added to requests or responses.
2578 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2579 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2580 &quot;replace&quot;: 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.
2581 # The default value is false.
2582 },
2583 ],
2584 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2585 &quot;A String&quot;,
2586 ],
2587 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2588 { # Specification determining how headers are added to requests or responses.
2589 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2590 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2591 &quot;replace&quot;: 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.
2592 # The default value is false.
2593 },
2594 ],
2595 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
2596 &quot;A String&quot;,
2597 ],
2598 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002599 &quot;httpFilterConfigs&quot;: [ # Outbound route specific configuration for networkservices.HttpFilter resources enabled by Traffic Director. httpFilterConfigs only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
2600 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
2601 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
2602 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
2603 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
2604 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
2605 },
2606 ],
2607 &quot;httpFilterMetadata&quot;: [ # Outbound route specific metadata supplied to networkservices.HttpFilter resources enabled by Traffic Director. httpFilterMetadata only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
2608 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
2609 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
2610 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
2611 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
2612 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
2613 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
2614 },
2615 ],
2616 &quot;matchRules&quot;: [ # The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
Bu Sun Kim65020912020-05-20 12:08:20 -07002617 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
2618 &quot;fullPathMatch&quot;: &quot;A String&quot;, # 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.
2619 # fullPathMatch must be between 1 and 1024 characters.
2620 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2621 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
2622 { # matchRule criteria for request header matches.
2623 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
2624 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2625 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
2626 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
2627 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002628 # When the URL map is bound to target gRPC proxy that has validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin.
Bu Sun Kim65020912020-05-20 12:08:20 -07002629 &quot;invertMatch&quot;: 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.
2630 # The default setting is false.
2631 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
2632 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2633 &quot;presentMatch&quot;: True or False, # A header with the contents of headerName must exist. The match takes place whether or not the request&#x27;s header has a value.
2634 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2635 &quot;rangeMatch&quot;: { # 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.
2636 # For example for a range [-5, 0]
2637 # - -3 will match.
2638 # - 0 will not match.
2639 # - 0.25 will not match.
2640 # - -3someString will not match.
2641 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2642 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2643 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
2644 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
2645 },
2646 &quot;regexMatch&quot;: &quot;A String&quot;, # 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
2647 # 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&#x27;s port specifier.
2648 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2649 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
2650 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
2651 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2652 },
2653 ],
2654 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
2655 # The default value is false.
2656 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002657 # Not supported when the URL map is bound to target gRPC proxy.
2658 &quot;metadataFilters&quot;: [ # 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. When there is a match, the relevant routing configuration is made available to those proxies.
2659 # 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. If multiple metadataFilters are specified, all of them need to be satisfied in order to be considered a match.
Bu Sun Kim65020912020-05-20 12:08:20 -07002660 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
2661 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002662 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002663 { # 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.
2664 # 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.
2665 # 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=&quot;https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/base.proto#envoy-api-msg-core-node&quot; Node metadata of their XDS requests to loadbalancers.
2666 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
2667 # This list must not be empty and can have at the most 64 entries.
2668 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
2669 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
2670 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
2671 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
2672 # value can have a maximum length of 1024 characters.
2673 },
2674 ],
2675 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
2676 # Supported values are:
2677 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
2678 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
2679 },
2680 ],
2681 &quot;prefixMatch&quot;: &quot;A String&quot;, # For satisfying the matchRule condition, the request&#x27;s path must begin with the specified prefixMatch. prefixMatch must begin with a /.
2682 # The value must be between 1 and 1024 characters.
2683 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2684 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002685 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002686 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
2687 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
2688 # Only one of presentMatch, exactMatch or regexMatch must be set.
2689 &quot;name&quot;: &quot;A String&quot;, # 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.
2690 &quot;presentMatch&quot;: 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.
2691 # Only one of presentMatch, exactMatch or regexMatch must be set.
2692 &quot;regexMatch&quot;: &quot;A String&quot;, # 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
2693 # Only one of presentMatch, exactMatch or regexMatch must be set.
2694 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
2695 },
2696 ],
2697 &quot;regexMatch&quot;: &quot;A String&quot;, # 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
2698 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2699 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
2700 },
2701 ],
2702 &quot;priority&quot;: 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.
2703 # 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.
2704 # 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.
2705 &quot;routeAction&quot;: { # 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.
2706 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002707 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a routeRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07002708 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002709 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002710 &quot;allowCredentials&quot;: 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.
2711 # Default is false.
2712 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2713 &quot;A String&quot;,
2714 ],
2715 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2716 &quot;A String&quot;,
2717 ],
2718 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2719 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2720 &quot;A String&quot;,
2721 ],
2722 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2723 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2724 &quot;A String&quot;,
2725 ],
2726 &quot;disabled&quot;: 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.
2727 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2728 &quot;A String&quot;,
2729 ],
2730 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
2731 },
2732 &quot;faultInjectionPolicy&quot;: { # 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.
2733 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002734 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002735 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
2736 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2737 # The value must be between 200 and 599 inclusive.
2738 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2739 # The value must be between 0.0 and 100.0 inclusive.
2740 },
2741 &quot;delay&quot;: { # 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.
2742 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
2743 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
2744 &quot;seconds&quot;: &quot;A String&quot;, # 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
2745 },
2746 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2747 # The value must be between 0.0 and 100.0 inclusive.
2748 },
2749 },
2750 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002751 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002752 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2753 },
2754 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002755 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002756 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2757 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
2758 # 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.
2759 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
2760 &quot;seconds&quot;: &quot;A String&quot;, # 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
2761 },
2762 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2763 # - 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.
2764 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2765 # -
2766 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2767 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2768 # - 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.
2769 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2770 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2771 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2772 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2773 &quot;A String&quot;,
2774 ],
2775 },
2776 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
2777 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002778 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002779 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
2780 &quot;seconds&quot;: &quot;A String&quot;, # 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
2781 },
2782 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002783 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002784 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002785 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
2786 # The value must be between 1 and 255 characters.
2787 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
2788 # The value must be between 1 and 1024 characters.
2789 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002790 &quot;weightedBackendServices&quot;: [ # 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-zero number.
2791 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07002792 { # 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
2793 &quot;backendService&quot;: &quot;A String&quot;, # 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.
2794 &quot;headerAction&quot;: { # 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.
2795 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002796 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2797 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002798 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2799 { # Specification determining how headers are added to requests or responses.
2800 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2801 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2802 &quot;replace&quot;: 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.
2803 # The default value is false.
2804 },
2805 ],
2806 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2807 &quot;A String&quot;,
2808 ],
2809 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2810 { # Specification determining how headers are added to requests or responses.
2811 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2812 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2813 &quot;replace&quot;: 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.
2814 # The default value is false.
2815 },
2816 ],
2817 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
2818 &quot;A String&quot;,
2819 ],
2820 },
2821 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2822 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
2823 # The value must be between 0 and 1000
2824 },
2825 ],
2826 },
2827 &quot;service&quot;: &quot;A String&quot;, # 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.
2828 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2829 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
2830 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002831 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002832 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
2833 # The value must be between 1 and 255 characters.
2834 &quot;httpsRedirect&quot;: 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.
2835 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2836 # The default is set to false.
2837 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
2838 # 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.
2839 # The value must be between 1 and 1024 characters.
2840 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
2841 # 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.
2842 # The value must be between 1 and 1024 characters.
2843 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2844 # Supported values are:
2845 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2846 # - FOUND, which corresponds to 302.
2847 # - SEE_OTHER which corresponds to 303.
2848 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2849 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2850 &quot;stripQuery&quot;: 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.
2851 # The default is set to false.
2852 },
2853 },
2854 ],
2855 },
2856 ],
2857 &quot;region&quot;: &quot;A String&quot;, # [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.
2858 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2859 &quot;tests&quot;: [ # 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002860 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002861 { # Message for the expected URL mappings.
2862 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002863 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL. If headers contains a host header, then host must also match the header value.
Bu Sun Kim65020912020-05-20 12:08:20 -07002864 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002865 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
2866 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07002867 },
2868 ],
2869}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002870
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002871 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.
2872
2873For 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.
2874
2875The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002876
2877Returns:
2878 An object of the form:
2879
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002880 { # Represents an Operation resource.
2881 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002882 # Google Compute Engine has three Operation resources:
2883 #
2884 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2885 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002886 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2887 #
2888 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002889 # - For global operations, use the `globalOperations` resource.
2890 # - For regional operations, use the `regionOperations` resource.
2891 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002892 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002893 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002894 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2895 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2896 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2897 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2898 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2899 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002900 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002901 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2902 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2903 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002904 },
2905 ],
2906 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002907 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
2908 &quot;httpErrorStatusCode&quot;: 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.
2909 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2910 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2911 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2912 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2913 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2914 &quot;progress&quot;: 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.
2915 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2916 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2917 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2918 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
2919 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2920 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2921 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
2922 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2923 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2924 {
2925 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2926 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2927 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2928 {
2929 &quot;key&quot;: &quot;A String&quot;, # [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).
2930 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2931 },
2932 ],
2933 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2934 },
2935 ],
2936 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002937 }</pre>
2938</div>
2939
2940<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002941 <code class="details" id="invalidateCache">invalidateCache(project, urlMap, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002942 <pre>Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.
2943
2944Args:
2945 project: string, Project ID for this request. (required)
2946 urlMap: string, Name of the UrlMap scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002947 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002948 The object takes the form of:
2949
2950{
Bu Sun Kim65020912020-05-20 12:08:20 -07002951 &quot;host&quot;: &quot;A String&quot;, # If set, this invalidation rule will only apply to requests with a Host header matching host.
2952 &quot;path&quot;: &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002953 }
2954
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002955 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.
2956
2957For 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.
2958
2959The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002960
2961Returns:
2962 An object of the form:
2963
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002964 { # Represents an Operation resource.
2965 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002966 # Google Compute Engine has three Operation resources:
2967 #
2968 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2969 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002970 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2971 #
2972 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002973 # - For global operations, use the `globalOperations` resource.
2974 # - For regional operations, use the `regionOperations` resource.
2975 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002976 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002977 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002978 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2979 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2980 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2981 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2982 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2983 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002984 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002985 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2986 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2987 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002988 },
2989 ],
2990 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002991 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
2992 &quot;httpErrorStatusCode&quot;: 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.
2993 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2994 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2995 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2996 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2997 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2998 &quot;progress&quot;: 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.
2999 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3000 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3001 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3002 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
3003 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3004 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3005 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
3006 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3007 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3008 {
3009 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
3010 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3011 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3012 {
3013 &quot;key&quot;: &quot;A String&quot;, # [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).
3014 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3015 },
3016 ],
3017 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3018 },
3019 ],
3020 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003021 }</pre>
3022</div>
3023
3024<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003025 <code class="details" id="list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003026 <pre>Retrieves the list of UrlMap resources available to the specified project.
3027
3028Args:
3029 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003030 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;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003031
Dan O'Mearadd494642020-05-01 07:42:23 -07003032For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003033
Dan O'Mearadd494642020-05-01 07:42:23 -07003034You 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003035
Bu Sun Kim65020912020-05-20 12:08:20 -07003036To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
3037 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`)
3038 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
3039
3040You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. 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.
3041
3042Currently, only sorting by `name` or `creationTimestamp desc` is supported.
3043 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003044 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003045
3046Returns:
3047 An object of the form:
3048
3049 { # Contains a list of UrlMap resources.
Bu Sun Kim65020912020-05-20 12:08:20 -07003050 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
3051 &quot;items&quot;: [ # A list of UrlMap resources.
Dan O'Mearadd494642020-05-01 07:42:23 -07003052 { # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003053 #
3054 # Google Compute Engine has two URL Map resources:
3055 #
3056 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
3057 #
3058 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
3059 #
3060 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
3061 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003062 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
3063 #
3064 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
3065 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003066 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
3067 #
3068 # 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.
3069 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
3070 &quot;defaultRouteAction&quot;: { # 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.
3071 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003072 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003073 # defaultRouteAction has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003074 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003075 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003076 &quot;allowCredentials&quot;: 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.
3077 # Default is false.
3078 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3079 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003080 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003081 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3082 &quot;A String&quot;,
3083 ],
3084 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3085 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3086 &quot;A String&quot;,
3087 ],
3088 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3089 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3090 &quot;A String&quot;,
3091 ],
3092 &quot;disabled&quot;: 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.
3093 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3094 &quot;A String&quot;,
3095 ],
3096 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
3097 },
3098 &quot;faultInjectionPolicy&quot;: { # 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.
3099 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003100 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003101 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
3102 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3103 # The value must be between 200 and 599 inclusive.
3104 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3105 # The value must be between 0.0 and 100.0 inclusive.
3106 },
3107 &quot;delay&quot;: { # 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.
3108 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
3109 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
3110 &quot;seconds&quot;: &quot;A String&quot;, # 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
3111 },
3112 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3113 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003114 },
3115 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003116 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003117 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003118 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3119 },
3120 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003121 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003122 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3123 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
3124 # 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.
3125 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
3126 &quot;seconds&quot;: &quot;A String&quot;, # 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
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003127 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003128 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3129 # - 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.
3130 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3131 # -
3132 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3133 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3134 # - 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.
3135 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3136 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3137 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3138 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3139 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003140 ],
3141 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003142 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
3143 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003144 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003145 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
3146 &quot;seconds&quot;: &quot;A String&quot;, # 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
3147 },
3148 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003149 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003150 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003151 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003152 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07003153 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
3154 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003155 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003156 &quot;weightedBackendServices&quot;: [ # 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-zero number.
3157 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07003158 { # 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
3159 &quot;backendService&quot;: &quot;A String&quot;, # 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.
3160 &quot;headerAction&quot;: { # 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.
3161 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003162 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3163 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003164 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3165 { # Specification determining how headers are added to requests or responses.
3166 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3167 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3168 &quot;replace&quot;: 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.
3169 # The default value is false.
3170 },
3171 ],
3172 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3173 &quot;A String&quot;,
3174 ],
3175 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3176 { # Specification determining how headers are added to requests or responses.
3177 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3178 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3179 &quot;replace&quot;: 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.
3180 # The default value is false.
3181 },
3182 ],
3183 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3184 &quot;A String&quot;,
3185 ],
3186 },
3187 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3188 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
3189 # The value must be between 0 and 1000
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003190 },
3191 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003192 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003193 &quot;defaultService&quot;: &quot;A String&quot;, # 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.
3194 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003195 # defaultService has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003196 &quot;defaultUrlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
3197 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003198 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003199 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
3200 # The value must be between 1 and 255 characters.
3201 &quot;httpsRedirect&quot;: 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.
3202 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3203 # The default is set to false.
3204 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
3205 # 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.
3206 # The value must be between 1 and 1024 characters.
3207 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
3208 # 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.
3209 # The value must be between 1 and 1024 characters.
3210 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3211 # Supported values are:
3212 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3213 # - FOUND, which corresponds to 302.
3214 # - SEE_OTHER which corresponds to 303.
3215 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3216 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3217 &quot;stripQuery&quot;: 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.
3218 # The default is set to false.
3219 },
3220 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3221 &quot;fingerprint&quot;: &quot;A String&quot;, # 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.
3222 #
3223 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
3224 &quot;headerAction&quot;: { # 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.
3225 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003226 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3227 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003228 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3229 { # Specification determining how headers are added to requests or responses.
3230 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3231 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3232 &quot;replace&quot;: 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.
3233 # The default value is false.
3234 },
3235 ],
3236 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3237 &quot;A String&quot;,
3238 ],
3239 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3240 { # Specification determining how headers are added to requests or responses.
3241 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3242 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3243 &quot;replace&quot;: 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.
3244 # The default value is false.
3245 },
3246 ],
3247 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3248 &quot;A String&quot;,
3249 ],
3250 },
3251 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
3252 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
3253 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3254 &quot;hosts&quot;: [ # 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 ..
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003255 # * based matching is not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003256 &quot;A String&quot;,
3257 ],
3258 &quot;pathMatcher&quot;: &quot;A String&quot;, # The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL&#x27;s host portion.
3259 },
3260 ],
3261 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3262 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
3263 &quot;name&quot;: &quot;A String&quot;, # 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.
3264 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
3265 { # 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.
3266 &quot;defaultRouteAction&quot;: { # 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.
3267 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003268 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathMatcher&#x27;s defaultRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07003269 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003270 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003271 &quot;allowCredentials&quot;: 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.
3272 # Default is false.
3273 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3274 &quot;A String&quot;,
3275 ],
3276 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3277 &quot;A String&quot;,
3278 ],
3279 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3280 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3281 &quot;A String&quot;,
3282 ],
3283 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3284 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3285 &quot;A String&quot;,
3286 ],
3287 &quot;disabled&quot;: 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.
3288 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3289 &quot;A String&quot;,
3290 ],
3291 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
3292 },
3293 &quot;faultInjectionPolicy&quot;: { # 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.
3294 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003295 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003296 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
3297 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3298 # The value must be between 200 and 599 inclusive.
3299 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3300 # The value must be between 0.0 and 100.0 inclusive.
3301 },
3302 &quot;delay&quot;: { # 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.
3303 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
3304 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
3305 &quot;seconds&quot;: &quot;A String&quot;, # 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
3306 },
3307 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3308 # The value must be between 0.0 and 100.0 inclusive.
3309 },
3310 },
3311 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003312 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003313 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3314 },
3315 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003316 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003317 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3318 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
3319 # 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.
3320 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
3321 &quot;seconds&quot;: &quot;A String&quot;, # 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
3322 },
3323 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3324 # - 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.
3325 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3326 # -
3327 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3328 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3329 # - 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.
3330 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3331 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3332 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3333 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3334 &quot;A String&quot;,
3335 ],
3336 },
3337 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
3338 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003339 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003340 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
3341 &quot;seconds&quot;: &quot;A String&quot;, # 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
3342 },
3343 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003344 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003345 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003346 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
3347 # The value must be between 1 and 255 characters.
3348 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
3349 # The value must be between 1 and 1024 characters.
3350 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003351 &quot;weightedBackendServices&quot;: [ # 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-zero number.
3352 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07003353 { # 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
3354 &quot;backendService&quot;: &quot;A String&quot;, # 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.
3355 &quot;headerAction&quot;: { # 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.
3356 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003357 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3358 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003359 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3360 { # Specification determining how headers are added to requests or responses.
3361 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3362 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3363 &quot;replace&quot;: 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.
3364 # The default value is false.
3365 },
3366 ],
3367 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3368 &quot;A String&quot;,
3369 ],
3370 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3371 { # Specification determining how headers are added to requests or responses.
3372 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3373 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3374 &quot;replace&quot;: 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.
3375 # The default value is false.
3376 },
3377 ],
3378 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3379 &quot;A String&quot;,
3380 ],
3381 },
3382 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3383 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
3384 # The value must be between 0 and 1000
3385 },
3386 ],
3387 },
3388 &quot;defaultService&quot;: &quot;A String&quot;, # 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:
3389 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
3390 # - compute/v1/projects/project/global/backendServices/backendService
3391 # - 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.
3392 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3393 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
3394 # - compute.backendBuckets.use
3395 # - compute.backendServices.use
3396 &quot;defaultUrlRedirect&quot;: { # 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.
3397 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003398 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003399 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
3400 # The value must be between 1 and 255 characters.
3401 &quot;httpsRedirect&quot;: 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.
3402 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3403 # The default is set to false.
3404 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
3405 # 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.
3406 # The value must be between 1 and 1024 characters.
3407 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
3408 # 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.
3409 # The value must be between 1 and 1024 characters.
3410 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3411 # Supported values are:
3412 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3413 # - FOUND, which corresponds to 302.
3414 # - SEE_OTHER which corresponds to 303.
3415 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3416 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3417 &quot;stripQuery&quot;: 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.
3418 # The default is set to false.
3419 },
3420 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3421 &quot;headerAction&quot;: { # 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.
3422 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003423 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3424 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003425 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3426 { # Specification determining how headers are added to requests or responses.
3427 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3428 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3429 &quot;replace&quot;: 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.
3430 # The default value is false.
3431 },
3432 ],
3433 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3434 &quot;A String&quot;,
3435 ],
3436 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3437 { # Specification determining how headers are added to requests or responses.
3438 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3439 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3440 &quot;replace&quot;: 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.
3441 # The default value is false.
3442 },
3443 ],
3444 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3445 &quot;A String&quot;,
3446 ],
3447 },
3448 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
3449 &quot;pathRules&quot;: [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that&#x27;s required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.
3450 # 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.
3451 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
3452 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
3453 &quot;paths&quot;: [ # 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.
3454 &quot;A String&quot;,
3455 ],
3456 &quot;routeAction&quot;: { # 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.
3457 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003458 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07003459 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003460 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003461 &quot;allowCredentials&quot;: 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.
3462 # Default is false.
3463 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3464 &quot;A String&quot;,
3465 ],
3466 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3467 &quot;A String&quot;,
3468 ],
3469 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3470 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3471 &quot;A String&quot;,
3472 ],
3473 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3474 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3475 &quot;A String&quot;,
3476 ],
3477 &quot;disabled&quot;: 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.
3478 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3479 &quot;A String&quot;,
3480 ],
3481 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
3482 },
3483 &quot;faultInjectionPolicy&quot;: { # 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.
3484 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003485 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003486 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
3487 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3488 # The value must be between 200 and 599 inclusive.
3489 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3490 # The value must be between 0.0 and 100.0 inclusive.
3491 },
3492 &quot;delay&quot;: { # 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.
3493 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
3494 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
3495 &quot;seconds&quot;: &quot;A String&quot;, # 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
3496 },
3497 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3498 # The value must be between 0.0 and 100.0 inclusive.
3499 },
3500 },
3501 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003502 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003503 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3504 },
3505 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003506 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003507 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3508 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
3509 # 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.
3510 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
3511 &quot;seconds&quot;: &quot;A String&quot;, # 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
3512 },
3513 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3514 # - 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.
3515 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3516 # -
3517 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3518 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3519 # - 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.
3520 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3521 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3522 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3523 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3524 &quot;A String&quot;,
3525 ],
3526 },
3527 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
3528 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003529 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003530 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
3531 &quot;seconds&quot;: &quot;A String&quot;, # 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
3532 },
3533 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003534 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003535 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003536 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
3537 # The value must be between 1 and 255 characters.
3538 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
3539 # The value must be between 1 and 1024 characters.
3540 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003541 &quot;weightedBackendServices&quot;: [ # 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-zero number.
3542 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07003543 { # 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
3544 &quot;backendService&quot;: &quot;A String&quot;, # 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.
3545 &quot;headerAction&quot;: { # 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.
3546 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003547 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3548 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003549 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3550 { # Specification determining how headers are added to requests or responses.
3551 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3552 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3553 &quot;replace&quot;: 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.
3554 # The default value is false.
3555 },
3556 ],
3557 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3558 &quot;A String&quot;,
3559 ],
3560 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3561 { # Specification determining how headers are added to requests or responses.
3562 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3563 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3564 &quot;replace&quot;: 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.
3565 # The default value is false.
3566 },
3567 ],
3568 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3569 &quot;A String&quot;,
3570 ],
3571 },
3572 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3573 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
3574 # The value must be between 0 and 1000
3575 },
3576 ],
3577 },
3578 &quot;service&quot;: &quot;A String&quot;, # 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.
3579 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3580 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
3581 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003582 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003583 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
3584 # The value must be between 1 and 255 characters.
3585 &quot;httpsRedirect&quot;: 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.
3586 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3587 # The default is set to false.
3588 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
3589 # 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.
3590 # The value must be between 1 and 1024 characters.
3591 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
3592 # 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.
3593 # The value must be between 1 and 1024 characters.
3594 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3595 # Supported values are:
3596 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3597 # - FOUND, which corresponds to 302.
3598 # - SEE_OTHER which corresponds to 303.
3599 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3600 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3601 &quot;stripQuery&quot;: 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.
3602 # The default is set to false.
3603 },
3604 },
3605 ],
3606 &quot;routeRules&quot;: [ # 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.
3607 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
3608 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
3609 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
3610 # The description can have a maximum length of 1024 characters.
3611 &quot;headerAction&quot;: { # 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.
3612 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003613 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3614 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003615 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3616 { # Specification determining how headers are added to requests or responses.
3617 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3618 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3619 &quot;replace&quot;: 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.
3620 # The default value is false.
3621 },
3622 ],
3623 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3624 &quot;A String&quot;,
3625 ],
3626 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3627 { # Specification determining how headers are added to requests or responses.
3628 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3629 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3630 &quot;replace&quot;: 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.
3631 # The default value is false.
3632 },
3633 ],
3634 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3635 &quot;A String&quot;,
3636 ],
3637 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003638 &quot;httpFilterConfigs&quot;: [ # Outbound route specific configuration for networkservices.HttpFilter resources enabled by Traffic Director. httpFilterConfigs only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
3639 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
3640 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
3641 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
3642 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
3643 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
3644 },
3645 ],
3646 &quot;httpFilterMetadata&quot;: [ # Outbound route specific metadata supplied to networkservices.HttpFilter resources enabled by Traffic Director. httpFilterMetadata only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
3647 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
3648 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
3649 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
3650 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
3651 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
3652 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
3653 },
3654 ],
3655 &quot;matchRules&quot;: [ # The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
Bu Sun Kim65020912020-05-20 12:08:20 -07003656 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
3657 &quot;fullPathMatch&quot;: &quot;A String&quot;, # 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.
3658 # fullPathMatch must be between 1 and 1024 characters.
3659 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3660 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
3661 { # matchRule criteria for request header matches.
3662 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
3663 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3664 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
3665 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
3666 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003667 # When the URL map is bound to target gRPC proxy that has validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin.
Bu Sun Kim65020912020-05-20 12:08:20 -07003668 &quot;invertMatch&quot;: 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.
3669 # The default setting is false.
3670 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
3671 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3672 &quot;presentMatch&quot;: True or False, # A header with the contents of headerName must exist. The match takes place whether or not the request&#x27;s header has a value.
3673 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3674 &quot;rangeMatch&quot;: { # 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.
3675 # For example for a range [-5, 0]
3676 # - -3 will match.
3677 # - 0 will not match.
3678 # - 0.25 will not match.
3679 # - -3someString will not match.
3680 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3681 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3682 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
3683 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
3684 },
3685 &quot;regexMatch&quot;: &quot;A String&quot;, # 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
3686 # 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&#x27;s port specifier.
3687 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3688 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
3689 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
3690 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3691 },
3692 ],
3693 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
3694 # The default value is false.
3695 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003696 # Not supported when the URL map is bound to target gRPC proxy.
3697 &quot;metadataFilters&quot;: [ # 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. When there is a match, the relevant routing configuration is made available to those proxies.
3698 # 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. If multiple metadataFilters are specified, all of them need to be satisfied in order to be considered a match.
Bu Sun Kim65020912020-05-20 12:08:20 -07003699 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
3700 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003701 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003702 { # 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.
3703 # 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.
3704 # 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=&quot;https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/base.proto#envoy-api-msg-core-node&quot; Node metadata of their XDS requests to loadbalancers.
3705 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
3706 # This list must not be empty and can have at the most 64 entries.
3707 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
3708 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
3709 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
3710 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
3711 # value can have a maximum length of 1024 characters.
3712 },
3713 ],
3714 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
3715 # Supported values are:
3716 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
3717 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
3718 },
3719 ],
3720 &quot;prefixMatch&quot;: &quot;A String&quot;, # For satisfying the matchRule condition, the request&#x27;s path must begin with the specified prefixMatch. prefixMatch must begin with a /.
3721 # The value must be between 1 and 1024 characters.
3722 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3723 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003724 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003725 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
3726 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
3727 # Only one of presentMatch, exactMatch or regexMatch must be set.
3728 &quot;name&quot;: &quot;A String&quot;, # 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.
3729 &quot;presentMatch&quot;: 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.
3730 # Only one of presentMatch, exactMatch or regexMatch must be set.
3731 &quot;regexMatch&quot;: &quot;A String&quot;, # 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
3732 # Only one of presentMatch, exactMatch or regexMatch must be set.
3733 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
3734 },
3735 ],
3736 &quot;regexMatch&quot;: &quot;A String&quot;, # 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
3737 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3738 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
3739 },
3740 ],
3741 &quot;priority&quot;: 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.
3742 # 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.
3743 # 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.
3744 &quot;routeAction&quot;: { # 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.
3745 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003746 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a routeRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07003747 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003748 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003749 &quot;allowCredentials&quot;: 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.
3750 # Default is false.
3751 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3752 &quot;A String&quot;,
3753 ],
3754 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3755 &quot;A String&quot;,
3756 ],
3757 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3758 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3759 &quot;A String&quot;,
3760 ],
3761 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3762 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3763 &quot;A String&quot;,
3764 ],
3765 &quot;disabled&quot;: 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.
3766 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3767 &quot;A String&quot;,
3768 ],
3769 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
3770 },
3771 &quot;faultInjectionPolicy&quot;: { # 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.
3772 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003773 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003774 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
3775 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3776 # The value must be between 200 and 599 inclusive.
3777 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3778 # The value must be between 0.0 and 100.0 inclusive.
3779 },
3780 &quot;delay&quot;: { # 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.
3781 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
3782 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
3783 &quot;seconds&quot;: &quot;A String&quot;, # 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
3784 },
3785 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3786 # The value must be between 0.0 and 100.0 inclusive.
3787 },
3788 },
3789 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003790 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003791 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3792 },
3793 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003794 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003795 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3796 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
3797 # 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.
3798 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
3799 &quot;seconds&quot;: &quot;A String&quot;, # 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
3800 },
3801 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3802 # - 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.
3803 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3804 # -
3805 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3806 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3807 # - 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.
3808 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3809 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3810 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3811 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3812 &quot;A String&quot;,
3813 ],
3814 },
3815 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
3816 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003817 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003818 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
3819 &quot;seconds&quot;: &quot;A String&quot;, # 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
3820 },
3821 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003822 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003823 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003824 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
3825 # The value must be between 1 and 255 characters.
3826 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
3827 # The value must be between 1 and 1024 characters.
3828 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003829 &quot;weightedBackendServices&quot;: [ # 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-zero number.
3830 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07003831 { # 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
3832 &quot;backendService&quot;: &quot;A String&quot;, # 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.
3833 &quot;headerAction&quot;: { # 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.
3834 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003835 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3836 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003837 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3838 { # Specification determining how headers are added to requests or responses.
3839 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3840 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3841 &quot;replace&quot;: 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.
3842 # The default value is false.
3843 },
3844 ],
3845 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3846 &quot;A String&quot;,
3847 ],
3848 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3849 { # Specification determining how headers are added to requests or responses.
3850 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3851 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3852 &quot;replace&quot;: 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.
3853 # The default value is false.
3854 },
3855 ],
3856 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3857 &quot;A String&quot;,
3858 ],
3859 },
3860 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3861 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
3862 # The value must be between 0 and 1000
3863 },
3864 ],
3865 },
3866 &quot;service&quot;: &quot;A String&quot;, # 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.
3867 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3868 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
3869 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003870 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003871 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
3872 # The value must be between 1 and 255 characters.
3873 &quot;httpsRedirect&quot;: 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.
3874 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3875 # The default is set to false.
3876 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
3877 # 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.
3878 # The value must be between 1 and 1024 characters.
3879 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
3880 # 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.
3881 # The value must be between 1 and 1024 characters.
3882 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3883 # Supported values are:
3884 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3885 # - FOUND, which corresponds to 302.
3886 # - SEE_OTHER which corresponds to 303.
3887 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3888 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3889 &quot;stripQuery&quot;: 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.
3890 # The default is set to false.
3891 },
3892 },
3893 ],
3894 },
3895 ],
3896 &quot;region&quot;: &quot;A String&quot;, # [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.
3897 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3898 &quot;tests&quot;: [ # 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003899 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003900 { # Message for the expected URL mappings.
3901 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003902 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL. If headers contains a host header, then host must also match the header value.
Bu Sun Kim65020912020-05-20 12:08:20 -07003903 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003904 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
3905 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07003906 },
3907 ],
3908 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003909 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003910 &quot;kind&quot;: &quot;compute#urlMapList&quot;, # Type of resource.
3911 &quot;nextPageToken&quot;: &quot;A String&quot;, # [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.
3912 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
3913 &quot;warning&quot;: { # [Output Only] Informational warning message.
3914 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
3915 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3916 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003917 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003918 &quot;key&quot;: &quot;A String&quot;, # [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).
3919 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003920 },
3921 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003922 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003923 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003924 }</pre>
3925</div>
3926
3927<div class="method">
3928 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
3929 <pre>Retrieves the next page of results.
3930
3931Args:
3932 previous_request: The request for the previous page. (required)
3933 previous_response: The response from the request for the previous page. (required)
3934
3935Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07003936 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003937 page. Returns None if there are no more items in the collection.
3938 </pre>
3939</div>
3940
3941<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003942 <code class="details" id="patch">patch(project, urlMap, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003943 <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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003944
3945Args:
3946 project: string, Project ID for this request. (required)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003947 urlMap: string, Name of the UrlMap resource to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003948 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003949 The object takes the form of:
3950
Dan O'Mearadd494642020-05-01 07:42:23 -07003951{ # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003952 #
3953 # Google Compute Engine has two URL Map resources:
3954 #
3955 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
3956 #
3957 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
3958 #
3959 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
3960 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003961 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
3962 #
3963 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
3964 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003965 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
3966 #
3967 # 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.
3968 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
3969 &quot;defaultRouteAction&quot;: { # 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.
3970 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003971 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003972 # defaultRouteAction has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003973 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003974 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003975 &quot;allowCredentials&quot;: 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.
3976 # Default is false.
3977 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3978 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003979 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003980 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3981 &quot;A String&quot;,
3982 ],
3983 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3984 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3985 &quot;A String&quot;,
3986 ],
3987 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3988 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3989 &quot;A String&quot;,
3990 ],
3991 &quot;disabled&quot;: 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.
3992 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3993 &quot;A String&quot;,
3994 ],
3995 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
3996 },
3997 &quot;faultInjectionPolicy&quot;: { # 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.
3998 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003999 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004000 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
4001 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4002 # The value must be between 200 and 599 inclusive.
4003 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4004 # The value must be between 0.0 and 100.0 inclusive.
4005 },
4006 &quot;delay&quot;: { # 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.
4007 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
4008 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
4009 &quot;seconds&quot;: &quot;A String&quot;, # 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
4010 },
4011 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4012 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004013 },
4014 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004015 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004016 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004017 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4018 },
4019 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004020 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004021 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4022 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
4023 # 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.
4024 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
4025 &quot;seconds&quot;: &quot;A String&quot;, # 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
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004026 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004027 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4028 # - 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.
4029 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4030 # -
4031 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4032 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4033 # - 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.
4034 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4035 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4036 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4037 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4038 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004039 ],
4040 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004041 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
4042 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004043 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004044 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
4045 &quot;seconds&quot;: &quot;A String&quot;, # 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
4046 },
4047 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004048 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004049 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004050 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004051 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07004052 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
4053 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004054 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004055 &quot;weightedBackendServices&quot;: [ # 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-zero number.
4056 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07004057 { # 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
4058 &quot;backendService&quot;: &quot;A String&quot;, # 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.
4059 &quot;headerAction&quot;: { # 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.
4060 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004061 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4062 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004063 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4064 { # Specification determining how headers are added to requests or responses.
4065 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4066 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4067 &quot;replace&quot;: 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.
4068 # The default value is false.
4069 },
4070 ],
4071 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4072 &quot;A String&quot;,
4073 ],
4074 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4075 { # Specification determining how headers are added to requests or responses.
4076 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4077 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4078 &quot;replace&quot;: 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.
4079 # The default value is false.
4080 },
4081 ],
4082 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
4083 &quot;A String&quot;,
4084 ],
4085 },
4086 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4087 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
4088 # The value must be between 0 and 1000
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004089 },
4090 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004091 },
4092 &quot;defaultService&quot;: &quot;A String&quot;, # 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.
4093 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004094 # defaultService has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004095 &quot;defaultUrlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
4096 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004097 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004098 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
4099 # The value must be between 1 and 255 characters.
4100 &quot;httpsRedirect&quot;: 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.
4101 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4102 # The default is set to false.
4103 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
4104 # 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.
4105 # The value must be between 1 and 1024 characters.
4106 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
4107 # 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.
4108 # The value must be between 1 and 1024 characters.
4109 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4110 # Supported values are:
4111 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4112 # - FOUND, which corresponds to 302.
4113 # - SEE_OTHER which corresponds to 303.
4114 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4115 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4116 &quot;stripQuery&quot;: 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.
4117 # The default is set to false.
4118 },
4119 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4120 &quot;fingerprint&quot;: &quot;A String&quot;, # 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.
4121 #
4122 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
4123 &quot;headerAction&quot;: { # 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.
4124 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004125 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4126 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004127 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4128 { # Specification determining how headers are added to requests or responses.
4129 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4130 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4131 &quot;replace&quot;: 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.
4132 # The default value is false.
4133 },
4134 ],
4135 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4136 &quot;A String&quot;,
4137 ],
4138 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4139 { # Specification determining how headers are added to requests or responses.
4140 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4141 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4142 &quot;replace&quot;: 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.
4143 # The default value is false.
4144 },
4145 ],
4146 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
4147 &quot;A String&quot;,
4148 ],
4149 },
4150 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
4151 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
4152 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4153 &quot;hosts&quot;: [ # 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 ..
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004154 # * based matching is not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004155 &quot;A String&quot;,
4156 ],
4157 &quot;pathMatcher&quot;: &quot;A String&quot;, # The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL&#x27;s host portion.
4158 },
4159 ],
4160 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4161 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
4162 &quot;name&quot;: &quot;A String&quot;, # 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.
4163 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
4164 { # 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.
4165 &quot;defaultRouteAction&quot;: { # 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.
4166 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004167 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathMatcher&#x27;s defaultRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07004168 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004169 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004170 &quot;allowCredentials&quot;: 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.
4171 # Default is false.
4172 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4173 &quot;A String&quot;,
4174 ],
4175 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4176 &quot;A String&quot;,
4177 ],
4178 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4179 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4180 &quot;A String&quot;,
4181 ],
4182 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4183 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4184 &quot;A String&quot;,
4185 ],
4186 &quot;disabled&quot;: 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.
4187 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4188 &quot;A String&quot;,
4189 ],
4190 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
4191 },
4192 &quot;faultInjectionPolicy&quot;: { # 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004194 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004195 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
4196 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4197 # The value must be between 200 and 599 inclusive.
4198 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4199 # The value must be between 0.0 and 100.0 inclusive.
4200 },
4201 &quot;delay&quot;: { # 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.
4202 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
4203 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
4204 &quot;seconds&quot;: &quot;A String&quot;, # 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
4205 },
4206 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4207 # The value must be between 0.0 and 100.0 inclusive.
4208 },
4209 },
4210 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004211 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004212 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4213 },
4214 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004215 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004216 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4217 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
4218 # 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.
4219 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
4220 &quot;seconds&quot;: &quot;A String&quot;, # 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
4221 },
4222 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4223 # - 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.
4224 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4225 # -
4226 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4227 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4228 # - 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.
4229 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4230 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4231 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4232 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4233 &quot;A String&quot;,
4234 ],
4235 },
4236 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
4237 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004238 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004239 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
4240 &quot;seconds&quot;: &quot;A String&quot;, # 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
4241 },
4242 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004243 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004244 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004245 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
4246 # The value must be between 1 and 255 characters.
4247 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
4248 # The value must be between 1 and 1024 characters.
4249 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004250 &quot;weightedBackendServices&quot;: [ # 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-zero number.
4251 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07004252 { # 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
4253 &quot;backendService&quot;: &quot;A String&quot;, # 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.
4254 &quot;headerAction&quot;: { # 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.
4255 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004256 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4257 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004258 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4259 { # Specification determining how headers are added to requests or responses.
4260 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4261 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4262 &quot;replace&quot;: 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.
4263 # The default value is false.
4264 },
4265 ],
4266 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4267 &quot;A String&quot;,
4268 ],
4269 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4270 { # Specification determining how headers are added to requests or responses.
4271 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4272 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4273 &quot;replace&quot;: 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.
4274 # The default value is false.
4275 },
4276 ],
4277 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
4278 &quot;A String&quot;,
4279 ],
4280 },
4281 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4282 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
4283 # The value must be between 0 and 1000
4284 },
4285 ],
4286 },
4287 &quot;defaultService&quot;: &quot;A String&quot;, # 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:
4288 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
4289 # - compute/v1/projects/project/global/backendServices/backendService
4290 # - 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.
4291 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
4292 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
4293 # - compute.backendBuckets.use
4294 # - compute.backendServices.use
4295 &quot;defaultUrlRedirect&quot;: { # 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.
4296 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004297 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004298 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
4299 # The value must be between 1 and 255 characters.
4300 &quot;httpsRedirect&quot;: 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.
4301 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4302 # The default is set to false.
4303 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
4304 # 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.
4305 # The value must be between 1 and 1024 characters.
4306 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
4307 # 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.
4308 # The value must be between 1 and 1024 characters.
4309 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4310 # Supported values are:
4311 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4312 # - FOUND, which corresponds to 302.
4313 # - SEE_OTHER which corresponds to 303.
4314 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4315 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4316 &quot;stripQuery&quot;: 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.
4317 # The default is set to false.
4318 },
4319 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4320 &quot;headerAction&quot;: { # 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.
4321 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004322 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4323 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004324 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4325 { # Specification determining how headers are added to requests or responses.
4326 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4327 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4328 &quot;replace&quot;: 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.
4329 # The default value is false.
4330 },
4331 ],
4332 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4333 &quot;A String&quot;,
4334 ],
4335 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4336 { # Specification determining how headers are added to requests or responses.
4337 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4338 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4339 &quot;replace&quot;: 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.
4340 # The default value is false.
4341 },
4342 ],
4343 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
4344 &quot;A String&quot;,
4345 ],
4346 },
4347 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
4348 &quot;pathRules&quot;: [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that&#x27;s required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.
4349 # 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.
4350 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
4351 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
4352 &quot;paths&quot;: [ # 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.
4353 &quot;A String&quot;,
4354 ],
4355 &quot;routeAction&quot;: { # 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.
4356 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004357 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07004358 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004359 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004360 &quot;allowCredentials&quot;: 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.
4361 # Default is false.
4362 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4363 &quot;A String&quot;,
4364 ],
4365 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4366 &quot;A String&quot;,
4367 ],
4368 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4369 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4370 &quot;A String&quot;,
4371 ],
4372 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4373 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4374 &quot;A String&quot;,
4375 ],
4376 &quot;disabled&quot;: 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.
4377 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4378 &quot;A String&quot;,
4379 ],
4380 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
4381 },
4382 &quot;faultInjectionPolicy&quot;: { # 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.
4383 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004384 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004385 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
4386 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4387 # The value must be between 200 and 599 inclusive.
4388 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4389 # The value must be between 0.0 and 100.0 inclusive.
4390 },
4391 &quot;delay&quot;: { # 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.
4392 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
4393 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
4394 &quot;seconds&quot;: &quot;A String&quot;, # 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
4395 },
4396 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4397 # The value must be between 0.0 and 100.0 inclusive.
4398 },
4399 },
4400 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004401 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004402 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4403 },
4404 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004405 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004406 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4407 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
4408 # 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.
4409 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
4410 &quot;seconds&quot;: &quot;A String&quot;, # 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
4411 },
4412 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4413 # - 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.
4414 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4415 # -
4416 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4417 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4418 # - 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.
4419 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4420 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4421 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4422 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4423 &quot;A String&quot;,
4424 ],
4425 },
4426 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
4427 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004428 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004429 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
4430 &quot;seconds&quot;: &quot;A String&quot;, # 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
4431 },
4432 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004433 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004434 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004435 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
4436 # The value must be between 1 and 255 characters.
4437 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
4438 # The value must be between 1 and 1024 characters.
4439 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004440 &quot;weightedBackendServices&quot;: [ # 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-zero number.
4441 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07004442 { # 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
4443 &quot;backendService&quot;: &quot;A String&quot;, # 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.
4444 &quot;headerAction&quot;: { # 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.
4445 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004446 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4447 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004448 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4449 { # Specification determining how headers are added to requests or responses.
4450 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4451 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4452 &quot;replace&quot;: 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.
4453 # The default value is false.
4454 },
4455 ],
4456 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4457 &quot;A String&quot;,
4458 ],
4459 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4460 { # Specification determining how headers are added to requests or responses.
4461 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4462 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4463 &quot;replace&quot;: 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.
4464 # The default value is false.
4465 },
4466 ],
4467 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
4468 &quot;A String&quot;,
4469 ],
4470 },
4471 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4472 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
4473 # The value must be between 0 and 1000
4474 },
4475 ],
4476 },
4477 &quot;service&quot;: &quot;A String&quot;, # 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.
4478 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4479 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
4480 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004481 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004482 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
4483 # The value must be between 1 and 255 characters.
4484 &quot;httpsRedirect&quot;: 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.
4485 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4486 # The default is set to false.
4487 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
4488 # 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.
4489 # The value must be between 1 and 1024 characters.
4490 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
4491 # 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.
4492 # The value must be between 1 and 1024 characters.
4493 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4494 # Supported values are:
4495 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4496 # - FOUND, which corresponds to 302.
4497 # - SEE_OTHER which corresponds to 303.
4498 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4499 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4500 &quot;stripQuery&quot;: 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.
4501 # The default is set to false.
4502 },
4503 },
4504 ],
4505 &quot;routeRules&quot;: [ # 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.
4506 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
4507 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
4508 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
4509 # The description can have a maximum length of 1024 characters.
4510 &quot;headerAction&quot;: { # 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.
4511 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004512 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4513 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004514 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4515 { # Specification determining how headers are added to requests or responses.
4516 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4517 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4518 &quot;replace&quot;: 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.
4519 # The default value is false.
4520 },
4521 ],
4522 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4523 &quot;A String&quot;,
4524 ],
4525 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4526 { # Specification determining how headers are added to requests or responses.
4527 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4528 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4529 &quot;replace&quot;: 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.
4530 # The default value is false.
4531 },
4532 ],
4533 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
4534 &quot;A String&quot;,
4535 ],
4536 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004537 &quot;httpFilterConfigs&quot;: [ # Outbound route specific configuration for networkservices.HttpFilter resources enabled by Traffic Director. httpFilterConfigs only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
4538 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
4539 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
4540 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
4541 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
4542 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
4543 },
4544 ],
4545 &quot;httpFilterMetadata&quot;: [ # Outbound route specific metadata supplied to networkservices.HttpFilter resources enabled by Traffic Director. httpFilterMetadata only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
4546 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
4547 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
4548 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
4549 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
4550 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
4551 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
4552 },
4553 ],
4554 &quot;matchRules&quot;: [ # The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
Bu Sun Kim65020912020-05-20 12:08:20 -07004555 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
4556 &quot;fullPathMatch&quot;: &quot;A String&quot;, # 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.
4557 # fullPathMatch must be between 1 and 1024 characters.
4558 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4559 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
4560 { # matchRule criteria for request header matches.
4561 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
4562 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4563 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
4564 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
4565 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004566 # When the URL map is bound to target gRPC proxy that has validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin.
Bu Sun Kim65020912020-05-20 12:08:20 -07004567 &quot;invertMatch&quot;: 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.
4568 # The default setting is false.
4569 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
4570 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4571 &quot;presentMatch&quot;: True or False, # A header with the contents of headerName must exist. The match takes place whether or not the request&#x27;s header has a value.
4572 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4573 &quot;rangeMatch&quot;: { # 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.
4574 # For example for a range [-5, 0]
4575 # - -3 will match.
4576 # - 0 will not match.
4577 # - 0.25 will not match.
4578 # - -3someString will not match.
4579 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4580 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4581 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
4582 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
4583 },
4584 &quot;regexMatch&quot;: &quot;A String&quot;, # 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
4585 # 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&#x27;s port specifier.
4586 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4587 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
4588 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
4589 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4590 },
4591 ],
4592 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
4593 # The default value is false.
4594 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004595 # Not supported when the URL map is bound to target gRPC proxy.
4596 &quot;metadataFilters&quot;: [ # 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. When there is a match, the relevant routing configuration is made available to those proxies.
4597 # 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. If multiple metadataFilters are specified, all of them need to be satisfied in order to be considered a match.
Bu Sun Kim65020912020-05-20 12:08:20 -07004598 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
4599 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004600 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004601 { # 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.
4602 # 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.
4603 # 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=&quot;https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/base.proto#envoy-api-msg-core-node&quot; Node metadata of their XDS requests to loadbalancers.
4604 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
4605 # This list must not be empty and can have at the most 64 entries.
4606 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
4607 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
4608 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
4609 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
4610 # value can have a maximum length of 1024 characters.
4611 },
4612 ],
4613 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
4614 # Supported values are:
4615 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
4616 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
4617 },
4618 ],
4619 &quot;prefixMatch&quot;: &quot;A String&quot;, # For satisfying the matchRule condition, the request&#x27;s path must begin with the specified prefixMatch. prefixMatch must begin with a /.
4620 # The value must be between 1 and 1024 characters.
4621 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4622 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004623 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004624 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
4625 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
4626 # Only one of presentMatch, exactMatch or regexMatch must be set.
4627 &quot;name&quot;: &quot;A String&quot;, # 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.
4628 &quot;presentMatch&quot;: 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.
4629 # Only one of presentMatch, exactMatch or regexMatch must be set.
4630 &quot;regexMatch&quot;: &quot;A String&quot;, # 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
4631 # Only one of presentMatch, exactMatch or regexMatch must be set.
4632 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
4633 },
4634 ],
4635 &quot;regexMatch&quot;: &quot;A String&quot;, # 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
4636 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4637 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
4638 },
4639 ],
4640 &quot;priority&quot;: 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.
4641 # 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.
4642 # 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.
4643 &quot;routeAction&quot;: { # 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.
4644 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004645 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a routeRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07004646 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004647 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004648 &quot;allowCredentials&quot;: 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.
4649 # Default is false.
4650 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4651 &quot;A String&quot;,
4652 ],
4653 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4654 &quot;A String&quot;,
4655 ],
4656 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4657 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4658 &quot;A String&quot;,
4659 ],
4660 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4661 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4662 &quot;A String&quot;,
4663 ],
4664 &quot;disabled&quot;: 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.
4665 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4666 &quot;A String&quot;,
4667 ],
4668 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
4669 },
4670 &quot;faultInjectionPolicy&quot;: { # 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.
4671 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004672 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004673 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
4674 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4675 # The value must be between 200 and 599 inclusive.
4676 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4677 # The value must be between 0.0 and 100.0 inclusive.
4678 },
4679 &quot;delay&quot;: { # 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.
4680 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
4681 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
4682 &quot;seconds&quot;: &quot;A String&quot;, # 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
4683 },
4684 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4685 # The value must be between 0.0 and 100.0 inclusive.
4686 },
4687 },
4688 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004689 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004690 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4691 },
4692 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004693 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004694 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4695 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
4696 # 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.
4697 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
4698 &quot;seconds&quot;: &quot;A String&quot;, # 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
4699 },
4700 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4701 # - 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.
4702 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4703 # -
4704 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4705 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4706 # - 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.
4707 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4708 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4709 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4710 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4711 &quot;A String&quot;,
4712 ],
4713 },
4714 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
4715 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004716 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004717 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
4718 &quot;seconds&quot;: &quot;A String&quot;, # 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
4719 },
4720 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004721 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004722 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004723 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
4724 # The value must be between 1 and 255 characters.
4725 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
4726 # The value must be between 1 and 1024 characters.
4727 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004728 &quot;weightedBackendServices&quot;: [ # 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-zero number.
4729 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07004730 { # 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
4731 &quot;backendService&quot;: &quot;A String&quot;, # 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.
4732 &quot;headerAction&quot;: { # 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.
4733 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004734 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4735 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004736 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4737 { # Specification determining how headers are added to requests or responses.
4738 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4739 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4740 &quot;replace&quot;: 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.
4741 # The default value is false.
4742 },
4743 ],
4744 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4745 &quot;A String&quot;,
4746 ],
4747 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4748 { # Specification determining how headers are added to requests or responses.
4749 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4750 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4751 &quot;replace&quot;: 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.
4752 # The default value is false.
4753 },
4754 ],
4755 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
4756 &quot;A String&quot;,
4757 ],
4758 },
4759 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4760 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
4761 # The value must be between 0 and 1000
4762 },
4763 ],
4764 },
4765 &quot;service&quot;: &quot;A String&quot;, # 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 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
4768 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004769 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004770 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
4771 # The value must be between 1 and 255 characters.
4772 &quot;httpsRedirect&quot;: 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.
4773 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4774 # The default is set to false.
4775 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
4776 # 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.
4777 # The value must be between 1 and 1024 characters.
4778 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
4779 # 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.
4780 # The value must be between 1 and 1024 characters.
4781 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4782 # Supported values are:
4783 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4784 # - FOUND, which corresponds to 302.
4785 # - SEE_OTHER which corresponds to 303.
4786 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4787 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4788 &quot;stripQuery&quot;: 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.
4789 # The default is set to false.
4790 },
4791 },
4792 ],
4793 },
4794 ],
4795 &quot;region&quot;: &quot;A String&quot;, # [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.
4796 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4797 &quot;tests&quot;: [ # 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004798 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004799 { # Message for the expected URL mappings.
4800 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004801 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL. If headers contains a host header, then host must also match the header value.
Bu Sun Kim65020912020-05-20 12:08:20 -07004802 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004803 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
4804 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07004805 },
4806 ],
4807}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004808
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004809 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.
4810
4811For 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.
4812
4813The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004814
4815Returns:
4816 An object of the form:
4817
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004818 { # Represents an Operation resource.
4819 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004820 # Google Compute Engine has three Operation resources:
4821 #
4822 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4823 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004824 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4825 #
4826 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004827 # - For global operations, use the `globalOperations` resource.
4828 # - For regional operations, use the `regionOperations` resource.
4829 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004830 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004831 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07004832 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4833 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4834 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4835 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4836 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4837 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004838 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004839 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4840 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4841 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004842 },
4843 ],
4844 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004845 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
4846 &quot;httpErrorStatusCode&quot;: 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.
4847 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4848 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4849 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4850 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4851 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4852 &quot;progress&quot;: 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.
4853 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4854 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4855 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4856 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
4857 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4858 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4859 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
4860 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4861 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4862 {
4863 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4864 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4865 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4866 {
4867 &quot;key&quot;: &quot;A String&quot;, # [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).
4868 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4869 },
4870 ],
4871 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4872 },
4873 ],
4874 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004875 }</pre>
4876</div>
4877
4878<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004879 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004880 <pre>Returns permissions that a caller has on the specified resource.
4881
4882Args:
4883 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004884 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004885 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004886 The object takes the form of:
4887
4888{
Bu Sun Kim65020912020-05-20 12:08:20 -07004889 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
4890 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004891 ],
4892 }
4893
4894
4895Returns:
4896 An object of the form:
4897
4898 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004899 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
4900 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004901 ],
4902 }</pre>
4903</div>
4904
4905<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004906 <code class="details" id="update">update(project, urlMap, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004907 <pre>Updates the specified UrlMap resource with the data included in the request.
4908
4909Args:
4910 project: string, Project ID for this request. (required)
4911 urlMap: string, Name of the UrlMap resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004912 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004913 The object takes the form of:
4914
Dan O'Mearadd494642020-05-01 07:42:23 -07004915{ # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07004916 #
4917 # Google Compute Engine has two URL Map resources:
4918 #
4919 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
4920 #
4921 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
4922 #
4923 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
4924 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004925 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
4926 #
4927 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
4928 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004929 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
4930 #
4931 # 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.
4932 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
4933 &quot;defaultRouteAction&quot;: { # 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.
4934 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004935 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004936 # defaultRouteAction has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004937 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004938 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004939 &quot;allowCredentials&quot;: 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.
4940 # Default is false.
4941 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4942 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004943 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004944 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4945 &quot;A String&quot;,
4946 ],
4947 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4948 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4949 &quot;A String&quot;,
4950 ],
4951 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4952 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4953 &quot;A String&quot;,
4954 ],
4955 &quot;disabled&quot;: 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.
4956 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4957 &quot;A String&quot;,
4958 ],
4959 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
4960 },
4961 &quot;faultInjectionPolicy&quot;: { # 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.
4962 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004963 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004964 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
4965 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4966 # The value must be between 200 and 599 inclusive.
4967 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4968 # The value must be between 0.0 and 100.0 inclusive.
4969 },
4970 &quot;delay&quot;: { # 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.
4971 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
4972 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
4973 &quot;seconds&quot;: &quot;A String&quot;, # 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
4974 },
4975 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4976 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004977 },
4978 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004979 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004980 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004981 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4982 },
4983 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004984 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004985 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4986 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
4987 # 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.
4988 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
4989 &quot;seconds&quot;: &quot;A String&quot;, # 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
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004990 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004991 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4992 # - 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.
4993 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4994 # -
4995 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4996 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4997 # - 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.
4998 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4999 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5000 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5001 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5002 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005003 ],
5004 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005005 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
5006 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005007 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005008 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
5009 &quot;seconds&quot;: &quot;A String&quot;, # 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
5010 },
5011 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005012 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005013 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005014 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005015 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07005016 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
5017 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005018 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005019 &quot;weightedBackendServices&quot;: [ # 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-zero number.
5020 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07005021 { # 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
5022 &quot;backendService&quot;: &quot;A String&quot;, # 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.
5023 &quot;headerAction&quot;: { # 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.
5024 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005025 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5026 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005027 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5028 { # Specification determining how headers are added to requests or responses.
5029 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5030 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5031 &quot;replace&quot;: 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.
5032 # The default value is false.
5033 },
5034 ],
5035 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5036 &quot;A String&quot;,
5037 ],
5038 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5039 { # Specification determining how headers are added to requests or responses.
5040 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5041 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5042 &quot;replace&quot;: 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.
5043 # The default value is false.
5044 },
5045 ],
5046 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
5047 &quot;A String&quot;,
5048 ],
5049 },
5050 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5051 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
5052 # The value must be between 0 and 1000
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005053 },
5054 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005055 },
5056 &quot;defaultService&quot;: &quot;A String&quot;, # 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.
5057 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005058 # defaultService has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005059 &quot;defaultUrlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
5060 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005061 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005062 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
5063 # The value must be between 1 and 255 characters.
5064 &quot;httpsRedirect&quot;: 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.
5065 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5066 # The default is set to false.
5067 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
5068 # 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.
5069 # The value must be between 1 and 1024 characters.
5070 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
5071 # 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.
5072 # The value must be between 1 and 1024 characters.
5073 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5074 # Supported values are:
5075 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5076 # - FOUND, which corresponds to 302.
5077 # - SEE_OTHER which corresponds to 303.
5078 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5079 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5080 &quot;stripQuery&quot;: 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.
5081 # The default is set to false.
5082 },
5083 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
5084 &quot;fingerprint&quot;: &quot;A String&quot;, # 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.
5085 #
5086 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
5087 &quot;headerAction&quot;: { # 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.
5088 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005089 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5090 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005091 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5092 { # Specification determining how headers are added to requests or responses.
5093 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5094 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5095 &quot;replace&quot;: 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.
5096 # The default value is false.
5097 },
5098 ],
5099 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5100 &quot;A String&quot;,
5101 ],
5102 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5103 { # Specification determining how headers are added to requests or responses.
5104 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5105 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5106 &quot;replace&quot;: 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.
5107 # The default value is false.
5108 },
5109 ],
5110 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
5111 &quot;A String&quot;,
5112 ],
5113 },
5114 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
5115 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
5116 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
5117 &quot;hosts&quot;: [ # 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 ..
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005118 # * based matching is not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005119 &quot;A String&quot;,
5120 ],
5121 &quot;pathMatcher&quot;: &quot;A String&quot;, # The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL&#x27;s host portion.
5122 },
5123 ],
5124 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
5125 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
5126 &quot;name&quot;: &quot;A String&quot;, # 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.
5127 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
5128 { # 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.
5129 &quot;defaultRouteAction&quot;: { # 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.
5130 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005131 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathMatcher&#x27;s defaultRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07005132 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005133 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005134 &quot;allowCredentials&quot;: 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.
5135 # Default is false.
5136 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
5137 &quot;A String&quot;,
5138 ],
5139 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
5140 &quot;A String&quot;,
5141 ],
5142 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
5143 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5144 &quot;A String&quot;,
5145 ],
5146 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
5147 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5148 &quot;A String&quot;,
5149 ],
5150 &quot;disabled&quot;: 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.
5151 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
5152 &quot;A String&quot;,
5153 ],
5154 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
5155 },
5156 &quot;faultInjectionPolicy&quot;: { # 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.
5157 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005158 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005159 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
5160 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
5161 # The value must be between 200 and 599 inclusive.
5162 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5163 # The value must be between 0.0 and 100.0 inclusive.
5164 },
5165 &quot;delay&quot;: { # 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.
5166 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
5167 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
5168 &quot;seconds&quot;: &quot;A String&quot;, # 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
5169 },
5170 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5171 # The value must be between 0.0 and 100.0 inclusive.
5172 },
5173 },
5174 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005175 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005176 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
5177 },
5178 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005179 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005180 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5181 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
5182 # 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.
5183 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
5184 &quot;seconds&quot;: &quot;A String&quot;, # 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
5185 },
5186 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5187 # - 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.
5188 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5189 # -
5190 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5191 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5192 # - 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.
5193 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5194 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5195 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5196 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5197 &quot;A String&quot;,
5198 ],
5199 },
5200 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
5201 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005202 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005203 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
5204 &quot;seconds&quot;: &quot;A String&quot;, # 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
5205 },
5206 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005207 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005208 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005209 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
5210 # The value must be between 1 and 255 characters.
5211 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
5212 # The value must be between 1 and 1024 characters.
5213 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005214 &quot;weightedBackendServices&quot;: [ # 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-zero number.
5215 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07005216 { # 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
5217 &quot;backendService&quot;: &quot;A String&quot;, # 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.
5218 &quot;headerAction&quot;: { # 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.
5219 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005220 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5221 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005222 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5223 { # Specification determining how headers are added to requests or responses.
5224 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5225 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5226 &quot;replace&quot;: 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.
5227 # The default value is false.
5228 },
5229 ],
5230 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5231 &quot;A String&quot;,
5232 ],
5233 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5234 { # Specification determining how headers are added to requests or responses.
5235 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5236 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5237 &quot;replace&quot;: 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.
5238 # The default value is false.
5239 },
5240 ],
5241 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
5242 &quot;A String&quot;,
5243 ],
5244 },
5245 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5246 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
5247 # The value must be between 0 and 1000
5248 },
5249 ],
5250 },
5251 &quot;defaultService&quot;: &quot;A String&quot;, # 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:
5252 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
5253 # - compute/v1/projects/project/global/backendServices/backendService
5254 # - 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.
5255 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
5256 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
5257 # - compute.backendBuckets.use
5258 # - compute.backendServices.use
5259 &quot;defaultUrlRedirect&quot;: { # 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.
5260 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005261 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005262 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
5263 # The value must be between 1 and 255 characters.
5264 &quot;httpsRedirect&quot;: 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.
5265 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5266 # The default is set to false.
5267 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
5268 # 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.
5269 # The value must be between 1 and 1024 characters.
5270 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
5271 # 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.
5272 # The value must be between 1 and 1024 characters.
5273 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5274 # Supported values are:
5275 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5276 # - FOUND, which corresponds to 302.
5277 # - SEE_OTHER which corresponds to 303.
5278 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5279 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5280 &quot;stripQuery&quot;: 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.
5281 # The default is set to false.
5282 },
5283 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
5284 &quot;headerAction&quot;: { # 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.
5285 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005286 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5287 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005288 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5289 { # Specification determining how headers are added to requests or responses.
5290 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5291 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5292 &quot;replace&quot;: 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.
5293 # The default value is false.
5294 },
5295 ],
5296 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5297 &quot;A String&quot;,
5298 ],
5299 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5300 { # Specification determining how headers are added to requests or responses.
5301 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5302 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5303 &quot;replace&quot;: 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.
5304 # The default value is false.
5305 },
5306 ],
5307 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
5308 &quot;A String&quot;,
5309 ],
5310 },
5311 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
5312 &quot;pathRules&quot;: [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that&#x27;s required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.
5313 # 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.
5314 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
5315 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
5316 &quot;paths&quot;: [ # 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.
5317 &quot;A String&quot;,
5318 ],
5319 &quot;routeAction&quot;: { # 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.
5320 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005321 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07005322 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005323 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005324 &quot;allowCredentials&quot;: 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.
5325 # Default is false.
5326 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
5327 &quot;A String&quot;,
5328 ],
5329 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
5330 &quot;A String&quot;,
5331 ],
5332 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
5333 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5334 &quot;A String&quot;,
5335 ],
5336 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
5337 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5338 &quot;A String&quot;,
5339 ],
5340 &quot;disabled&quot;: 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.
5341 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
5342 &quot;A String&quot;,
5343 ],
5344 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
5345 },
5346 &quot;faultInjectionPolicy&quot;: { # 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.
5347 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005348 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005349 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
5350 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
5351 # The value must be between 200 and 599 inclusive.
5352 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5353 # The value must be between 0.0 and 100.0 inclusive.
5354 },
5355 &quot;delay&quot;: { # 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.
5356 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
5357 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
5358 &quot;seconds&quot;: &quot;A String&quot;, # 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
5359 },
5360 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5361 # The value must be between 0.0 and 100.0 inclusive.
5362 },
5363 },
5364 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005365 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005366 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
5367 },
5368 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005369 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005370 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5371 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
5372 # 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.
5373 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
5374 &quot;seconds&quot;: &quot;A String&quot;, # 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
5375 },
5376 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5377 # - 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.
5378 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5379 # -
5380 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5381 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5382 # - 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.
5383 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5384 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5385 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5386 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5387 &quot;A String&quot;,
5388 ],
5389 },
5390 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
5391 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005392 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005393 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
5394 &quot;seconds&quot;: &quot;A String&quot;, # 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
5395 },
5396 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005397 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005398 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005399 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
5400 # The value must be between 1 and 255 characters.
5401 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
5402 # The value must be between 1 and 1024 characters.
5403 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005404 &quot;weightedBackendServices&quot;: [ # 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-zero number.
5405 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07005406 { # 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
5407 &quot;backendService&quot;: &quot;A String&quot;, # 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.
5408 &quot;headerAction&quot;: { # 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.
5409 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005410 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5411 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005412 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5413 { # Specification determining how headers are added to requests or responses.
5414 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5415 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5416 &quot;replace&quot;: 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.
5417 # The default value is false.
5418 },
5419 ],
5420 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5421 &quot;A String&quot;,
5422 ],
5423 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5424 { # Specification determining how headers are added to requests or responses.
5425 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5426 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5427 &quot;replace&quot;: 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.
5428 # The default value is false.
5429 },
5430 ],
5431 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
5432 &quot;A String&quot;,
5433 ],
5434 },
5435 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5436 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
5437 # The value must be between 0 and 1000
5438 },
5439 ],
5440 },
5441 &quot;service&quot;: &quot;A String&quot;, # 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.
5442 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5443 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
5444 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005445 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005446 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
5447 # The value must be between 1 and 255 characters.
5448 &quot;httpsRedirect&quot;: 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.
5449 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5450 # The default is set to false.
5451 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
5452 # 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.
5453 # The value must be between 1 and 1024 characters.
5454 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
5455 # 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.
5456 # The value must be between 1 and 1024 characters.
5457 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5458 # Supported values are:
5459 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5460 # - FOUND, which corresponds to 302.
5461 # - SEE_OTHER which corresponds to 303.
5462 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5463 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5464 &quot;stripQuery&quot;: 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.
5465 # The default is set to false.
5466 },
5467 },
5468 ],
5469 &quot;routeRules&quot;: [ # 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.
5470 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
5471 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
5472 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
5473 # The description can have a maximum length of 1024 characters.
5474 &quot;headerAction&quot;: { # 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.
5475 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005476 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5477 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005478 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5479 { # Specification determining how headers are added to requests or responses.
5480 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5481 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5482 &quot;replace&quot;: 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.
5483 # The default value is false.
5484 },
5485 ],
5486 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5487 &quot;A String&quot;,
5488 ],
5489 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5490 { # Specification determining how headers are added to requests or responses.
5491 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5492 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5493 &quot;replace&quot;: 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.
5494 # The default value is false.
5495 },
5496 ],
5497 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
5498 &quot;A String&quot;,
5499 ],
5500 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005501 &quot;httpFilterConfigs&quot;: [ # Outbound route specific configuration for networkservices.HttpFilter resources enabled by Traffic Director. httpFilterConfigs only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
5502 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
5503 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
5504 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
5505 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
5506 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
5507 },
5508 ],
5509 &quot;httpFilterMetadata&quot;: [ # Outbound route specific metadata supplied to networkservices.HttpFilter resources enabled by Traffic Director. httpFilterMetadata only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
5510 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
5511 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
5512 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
5513 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
5514 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
5515 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
5516 },
5517 ],
5518 &quot;matchRules&quot;: [ # The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
Bu Sun Kim65020912020-05-20 12:08:20 -07005519 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
5520 &quot;fullPathMatch&quot;: &quot;A String&quot;, # 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.
5521 # fullPathMatch must be between 1 and 1024 characters.
5522 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5523 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
5524 { # matchRule criteria for request header matches.
5525 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
5526 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5527 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
5528 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
5529 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005530 # When the URL map is bound to target gRPC proxy that has validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin.
Bu Sun Kim65020912020-05-20 12:08:20 -07005531 &quot;invertMatch&quot;: 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.
5532 # The default setting is false.
5533 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
5534 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5535 &quot;presentMatch&quot;: True or False, # A header with the contents of headerName must exist. The match takes place whether or not the request&#x27;s header has a value.
5536 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5537 &quot;rangeMatch&quot;: { # 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.
5538 # For example for a range [-5, 0]
5539 # - -3 will match.
5540 # - 0 will not match.
5541 # - 0.25 will not match.
5542 # - -3someString will not match.
5543 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5544 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5545 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
5546 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
5547 },
5548 &quot;regexMatch&quot;: &quot;A String&quot;, # 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
5549 # 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&#x27;s port specifier.
5550 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5551 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
5552 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
5553 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5554 },
5555 ],
5556 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
5557 # The default value is false.
5558 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005559 # Not supported when the URL map is bound to target gRPC proxy.
5560 &quot;metadataFilters&quot;: [ # 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. When there is a match, the relevant routing configuration is made available to those proxies.
5561 # 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. If multiple metadataFilters are specified, all of them need to be satisfied in order to be considered a match.
Bu Sun Kim65020912020-05-20 12:08:20 -07005562 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
5563 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005564 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005565 { # 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.
5566 # 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.
5567 # 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=&quot;https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/base.proto#envoy-api-msg-core-node&quot; Node metadata of their XDS requests to loadbalancers.
5568 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
5569 # This list must not be empty and can have at the most 64 entries.
5570 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
5571 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
5572 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
5573 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
5574 # value can have a maximum length of 1024 characters.
5575 },
5576 ],
5577 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
5578 # Supported values are:
5579 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
5580 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
5581 },
5582 ],
5583 &quot;prefixMatch&quot;: &quot;A String&quot;, # For satisfying the matchRule condition, the request&#x27;s path must begin with the specified prefixMatch. prefixMatch must begin with a /.
5584 # The value must be between 1 and 1024 characters.
5585 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5586 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005587 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005588 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
5589 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
5590 # Only one of presentMatch, exactMatch or regexMatch must be set.
5591 &quot;name&quot;: &quot;A String&quot;, # 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.
5592 &quot;presentMatch&quot;: 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.
5593 # Only one of presentMatch, exactMatch or regexMatch must be set.
5594 &quot;regexMatch&quot;: &quot;A String&quot;, # 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
5595 # Only one of presentMatch, exactMatch or regexMatch must be set.
5596 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
5597 },
5598 ],
5599 &quot;regexMatch&quot;: &quot;A String&quot;, # 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
5600 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5601 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
5602 },
5603 ],
5604 &quot;priority&quot;: 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.
5605 # 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.
5606 # 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.
5607 &quot;routeAction&quot;: { # 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.
5608 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005609 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a routeRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07005610 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005611 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005612 &quot;allowCredentials&quot;: 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.
5613 # Default is false.
5614 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
5615 &quot;A String&quot;,
5616 ],
5617 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
5618 &quot;A String&quot;,
5619 ],
5620 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
5621 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5622 &quot;A String&quot;,
5623 ],
5624 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
5625 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5626 &quot;A String&quot;,
5627 ],
5628 &quot;disabled&quot;: 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.
5629 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
5630 &quot;A String&quot;,
5631 ],
5632 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
5633 },
5634 &quot;faultInjectionPolicy&quot;: { # 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.
5635 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005636 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005637 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
5638 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
5639 # The value must be between 200 and 599 inclusive.
5640 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5641 # The value must be between 0.0 and 100.0 inclusive.
5642 },
5643 &quot;delay&quot;: { # 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.
5644 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
5645 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
5646 &quot;seconds&quot;: &quot;A String&quot;, # 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
5647 },
5648 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5649 # The value must be between 0.0 and 100.0 inclusive.
5650 },
5651 },
5652 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005653 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005654 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
5655 },
5656 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005657 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005658 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5659 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
5660 # 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.
5661 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
5662 &quot;seconds&quot;: &quot;A String&quot;, # 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
5663 },
5664 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5665 # - 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.
5666 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5667 # -
5668 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5669 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5670 # - 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.
5671 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5672 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5673 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5674 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5675 &quot;A String&quot;,
5676 ],
5677 },
5678 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
5679 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005680 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005681 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
5682 &quot;seconds&quot;: &quot;A String&quot;, # 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
5683 },
5684 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005685 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005686 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005687 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
5688 # The value must be between 1 and 255 characters.
5689 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
5690 # The value must be between 1 and 1024 characters.
5691 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005692 &quot;weightedBackendServices&quot;: [ # 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-zero number.
5693 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07005694 { # 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
5695 &quot;backendService&quot;: &quot;A String&quot;, # 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.
5696 &quot;headerAction&quot;: { # 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.
5697 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005698 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5699 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005700 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5701 { # Specification determining how headers are added to requests or responses.
5702 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5703 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5704 &quot;replace&quot;: 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.
5705 # The default value is false.
5706 },
5707 ],
5708 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5709 &quot;A String&quot;,
5710 ],
5711 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5712 { # Specification determining how headers are added to requests or responses.
5713 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5714 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5715 &quot;replace&quot;: 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.
5716 # The default value is false.
5717 },
5718 ],
5719 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
5720 &quot;A String&quot;,
5721 ],
5722 },
5723 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5724 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
5725 # The value must be between 0 and 1000
5726 },
5727 ],
5728 },
5729 &quot;service&quot;: &quot;A String&quot;, # 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.
5730 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5731 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
5732 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005733 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005734 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
5735 # The value must be between 1 and 255 characters.
5736 &quot;httpsRedirect&quot;: 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.
5737 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5738 # The default is set to false.
5739 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
5740 # 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.
5741 # The value must be between 1 and 1024 characters.
5742 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
5743 # 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.
5744 # The value must be between 1 and 1024 characters.
5745 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5746 # Supported values are:
5747 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5748 # - FOUND, which corresponds to 302.
5749 # - SEE_OTHER which corresponds to 303.
5750 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5751 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5752 &quot;stripQuery&quot;: 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.
5753 # The default is set to false.
5754 },
5755 },
5756 ],
5757 },
5758 ],
5759 &quot;region&quot;: &quot;A String&quot;, # [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.
5760 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5761 &quot;tests&quot;: [ # 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005762 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005763 { # Message for the expected URL mappings.
5764 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005765 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL. If headers contains a host header, then host must also match the header value.
Bu Sun Kim65020912020-05-20 12:08:20 -07005766 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005767 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
5768 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07005769 },
5770 ],
5771}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005772
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005773 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.
5774
5775For 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.
5776
5777The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005778
5779Returns:
5780 An object of the form:
5781
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005782 { # Represents an Operation resource.
5783 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005784 # Google Compute Engine has three Operation resources:
5785 #
5786 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5787 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005788 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5789 #
5790 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005791 # - For global operations, use the `globalOperations` resource.
5792 # - For regional operations, use the `regionOperations` resource.
5793 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005794 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005795 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07005796 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5797 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5798 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5799 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5800 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5801 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005802 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005803 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5804 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5805 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005806 },
5807 ],
5808 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005809 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
5810 &quot;httpErrorStatusCode&quot;: 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.
5811 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5812 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5813 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5814 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5815 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5816 &quot;progress&quot;: 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.
5817 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5818 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5819 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
5820 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
5821 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5822 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5823 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
5824 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5825 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5826 {
5827 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
5828 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5829 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5830 {
5831 &quot;key&quot;: &quot;A String&quot;, # [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).
5832 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5833 },
5834 ],
5835 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5836 },
5837 ],
5838 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005839 }</pre>
5840</div>
5841
5842<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005843 <code class="details" id="validate">validate(project, urlMap, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005844 <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.
5845
5846Args:
5847 project: string, Project ID for this request. (required)
5848 urlMap: string, Name of the UrlMap resource to be validated as. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005849 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005850 The object takes the form of:
5851
5852{
Bu Sun Kim65020912020-05-20 12:08:20 -07005853 &quot;resource&quot;: { # Represents a URL Map resource. # Content of the UrlMap to be validated.
5854 #
5855 # Google Compute Engine has two URL Map resources:
5856 #
5857 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
5858 #
5859 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
5860 #
5861 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
5862 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005863 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
5864 #
5865 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
5866 #
Bu Sun Kim65020912020-05-20 12:08:20 -07005867 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
5868 #
5869 # 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.
5870 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
5871 &quot;defaultRouteAction&quot;: { # 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.
5872 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005873 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005874 # defaultRouteAction has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005875 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005876 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005877 &quot;allowCredentials&quot;: 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.
5878 # Default is false.
5879 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
5880 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005881 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005882 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
5883 &quot;A String&quot;,
5884 ],
5885 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
5886 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5887 &quot;A String&quot;,
5888 ],
5889 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
5890 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5891 &quot;A String&quot;,
5892 ],
5893 &quot;disabled&quot;: 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.
5894 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
5895 &quot;A String&quot;,
5896 ],
5897 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
5898 },
5899 &quot;faultInjectionPolicy&quot;: { # 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.
5900 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005901 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005902 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
5903 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
5904 # The value must be between 200 and 599 inclusive.
5905 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5906 # The value must be between 0.0 and 100.0 inclusive.
5907 },
5908 &quot;delay&quot;: { # 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.
5909 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
5910 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
5911 &quot;seconds&quot;: &quot;A String&quot;, # 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
5912 },
5913 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5914 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005915 },
5916 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005917 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005918 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005919 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
5920 },
5921 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005922 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005923 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5924 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
5925 # 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.
5926 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
5927 &quot;seconds&quot;: &quot;A String&quot;, # 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
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005928 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005929 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5930 # - 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.
5931 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5932 # -
5933 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5934 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5935 # - 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.
5936 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5937 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5938 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5939 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5940 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005941 ],
5942 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005943 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
5944 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005945 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005946 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
5947 &quot;seconds&quot;: &quot;A String&quot;, # 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
5948 },
5949 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005950 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005951 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005952 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005953 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07005954 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
5955 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005956 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005957 &quot;weightedBackendServices&quot;: [ # 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-zero number.
5958 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07005959 { # 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
5960 &quot;backendService&quot;: &quot;A String&quot;, # 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.
5961 &quot;headerAction&quot;: { # 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.
5962 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005963 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5964 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005965 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5966 { # Specification determining how headers are added to requests or responses.
5967 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5968 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5969 &quot;replace&quot;: 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.
5970 # The default value is false.
5971 },
5972 ],
5973 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5974 &quot;A String&quot;,
5975 ],
5976 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5977 { # Specification determining how headers are added to requests or responses.
5978 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5979 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5980 &quot;replace&quot;: 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.
5981 # The default value is false.
5982 },
5983 ],
5984 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
5985 &quot;A String&quot;,
5986 ],
5987 },
5988 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5989 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
5990 # The value must be between 0 and 1000
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005991 },
5992 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005993 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005994 &quot;defaultService&quot;: &quot;A String&quot;, # 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.
5995 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005996 # defaultService has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005997 &quot;defaultUrlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
5998 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005999 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07006000 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
6001 # The value must be between 1 and 255 characters.
6002 &quot;httpsRedirect&quot;: 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.
6003 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
6004 # The default is set to false.
6005 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
6006 # 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.
6007 # The value must be between 1 and 1024 characters.
6008 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
6009 # 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.
6010 # The value must be between 1 and 1024 characters.
6011 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
6012 # Supported values are:
6013 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
6014 # - FOUND, which corresponds to 302.
6015 # - SEE_OTHER which corresponds to 303.
6016 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
6017 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
6018 &quot;stripQuery&quot;: 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.
6019 # The default is set to false.
6020 },
6021 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
6022 &quot;fingerprint&quot;: &quot;A String&quot;, # 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.
6023 #
6024 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
6025 &quot;headerAction&quot;: { # 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.
6026 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006027 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
6028 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006029 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
6030 { # Specification determining how headers are added to requests or responses.
6031 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6032 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6033 &quot;replace&quot;: 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.
6034 # The default value is false.
6035 },
6036 ],
6037 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
6038 &quot;A String&quot;,
6039 ],
6040 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
6041 { # Specification determining how headers are added to requests or responses.
6042 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6043 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6044 &quot;replace&quot;: 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.
6045 # The default value is false.
6046 },
6047 ],
6048 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
6049 &quot;A String&quot;,
6050 ],
6051 },
6052 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
6053 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
6054 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
6055 &quot;hosts&quot;: [ # 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 ..
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006056 # * based matching is not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006057 &quot;A String&quot;,
6058 ],
6059 &quot;pathMatcher&quot;: &quot;A String&quot;, # The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL&#x27;s host portion.
6060 },
6061 ],
6062 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
6063 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
6064 &quot;name&quot;: &quot;A String&quot;, # 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.
6065 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
6066 { # 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.
6067 &quot;defaultRouteAction&quot;: { # 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.
6068 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07006069 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathMatcher&#x27;s defaultRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07006070 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006071 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07006072 &quot;allowCredentials&quot;: 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.
6073 # Default is false.
6074 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
6075 &quot;A String&quot;,
6076 ],
6077 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
6078 &quot;A String&quot;,
6079 ],
6080 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
6081 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
6082 &quot;A String&quot;,
6083 ],
6084 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
6085 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
6086 &quot;A String&quot;,
6087 ],
6088 &quot;disabled&quot;: 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.
6089 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
6090 &quot;A String&quot;,
6091 ],
6092 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
6093 },
6094 &quot;faultInjectionPolicy&quot;: { # 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.
6095 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006096 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006097 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
6098 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
6099 # The value must be between 200 and 599 inclusive.
6100 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
6101 # The value must be between 0.0 and 100.0 inclusive.
6102 },
6103 &quot;delay&quot;: { # 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.
6104 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
6105 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
6106 &quot;seconds&quot;: &quot;A String&quot;, # 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
6107 },
6108 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
6109 # The value must be between 0.0 and 100.0 inclusive.
6110 },
6111 },
6112 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006113 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006114 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
6115 },
6116 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006117 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006118 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
6119 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
6120 # 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.
6121 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
6122 &quot;seconds&quot;: &quot;A String&quot;, # 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
6123 },
6124 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
6125 # - 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.
6126 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
6127 # -
6128 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
6129 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
6130 # - 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.
6131 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
6132 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
6133 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
6134 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
6135 &quot;A String&quot;,
6136 ],
6137 },
6138 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
6139 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006140 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006141 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
6142 &quot;seconds&quot;: &quot;A String&quot;, # 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
6143 },
6144 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07006145 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006146 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006147 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
6148 # The value must be between 1 and 255 characters.
6149 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
6150 # The value must be between 1 and 1024 characters.
6151 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006152 &quot;weightedBackendServices&quot;: [ # 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-zero number.
6153 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07006154 { # 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
6155 &quot;backendService&quot;: &quot;A String&quot;, # 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.
6156 &quot;headerAction&quot;: { # 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.
6157 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006158 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
6159 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006160 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
6161 { # Specification determining how headers are added to requests or responses.
6162 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6163 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6164 &quot;replace&quot;: 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.
6165 # The default value is false.
6166 },
6167 ],
6168 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
6169 &quot;A String&quot;,
6170 ],
6171 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
6172 { # Specification determining how headers are added to requests or responses.
6173 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6174 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6175 &quot;replace&quot;: 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.
6176 # The default value is false.
6177 },
6178 ],
6179 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
6180 &quot;A String&quot;,
6181 ],
6182 },
6183 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
6184 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
6185 # The value must be between 0 and 1000
6186 },
6187 ],
6188 },
6189 &quot;defaultService&quot;: &quot;A String&quot;, # 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:
6190 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
6191 # - compute/v1/projects/project/global/backendServices/backendService
6192 # - 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.
6193 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
6194 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
6195 # - compute.backendBuckets.use
6196 # - compute.backendServices.use
6197 &quot;defaultUrlRedirect&quot;: { # 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.
6198 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006199 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07006200 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
6201 # The value must be between 1 and 255 characters.
6202 &quot;httpsRedirect&quot;: 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.
6203 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
6204 # The default is set to false.
6205 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
6206 # 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.
6207 # The value must be between 1 and 1024 characters.
6208 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
6209 # 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.
6210 # The value must be between 1 and 1024 characters.
6211 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
6212 # Supported values are:
6213 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
6214 # - FOUND, which corresponds to 302.
6215 # - SEE_OTHER which corresponds to 303.
6216 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
6217 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
6218 &quot;stripQuery&quot;: 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.
6219 # The default is set to false.
6220 },
6221 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
6222 &quot;headerAction&quot;: { # 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.
6223 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006224 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
6225 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006226 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
6227 { # Specification determining how headers are added to requests or responses.
6228 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6229 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6230 &quot;replace&quot;: 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.
6231 # The default value is false.
6232 },
6233 ],
6234 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
6235 &quot;A String&quot;,
6236 ],
6237 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
6238 { # Specification determining how headers are added to requests or responses.
6239 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6240 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6241 &quot;replace&quot;: 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.
6242 # The default value is false.
6243 },
6244 ],
6245 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
6246 &quot;A String&quot;,
6247 ],
6248 },
6249 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
6250 &quot;pathRules&quot;: [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that&#x27;s required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.
6251 # 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.
6252 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
6253 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
6254 &quot;paths&quot;: [ # 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.
6255 &quot;A String&quot;,
6256 ],
6257 &quot;routeAction&quot;: { # 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.
6258 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07006259 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07006260 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006261 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07006262 &quot;allowCredentials&quot;: 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.
6263 # Default is false.
6264 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
6265 &quot;A String&quot;,
6266 ],
6267 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
6268 &quot;A String&quot;,
6269 ],
6270 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
6271 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
6272 &quot;A String&quot;,
6273 ],
6274 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
6275 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
6276 &quot;A String&quot;,
6277 ],
6278 &quot;disabled&quot;: 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.
6279 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
6280 &quot;A String&quot;,
6281 ],
6282 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
6283 },
6284 &quot;faultInjectionPolicy&quot;: { # 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.
6285 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006286 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006287 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
6288 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
6289 # The value must be between 200 and 599 inclusive.
6290 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
6291 # The value must be between 0.0 and 100.0 inclusive.
6292 },
6293 &quot;delay&quot;: { # 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.
6294 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
6295 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
6296 &quot;seconds&quot;: &quot;A String&quot;, # 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
6297 },
6298 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
6299 # The value must be between 0.0 and 100.0 inclusive.
6300 },
6301 },
6302 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006303 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006304 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
6305 },
6306 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006307 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006308 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
6309 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
6310 # 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.
6311 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
6312 &quot;seconds&quot;: &quot;A String&quot;, # 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
6313 },
6314 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
6315 # - 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.
6316 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
6317 # -
6318 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
6319 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
6320 # - 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.
6321 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
6322 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
6323 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
6324 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
6325 &quot;A String&quot;,
6326 ],
6327 },
6328 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
6329 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006330 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006331 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
6332 &quot;seconds&quot;: &quot;A String&quot;, # 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
6333 },
6334 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07006335 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006336 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006337 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
6338 # The value must be between 1 and 255 characters.
6339 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
6340 # The value must be between 1 and 1024 characters.
6341 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006342 &quot;weightedBackendServices&quot;: [ # 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-zero number.
6343 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07006344 { # 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
6345 &quot;backendService&quot;: &quot;A String&quot;, # 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.
6346 &quot;headerAction&quot;: { # 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.
6347 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006348 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
6349 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006350 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
6351 { # Specification determining how headers are added to requests or responses.
6352 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6353 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6354 &quot;replace&quot;: 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.
6355 # The default value is false.
6356 },
6357 ],
6358 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
6359 &quot;A String&quot;,
6360 ],
6361 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
6362 { # Specification determining how headers are added to requests or responses.
6363 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6364 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6365 &quot;replace&quot;: 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.
6366 # The default value is false.
6367 },
6368 ],
6369 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
6370 &quot;A String&quot;,
6371 ],
6372 },
6373 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
6374 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
6375 # The value must be between 0 and 1000
6376 },
6377 ],
6378 },
6379 &quot;service&quot;: &quot;A String&quot;, # 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.
6380 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
6381 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
6382 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006383 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07006384 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
6385 # The value must be between 1 and 255 characters.
6386 &quot;httpsRedirect&quot;: 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.
6387 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
6388 # The default is set to false.
6389 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
6390 # 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.
6391 # The value must be between 1 and 1024 characters.
6392 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
6393 # 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.
6394 # The value must be between 1 and 1024 characters.
6395 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
6396 # Supported values are:
6397 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
6398 # - FOUND, which corresponds to 302.
6399 # - SEE_OTHER which corresponds to 303.
6400 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
6401 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
6402 &quot;stripQuery&quot;: 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.
6403 # The default is set to false.
6404 },
6405 },
6406 ],
6407 &quot;routeRules&quot;: [ # 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.
6408 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
6409 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
6410 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
6411 # The description can have a maximum length of 1024 characters.
6412 &quot;headerAction&quot;: { # 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.
6413 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006414 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
6415 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006416 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
6417 { # Specification determining how headers are added to requests or responses.
6418 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6419 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6420 &quot;replace&quot;: 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.
6421 # The default value is false.
6422 },
6423 ],
6424 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
6425 &quot;A String&quot;,
6426 ],
6427 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
6428 { # Specification determining how headers are added to requests or responses.
6429 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6430 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6431 &quot;replace&quot;: 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.
6432 # The default value is false.
6433 },
6434 ],
6435 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
6436 &quot;A String&quot;,
6437 ],
6438 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006439 &quot;httpFilterConfigs&quot;: [ # Outbound route specific configuration for networkservices.HttpFilter resources enabled by Traffic Director. httpFilterConfigs only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
6440 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
6441 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
6442 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
6443 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
6444 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
6445 },
6446 ],
6447 &quot;httpFilterMetadata&quot;: [ # Outbound route specific metadata supplied to networkservices.HttpFilter resources enabled by Traffic Director. httpFilterMetadata only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
6448 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
6449 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
6450 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
6451 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
6452 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
6453 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
6454 },
6455 ],
6456 &quot;matchRules&quot;: [ # The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
Bu Sun Kim65020912020-05-20 12:08:20 -07006457 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
6458 &quot;fullPathMatch&quot;: &quot;A String&quot;, # 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.
6459 # fullPathMatch must be between 1 and 1024 characters.
6460 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
6461 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
6462 { # matchRule criteria for request header matches.
6463 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
6464 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
6465 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
6466 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
6467 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006468 # When the URL map is bound to target gRPC proxy that has validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin.
Bu Sun Kim65020912020-05-20 12:08:20 -07006469 &quot;invertMatch&quot;: 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.
6470 # The default setting is false.
6471 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
6472 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
6473 &quot;presentMatch&quot;: True or False, # A header with the contents of headerName must exist. The match takes place whether or not the request&#x27;s header has a value.
6474 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
6475 &quot;rangeMatch&quot;: { # 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.
6476 # For example for a range [-5, 0]
6477 # - -3 will match.
6478 # - 0 will not match.
6479 # - 0.25 will not match.
6480 # - -3someString will not match.
6481 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
6482 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
6483 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
6484 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
6485 },
6486 &quot;regexMatch&quot;: &quot;A String&quot;, # 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
6487 # 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&#x27;s port specifier.
6488 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
6489 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
6490 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
6491 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
6492 },
6493 ],
6494 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
6495 # The default value is false.
6496 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006497 # Not supported when the URL map is bound to target gRPC proxy.
6498 &quot;metadataFilters&quot;: [ # 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. When there is a match, the relevant routing configuration is made available to those proxies.
6499 # 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. If multiple metadataFilters are specified, all of them need to be satisfied in order to be considered a match.
Bu Sun Kim65020912020-05-20 12:08:20 -07006500 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
6501 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006502 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006503 { # 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.
6504 # 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.
6505 # 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=&quot;https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/base.proto#envoy-api-msg-core-node&quot; Node metadata of their XDS requests to loadbalancers.
6506 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
6507 # This list must not be empty and can have at the most 64 entries.
6508 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
6509 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
6510 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
6511 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
6512 # value can have a maximum length of 1024 characters.
6513 },
6514 ],
6515 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
6516 # Supported values are:
6517 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
6518 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
6519 },
6520 ],
6521 &quot;prefixMatch&quot;: &quot;A String&quot;, # For satisfying the matchRule condition, the request&#x27;s path must begin with the specified prefixMatch. prefixMatch must begin with a /.
6522 # The value must be between 1 and 1024 characters.
6523 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
6524 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006525 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07006526 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
6527 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
6528 # Only one of presentMatch, exactMatch or regexMatch must be set.
6529 &quot;name&quot;: &quot;A String&quot;, # 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.
6530 &quot;presentMatch&quot;: 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.
6531 # Only one of presentMatch, exactMatch or regexMatch must be set.
6532 &quot;regexMatch&quot;: &quot;A String&quot;, # 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
6533 # Only one of presentMatch, exactMatch or regexMatch must be set.
6534 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
6535 },
6536 ],
6537 &quot;regexMatch&quot;: &quot;A String&quot;, # 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
6538 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
6539 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
6540 },
6541 ],
6542 &quot;priority&quot;: 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.
6543 # 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.
6544 # 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.
6545 &quot;routeAction&quot;: { # 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.
6546 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006547 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a routeRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07006548 &quot;corsPolicy&quot;: { # 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006549 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07006550 &quot;allowCredentials&quot;: 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.
6551 # Default is false.
6552 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
6553 &quot;A String&quot;,
6554 ],
6555 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
6556 &quot;A String&quot;,
6557 ],
6558 &quot;allowOriginRegexes&quot;: [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
6559 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
6560 &quot;A String&quot;,
6561 ],
6562 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
6563 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
6564 &quot;A String&quot;,
6565 ],
6566 &quot;disabled&quot;: 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.
6567 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
6568 &quot;A String&quot;,
6569 ],
6570 &quot;maxAge&quot;: 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
6571 },
6572 &quot;faultInjectionPolicy&quot;: { # 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.
6573 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006574 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006575 &quot;abort&quot;: { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
6576 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
6577 # The value must be between 200 and 599 inclusive.
6578 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
6579 # The value must be between 0.0 and 100.0 inclusive.
6580 },
6581 &quot;delay&quot;: { # 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.
6582 &quot;fixedDelay&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
6583 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
6584 &quot;seconds&quot;: &quot;A String&quot;, # 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
6585 },
6586 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
6587 # The value must be between 0.0 and 100.0 inclusive.
6588 },
6589 },
6590 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;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&#x27;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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006591 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006592 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
6593 },
6594 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006595 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006596 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
6597 &quot;perTryTimeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
6598 # 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.
6599 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
6600 &quot;seconds&quot;: &quot;A String&quot;, # 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
6601 },
6602 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
6603 # - 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.
6604 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
6605 # -
6606 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
6607 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
6608 # - 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.
6609 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
6610 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
6611 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
6612 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
6613 &quot;A String&quot;,
6614 ],
6615 },
6616 &quot;timeout&quot;: { # 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 &quot;day&quot; or &quot;month&quot;. 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.
6617 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006618 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006619 &quot;nanos&quot;: 42, # Span of time that&#x27;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.
6620 &quot;seconds&quot;: &quot;A String&quot;, # 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
6621 },
6622 &quot;urlRewrite&quot;: { # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07006623 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006624 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006625 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
6626 # The value must be between 1 and 255 characters.
6627 &quot;pathPrefixRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected backend service, the matching portion of the request&#x27;s path is replaced by pathPrefixRewrite.
6628 # The value must be between 1 and 1024 characters.
6629 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006630 &quot;weightedBackendServices&quot;: [ # 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-zero number.
6631 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07006632 { # 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
6633 &quot;backendService&quot;: &quot;A String&quot;, # 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.
6634 &quot;headerAction&quot;: { # 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.
6635 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006636 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
6637 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006638 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
6639 { # Specification determining how headers are added to requests or responses.
6640 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6641 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6642 &quot;replace&quot;: 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.
6643 # The default value is false.
6644 },
6645 ],
6646 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
6647 &quot;A String&quot;,
6648 ],
6649 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
6650 { # Specification determining how headers are added to requests or responses.
6651 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6652 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6653 &quot;replace&quot;: 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.
6654 # The default value is false.
6655 },
6656 ],
6657 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
6658 &quot;A String&quot;,
6659 ],
6660 },
6661 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
6662 # The selection of a backend service is determined only for new traffic. Once a user&#x27;s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService&#x27;s session affinity policy.
6663 # The value must be between 0 and 1000
6664 },
6665 ],
6666 },
6667 &quot;service&quot;: &quot;A String&quot;, # 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.
6668 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
6669 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
6670 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006671 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07006672 &quot;hostRedirect&quot;: &quot;A String&quot;, # The host that will be used in the redirect response instead of the one that was supplied in the request.
6673 # The value must be between 1 and 255 characters.
6674 &quot;httpsRedirect&quot;: 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.
6675 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
6676 # The default is set to false.
6677 &quot;pathRedirect&quot;: &quot;A String&quot;, # The path that will be used in the redirect response instead of the one that was supplied in the request.
6678 # 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.
6679 # The value must be between 1 and 1024 characters.
6680 &quot;prefixRedirect&quot;: &quot;A String&quot;, # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
6681 # 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.
6682 # The value must be between 1 and 1024 characters.
6683 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
6684 # Supported values are:
6685 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
6686 # - FOUND, which corresponds to 302.
6687 # - SEE_OTHER which corresponds to 303.
6688 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
6689 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
6690 &quot;stripQuery&quot;: 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.
6691 # The default is set to false.
6692 },
6693 },
6694 ],
6695 },
6696 ],
6697 &quot;region&quot;: &quot;A String&quot;, # [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.
6698 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6699 &quot;tests&quot;: [ # 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006700 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07006701 { # Message for the expected URL mappings.
6702 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006703 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL. If headers contains a host header, then host must also match the header value.
Bu Sun Kim65020912020-05-20 12:08:20 -07006704 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006705 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
6706 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07006707 },
6708 ],
6709 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006710 }
6711
6712
6713Returns:
6714 An object of the form:
6715
6716 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006717 &quot;result&quot;: { # Message representing the validation result for a UrlMap.
6718 &quot;loadErrors&quot;: [
6719 &quot;A String&quot;,
6720 ],
6721 &quot;loadSucceeded&quot;: True or False, # Whether the given UrlMap can be successfully loaded. If false, &#x27;loadErrors&#x27; indicates the reasons.
6722 &quot;testFailures&quot;: [
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006723 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006724 &quot;actualService&quot;: &quot;A String&quot;, # BackendService or BackendBucket returned by load balancer.
6725 &quot;expectedService&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
6726 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL.
6727 &quot;path&quot;: &quot;A String&quot;, # Path portion including query parameters in the URL.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006728 },
6729 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07006730 &quot;testPassed&quot;: True or False, # If successfully loaded, this field indicates whether the test passed. If false, &#x27;testFailures&#x27;s indicate the reason of failure.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006731 },
6732 }</pre>
6733</div>
6734
6735</body></html>