blob: 114d5639e1d99e5249ab2b598de924ec5e25e1c5 [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
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002944For more information, see [Invalidating cached content](/cdn/docs/invalidating-cached-content).
2945
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002946Args:
2947 project: string, Project ID for this request. (required)
2948 urlMap: string, Name of the UrlMap scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002949 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002950 The object takes the form of:
2951
2952{
Bu Sun Kim65020912020-05-20 12:08:20 -07002953 &quot;host&quot;: &quot;A String&quot;, # If set, this invalidation rule will only apply to requests with a Host header matching host.
2954 &quot;path&quot;: &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002955 }
2956
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002957 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.
2958
2959For 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.
2960
2961The 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 -07002962
2963Returns:
2964 An object of the form:
2965
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002966 { # Represents an Operation resource.
2967 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002968 # Google Compute Engine has three Operation resources:
2969 #
2970 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2971 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002972 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2973 #
2974 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002975 # - For global operations, use the `globalOperations` resource.
2976 # - For regional operations, use the `regionOperations` resource.
2977 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002978 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002979 # 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 -07002980 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2981 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2982 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2983 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2984 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2985 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002986 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002987 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2988 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2989 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002990 },
2991 ],
2992 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002993 &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`.
2994 &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.
2995 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2996 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2997 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2998 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2999 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3000 &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.
3001 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3002 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3003 &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.
3004 &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`.
3005 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3006 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3007 &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.
3008 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3009 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3010 {
3011 &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.
3012 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3013 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3014 {
3015 &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).
3016 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3017 },
3018 ],
3019 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3020 },
3021 ],
3022 &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 -07003023 }</pre>
3024</div>
3025
3026<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003027 <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 -07003028 <pre>Retrieves the list of UrlMap resources available to the specified project.
3029
3030Args:
3031 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003032 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 -07003033
Dan O'Mearadd494642020-05-01 07:42:23 -07003034For 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 -07003035
Dan O'Mearadd494642020-05-01 07:42:23 -07003036You 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 -07003037
Bu Sun Kim65020912020-05-20 12:08:20 -07003038To 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) ```
3039 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`)
3040 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
3041
3042You 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.
3043
3044Currently, only sorting by `name` or `creationTimestamp desc` is supported.
3045 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 -07003046 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 -07003047
3048Returns:
3049 An object of the form:
3050
3051 { # Contains a list of UrlMap resources.
Bu Sun Kim65020912020-05-20 12:08:20 -07003052 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
3053 &quot;items&quot;: [ # A list of UrlMap resources.
Dan O'Mearadd494642020-05-01 07:42:23 -07003054 { # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003055 #
3056 # Google Compute Engine has two URL Map resources:
3057 #
3058 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
3059 #
3060 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
3061 #
3062 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
3063 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003064 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
3065 #
3066 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
3067 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003068 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
3069 #
3070 # 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.
3071 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
3072 &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.
3073 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003074 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003075 # 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 -07003076 &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 -07003077 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003078 &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.
3079 # Default is false.
3080 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3081 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003082 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003083 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3084 &quot;A String&quot;,
3085 ],
3086 &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
3087 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3088 &quot;A String&quot;,
3089 ],
3090 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3091 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3092 &quot;A String&quot;,
3093 ],
3094 &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.
3095 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3096 &quot;A String&quot;,
3097 ],
3098 &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.
3099 },
3100 &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.
3101 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003102 # 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 -07003103 &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.
3104 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3105 # The value must be between 200 and 599 inclusive.
3106 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3107 # The value must be between 0.0 and 100.0 inclusive.
3108 },
3109 &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.
3110 &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.
3111 &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.
3112 &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
3113 },
3114 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3115 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003116 },
3117 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003118 &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 -07003119 # 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 -07003120 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3121 },
3122 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003123 # 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 -07003124 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3125 &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.
3126 # 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.
3127 &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.
3128 &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 -07003129 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003130 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3131 # - 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.
3132 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3133 # -
3134 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3135 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3136 # - 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.
3137 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3138 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3139 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3140 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3141 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003142 ],
3143 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003144 &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.
3145 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003146 # 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 -07003147 &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.
3148 &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
3149 },
3150 &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 -07003151 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003152 # 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 -07003153 &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 -07003154 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07003155 &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.
3156 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003157 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003158 &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.
3159 # 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 -07003160 { # 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
3161 &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.
3162 &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.
3163 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003164 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3165 # 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 -07003166 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3167 { # Specification determining how headers are added to requests or responses.
3168 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3169 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3170 &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.
3171 # The default value is false.
3172 },
3173 ],
3174 &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.
3175 &quot;A String&quot;,
3176 ],
3177 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3178 { # Specification determining how headers are added to requests or responses.
3179 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3180 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3181 &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.
3182 # The default value is false.
3183 },
3184 ],
3185 &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.
3186 &quot;A String&quot;,
3187 ],
3188 },
3189 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3190 # 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.
3191 # The value must be between 0 and 1000
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003192 },
3193 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003194 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003195 &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.
3196 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003197 # 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 -07003198 &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.
3199 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003200 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003201 &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.
3202 # The value must be between 1 and 255 characters.
3203 &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.
3204 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3205 # The default is set to false.
3206 &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.
3207 # 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.
3208 # The value must be between 1 and 1024 characters.
3209 &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.
3210 # 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.
3211 # The value must be between 1 and 1024 characters.
3212 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3213 # Supported values are:
3214 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3215 # - FOUND, which corresponds to 302.
3216 # - SEE_OTHER which corresponds to 303.
3217 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3218 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3219 &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.
3220 # The default is set to false.
3221 },
3222 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3223 &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.
3224 #
3225 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
3226 &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.
3227 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003228 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3229 # 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 -07003230 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3231 { # Specification determining how headers are added to requests or responses.
3232 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3233 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3234 &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.
3235 # The default value is false.
3236 },
3237 ],
3238 &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.
3239 &quot;A String&quot;,
3240 ],
3241 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3242 { # Specification determining how headers are added to requests or responses.
3243 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3244 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3245 &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.
3246 # The default value is false.
3247 },
3248 ],
3249 &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.
3250 &quot;A String&quot;,
3251 ],
3252 },
3253 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
3254 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
3255 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3256 &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 -07003257 # * 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 -07003258 &quot;A String&quot;,
3259 ],
3260 &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.
3261 },
3262 ],
3263 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3264 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
3265 &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.
3266 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
3267 { # 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.
3268 &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.
3269 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003270 # 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 -07003271 &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 -07003272 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003273 &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.
3274 # Default is false.
3275 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3276 &quot;A String&quot;,
3277 ],
3278 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3279 &quot;A String&quot;,
3280 ],
3281 &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
3282 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3283 &quot;A String&quot;,
3284 ],
3285 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3286 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3287 &quot;A String&quot;,
3288 ],
3289 &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.
3290 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3291 &quot;A String&quot;,
3292 ],
3293 &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.
3294 },
3295 &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.
3296 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003297 # 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 -07003298 &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.
3299 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3300 # The value must be between 200 and 599 inclusive.
3301 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3302 # The value must be between 0.0 and 100.0 inclusive.
3303 },
3304 &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.
3305 &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.
3306 &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.
3307 &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
3308 },
3309 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3310 # The value must be between 0.0 and 100.0 inclusive.
3311 },
3312 },
3313 &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 -07003314 # 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 -07003315 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3316 },
3317 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003318 # 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 -07003319 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3320 &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.
3321 # 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.
3322 &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.
3323 &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
3324 },
3325 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3326 # - 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.
3327 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3328 # -
3329 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3330 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3331 # - 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.
3332 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3333 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3334 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3335 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3336 &quot;A String&quot;,
3337 ],
3338 },
3339 &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.
3340 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003341 # 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 -07003342 &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.
3343 &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
3344 },
3345 &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 -07003346 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003347 # 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 -07003348 &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.
3349 # The value must be between 1 and 255 characters.
3350 &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.
3351 # The value must be between 1 and 1024 characters.
3352 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003353 &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.
3354 # 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 -07003355 { # 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
3356 &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.
3357 &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.
3358 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003359 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3360 # 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 -07003361 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3362 { # Specification determining how headers are added to requests or responses.
3363 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3364 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3365 &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.
3366 # The default value is false.
3367 },
3368 ],
3369 &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.
3370 &quot;A String&quot;,
3371 ],
3372 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3373 { # Specification determining how headers are added to requests or responses.
3374 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3375 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3376 &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.
3377 # The default value is false.
3378 },
3379 ],
3380 &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.
3381 &quot;A String&quot;,
3382 ],
3383 },
3384 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3385 # 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.
3386 # The value must be between 0 and 1000
3387 },
3388 ],
3389 },
3390 &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:
3391 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
3392 # - compute/v1/projects/project/global/backendServices/backendService
3393 # - 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.
3394 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3395 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
3396 # - compute.backendBuckets.use
3397 # - compute.backendServices.use
3398 &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.
3399 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003400 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003401 &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.
3402 # The value must be between 1 and 255 characters.
3403 &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.
3404 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3405 # The default is set to false.
3406 &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.
3407 # 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.
3408 # The value must be between 1 and 1024 characters.
3409 &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.
3410 # 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.
3411 # The value must be between 1 and 1024 characters.
3412 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3413 # Supported values are:
3414 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3415 # - FOUND, which corresponds to 302.
3416 # - SEE_OTHER which corresponds to 303.
3417 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3418 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3419 &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.
3420 # The default is set to false.
3421 },
3422 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3423 &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.
3424 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003425 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3426 # 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 -07003427 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3428 { # Specification determining how headers are added to requests or responses.
3429 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3430 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3431 &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.
3432 # The default value is false.
3433 },
3434 ],
3435 &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.
3436 &quot;A String&quot;,
3437 ],
3438 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3439 { # Specification determining how headers are added to requests or responses.
3440 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3441 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3442 &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.
3443 # The default value is false.
3444 },
3445 ],
3446 &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.
3447 &quot;A String&quot;,
3448 ],
3449 },
3450 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
3451 &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.
3452 # 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.
3453 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
3454 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
3455 &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.
3456 &quot;A String&quot;,
3457 ],
3458 &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.
3459 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003460 # 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 -07003461 &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 -07003462 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003463 &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.
3464 # Default is false.
3465 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3466 &quot;A String&quot;,
3467 ],
3468 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3469 &quot;A String&quot;,
3470 ],
3471 &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
3472 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3473 &quot;A String&quot;,
3474 ],
3475 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3476 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3477 &quot;A String&quot;,
3478 ],
3479 &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.
3480 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3481 &quot;A String&quot;,
3482 ],
3483 &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.
3484 },
3485 &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.
3486 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003487 # 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 -07003488 &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.
3489 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3490 # The value must be between 200 and 599 inclusive.
3491 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3492 # The value must be between 0.0 and 100.0 inclusive.
3493 },
3494 &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.
3495 &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.
3496 &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.
3497 &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
3498 },
3499 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3500 # The value must be between 0.0 and 100.0 inclusive.
3501 },
3502 },
3503 &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 -07003504 # 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 -07003505 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3506 },
3507 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003508 # 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 -07003509 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3510 &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.
3511 # 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.
3512 &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.
3513 &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
3514 },
3515 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3516 # - 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.
3517 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3518 # -
3519 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3520 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3521 # - 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.
3522 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3523 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3524 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3525 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3526 &quot;A String&quot;,
3527 ],
3528 },
3529 &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.
3530 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003531 # 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 -07003532 &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.
3533 &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
3534 },
3535 &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 -07003536 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003537 # 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 -07003538 &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.
3539 # The value must be between 1 and 255 characters.
3540 &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.
3541 # The value must be between 1 and 1024 characters.
3542 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003543 &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.
3544 # 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 -07003545 { # 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
3546 &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.
3547 &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.
3548 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003549 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3550 # 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 -07003551 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3552 { # Specification determining how headers are added to requests or responses.
3553 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3554 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3555 &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.
3556 # The default value is false.
3557 },
3558 ],
3559 &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.
3560 &quot;A String&quot;,
3561 ],
3562 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3563 { # Specification determining how headers are added to requests or responses.
3564 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3565 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3566 &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.
3567 # The default value is false.
3568 },
3569 ],
3570 &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.
3571 &quot;A String&quot;,
3572 ],
3573 },
3574 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3575 # 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.
3576 # The value must be between 0 and 1000
3577 },
3578 ],
3579 },
3580 &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.
3581 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3582 &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.
3583 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003584 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003585 &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.
3586 # The value must be between 1 and 255 characters.
3587 &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.
3588 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3589 # The default is set to false.
3590 &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.
3591 # 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.
3592 # The value must be between 1 and 1024 characters.
3593 &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.
3594 # 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.
3595 # The value must be between 1 and 1024 characters.
3596 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3597 # Supported values are:
3598 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3599 # - FOUND, which corresponds to 302.
3600 # - SEE_OTHER which corresponds to 303.
3601 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3602 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3603 &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.
3604 # The default is set to false.
3605 },
3606 },
3607 ],
3608 &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.
3609 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
3610 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
3611 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
3612 # The description can have a maximum length of 1024 characters.
3613 &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.
3614 # 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 -07003615 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3616 # 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 -07003617 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3618 { # Specification determining how headers are added to requests or responses.
3619 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3620 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3621 &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.
3622 # The default value is false.
3623 },
3624 ],
3625 &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.
3626 &quot;A String&quot;,
3627 ],
3628 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3629 { # Specification determining how headers are added to requests or responses.
3630 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3631 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3632 &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.
3633 # The default value is false.
3634 },
3635 ],
3636 &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.
3637 &quot;A String&quot;,
3638 ],
3639 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003640 &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.
3641 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
3642 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
3643 &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
3644 &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
3645 &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
3646 },
3647 ],
3648 &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.
3649 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
3650 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
3651 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
3652 &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
3653 &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
3654 &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
3655 },
3656 ],
3657 &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 -07003658 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
3659 &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.
3660 # fullPathMatch must be between 1 and 1024 characters.
3661 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3662 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
3663 { # matchRule criteria for request header matches.
3664 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
3665 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3666 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
3667 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
3668 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003669 # 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 -07003670 &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.
3671 # The default setting is false.
3672 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
3673 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3674 &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.
3675 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3676 &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.
3677 # For example for a range [-5, 0]
3678 # - -3 will match.
3679 # - 0 will not match.
3680 # - 0.25 will not match.
3681 # - -3someString will not match.
3682 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3683 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3684 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
3685 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
3686 },
3687 &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
3688 # 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.
3689 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3690 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
3691 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
3692 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3693 },
3694 ],
3695 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
3696 # The default value is false.
3697 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003698 # Not supported when the URL map is bound to target gRPC proxy.
3699 &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.
3700 # 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 -07003701 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
3702 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003703 # 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 -07003704 { # 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.
3705 # 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.
3706 # 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.
3707 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
3708 # This list must not be empty and can have at the most 64 entries.
3709 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
3710 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
3711 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
3712 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
3713 # value can have a maximum length of 1024 characters.
3714 },
3715 ],
3716 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
3717 # Supported values are:
3718 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
3719 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
3720 },
3721 ],
3722 &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 /.
3723 # The value must be between 1 and 1024 characters.
3724 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3725 &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 -07003726 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003727 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
3728 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
3729 # Only one of presentMatch, exactMatch or regexMatch must be set.
3730 &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.
3731 &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.
3732 # Only one of presentMatch, exactMatch or regexMatch must be set.
3733 &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
3734 # Only one of presentMatch, exactMatch or regexMatch must be set.
3735 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
3736 },
3737 ],
3738 &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
3739 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3740 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
3741 },
3742 ],
3743 &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.
3744 # 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.
3745 # 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.
3746 &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.
3747 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003748 # 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 -07003749 &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 -07003750 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003751 &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.
3752 # Default is false.
3753 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3754 &quot;A String&quot;,
3755 ],
3756 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3757 &quot;A String&quot;,
3758 ],
3759 &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
3760 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3761 &quot;A String&quot;,
3762 ],
3763 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3764 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3765 &quot;A String&quot;,
3766 ],
3767 &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.
3768 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3769 &quot;A String&quot;,
3770 ],
3771 &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.
3772 },
3773 &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.
3774 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003775 # 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 -07003776 &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.
3777 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3778 # The value must be between 200 and 599 inclusive.
3779 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3780 # The value must be between 0.0 and 100.0 inclusive.
3781 },
3782 &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.
3783 &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.
3784 &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.
3785 &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
3786 },
3787 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3788 # The value must be between 0.0 and 100.0 inclusive.
3789 },
3790 },
3791 &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 -07003792 # 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 -07003793 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3794 },
3795 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003796 # 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 -07003797 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3798 &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.
3799 # 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.
3800 &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.
3801 &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
3802 },
3803 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3804 # - 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.
3805 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3806 # -
3807 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3808 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3809 # - 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.
3810 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3811 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3812 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3813 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3814 &quot;A String&quot;,
3815 ],
3816 },
3817 &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.
3818 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003819 # 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 -07003820 &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.
3821 &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
3822 },
3823 &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 -07003824 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003825 # 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 -07003826 &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.
3827 # The value must be between 1 and 255 characters.
3828 &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.
3829 # The value must be between 1 and 1024 characters.
3830 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003831 &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.
3832 # 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 -07003833 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
3834 &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.
3835 &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.
3836 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003837 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3838 # 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 -07003839 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3840 { # Specification determining how headers are added to requests or responses.
3841 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3842 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3843 &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.
3844 # The default value is false.
3845 },
3846 ],
3847 &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.
3848 &quot;A String&quot;,
3849 ],
3850 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3851 { # Specification determining how headers are added to requests or responses.
3852 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3853 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3854 &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.
3855 # The default value is false.
3856 },
3857 ],
3858 &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.
3859 &quot;A String&quot;,
3860 ],
3861 },
3862 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3863 # 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.
3864 # The value must be between 0 and 1000
3865 },
3866 ],
3867 },
3868 &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.
3869 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3870 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
3871 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003872 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003873 &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.
3874 # The value must be between 1 and 255 characters.
3875 &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.
3876 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3877 # The default is set to false.
3878 &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.
3879 # 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.
3880 # The value must be between 1 and 1024 characters.
3881 &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.
3882 # 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.
3883 # The value must be between 1 and 1024 characters.
3884 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3885 # Supported values are:
3886 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3887 # - FOUND, which corresponds to 302.
3888 # - SEE_OTHER which corresponds to 303.
3889 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3890 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3891 &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.
3892 # The default is set to false.
3893 },
3894 },
3895 ],
3896 },
3897 ],
3898 &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.
3899 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3900 &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 -07003901 # 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 -07003902 { # Message for the expected URL mappings.
3903 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003904 &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 -07003905 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003906 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
3907 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07003908 },
3909 ],
3910 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003911 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003912 &quot;kind&quot;: &quot;compute#urlMapList&quot;, # Type of resource.
3913 &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.
3914 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
3915 &quot;warning&quot;: { # [Output Only] Informational warning message.
3916 &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.
3917 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3918 # &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 -07003919 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003920 &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).
3921 &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 -07003922 },
3923 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003924 &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 -07003925 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003926 }</pre>
3927</div>
3928
3929<div class="method">
3930 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
3931 <pre>Retrieves the next page of results.
3932
3933Args:
3934 previous_request: The request for the previous page. (required)
3935 previous_response: The response from the request for the previous page. (required)
3936
3937Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07003938 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003939 page. Returns None if there are no more items in the collection.
3940 </pre>
3941</div>
3942
3943<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003944 <code class="details" id="patch">patch(project, urlMap, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003945 <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 -07003946
3947Args:
3948 project: string, Project ID for this request. (required)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003949 urlMap: string, Name of the UrlMap resource to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003950 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003951 The object takes the form of:
3952
Dan O'Mearadd494642020-05-01 07:42:23 -07003953{ # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003954 #
3955 # Google Compute Engine has two URL Map resources:
3956 #
3957 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
3958 #
3959 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
3960 #
3961 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
3962 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003963 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
3964 #
3965 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
3966 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003967 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
3968 #
3969 # 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.
3970 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
3971 &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.
3972 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003973 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003974 # 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 -07003975 &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 -07003976 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003977 &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.
3978 # Default is false.
3979 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3980 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003981 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003982 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3983 &quot;A String&quot;,
3984 ],
3985 &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
3986 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3987 &quot;A String&quot;,
3988 ],
3989 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3990 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3991 &quot;A String&quot;,
3992 ],
3993 &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.
3994 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3995 &quot;A String&quot;,
3996 ],
3997 &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.
3998 },
3999 &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.
4000 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004001 # 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 -07004002 &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.
4003 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4004 # The value must be between 200 and 599 inclusive.
4005 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4006 # The value must be between 0.0 and 100.0 inclusive.
4007 },
4008 &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.
4009 &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.
4010 &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.
4011 &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
4012 },
4013 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4014 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004015 },
4016 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004017 &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 -07004018 # 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 -07004019 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4020 },
4021 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004022 # 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 -07004023 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4024 &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.
4025 # 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.
4026 &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.
4027 &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 -07004028 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004029 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4030 # - 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.
4031 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4032 # -
4033 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4034 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4035 # - 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.
4036 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4037 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4038 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4039 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4040 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004041 ],
4042 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004043 &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.
4044 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004045 # 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 -07004046 &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.
4047 &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
4048 },
4049 &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 -07004050 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004051 # 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 -07004052 &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 -07004053 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07004054 &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.
4055 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004056 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004057 &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.
4058 # 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 -07004059 { # 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
4060 &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.
4061 &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.
4062 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004063 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4064 # 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 -07004065 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4066 { # Specification determining how headers are added to requests or responses.
4067 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4068 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4069 &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.
4070 # The default value is false.
4071 },
4072 ],
4073 &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.
4074 &quot;A String&quot;,
4075 ],
4076 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4077 { # Specification determining how headers are added to requests or responses.
4078 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4079 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4080 &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.
4081 # The default value is false.
4082 },
4083 ],
4084 &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.
4085 &quot;A String&quot;,
4086 ],
4087 },
4088 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4089 # 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.
4090 # The value must be between 0 and 1000
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004091 },
4092 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004093 },
4094 &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.
4095 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004096 # 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 -07004097 &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.
4098 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004099 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004100 &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.
4101 # The value must be between 1 and 255 characters.
4102 &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.
4103 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4104 # The default is set to false.
4105 &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.
4106 # 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.
4107 # The value must be between 1 and 1024 characters.
4108 &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.
4109 # 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.
4110 # The value must be between 1 and 1024 characters.
4111 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4112 # Supported values are:
4113 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4114 # - FOUND, which corresponds to 302.
4115 # - SEE_OTHER which corresponds to 303.
4116 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4117 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4118 &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.
4119 # The default is set to false.
4120 },
4121 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4122 &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.
4123 #
4124 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
4125 &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.
4126 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004127 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4128 # 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 -07004129 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4130 { # Specification determining how headers are added to requests or responses.
4131 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4132 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4133 &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.
4134 # The default value is false.
4135 },
4136 ],
4137 &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.
4138 &quot;A String&quot;,
4139 ],
4140 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4141 { # Specification determining how headers are added to requests or responses.
4142 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4143 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4144 &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.
4145 # The default value is false.
4146 },
4147 ],
4148 &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.
4149 &quot;A String&quot;,
4150 ],
4151 },
4152 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
4153 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
4154 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4155 &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 -07004156 # * 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 -07004157 &quot;A String&quot;,
4158 ],
4159 &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.
4160 },
4161 ],
4162 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4163 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
4164 &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.
4165 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
4166 { # 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.
4167 &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.
4168 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004169 # 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 -07004170 &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 -07004171 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004172 &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.
4173 # Default is false.
4174 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4175 &quot;A String&quot;,
4176 ],
4177 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4178 &quot;A String&quot;,
4179 ],
4180 &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
4181 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4182 &quot;A String&quot;,
4183 ],
4184 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4185 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4186 &quot;A String&quot;,
4187 ],
4188 &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.
4189 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4190 &quot;A String&quot;,
4191 ],
4192 &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.
4193 },
4194 &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.
4195 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004196 # 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 -07004197 &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.
4198 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4199 # The value must be between 200 and 599 inclusive.
4200 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4201 # The value must be between 0.0 and 100.0 inclusive.
4202 },
4203 &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.
4204 &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.
4205 &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.
4206 &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
4207 },
4208 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4209 # The value must be between 0.0 and 100.0 inclusive.
4210 },
4211 },
4212 &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 -07004213 # 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 -07004214 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4215 },
4216 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004217 # 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 -07004218 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4219 &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.
4220 # 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.
4221 &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.
4222 &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
4223 },
4224 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4225 # - 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.
4226 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4227 # -
4228 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4229 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4230 # - 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.
4231 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4232 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4233 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4234 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4235 &quot;A String&quot;,
4236 ],
4237 },
4238 &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.
4239 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004240 # 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 -07004241 &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.
4242 &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
4243 },
4244 &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 -07004245 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004246 # 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 -07004247 &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.
4248 # The value must be between 1 and 255 characters.
4249 &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.
4250 # The value must be between 1 and 1024 characters.
4251 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004252 &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.
4253 # 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 -07004254 { # 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
4255 &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.
4256 &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.
4257 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004258 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4259 # 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 -07004260 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4261 { # Specification determining how headers are added to requests or responses.
4262 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4263 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4264 &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.
4265 # The default value is false.
4266 },
4267 ],
4268 &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.
4269 &quot;A String&quot;,
4270 ],
4271 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4272 { # Specification determining how headers are added to requests or responses.
4273 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4274 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4275 &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.
4276 # The default value is false.
4277 },
4278 ],
4279 &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.
4280 &quot;A String&quot;,
4281 ],
4282 },
4283 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4284 # 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.
4285 # The value must be between 0 and 1000
4286 },
4287 ],
4288 },
4289 &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:
4290 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
4291 # - compute/v1/projects/project/global/backendServices/backendService
4292 # - 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.
4293 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
4294 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
4295 # - compute.backendBuckets.use
4296 # - compute.backendServices.use
4297 &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.
4298 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004299 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004300 &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.
4301 # The value must be between 1 and 255 characters.
4302 &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.
4303 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4304 # The default is set to false.
4305 &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.
4306 # 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.
4307 # The value must be between 1 and 1024 characters.
4308 &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.
4309 # 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.
4310 # The value must be between 1 and 1024 characters.
4311 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4312 # Supported values are:
4313 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4314 # - FOUND, which corresponds to 302.
4315 # - SEE_OTHER which corresponds to 303.
4316 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4317 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4318 &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.
4319 # The default is set to false.
4320 },
4321 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4322 &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.
4323 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004324 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4325 # 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 -07004326 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4327 { # Specification determining how headers are added to requests or responses.
4328 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4329 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4330 &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.
4331 # The default value is false.
4332 },
4333 ],
4334 &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.
4335 &quot;A String&quot;,
4336 ],
4337 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4338 { # Specification determining how headers are added to requests or responses.
4339 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4340 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4341 &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.
4342 # The default value is false.
4343 },
4344 ],
4345 &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.
4346 &quot;A String&quot;,
4347 ],
4348 },
4349 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
4350 &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.
4351 # 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.
4352 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
4353 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
4354 &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.
4355 &quot;A String&quot;,
4356 ],
4357 &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.
4358 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004359 # 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 -07004360 &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 -07004361 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004362 &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.
4363 # Default is false.
4364 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4365 &quot;A String&quot;,
4366 ],
4367 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4368 &quot;A String&quot;,
4369 ],
4370 &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
4371 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4372 &quot;A String&quot;,
4373 ],
4374 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4375 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4376 &quot;A String&quot;,
4377 ],
4378 &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.
4379 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4380 &quot;A String&quot;,
4381 ],
4382 &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.
4383 },
4384 &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.
4385 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004386 # 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 -07004387 &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.
4388 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4389 # The value must be between 200 and 599 inclusive.
4390 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4391 # The value must be between 0.0 and 100.0 inclusive.
4392 },
4393 &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.
4394 &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.
4395 &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.
4396 &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
4397 },
4398 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4399 # The value must be between 0.0 and 100.0 inclusive.
4400 },
4401 },
4402 &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 -07004403 # 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 -07004404 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4405 },
4406 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004407 # 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 -07004408 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4409 &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.
4410 # 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.
4411 &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.
4412 &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
4413 },
4414 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4415 # - 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.
4416 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4417 # -
4418 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4419 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4420 # - 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.
4421 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4422 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4423 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4424 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4425 &quot;A String&quot;,
4426 ],
4427 },
4428 &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.
4429 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004430 # 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 -07004431 &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.
4432 &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
4433 },
4434 &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 -07004435 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004436 # 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 -07004437 &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.
4438 # The value must be between 1 and 255 characters.
4439 &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.
4440 # The value must be between 1 and 1024 characters.
4441 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004442 &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.
4443 # 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 -07004444 { # 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
4445 &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.
4446 &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.
4447 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004448 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4449 # 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 -07004450 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4451 { # Specification determining how headers are added to requests or responses.
4452 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4453 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4454 &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.
4455 # The default value is false.
4456 },
4457 ],
4458 &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.
4459 &quot;A String&quot;,
4460 ],
4461 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4462 { # Specification determining how headers are added to requests or responses.
4463 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4464 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4465 &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.
4466 # The default value is false.
4467 },
4468 ],
4469 &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.
4470 &quot;A String&quot;,
4471 ],
4472 },
4473 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4474 # 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.
4475 # The value must be between 0 and 1000
4476 },
4477 ],
4478 },
4479 &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.
4480 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4481 &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.
4482 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004483 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004484 &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.
4485 # The value must be between 1 and 255 characters.
4486 &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.
4487 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4488 # The default is set to false.
4489 &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.
4490 # 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.
4491 # The value must be between 1 and 1024 characters.
4492 &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.
4493 # 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.
4494 # The value must be between 1 and 1024 characters.
4495 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4496 # Supported values are:
4497 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4498 # - FOUND, which corresponds to 302.
4499 # - SEE_OTHER which corresponds to 303.
4500 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4501 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4502 &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.
4503 # The default is set to false.
4504 },
4505 },
4506 ],
4507 &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.
4508 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
4509 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
4510 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
4511 # The description can have a maximum length of 1024 characters.
4512 &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.
4513 # 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 -07004514 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4515 # 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 -07004516 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4517 { # Specification determining how headers are added to requests or responses.
4518 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4519 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4520 &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.
4521 # The default value is false.
4522 },
4523 ],
4524 &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.
4525 &quot;A String&quot;,
4526 ],
4527 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4528 { # Specification determining how headers are added to requests or responses.
4529 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4530 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4531 &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.
4532 # The default value is false.
4533 },
4534 ],
4535 &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.
4536 &quot;A String&quot;,
4537 ],
4538 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004539 &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.
4540 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
4541 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
4542 &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
4543 &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
4544 &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
4545 },
4546 ],
4547 &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.
4548 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
4549 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
4550 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
4551 &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
4552 &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
4553 &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
4554 },
4555 ],
4556 &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 -07004557 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
4558 &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.
4559 # fullPathMatch must be between 1 and 1024 characters.
4560 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4561 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
4562 { # matchRule criteria for request header matches.
4563 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
4564 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4565 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
4566 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
4567 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004568 # 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 -07004569 &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.
4570 # The default setting is false.
4571 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
4572 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4573 &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.
4574 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4575 &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.
4576 # For example for a range [-5, 0]
4577 # - -3 will match.
4578 # - 0 will not match.
4579 # - 0.25 will not match.
4580 # - -3someString will not match.
4581 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4582 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4583 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
4584 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
4585 },
4586 &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
4587 # 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.
4588 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4589 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
4590 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
4591 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4592 },
4593 ],
4594 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
4595 # The default value is false.
4596 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004597 # Not supported when the URL map is bound to target gRPC proxy.
4598 &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.
4599 # 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 -07004600 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
4601 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004602 # 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 -07004603 { # 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.
4604 # 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.
4605 # 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.
4606 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
4607 # This list must not be empty and can have at the most 64 entries.
4608 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
4609 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
4610 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
4611 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
4612 # value can have a maximum length of 1024 characters.
4613 },
4614 ],
4615 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
4616 # Supported values are:
4617 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
4618 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
4619 },
4620 ],
4621 &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 /.
4622 # The value must be between 1 and 1024 characters.
4623 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4624 &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 -07004625 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004626 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
4627 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
4628 # Only one of presentMatch, exactMatch or regexMatch must be set.
4629 &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.
4630 &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.
4631 # Only one of presentMatch, exactMatch or regexMatch must be set.
4632 &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
4633 # Only one of presentMatch, exactMatch or regexMatch must be set.
4634 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
4635 },
4636 ],
4637 &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
4638 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4639 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
4640 },
4641 ],
4642 &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.
4643 # 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.
4644 # 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.
4645 &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.
4646 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004647 # 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 -07004648 &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 -07004649 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004650 &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.
4651 # Default is false.
4652 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4653 &quot;A String&quot;,
4654 ],
4655 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4656 &quot;A String&quot;,
4657 ],
4658 &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
4659 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4660 &quot;A String&quot;,
4661 ],
4662 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4663 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4664 &quot;A String&quot;,
4665 ],
4666 &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.
4667 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4668 &quot;A String&quot;,
4669 ],
4670 &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.
4671 },
4672 &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.
4673 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004674 # 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 -07004675 &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.
4676 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4677 # The value must be between 200 and 599 inclusive.
4678 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4679 # The value must be between 0.0 and 100.0 inclusive.
4680 },
4681 &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.
4682 &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.
4683 &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.
4684 &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
4685 },
4686 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4687 # The value must be between 0.0 and 100.0 inclusive.
4688 },
4689 },
4690 &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 -07004691 # 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 -07004692 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4693 },
4694 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004695 # 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 -07004696 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4697 &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.
4698 # 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.
4699 &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.
4700 &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
4701 },
4702 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4703 # - 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.
4704 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4705 # -
4706 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4707 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4708 # - 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.
4709 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4710 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4711 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4712 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4713 &quot;A String&quot;,
4714 ],
4715 },
4716 &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.
4717 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004718 # 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 -07004719 &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.
4720 &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
4721 },
4722 &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 -07004723 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004724 # 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 -07004725 &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.
4726 # The value must be between 1 and 255 characters.
4727 &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.
4728 # The value must be between 1 and 1024 characters.
4729 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004730 &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.
4731 # 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 -07004732 { # 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
4733 &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.
4734 &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.
4735 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004736 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4737 # 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 -07004738 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4739 { # Specification determining how headers are added to requests or responses.
4740 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4741 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4742 &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.
4743 # The default value is false.
4744 },
4745 ],
4746 &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.
4747 &quot;A String&quot;,
4748 ],
4749 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4750 { # Specification determining how headers are added to requests or responses.
4751 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4752 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4753 &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.
4754 # The default value is false.
4755 },
4756 ],
4757 &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.
4758 &quot;A String&quot;,
4759 ],
4760 },
4761 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4762 # 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.
4763 # The value must be between 0 and 1000
4764 },
4765 ],
4766 },
4767 &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.
4768 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4769 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
4770 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004771 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004772 &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.
4773 # The value must be between 1 and 255 characters.
4774 &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.
4775 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4776 # The default is set to false.
4777 &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.
4778 # 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.
4779 # The value must be between 1 and 1024 characters.
4780 &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.
4781 # 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.
4782 # The value must be between 1 and 1024 characters.
4783 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4784 # Supported values are:
4785 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4786 # - FOUND, which corresponds to 302.
4787 # - SEE_OTHER which corresponds to 303.
4788 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4789 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4790 &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.
4791 # The default is set to false.
4792 },
4793 },
4794 ],
4795 },
4796 ],
4797 &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.
4798 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4799 &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 -07004800 # 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 -07004801 { # Message for the expected URL mappings.
4802 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004803 &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 -07004804 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004805 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
4806 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07004807 },
4808 ],
4809}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004810
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004811 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.
4812
4813For 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.
4814
4815The 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 -07004816
4817Returns:
4818 An object of the form:
4819
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004820 { # Represents an Operation resource.
4821 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004822 # Google Compute Engine has three Operation resources:
4823 #
4824 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4825 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004826 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4827 #
4828 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004829 # - For global operations, use the `globalOperations` resource.
4830 # - For regional operations, use the `regionOperations` resource.
4831 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004832 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004833 # 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 -07004834 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4835 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4836 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4837 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4838 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4839 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004840 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004841 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4842 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4843 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004844 },
4845 ],
4846 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004847 &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`.
4848 &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.
4849 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4850 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4851 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4852 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4853 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4854 &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.
4855 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4856 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4857 &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.
4858 &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`.
4859 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4860 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4861 &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.
4862 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4863 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4864 {
4865 &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.
4866 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4867 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4868 {
4869 &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).
4870 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4871 },
4872 ],
4873 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4874 },
4875 ],
4876 &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 -07004877 }</pre>
4878</div>
4879
4880<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004881 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004882 <pre>Returns permissions that a caller has on the specified resource.
4883
4884Args:
4885 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004886 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004887 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004888 The object takes the form of:
4889
4890{
Bu Sun Kim65020912020-05-20 12:08:20 -07004891 &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.
4892 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004893 ],
4894 }
4895
4896
4897Returns:
4898 An object of the form:
4899
4900 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004901 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
4902 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004903 ],
4904 }</pre>
4905</div>
4906
4907<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004908 <code class="details" id="update">update(project, urlMap, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004909 <pre>Updates the specified UrlMap resource with the data included in the request.
4910
4911Args:
4912 project: string, Project ID for this request. (required)
4913 urlMap: string, Name of the UrlMap resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004914 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004915 The object takes the form of:
4916
Dan O'Mearadd494642020-05-01 07:42:23 -07004917{ # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07004918 #
4919 # Google Compute Engine has two URL Map resources:
4920 #
4921 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
4922 #
4923 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
4924 #
4925 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
4926 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004927 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
4928 #
4929 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
4930 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004931 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
4932 #
4933 # 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.
4934 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
4935 &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.
4936 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004937 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004938 # 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 -07004939 &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 -07004940 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004941 &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.
4942 # Default is false.
4943 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4944 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004945 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004946 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4947 &quot;A String&quot;,
4948 ],
4949 &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
4950 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4951 &quot;A String&quot;,
4952 ],
4953 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4954 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4955 &quot;A String&quot;,
4956 ],
4957 &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.
4958 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4959 &quot;A String&quot;,
4960 ],
4961 &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.
4962 },
4963 &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.
4964 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004965 # 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 -07004966 &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.
4967 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4968 # The value must be between 200 and 599 inclusive.
4969 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4970 # The value must be between 0.0 and 100.0 inclusive.
4971 },
4972 &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.
4973 &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.
4974 &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.
4975 &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
4976 },
4977 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4978 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004979 },
4980 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004981 &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 -07004982 # 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 -07004983 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4984 },
4985 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004986 # 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 -07004987 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4988 &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.
4989 # 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.
4990 &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.
4991 &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 -07004992 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004993 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4994 # - 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.
4995 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4996 # -
4997 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4998 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4999 # - 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.
5000 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5001 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5002 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5003 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5004 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005005 ],
5006 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005007 &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.
5008 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005009 # 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 -07005010 &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.
5011 &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
5012 },
5013 &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 -07005014 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005015 # 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 -07005016 &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 -07005017 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07005018 &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.
5019 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005020 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005021 &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.
5022 # 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 -07005023 { # 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
5024 &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.
5025 &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.
5026 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005027 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5028 # 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 -07005029 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5030 { # Specification determining how headers are added to requests or responses.
5031 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5032 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5033 &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.
5034 # The default value is false.
5035 },
5036 ],
5037 &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.
5038 &quot;A String&quot;,
5039 ],
5040 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5041 { # Specification determining how headers are added to requests or responses.
5042 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5043 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5044 &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.
5045 # The default value is false.
5046 },
5047 ],
5048 &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.
5049 &quot;A String&quot;,
5050 ],
5051 },
5052 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5053 # 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.
5054 # The value must be between 0 and 1000
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005055 },
5056 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005057 },
5058 &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.
5059 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005060 # 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 -07005061 &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.
5062 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005063 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005064 &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.
5065 # The value must be between 1 and 255 characters.
5066 &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.
5067 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5068 # The default is set to false.
5069 &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.
5070 # 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.
5071 # The value must be between 1 and 1024 characters.
5072 &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.
5073 # 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.
5074 # The value must be between 1 and 1024 characters.
5075 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5076 # Supported values are:
5077 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5078 # - FOUND, which corresponds to 302.
5079 # - SEE_OTHER which corresponds to 303.
5080 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5081 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5082 &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.
5083 # The default is set to false.
5084 },
5085 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
5086 &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.
5087 #
5088 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
5089 &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.
5090 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005091 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5092 # 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 -07005093 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5094 { # Specification determining how headers are added to requests or responses.
5095 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5096 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5097 &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.
5098 # The default value is false.
5099 },
5100 ],
5101 &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.
5102 &quot;A String&quot;,
5103 ],
5104 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5105 { # Specification determining how headers are added to requests or responses.
5106 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5107 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5108 &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.
5109 # The default value is false.
5110 },
5111 ],
5112 &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.
5113 &quot;A String&quot;,
5114 ],
5115 },
5116 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
5117 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
5118 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
5119 &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 -07005120 # * 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 -07005121 &quot;A String&quot;,
5122 ],
5123 &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.
5124 },
5125 ],
5126 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
5127 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
5128 &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.
5129 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
5130 { # 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.
5131 &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.
5132 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005133 # 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 -07005134 &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 -07005135 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005136 &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.
5137 # Default is false.
5138 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
5139 &quot;A String&quot;,
5140 ],
5141 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
5142 &quot;A String&quot;,
5143 ],
5144 &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
5145 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5146 &quot;A String&quot;,
5147 ],
5148 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
5149 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5150 &quot;A String&quot;,
5151 ],
5152 &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.
5153 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
5154 &quot;A String&quot;,
5155 ],
5156 &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.
5157 },
5158 &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.
5159 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005160 # 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 -07005161 &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.
5162 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
5163 # The value must be between 200 and 599 inclusive.
5164 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5165 # The value must be between 0.0 and 100.0 inclusive.
5166 },
5167 &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.
5168 &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.
5169 &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.
5170 &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
5171 },
5172 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5173 # The value must be between 0.0 and 100.0 inclusive.
5174 },
5175 },
5176 &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 -07005177 # 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 -07005178 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
5179 },
5180 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005181 # 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 -07005182 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5183 &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.
5184 # 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.
5185 &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.
5186 &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
5187 },
5188 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5189 # - 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.
5190 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5191 # -
5192 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5193 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5194 # - 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.
5195 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5196 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5197 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5198 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5199 &quot;A String&quot;,
5200 ],
5201 },
5202 &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.
5203 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005204 # 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 -07005205 &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.
5206 &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
5207 },
5208 &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 -07005209 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005210 # 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 -07005211 &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.
5212 # The value must be between 1 and 255 characters.
5213 &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.
5214 # The value must be between 1 and 1024 characters.
5215 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005216 &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.
5217 # 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 -07005218 { # 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
5219 &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.
5220 &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.
5221 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005222 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5223 # 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 -07005224 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5225 { # Specification determining how headers are added to requests or responses.
5226 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5227 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5228 &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.
5229 # The default value is false.
5230 },
5231 ],
5232 &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.
5233 &quot;A String&quot;,
5234 ],
5235 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5236 { # Specification determining how headers are added to requests or responses.
5237 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5238 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5239 &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.
5240 # The default value is false.
5241 },
5242 ],
5243 &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.
5244 &quot;A String&quot;,
5245 ],
5246 },
5247 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5248 # 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.
5249 # The value must be between 0 and 1000
5250 },
5251 ],
5252 },
5253 &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:
5254 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
5255 # - compute/v1/projects/project/global/backendServices/backendService
5256 # - 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.
5257 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
5258 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
5259 # - compute.backendBuckets.use
5260 # - compute.backendServices.use
5261 &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.
5262 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005263 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005264 &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.
5265 # The value must be between 1 and 255 characters.
5266 &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.
5267 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5268 # The default is set to false.
5269 &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.
5270 # 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.
5271 # The value must be between 1 and 1024 characters.
5272 &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.
5273 # 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.
5274 # The value must be between 1 and 1024 characters.
5275 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5276 # Supported values are:
5277 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5278 # - FOUND, which corresponds to 302.
5279 # - SEE_OTHER which corresponds to 303.
5280 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5281 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5282 &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.
5283 # The default is set to false.
5284 },
5285 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
5286 &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.
5287 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005288 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5289 # 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 -07005290 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5291 { # Specification determining how headers are added to requests or responses.
5292 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5293 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5294 &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.
5295 # The default value is false.
5296 },
5297 ],
5298 &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.
5299 &quot;A String&quot;,
5300 ],
5301 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5302 { # Specification determining how headers are added to requests or responses.
5303 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5304 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5305 &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.
5306 # The default value is false.
5307 },
5308 ],
5309 &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.
5310 &quot;A String&quot;,
5311 ],
5312 },
5313 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
5314 &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.
5315 # 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.
5316 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
5317 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
5318 &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.
5319 &quot;A String&quot;,
5320 ],
5321 &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.
5322 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005323 # 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 -07005324 &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 -07005325 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005326 &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.
5327 # Default is false.
5328 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
5329 &quot;A String&quot;,
5330 ],
5331 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
5332 &quot;A String&quot;,
5333 ],
5334 &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
5335 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5336 &quot;A String&quot;,
5337 ],
5338 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
5339 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5340 &quot;A String&quot;,
5341 ],
5342 &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.
5343 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
5344 &quot;A String&quot;,
5345 ],
5346 &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.
5347 },
5348 &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.
5349 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005350 # 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 -07005351 &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.
5352 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
5353 # The value must be between 200 and 599 inclusive.
5354 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5355 # The value must be between 0.0 and 100.0 inclusive.
5356 },
5357 &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.
5358 &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.
5359 &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.
5360 &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
5361 },
5362 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5363 # The value must be between 0.0 and 100.0 inclusive.
5364 },
5365 },
5366 &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 -07005367 # 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 -07005368 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
5369 },
5370 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005371 # 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 -07005372 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5373 &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.
5374 # 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.
5375 &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.
5376 &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
5377 },
5378 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5379 # - 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.
5380 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5381 # -
5382 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5383 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5384 # - 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.
5385 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5386 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5387 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5388 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5389 &quot;A String&quot;,
5390 ],
5391 },
5392 &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.
5393 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005394 # 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 -07005395 &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.
5396 &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
5397 },
5398 &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 -07005399 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005400 # 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 -07005401 &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.
5402 # The value must be between 1 and 255 characters.
5403 &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.
5404 # The value must be between 1 and 1024 characters.
5405 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005406 &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.
5407 # 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 -07005408 { # 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
5409 &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.
5410 &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.
5411 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005412 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5413 # 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 -07005414 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5415 { # Specification determining how headers are added to requests or responses.
5416 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5417 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5418 &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.
5419 # The default value is false.
5420 },
5421 ],
5422 &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.
5423 &quot;A String&quot;,
5424 ],
5425 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5426 { # Specification determining how headers are added to requests or responses.
5427 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5428 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5429 &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.
5430 # The default value is false.
5431 },
5432 ],
5433 &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.
5434 &quot;A String&quot;,
5435 ],
5436 },
5437 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5438 # 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.
5439 # The value must be between 0 and 1000
5440 },
5441 ],
5442 },
5443 &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.
5444 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5445 &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.
5446 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005447 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005448 &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.
5449 # The value must be between 1 and 255 characters.
5450 &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.
5451 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5452 # The default is set to false.
5453 &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.
5454 # 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.
5455 # The value must be between 1 and 1024 characters.
5456 &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.
5457 # 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.
5458 # The value must be between 1 and 1024 characters.
5459 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5460 # Supported values are:
5461 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5462 # - FOUND, which corresponds to 302.
5463 # - SEE_OTHER which corresponds to 303.
5464 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5465 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5466 &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.
5467 # The default is set to false.
5468 },
5469 },
5470 ],
5471 &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.
5472 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
5473 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
5474 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
5475 # The description can have a maximum length of 1024 characters.
5476 &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.
5477 # 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 -07005478 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5479 # 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 -07005480 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5481 { # Specification determining how headers are added to requests or responses.
5482 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5483 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5484 &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.
5485 # The default value is false.
5486 },
5487 ],
5488 &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.
5489 &quot;A String&quot;,
5490 ],
5491 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5492 { # Specification determining how headers are added to requests or responses.
5493 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5494 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5495 &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.
5496 # The default value is false.
5497 },
5498 ],
5499 &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.
5500 &quot;A String&quot;,
5501 ],
5502 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005503 &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.
5504 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
5505 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
5506 &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
5507 &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
5508 &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
5509 },
5510 ],
5511 &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.
5512 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
5513 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
5514 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
5515 &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
5516 &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
5517 &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
5518 },
5519 ],
5520 &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 -07005521 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
5522 &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.
5523 # fullPathMatch must be between 1 and 1024 characters.
5524 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5525 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
5526 { # matchRule criteria for request header matches.
5527 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
5528 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5529 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
5530 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
5531 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005532 # 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 -07005533 &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.
5534 # The default setting is false.
5535 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
5536 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5537 &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.
5538 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5539 &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.
5540 # For example for a range [-5, 0]
5541 # - -3 will match.
5542 # - 0 will not match.
5543 # - 0.25 will not match.
5544 # - -3someString will not match.
5545 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5546 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5547 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
5548 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
5549 },
5550 &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
5551 # 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.
5552 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5553 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
5554 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
5555 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5556 },
5557 ],
5558 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
5559 # The default value is false.
5560 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005561 # Not supported when the URL map is bound to target gRPC proxy.
5562 &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.
5563 # 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 -07005564 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
5565 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005566 # 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 -07005567 { # 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.
5568 # 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.
5569 # 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.
5570 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
5571 # This list must not be empty and can have at the most 64 entries.
5572 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
5573 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
5574 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
5575 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
5576 # value can have a maximum length of 1024 characters.
5577 },
5578 ],
5579 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
5580 # Supported values are:
5581 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
5582 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
5583 },
5584 ],
5585 &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 /.
5586 # The value must be between 1 and 1024 characters.
5587 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5588 &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 -07005589 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005590 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
5591 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
5592 # Only one of presentMatch, exactMatch or regexMatch must be set.
5593 &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.
5594 &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.
5595 # Only one of presentMatch, exactMatch or regexMatch must be set.
5596 &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
5597 # Only one of presentMatch, exactMatch or regexMatch must be set.
5598 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
5599 },
5600 ],
5601 &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
5602 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5603 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
5604 },
5605 ],
5606 &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.
5607 # 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.
5608 # 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.
5609 &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.
5610 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005611 # 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 -07005612 &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 -07005613 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005614 &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.
5615 # Default is false.
5616 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
5617 &quot;A String&quot;,
5618 ],
5619 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
5620 &quot;A String&quot;,
5621 ],
5622 &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
5623 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5624 &quot;A String&quot;,
5625 ],
5626 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
5627 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5628 &quot;A String&quot;,
5629 ],
5630 &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.
5631 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
5632 &quot;A String&quot;,
5633 ],
5634 &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.
5635 },
5636 &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.
5637 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005638 # 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 -07005639 &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.
5640 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
5641 # The value must be between 200 and 599 inclusive.
5642 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5643 # The value must be between 0.0 and 100.0 inclusive.
5644 },
5645 &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.
5646 &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.
5647 &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.
5648 &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
5649 },
5650 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5651 # The value must be between 0.0 and 100.0 inclusive.
5652 },
5653 },
5654 &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 -07005655 # 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 -07005656 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
5657 },
5658 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005659 # 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 -07005660 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5661 &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.
5662 # 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.
5663 &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.
5664 &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
5665 },
5666 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5667 # - 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.
5668 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5669 # -
5670 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5671 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5672 # - 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.
5673 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5674 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5675 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5676 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5677 &quot;A String&quot;,
5678 ],
5679 },
5680 &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.
5681 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005682 # 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 -07005683 &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.
5684 &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
5685 },
5686 &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 -07005687 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005688 # 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 -07005689 &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.
5690 # The value must be between 1 and 255 characters.
5691 &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.
5692 # The value must be between 1 and 1024 characters.
5693 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005694 &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.
5695 # 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 -07005696 { # 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
5697 &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.
5698 &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.
5699 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005700 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5701 # 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 -07005702 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5703 { # Specification determining how headers are added to requests or responses.
5704 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5705 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5706 &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.
5707 # The default value is false.
5708 },
5709 ],
5710 &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.
5711 &quot;A String&quot;,
5712 ],
5713 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5714 { # Specification determining how headers are added to requests or responses.
5715 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5716 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5717 &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.
5718 # The default value is false.
5719 },
5720 ],
5721 &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.
5722 &quot;A String&quot;,
5723 ],
5724 },
5725 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5726 # 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.
5727 # The value must be between 0 and 1000
5728 },
5729 ],
5730 },
5731 &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.
5732 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5733 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
5734 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005735 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005736 &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.
5737 # The value must be between 1 and 255 characters.
5738 &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.
5739 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5740 # The default is set to false.
5741 &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.
5742 # 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.
5743 # The value must be between 1 and 1024 characters.
5744 &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.
5745 # 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.
5746 # The value must be between 1 and 1024 characters.
5747 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5748 # Supported values are:
5749 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5750 # - FOUND, which corresponds to 302.
5751 # - SEE_OTHER which corresponds to 303.
5752 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5753 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5754 &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.
5755 # The default is set to false.
5756 },
5757 },
5758 ],
5759 },
5760 ],
5761 &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.
5762 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5763 &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 -07005764 # 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 -07005765 { # Message for the expected URL mappings.
5766 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005767 &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 -07005768 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005769 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
5770 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07005771 },
5772 ],
5773}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005774
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005775 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.
5776
5777For 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.
5778
5779The 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 -07005780
5781Returns:
5782 An object of the form:
5783
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005784 { # Represents an Operation resource.
5785 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005786 # Google Compute Engine has three Operation resources:
5787 #
5788 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5789 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005790 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5791 #
5792 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005793 # - For global operations, use the `globalOperations` resource.
5794 # - For regional operations, use the `regionOperations` resource.
5795 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005796 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005797 # 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 -07005798 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5799 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5800 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5801 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5802 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5803 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005804 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005805 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5806 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5807 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005808 },
5809 ],
5810 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005811 &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`.
5812 &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.
5813 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5814 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5815 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5816 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5817 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5818 &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.
5819 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5820 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5821 &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.
5822 &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`.
5823 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5824 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5825 &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.
5826 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5827 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5828 {
5829 &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.
5830 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5831 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5832 {
5833 &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).
5834 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5835 },
5836 ],
5837 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5838 },
5839 ],
5840 &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 -07005841 }</pre>
5842</div>
5843
5844<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005845 <code class="details" id="validate">validate(project, urlMap, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005846 <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.
5847
5848Args:
5849 project: string, Project ID for this request. (required)
5850 urlMap: string, Name of the UrlMap resource to be validated as. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005851 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005852 The object takes the form of:
5853
5854{
Bu Sun Kim65020912020-05-20 12:08:20 -07005855 &quot;resource&quot;: { # Represents a URL Map resource. # Content of the UrlMap to be validated.
5856 #
5857 # Google Compute Engine has two URL Map resources:
5858 #
5859 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
5860 #
5861 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
5862 #
5863 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
5864 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005865 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
5866 #
5867 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
5868 #
Bu Sun Kim65020912020-05-20 12:08:20 -07005869 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
5870 #
5871 # 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.
5872 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
5873 &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.
5874 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005875 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005876 # 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 -07005877 &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 -07005878 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005879 &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.
5880 # Default is false.
5881 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
5882 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005883 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005884 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
5885 &quot;A String&quot;,
5886 ],
5887 &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
5888 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5889 &quot;A String&quot;,
5890 ],
5891 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
5892 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5893 &quot;A String&quot;,
5894 ],
5895 &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.
5896 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
5897 &quot;A String&quot;,
5898 ],
5899 &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.
5900 },
5901 &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.
5902 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005903 # 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 -07005904 &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.
5905 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
5906 # The value must be between 200 and 599 inclusive.
5907 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5908 # The value must be between 0.0 and 100.0 inclusive.
5909 },
5910 &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.
5911 &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.
5912 &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.
5913 &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
5914 },
5915 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5916 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005917 },
5918 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005919 &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 -07005920 # 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 -07005921 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
5922 },
5923 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005924 # 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 -07005925 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5926 &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.
5927 # 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.
5928 &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.
5929 &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 -07005930 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005931 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5932 # - 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.
5933 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5934 # -
5935 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5936 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5937 # - 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.
5938 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5939 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5940 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5941 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5942 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005943 ],
5944 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005945 &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.
5946 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005947 # 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 -07005948 &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.
5949 &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
5950 },
5951 &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 -07005952 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005953 # 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 -07005954 &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 -07005955 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07005956 &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.
5957 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005958 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005959 &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.
5960 # 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 -07005961 { # 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
5962 &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.
5963 &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.
5964 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005965 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5966 # 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 -07005967 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5968 { # Specification determining how headers are added to requests or responses.
5969 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5970 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5971 &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.
5972 # The default value is false.
5973 },
5974 ],
5975 &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.
5976 &quot;A String&quot;,
5977 ],
5978 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5979 { # Specification determining how headers are added to requests or responses.
5980 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5981 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5982 &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.
5983 # The default value is false.
5984 },
5985 ],
5986 &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.
5987 &quot;A String&quot;,
5988 ],
5989 },
5990 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5991 # 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.
5992 # The value must be between 0 and 1000
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005993 },
5994 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005995 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005996 &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.
5997 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005998 # 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 -07005999 &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.
6000 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006001 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07006002 &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.
6003 # The value must be between 1 and 255 characters.
6004 &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.
6005 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
6006 # The default is set to false.
6007 &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.
6008 # 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.
6009 # The value must be between 1 and 1024 characters.
6010 &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.
6011 # 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.
6012 # The value must be between 1 and 1024 characters.
6013 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
6014 # Supported values are:
6015 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
6016 # - FOUND, which corresponds to 302.
6017 # - SEE_OTHER which corresponds to 303.
6018 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
6019 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
6020 &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.
6021 # The default is set to false.
6022 },
6023 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
6024 &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.
6025 #
6026 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
6027 &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.
6028 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006029 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
6030 # 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 -07006031 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
6032 { # Specification determining how headers are added to requests or responses.
6033 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6034 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6035 &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.
6036 # The default value is false.
6037 },
6038 ],
6039 &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.
6040 &quot;A String&quot;,
6041 ],
6042 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
6043 { # Specification determining how headers are added to requests or responses.
6044 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6045 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6046 &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.
6047 # The default value is false.
6048 },
6049 ],
6050 &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.
6051 &quot;A String&quot;,
6052 ],
6053 },
6054 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
6055 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
6056 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
6057 &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 -07006058 # * 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 -07006059 &quot;A String&quot;,
6060 ],
6061 &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.
6062 },
6063 ],
6064 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
6065 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
6066 &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.
6067 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
6068 { # 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.
6069 &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.
6070 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07006071 # 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 -07006072 &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 -07006073 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07006074 &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.
6075 # Default is false.
6076 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
6077 &quot;A String&quot;,
6078 ],
6079 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
6080 &quot;A String&quot;,
6081 ],
6082 &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
6083 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
6084 &quot;A String&quot;,
6085 ],
6086 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
6087 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
6088 &quot;A String&quot;,
6089 ],
6090 &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.
6091 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
6092 &quot;A String&quot;,
6093 ],
6094 &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.
6095 },
6096 &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.
6097 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006098 # 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 -07006099 &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.
6100 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
6101 # The value must be between 200 and 599 inclusive.
6102 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
6103 # The value must be between 0.0 and 100.0 inclusive.
6104 },
6105 &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.
6106 &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.
6107 &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.
6108 &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
6109 },
6110 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
6111 # The value must be between 0.0 and 100.0 inclusive.
6112 },
6113 },
6114 &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 -07006115 # 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 -07006116 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
6117 },
6118 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006119 # 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 -07006120 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
6121 &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.
6122 # 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.
6123 &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.
6124 &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
6125 },
6126 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
6127 # - 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.
6128 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
6129 # -
6130 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
6131 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
6132 # - 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.
6133 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
6134 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
6135 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
6136 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
6137 &quot;A String&quot;,
6138 ],
6139 },
6140 &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.
6141 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006142 # 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 -07006143 &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.
6144 &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
6145 },
6146 &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 -07006147 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006148 # 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 -07006149 &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.
6150 # The value must be between 1 and 255 characters.
6151 &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.
6152 # The value must be between 1 and 1024 characters.
6153 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006154 &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.
6155 # 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 -07006156 { # 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
6157 &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.
6158 &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.
6159 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006160 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
6161 # 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 -07006162 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
6163 { # Specification determining how headers are added to requests or responses.
6164 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6165 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6166 &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.
6167 # The default value is false.
6168 },
6169 ],
6170 &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.
6171 &quot;A String&quot;,
6172 ],
6173 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
6174 { # Specification determining how headers are added to requests or responses.
6175 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6176 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6177 &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.
6178 # The default value is false.
6179 },
6180 ],
6181 &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.
6182 &quot;A String&quot;,
6183 ],
6184 },
6185 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
6186 # 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.
6187 # The value must be between 0 and 1000
6188 },
6189 ],
6190 },
6191 &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:
6192 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
6193 # - compute/v1/projects/project/global/backendServices/backendService
6194 # - 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.
6195 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
6196 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
6197 # - compute.backendBuckets.use
6198 # - compute.backendServices.use
6199 &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.
6200 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006201 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07006202 &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.
6203 # The value must be between 1 and 255 characters.
6204 &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.
6205 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
6206 # The default is set to false.
6207 &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.
6208 # 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.
6209 # The value must be between 1 and 1024 characters.
6210 &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.
6211 # 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.
6212 # The value must be between 1 and 1024 characters.
6213 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
6214 # Supported values are:
6215 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
6216 # - FOUND, which corresponds to 302.
6217 # - SEE_OTHER which corresponds to 303.
6218 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
6219 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
6220 &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.
6221 # The default is set to false.
6222 },
6223 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
6224 &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.
6225 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006226 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
6227 # 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 -07006228 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
6229 { # Specification determining how headers are added to requests or responses.
6230 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6231 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6232 &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.
6233 # The default value is false.
6234 },
6235 ],
6236 &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.
6237 &quot;A String&quot;,
6238 ],
6239 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
6240 { # Specification determining how headers are added to requests or responses.
6241 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6242 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6243 &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.
6244 # The default value is false.
6245 },
6246 ],
6247 &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.
6248 &quot;A String&quot;,
6249 ],
6250 },
6251 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
6252 &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.
6253 # 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.
6254 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
6255 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
6256 &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.
6257 &quot;A String&quot;,
6258 ],
6259 &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.
6260 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07006261 # 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 -07006262 &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 -07006263 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07006264 &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.
6265 # Default is false.
6266 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
6267 &quot;A String&quot;,
6268 ],
6269 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
6270 &quot;A String&quot;,
6271 ],
6272 &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
6273 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
6274 &quot;A String&quot;,
6275 ],
6276 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
6277 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
6278 &quot;A String&quot;,
6279 ],
6280 &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.
6281 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
6282 &quot;A String&quot;,
6283 ],
6284 &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.
6285 },
6286 &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.
6287 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006288 # 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 -07006289 &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.
6290 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
6291 # The value must be between 200 and 599 inclusive.
6292 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
6293 # The value must be between 0.0 and 100.0 inclusive.
6294 },
6295 &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.
6296 &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.
6297 &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.
6298 &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
6299 },
6300 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
6301 # The value must be between 0.0 and 100.0 inclusive.
6302 },
6303 },
6304 &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 -07006305 # 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 -07006306 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
6307 },
6308 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006309 # 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 -07006310 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
6311 &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.
6312 # 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.
6313 &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.
6314 &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
6315 },
6316 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
6317 # - 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.
6318 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
6319 # -
6320 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
6321 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
6322 # - 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.
6323 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
6324 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
6325 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
6326 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
6327 &quot;A String&quot;,
6328 ],
6329 },
6330 &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.
6331 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006332 # 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 -07006333 &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.
6334 &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
6335 },
6336 &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 -07006337 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006338 # 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 -07006339 &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.
6340 # The value must be between 1 and 255 characters.
6341 &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.
6342 # The value must be between 1 and 1024 characters.
6343 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006344 &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.
6345 # 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 -07006346 { # 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
6347 &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.
6348 &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.
6349 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006350 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
6351 # 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 -07006352 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
6353 { # Specification determining how headers are added to requests or responses.
6354 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6355 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6356 &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.
6357 # The default value is false.
6358 },
6359 ],
6360 &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.
6361 &quot;A String&quot;,
6362 ],
6363 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
6364 { # Specification determining how headers are added to requests or responses.
6365 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6366 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6367 &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.
6368 # The default value is false.
6369 },
6370 ],
6371 &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.
6372 &quot;A String&quot;,
6373 ],
6374 },
6375 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
6376 # 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.
6377 # The value must be between 0 and 1000
6378 },
6379 ],
6380 },
6381 &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.
6382 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
6383 &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.
6384 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006385 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07006386 &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.
6387 # The value must be between 1 and 255 characters.
6388 &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.
6389 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
6390 # The default is set to false.
6391 &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.
6392 # 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.
6393 # The value must be between 1 and 1024 characters.
6394 &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.
6395 # 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.
6396 # The value must be between 1 and 1024 characters.
6397 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
6398 # Supported values are:
6399 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
6400 # - FOUND, which corresponds to 302.
6401 # - SEE_OTHER which corresponds to 303.
6402 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
6403 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
6404 &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.
6405 # The default is set to false.
6406 },
6407 },
6408 ],
6409 &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.
6410 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
6411 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
6412 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
6413 # The description can have a maximum length of 1024 characters.
6414 &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.
6415 # 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 -07006416 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
6417 # 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 -07006418 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
6419 { # Specification determining how headers are added to requests or responses.
6420 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6421 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6422 &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.
6423 # The default value is false.
6424 },
6425 ],
6426 &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.
6427 &quot;A String&quot;,
6428 ],
6429 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
6430 { # Specification determining how headers are added to requests or responses.
6431 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6432 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6433 &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.
6434 # The default value is false.
6435 },
6436 ],
6437 &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.
6438 &quot;A String&quot;,
6439 ],
6440 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006441 &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.
6442 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
6443 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
6444 &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
6445 &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
6446 &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
6447 },
6448 ],
6449 &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.
6450 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
6451 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
6452 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
6453 &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
6454 &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
6455 &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
6456 },
6457 ],
6458 &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 -07006459 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
6460 &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.
6461 # fullPathMatch must be between 1 and 1024 characters.
6462 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
6463 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
6464 { # matchRule criteria for request header matches.
6465 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
6466 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
6467 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
6468 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
6469 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006470 # 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 -07006471 &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.
6472 # The default setting is false.
6473 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
6474 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
6475 &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.
6476 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
6477 &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.
6478 # For example for a range [-5, 0]
6479 # - -3 will match.
6480 # - 0 will not match.
6481 # - 0.25 will not match.
6482 # - -3someString will not match.
6483 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
6484 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
6485 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
6486 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
6487 },
6488 &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
6489 # 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.
6490 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
6491 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
6492 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
6493 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
6494 },
6495 ],
6496 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
6497 # The default value is false.
6498 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006499 # Not supported when the URL map is bound to target gRPC proxy.
6500 &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.
6501 # 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 -07006502 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
6503 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006504 # 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 -07006505 { # 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.
6506 # 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.
6507 # 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.
6508 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
6509 # This list must not be empty and can have at the most 64 entries.
6510 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
6511 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
6512 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
6513 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
6514 # value can have a maximum length of 1024 characters.
6515 },
6516 ],
6517 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
6518 # Supported values are:
6519 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
6520 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
6521 },
6522 ],
6523 &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 /.
6524 # The value must be between 1 and 1024 characters.
6525 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
6526 &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 -07006527 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07006528 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
6529 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
6530 # Only one of presentMatch, exactMatch or regexMatch must be set.
6531 &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.
6532 &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.
6533 # Only one of presentMatch, exactMatch or regexMatch must be set.
6534 &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
6535 # Only one of presentMatch, exactMatch or regexMatch must be set.
6536 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
6537 },
6538 ],
6539 &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
6540 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
6541 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
6542 },
6543 ],
6544 &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.
6545 # 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.
6546 # 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.
6547 &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.
6548 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006549 # 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 -07006550 &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 -07006551 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07006552 &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.
6553 # Default is false.
6554 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
6555 &quot;A String&quot;,
6556 ],
6557 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
6558 &quot;A String&quot;,
6559 ],
6560 &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
6561 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
6562 &quot;A String&quot;,
6563 ],
6564 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
6565 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
6566 &quot;A String&quot;,
6567 ],
6568 &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.
6569 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
6570 &quot;A String&quot;,
6571 ],
6572 &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.
6573 },
6574 &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.
6575 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006576 # 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 -07006577 &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.
6578 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
6579 # The value must be between 200 and 599 inclusive.
6580 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
6581 # The value must be between 0.0 and 100.0 inclusive.
6582 },
6583 &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.
6584 &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.
6585 &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.
6586 &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
6587 },
6588 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
6589 # The value must be between 0.0 and 100.0 inclusive.
6590 },
6591 },
6592 &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 -07006593 # 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 -07006594 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
6595 },
6596 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006597 # 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 -07006598 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
6599 &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.
6600 # 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.
6601 &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.
6602 &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
6603 },
6604 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
6605 # - 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.
6606 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
6607 # -
6608 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
6609 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
6610 # - 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.
6611 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
6612 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
6613 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
6614 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
6615 &quot;A String&quot;,
6616 ],
6617 },
6618 &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.
6619 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006620 # 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 -07006621 &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.
6622 &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
6623 },
6624 &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 -07006625 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006626 # 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 -07006627 &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.
6628 # The value must be between 1 and 255 characters.
6629 &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.
6630 # The value must be between 1 and 1024 characters.
6631 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006632 &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.
6633 # 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 -07006634 { # 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
6635 &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.
6636 &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.
6637 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006638 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
6639 # 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 -07006640 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
6641 { # Specification determining how headers are added to requests or responses.
6642 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6643 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6644 &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.
6645 # The default value is false.
6646 },
6647 ],
6648 &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.
6649 &quot;A String&quot;,
6650 ],
6651 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
6652 { # Specification determining how headers are added to requests or responses.
6653 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6654 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6655 &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.
6656 # The default value is false.
6657 },
6658 ],
6659 &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.
6660 &quot;A String&quot;,
6661 ],
6662 },
6663 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
6664 # 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.
6665 # The value must be between 0 and 1000
6666 },
6667 ],
6668 },
6669 &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.
6670 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
6671 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
6672 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006673 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07006674 &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.
6675 # The value must be between 1 and 255 characters.
6676 &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.
6677 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
6678 # The default is set to false.
6679 &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.
6680 # 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.
6681 # The value must be between 1 and 1024 characters.
6682 &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.
6683 # 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.
6684 # The value must be between 1 and 1024 characters.
6685 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
6686 # Supported values are:
6687 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
6688 # - FOUND, which corresponds to 302.
6689 # - SEE_OTHER which corresponds to 303.
6690 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
6691 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
6692 &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.
6693 # The default is set to false.
6694 },
6695 },
6696 ],
6697 },
6698 ],
6699 &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.
6700 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6701 &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 -07006702 # 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 -07006703 { # Message for the expected URL mappings.
6704 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006705 &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 -07006706 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006707 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
6708 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07006709 },
6710 ],
6711 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006712 }
6713
6714
6715Returns:
6716 An object of the form:
6717
6718 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006719 &quot;result&quot;: { # Message representing the validation result for a UrlMap.
6720 &quot;loadErrors&quot;: [
6721 &quot;A String&quot;,
6722 ],
6723 &quot;loadSucceeded&quot;: True or False, # Whether the given UrlMap can be successfully loaded. If false, &#x27;loadErrors&#x27; indicates the reasons.
6724 &quot;testFailures&quot;: [
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006725 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006726 &quot;actualService&quot;: &quot;A String&quot;, # BackendService or BackendBucket returned by load balancer.
6727 &quot;expectedService&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
6728 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL.
6729 &quot;path&quot;: &quot;A String&quot;, # Path portion including query parameters in the URL.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006730 },
6731 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07006732 &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 -07006733 },
6734 }</pre>
6735</div>
6736
6737</body></html>