blob: c4499a6cd9ba10fa6a2ceb3af6c40cffc92ec0a8 [file] [log] [blame]
Craig Citro065b5302014-08-14 00:47:23 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.urlMaps.html">urlMaps</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070078 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070084 <code><a href="#delete">delete(project, urlMap, requestId=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070085<p class="firstline">Deletes the specified UrlMap resource.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, urlMap)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.</p>
Craig Citro065b5302014-08-14 00:47:23 -070089<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#insert">insert(project, body=None, requestId=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070091<p class="firstline">Creates a UrlMap resource in the specified project using the data included in the request.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#invalidateCache">invalidateCache(project, urlMap, body=None, requestId=None)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070094<p class="firstline">Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.</p>
95<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070096 <code><a href="#list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070097<p class="firstline">Retrieves the list of UrlMap resources available to the specified project.</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#patch">patch(project, urlMap, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Craig Citro065b5302014-08-14 00:47:23 -0700104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#update">update(project, urlMap, body=None, requestId=None)</a></code></p>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700106<p class="firstline">Updates the specified UrlMap resource with the data included in the request.</p>
Craig Citro065b5302014-08-14 00:47:23 -0700107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#validate">validate(project, urlMap, body=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800109<p class="firstline">Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.</p>
Craig Citro065b5302014-08-14 00:47:23 -0700110<h3>Method Details</h3>
111<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700112 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -0700113 <pre>Retrieves the list of all UrlMap resources, regional and global, available to the specified project.
114
115Args:
116 project: string, Name of the project scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 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;`.
118
119For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
120
121You 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.
122
Bu Sun Kim65020912020-05-20 12:08:20 -0700123To 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 -0700124 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 -0700125 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`)
126 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
127
128You 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.
129
130Currently, only sorting by `name` or `creationTimestamp desc` is supported.
131 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700132
133Returns:
134 An object of the form:
135
136 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700137 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
138 &quot;items&quot;: { # A list of UrlMapsScopedList resources.
139 &quot;a_key&quot;: { # Name of the scope containing this set of UrlMaps.
140 &quot;urlMaps&quot;: [ # A list of UrlMaps contained in this scope.
Dan O'Mearadd494642020-05-01 07:42:23 -0700141 { # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700142 #
143 # Google Compute Engine has two URL Map resources:
144 #
145 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
146 #
147 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
148 #
149 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
150 #
151 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
152 #
153 # 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.
154 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
155 &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.
156 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
157 &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
158 &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.
159 # Default is false.
160 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
161 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700162 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700163 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
164 &quot;A String&quot;,
165 ],
166 &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
167 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
168 &quot;A String&quot;,
169 ],
170 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
171 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
172 &quot;A String&quot;,
173 ],
174 &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.
175 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
176 &quot;A String&quot;,
177 ],
178 &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.
179 },
180 &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.
181 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
182 &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.
183 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
184 # The value must be between 200 and 599 inclusive.
185 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
186 # The value must be between 0.0 and 100.0 inclusive.
187 },
188 &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.
189 &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.
190 &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.
191 &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
192 },
193 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
194 # The value must be between 0.0 and 100.0 inclusive.
Dan O'Mearadd494642020-05-01 07:42:23 -0700195 },
196 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700197 &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.
198 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
199 },
200 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
201 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
202 &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.
203 # 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.
204 &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.
205 &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
Dan O'Mearadd494642020-05-01 07:42:23 -0700206 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700207 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
208 # - 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.
209 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
210 # -
211 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
212 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
213 # - 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.
214 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
215 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
216 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
217 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
218 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700219 ],
220 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700221 &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.
222 # If not specified, will use the largest timeout among all backend services associated with the route.
223 &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.
224 &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
225 },
226 &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.
227 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700228 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700229 &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.
230 # The value must be between 1 and 1024 characters.
Dan O'Mearadd494642020-05-01 07:42:23 -0700231 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700232 &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 0 number.
233 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
234 { # 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
235 &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.
236 &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.
237 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
238 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
239 { # Specification determining how headers are added to requests or responses.
240 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
241 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
242 &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.
243 # The default value is false.
244 },
245 ],
246 &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.
247 &quot;A String&quot;,
248 ],
249 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
250 { # Specification determining how headers are added to requests or responses.
251 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
252 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
253 &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.
254 # The default value is false.
255 },
256 ],
257 &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.
258 &quot;A String&quot;,
259 ],
260 },
261 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
262 # 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.
263 # The value must be between 0 and 1000
Dan O'Mearadd494642020-05-01 07:42:23 -0700264 },
265 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700266 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700267 &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.
268 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
269 &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.
270 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
271 &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.
272 # The value must be between 1 and 255 characters.
273 &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.
274 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
275 # The default is set to false.
276 &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.
277 # 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.
278 # The value must be between 1 and 1024 characters.
279 &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.
280 # 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.
281 # The value must be between 1 and 1024 characters.
282 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
283 # Supported values are:
284 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
285 # - FOUND, which corresponds to 302.
286 # - SEE_OTHER which corresponds to 303.
287 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
288 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
289 &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.
290 # The default is set to false.
291 },
292 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
293 &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.
294 #
295 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
296 &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.
297 # The headerAction specified here take effect after headerAction specified under pathMatcher.
298 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
299 { # Specification determining how headers are added to requests or responses.
300 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
301 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
302 &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.
303 # The default value is false.
304 },
305 ],
306 &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.
307 &quot;A String&quot;,
308 ],
309 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
310 { # Specification determining how headers are added to requests or responses.
311 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
312 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
313 &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.
314 # The default value is false.
315 },
316 ],
317 &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.
318 &quot;A String&quot;,
319 ],
320 },
321 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
322 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
323 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
324 &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 ..
325 &quot;A String&quot;,
326 ],
327 &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.
328 },
329 ],
330 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
331 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
332 &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.
333 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
334 { # 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.
335 &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.
336 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
337 &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
338 &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.
339 # Default is false.
340 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
341 &quot;A String&quot;,
342 ],
343 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
344 &quot;A String&quot;,
345 ],
346 &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
347 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
348 &quot;A String&quot;,
349 ],
350 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
351 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
352 &quot;A String&quot;,
353 ],
354 &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.
355 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
356 &quot;A String&quot;,
357 ],
358 &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.
359 },
360 &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.
361 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
362 &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.
363 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
364 # The value must be between 200 and 599 inclusive.
365 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
366 # The value must be between 0.0 and 100.0 inclusive.
367 },
368 &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.
369 &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.
370 &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.
371 &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
372 },
373 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
374 # The value must be between 0.0 and 100.0 inclusive.
375 },
376 },
377 &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.
378 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
379 },
380 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
381 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
382 &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.
383 # 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.
384 &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.
385 &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
386 },
387 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
388 # - 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.
389 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
390 # -
391 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
392 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
393 # - 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.
394 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
395 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
396 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
397 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
398 &quot;A String&quot;,
399 ],
400 },
401 &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.
402 # If not specified, will use the largest timeout among all backend services associated with the route.
403 &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.
404 &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
405 },
406 &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.
407 &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.
408 # The value must be between 1 and 255 characters.
409 &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.
410 # The value must be between 1 and 1024 characters.
411 },
412 &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 0 number.
413 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
414 { # 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
415 &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.
416 &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.
417 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
418 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
419 { # Specification determining how headers are added to requests or responses.
420 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
421 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
422 &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.
423 # The default value is false.
424 },
425 ],
426 &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.
427 &quot;A String&quot;,
428 ],
429 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
430 { # Specification determining how headers are added to requests or responses.
431 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
432 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
433 &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.
434 # The default value is false.
435 },
436 ],
437 &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.
438 &quot;A String&quot;,
439 ],
440 },
441 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
442 # 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.
443 # The value must be between 0 and 1000
444 },
445 ],
446 },
447 &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:
448 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
449 # - compute/v1/projects/project/global/backendServices/backendService
450 # - 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.
451 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
452 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
453 # - compute.backendBuckets.use
454 # - compute.backendServices.use
455 &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.
456 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
457 &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.
458 # The value must be between 1 and 255 characters.
459 &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.
460 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
461 # The default is set to false.
462 &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.
463 # 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.
464 # The value must be between 1 and 1024 characters.
465 &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.
466 # 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.
467 # The value must be between 1 and 1024 characters.
468 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
469 # Supported values are:
470 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
471 # - FOUND, which corresponds to 302.
472 # - SEE_OTHER which corresponds to 303.
473 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
474 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
475 &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.
476 # The default is set to false.
477 },
478 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
479 &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.
480 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
481 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
482 { # Specification determining how headers are added to requests or responses.
483 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
484 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
485 &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.
486 # The default value is false.
487 },
488 ],
489 &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.
490 &quot;A String&quot;,
491 ],
492 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
493 { # Specification determining how headers are added to requests or responses.
494 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
495 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
496 &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.
497 # The default value is false.
498 },
499 ],
500 &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.
501 &quot;A String&quot;,
502 ],
503 },
504 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
505 &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.
506 # 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.
507 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
508 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
509 &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.
510 &quot;A String&quot;,
511 ],
512 &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.
513 # Only one of routeAction or urlRedirect must be set.
514 &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
515 &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.
516 # Default is false.
517 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
518 &quot;A String&quot;,
519 ],
520 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
521 &quot;A String&quot;,
522 ],
523 &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
524 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
525 &quot;A String&quot;,
526 ],
527 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
528 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
529 &quot;A String&quot;,
530 ],
531 &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.
532 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
533 &quot;A String&quot;,
534 ],
535 &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.
536 },
537 &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.
538 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
539 &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.
540 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
541 # The value must be between 200 and 599 inclusive.
542 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
543 # The value must be between 0.0 and 100.0 inclusive.
544 },
545 &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.
546 &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.
547 &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.
548 &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
549 },
550 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
551 # The value must be between 0.0 and 100.0 inclusive.
552 },
553 },
554 &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.
555 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
556 },
557 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
558 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
559 &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.
560 # 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.
561 &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.
562 &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
563 },
564 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
565 # - 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.
566 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
567 # -
568 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
569 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
570 # - 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.
571 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
572 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
573 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
574 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
575 &quot;A String&quot;,
576 ],
577 },
578 &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.
579 # If not specified, will use the largest timeout among all backend services associated with the route.
580 &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.
581 &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
582 },
583 &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.
584 &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.
585 # The value must be between 1 and 255 characters.
586 &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.
587 # The value must be between 1 and 1024 characters.
588 },
589 &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 0 number.
590 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
591 { # 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
592 &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.
593 &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.
594 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
595 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
596 { # Specification determining how headers are added to requests or responses.
597 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
598 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
599 &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.
600 # The default value is false.
601 },
602 ],
603 &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.
604 &quot;A String&quot;,
605 ],
606 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
607 { # Specification determining how headers are added to requests or responses.
608 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
609 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
610 &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.
611 # The default value is false.
612 },
613 ],
614 &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.
615 &quot;A String&quot;,
616 ],
617 },
618 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
619 # 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.
620 # The value must be between 0 and 1000
621 },
622 ],
623 },
624 &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.
625 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
626 &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.
627 # If urlRedirect is specified, service or routeAction must not be set.
628 &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.
629 # The value must be between 1 and 255 characters.
630 &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.
631 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
632 # The default is set to false.
633 &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.
634 # 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.
635 # The value must be between 1 and 1024 characters.
636 &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.
637 # 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.
638 # The value must be between 1 and 1024 characters.
639 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
640 # Supported values are:
641 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
642 # - FOUND, which corresponds to 302.
643 # - SEE_OTHER which corresponds to 303.
644 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
645 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
646 &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.
647 # The default is set to false.
648 },
649 },
650 ],
651 &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.
652 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
653 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
654 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
655 # The description can have a maximum length of 1024 characters.
656 &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.
657 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
658 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
659 { # Specification determining how headers are added to requests or responses.
660 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
661 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
662 &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.
663 # The default value is false.
664 },
665 ],
666 &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.
667 &quot;A String&quot;,
668 ],
669 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
670 { # Specification determining how headers are added to requests or responses.
671 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
672 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
673 &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.
674 # The default value is false.
675 },
676 ],
677 &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.
678 &quot;A String&quot;,
679 ],
680 },
681 &quot;matchRules&quot;: [
682 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
683 &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.
684 # fullPathMatch must be between 1 and 1024 characters.
685 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
686 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
687 { # matchRule criteria for request header matches.
688 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
689 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
690 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
691 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
692 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
693 &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.
694 # The default setting is false.
695 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
696 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
697 &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.
698 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
699 &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.
700 # For example for a range [-5, 0]
701 # - -3 will match.
702 # - 0 will not match.
703 # - 0.25 will not match.
704 # - -3someString will not match.
705 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
706 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
707 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
708 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
709 },
710 &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
711 # 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.
712 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
713 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
714 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
715 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
716 },
717 ],
718 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
719 # The default value is false.
720 # ignoreCase must not be used with regexMatch.
721 &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. If a match takes place, the relevant routing configuration is made available to those proxies.
722 # 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.
723 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
724 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
725 { # 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.
726 # 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.
727 # 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.
728 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
729 # This list must not be empty and can have at the most 64 entries.
730 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
731 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
732 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
733 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
734 # value can have a maximum length of 1024 characters.
735 },
736 ],
737 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
738 # Supported values are:
739 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
740 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
741 },
742 ],
743 &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 /.
744 # The value must be between 1 and 1024 characters.
745 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
746 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
747 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
748 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
749 # Only one of presentMatch, exactMatch or regexMatch must be set.
750 &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.
751 &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.
752 # Only one of presentMatch, exactMatch or regexMatch must be set.
753 &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
754 # Only one of presentMatch, exactMatch or regexMatch must be set.
755 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
756 },
757 ],
758 &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
759 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
760 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
761 },
762 ],
763 &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.
764 # 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.
765 # 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.
766 &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.
767 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
768 &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
769 &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.
770 # Default is false.
771 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
772 &quot;A String&quot;,
773 ],
774 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
775 &quot;A String&quot;,
776 ],
777 &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
778 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
779 &quot;A String&quot;,
780 ],
781 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
782 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
783 &quot;A String&quot;,
784 ],
785 &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.
786 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
787 &quot;A String&quot;,
788 ],
789 &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.
790 },
791 &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.
792 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
793 &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.
794 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
795 # The value must be between 200 and 599 inclusive.
796 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
797 # The value must be between 0.0 and 100.0 inclusive.
798 },
799 &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.
800 &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.
801 &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.
802 &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
803 },
804 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
805 # The value must be between 0.0 and 100.0 inclusive.
806 },
807 },
808 &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.
809 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
810 },
811 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
812 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
813 &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.
814 # 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.
815 &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.
816 &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
817 },
818 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
819 # - 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.
820 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
821 # -
822 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
823 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
824 # - 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.
825 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
826 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
827 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
828 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
829 &quot;A String&quot;,
830 ],
831 },
832 &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.
833 # If not specified, will use the largest timeout among all backend services associated with the route.
834 &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.
835 &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
836 },
837 &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.
838 &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.
839 # The value must be between 1 and 255 characters.
840 &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.
841 # The value must be between 1 and 1024 characters.
842 },
843 &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 0 number.
844 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
845 { # 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
846 &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.
847 &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.
848 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
849 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
850 { # Specification determining how headers are added to requests or responses.
851 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
852 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
853 &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.
854 # The default value is false.
855 },
856 ],
857 &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.
858 &quot;A String&quot;,
859 ],
860 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
861 { # Specification determining how headers are added to requests or responses.
862 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
863 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
864 &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.
865 # The default value is false.
866 },
867 ],
868 &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.
869 &quot;A String&quot;,
870 ],
871 },
872 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
873 # 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.
874 # The value must be between 0 and 1000
875 },
876 ],
877 },
878 &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.
879 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
880 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
881 # If urlRedirect is specified, service or routeAction must not be set.
882 &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.
883 # The value must be between 1 and 255 characters.
884 &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.
885 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
886 # The default is set to false.
887 &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.
888 # 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.
889 # The value must be between 1 and 1024 characters.
890 &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.
891 # 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.
892 # The value must be between 1 and 1024 characters.
893 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
894 # Supported values are:
895 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
896 # - FOUND, which corresponds to 302.
897 # - SEE_OTHER which corresponds to 303.
898 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
899 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
900 &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.
901 # The default is set to false.
902 },
903 },
904 ],
905 },
906 ],
907 &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.
908 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
909 &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.
910 { # Message for the expected URL mappings.
911 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
912 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL.
913 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
914 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService resource the given URL should be mapped to.
915 },
916 ],
917 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700918 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700919 &quot;warning&quot;: { # Informational warning which replaces the list of backend services when the list is empty.
920 &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.
921 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
922 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Dan O'Mearadd494642020-05-01 07:42:23 -0700923 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700924 &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).
925 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Dan O'Mearadd494642020-05-01 07:42:23 -0700926 },
927 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700928 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Dan O'Mearadd494642020-05-01 07:42:23 -0700929 },
930 },
931 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700932 &quot;kind&quot;: &quot;compute#urlMapsAggregatedList&quot;, # Type of resource.
933 &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.
934 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
935 &quot;warning&quot;: { # [Output Only] Informational warning message.
936 &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.
937 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
938 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Dan O'Mearadd494642020-05-01 07:42:23 -0700939 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700940 &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).
941 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Dan O'Mearadd494642020-05-01 07:42:23 -0700942 },
943 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700944 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Dan O'Mearadd494642020-05-01 07:42:23 -0700945 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700946 }</pre>
947</div>
948
949<div class="method">
950 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
951 <pre>Retrieves the next page of results.
952
953Args:
954 previous_request: The request for the previous page. (required)
955 previous_response: The response from the request for the previous page. (required)
956
957Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700958 A request object that you can call &#x27;execute()&#x27; on to request the next
Dan O'Mearadd494642020-05-01 07:42:23 -0700959 page. Returns None if there are no more items in the collection.
960 </pre>
961</div>
962
963<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700964 <code class="details" id="delete">delete(project, urlMap, requestId=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700965 <pre>Deletes the specified UrlMap resource.
966
967Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800968 project: string, Project ID for this request. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700969 urlMap: string, Name of the UrlMap resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700970 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
971
972For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
973
974The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Craig Citro065b5302014-08-14 00:47:23 -0700975
976Returns:
977 An object of the form:
978
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700979 { # Represents an Operation resource.
980 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700981 # Google Compute Engine has three Operation resources:
982 #
983 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
984 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700985 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
986 #
987 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700988 # - For global operations, use the `globalOperations` resource.
989 # - For regional operations, use the `regionOperations` resource.
990 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700991 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700992 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700993 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
994 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
995 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
996 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
997 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
998 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -0700999 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001000 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1001 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1002 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Craig Citro065b5302014-08-14 00:47:23 -07001003 },
1004 ],
1005 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001006 &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`.
1007 &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.
1008 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1009 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1010 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1011 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1012 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1013 &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.
1014 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1015 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1016 &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.
1017 &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`.
1018 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1019 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1020 &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.
1021 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1022 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1023 {
1024 &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.
1025 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1026 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1027 {
1028 &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).
1029 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1030 },
1031 ],
1032 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1033 },
1034 ],
1035 &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.
Craig Citro065b5302014-08-14 00:47:23 -07001036 }</pre>
1037</div>
1038
1039<div class="method">
1040 <code class="details" id="get">get(project, urlMap)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001041 <pre>Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.
Craig Citro065b5302014-08-14 00:47:23 -07001042
1043Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001044 project: string, Project ID for this request. (required)
Craig Citro065b5302014-08-14 00:47:23 -07001045 urlMap: string, Name of the UrlMap resource to return. (required)
1046
1047Returns:
1048 An object of the form:
1049
Dan O'Mearadd494642020-05-01 07:42:23 -07001050 { # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001051 #
1052 # Google Compute Engine has two URL Map resources:
1053 #
1054 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
1055 #
1056 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
1057 #
1058 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
1059 #
1060 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
1061 #
1062 # To use the global urlMaps resource, the backend service must have a loadBalancingScheme of either EXTERNAL or INTERNAL_SELF_MANAGED. To use the regionUrlMaps resource, the backend service must have a loadBalancingScheme of INTERNAL_MANAGED. For more information, read URL Map Concepts.
1063 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1064 &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.
1065 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
1066 &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
1067 &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.
1068 # Default is false.
1069 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
1070 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001071 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001072 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
1073 &quot;A String&quot;,
1074 ],
1075 &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
1076 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1077 &quot;A String&quot;,
1078 ],
1079 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
1080 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1081 &quot;A String&quot;,
1082 ],
1083 &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.
1084 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
1085 &quot;A String&quot;,
1086 ],
1087 &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.
1088 },
1089 &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.
1090 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1091 &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.
1092 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
1093 # The value must be between 200 and 599 inclusive.
1094 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1095 # The value must be between 0.0 and 100.0 inclusive.
1096 },
1097 &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.
1098 &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.
1099 &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.
1100 &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
1101 },
1102 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1103 # The value must be between 0.0 and 100.0 inclusive.
Dan O'Mearadd494642020-05-01 07:42:23 -07001104 },
1105 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001106 &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.
1107 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
1108 },
1109 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1110 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1111 &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.
1112 # 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.
1113 &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.
1114 &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
Craig Citro065b5302014-08-14 00:47:23 -07001115 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001116 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1117 # - 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.
1118 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1119 # -
1120 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1121 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1122 # - 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.
1123 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1124 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1125 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1126 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1127 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001128 ],
1129 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001130 &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.
1131 # If not specified, will use the largest timeout among all backend services associated with the route.
1132 &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.
1133 &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
1134 },
1135 &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.
1136 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001137 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001138 &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.
1139 # The value must be between 1 and 1024 characters.
Dan O'Mearadd494642020-05-01 07:42:23 -07001140 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001141 &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 0 number.
1142 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
1143 { # 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
1144 &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.
1145 &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.
1146 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1147 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1148 { # Specification determining how headers are added to requests or responses.
1149 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1150 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1151 &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.
1152 # The default value is false.
1153 },
1154 ],
1155 &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.
1156 &quot;A String&quot;,
1157 ],
1158 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1159 { # Specification determining how headers are added to requests or responses.
1160 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1161 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1162 &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.
1163 # The default value is false.
1164 },
1165 ],
1166 &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.
1167 &quot;A String&quot;,
1168 ],
1169 },
1170 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1171 # 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.
1172 # The value must be between 0 and 1000
Craig Citro065b5302014-08-14 00:47:23 -07001173 },
1174 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001175 },
1176 &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.
1177 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
1178 &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.
1179 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
1180 &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.
1181 # The value must be between 1 and 255 characters.
1182 &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.
1183 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1184 # The default is set to false.
1185 &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.
1186 # 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.
1187 # The value must be between 1 and 1024 characters.
1188 &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.
1189 # 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.
1190 # The value must be between 1 and 1024 characters.
1191 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
1192 # Supported values are:
1193 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1194 # - FOUND, which corresponds to 302.
1195 # - SEE_OTHER which corresponds to 303.
1196 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1197 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1198 &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.
1199 # The default is set to false.
1200 },
1201 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1202 &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.
1203 #
1204 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
1205 &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.
1206 # The headerAction specified here take effect after headerAction specified under pathMatcher.
1207 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1208 { # Specification determining how headers are added to requests or responses.
1209 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1210 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1211 &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.
1212 # The default value is false.
1213 },
1214 ],
1215 &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.
1216 &quot;A String&quot;,
1217 ],
1218 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1219 { # Specification determining how headers are added to requests or responses.
1220 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1221 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1222 &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.
1223 # The default value is false.
1224 },
1225 ],
1226 &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.
1227 &quot;A String&quot;,
1228 ],
1229 },
1230 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
1231 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
1232 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1233 &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 ..
1234 &quot;A String&quot;,
1235 ],
1236 &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.
1237 },
1238 ],
1239 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1240 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
1241 &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.
1242 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
1243 { # 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.
1244 &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.
1245 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
1246 &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
1247 &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.
1248 # Default is false.
1249 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
1250 &quot;A String&quot;,
1251 ],
1252 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
1253 &quot;A String&quot;,
1254 ],
1255 &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
1256 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1257 &quot;A String&quot;,
1258 ],
1259 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
1260 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1261 &quot;A String&quot;,
1262 ],
1263 &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.
1264 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
1265 &quot;A String&quot;,
1266 ],
1267 &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.
1268 },
1269 &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.
1270 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1271 &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.
1272 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
1273 # The value must be between 200 and 599 inclusive.
1274 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1275 # The value must be between 0.0 and 100.0 inclusive.
1276 },
1277 &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.
1278 &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.
1279 &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.
1280 &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
1281 },
1282 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1283 # The value must be between 0.0 and 100.0 inclusive.
1284 },
1285 },
1286 &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.
1287 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
1288 },
1289 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1290 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1291 &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.
1292 # 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.
1293 &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.
1294 &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
1295 },
1296 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1297 # - 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.
1298 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1299 # -
1300 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1301 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1302 # - 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.
1303 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1304 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1305 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1306 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1307 &quot;A String&quot;,
1308 ],
1309 },
1310 &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.
1311 # If not specified, will use the largest timeout among all backend services associated with the route.
1312 &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.
1313 &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
1314 },
1315 &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.
1316 &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.
1317 # The value must be between 1 and 255 characters.
1318 &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.
1319 # The value must be between 1 and 1024 characters.
1320 },
1321 &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 0 number.
1322 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
1323 { # 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
1324 &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.
1325 &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.
1326 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1327 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1328 { # Specification determining how headers are added to requests or responses.
1329 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1330 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1331 &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.
1332 # The default value is false.
1333 },
1334 ],
1335 &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.
1336 &quot;A String&quot;,
1337 ],
1338 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1339 { # Specification determining how headers are added to requests or responses.
1340 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1341 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1342 &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.
1343 # The default value is false.
1344 },
1345 ],
1346 &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.
1347 &quot;A String&quot;,
1348 ],
1349 },
1350 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1351 # 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.
1352 # The value must be between 0 and 1000
1353 },
1354 ],
1355 },
1356 &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:
1357 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
1358 # - compute/v1/projects/project/global/backendServices/backendService
1359 # - 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.
1360 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
1361 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
1362 # - compute.backendBuckets.use
1363 # - compute.backendServices.use
1364 &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.
1365 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
1366 &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.
1367 # The value must be between 1 and 255 characters.
1368 &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.
1369 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1370 # The default is set to false.
1371 &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.
1372 # 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.
1373 # The value must be between 1 and 1024 characters.
1374 &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.
1375 # 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.
1376 # The value must be between 1 and 1024 characters.
1377 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
1378 # Supported values are:
1379 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1380 # - FOUND, which corresponds to 302.
1381 # - SEE_OTHER which corresponds to 303.
1382 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1383 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1384 &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.
1385 # The default is set to false.
1386 },
1387 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1388 &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.
1389 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
1390 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1391 { # Specification determining how headers are added to requests or responses.
1392 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1393 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1394 &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.
1395 # The default value is false.
1396 },
1397 ],
1398 &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.
1399 &quot;A String&quot;,
1400 ],
1401 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1402 { # Specification determining how headers are added to requests or responses.
1403 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1404 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1405 &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.
1406 # The default value is false.
1407 },
1408 ],
1409 &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.
1410 &quot;A String&quot;,
1411 ],
1412 },
1413 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
1414 &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.
1415 # 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.
1416 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
1417 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
1418 &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.
1419 &quot;A String&quot;,
1420 ],
1421 &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.
1422 # Only one of routeAction or urlRedirect must be set.
1423 &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
1424 &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.
1425 # Default is false.
1426 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
1427 &quot;A String&quot;,
1428 ],
1429 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
1430 &quot;A String&quot;,
1431 ],
1432 &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
1433 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1434 &quot;A String&quot;,
1435 ],
1436 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
1437 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1438 &quot;A String&quot;,
1439 ],
1440 &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.
1441 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
1442 &quot;A String&quot;,
1443 ],
1444 &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.
1445 },
1446 &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.
1447 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1448 &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.
1449 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
1450 # The value must be between 200 and 599 inclusive.
1451 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1452 # The value must be between 0.0 and 100.0 inclusive.
1453 },
1454 &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.
1455 &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.
1456 &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.
1457 &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
1458 },
1459 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1460 # The value must be between 0.0 and 100.0 inclusive.
1461 },
1462 },
1463 &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.
1464 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
1465 },
1466 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1467 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1468 &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.
1469 # 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.
1470 &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.
1471 &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
1472 },
1473 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1474 # - 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.
1475 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1476 # -
1477 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1478 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1479 # - 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.
1480 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1481 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1482 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1483 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1484 &quot;A String&quot;,
1485 ],
1486 },
1487 &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.
1488 # If not specified, will use the largest timeout among all backend services associated with the route.
1489 &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.
1490 &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
1491 },
1492 &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.
1493 &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.
1494 # The value must be between 1 and 255 characters.
1495 &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.
1496 # The value must be between 1 and 1024 characters.
1497 },
1498 &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 0 number.
1499 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
1500 { # 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
1501 &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.
1502 &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.
1503 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1504 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1505 { # Specification determining how headers are added to requests or responses.
1506 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1507 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1508 &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.
1509 # The default value is false.
1510 },
1511 ],
1512 &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.
1513 &quot;A String&quot;,
1514 ],
1515 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1516 { # Specification determining how headers are added to requests or responses.
1517 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1518 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1519 &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.
1520 # The default value is false.
1521 },
1522 ],
1523 &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.
1524 &quot;A String&quot;,
1525 ],
1526 },
1527 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1528 # 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.
1529 # The value must be between 0 and 1000
1530 },
1531 ],
1532 },
1533 &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.
1534 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1535 &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.
1536 # If urlRedirect is specified, service or routeAction must not be set.
1537 &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.
1538 # The value must be between 1 and 255 characters.
1539 &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.
1540 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1541 # The default is set to false.
1542 &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.
1543 # 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.
1544 # The value must be between 1 and 1024 characters.
1545 &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.
1546 # 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.
1547 # The value must be between 1 and 1024 characters.
1548 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
1549 # Supported values are:
1550 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1551 # - FOUND, which corresponds to 302.
1552 # - SEE_OTHER which corresponds to 303.
1553 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1554 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1555 &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.
1556 # The default is set to false.
1557 },
1558 },
1559 ],
1560 &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.
1561 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
1562 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
1563 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
1564 # The description can have a maximum length of 1024 characters.
1565 &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.
1566 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
1567 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1568 { # Specification determining how headers are added to requests or responses.
1569 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1570 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1571 &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.
1572 # The default value is false.
1573 },
1574 ],
1575 &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.
1576 &quot;A String&quot;,
1577 ],
1578 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1579 { # Specification determining how headers are added to requests or responses.
1580 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1581 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1582 &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.
1583 # The default value is false.
1584 },
1585 ],
1586 &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.
1587 &quot;A String&quot;,
1588 ],
1589 },
1590 &quot;matchRules&quot;: [
1591 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
1592 &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.
1593 # fullPathMatch must be between 1 and 1024 characters.
1594 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
1595 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
1596 { # matchRule criteria for request header matches.
1597 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
1598 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1599 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
1600 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
1601 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
1602 &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.
1603 # The default setting is false.
1604 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
1605 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1606 &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.
1607 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1608 &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.
1609 # For example for a range [-5, 0]
1610 # - -3 will match.
1611 # - 0 will not match.
1612 # - 0.25 will not match.
1613 # - -3someString will not match.
1614 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1615 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1616 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
1617 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
1618 },
1619 &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
1620 # 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.
1621 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1622 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
1623 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
1624 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1625 },
1626 ],
1627 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
1628 # The default value is false.
1629 # ignoreCase must not be used with regexMatch.
1630 &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. If a match takes place, the relevant routing configuration is made available to those proxies.
1631 # 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.
1632 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
1633 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
1634 { # 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.
1635 # 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.
1636 # 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.
1637 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
1638 # This list must not be empty and can have at the most 64 entries.
1639 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
1640 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
1641 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
1642 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
1643 # value can have a maximum length of 1024 characters.
1644 },
1645 ],
1646 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
1647 # Supported values are:
1648 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
1649 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
1650 },
1651 ],
1652 &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 /.
1653 # The value must be between 1 and 1024 characters.
1654 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
1655 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
1656 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
1657 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
1658 # Only one of presentMatch, exactMatch or regexMatch must be set.
1659 &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.
1660 &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.
1661 # Only one of presentMatch, exactMatch or regexMatch must be set.
1662 &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
1663 # Only one of presentMatch, exactMatch or regexMatch must be set.
1664 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
1665 },
1666 ],
1667 &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
1668 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
1669 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
1670 },
1671 ],
1672 &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.
1673 # 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.
1674 # 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.
1675 &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.
1676 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1677 &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
1678 &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.
1679 # Default is false.
1680 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
1681 &quot;A String&quot;,
1682 ],
1683 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
1684 &quot;A String&quot;,
1685 ],
1686 &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
1687 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1688 &quot;A String&quot;,
1689 ],
1690 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
1691 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1692 &quot;A String&quot;,
1693 ],
1694 &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.
1695 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
1696 &quot;A String&quot;,
1697 ],
1698 &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.
1699 },
1700 &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.
1701 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1702 &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.
1703 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
1704 # The value must be between 200 and 599 inclusive.
1705 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1706 # The value must be between 0.0 and 100.0 inclusive.
1707 },
1708 &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.
1709 &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.
1710 &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.
1711 &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
1712 },
1713 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1714 # The value must be between 0.0 and 100.0 inclusive.
1715 },
1716 },
1717 &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.
1718 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
1719 },
1720 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1721 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1722 &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.
1723 # 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.
1724 &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.
1725 &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
1726 },
1727 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1728 # - 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.
1729 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1730 # -
1731 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1732 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1733 # - 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.
1734 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1735 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1736 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1737 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1738 &quot;A String&quot;,
1739 ],
1740 },
1741 &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.
1742 # If not specified, will use the largest timeout among all backend services associated with the route.
1743 &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.
1744 &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
1745 },
1746 &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.
1747 &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.
1748 # The value must be between 1 and 255 characters.
1749 &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.
1750 # The value must be between 1 and 1024 characters.
1751 },
1752 &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 0 number.
1753 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
1754 { # 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
1755 &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.
1756 &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.
1757 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1758 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1759 { # Specification determining how headers are added to requests or responses.
1760 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1761 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1762 &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.
1763 # The default value is false.
1764 },
1765 ],
1766 &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.
1767 &quot;A String&quot;,
1768 ],
1769 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1770 { # Specification determining how headers are added to requests or responses.
1771 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1772 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1773 &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.
1774 # The default value is false.
1775 },
1776 ],
1777 &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.
1778 &quot;A String&quot;,
1779 ],
1780 },
1781 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1782 # 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.
1783 # The value must be between 0 and 1000
1784 },
1785 ],
1786 },
1787 &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.
1788 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1789 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
1790 # If urlRedirect is specified, service or routeAction must not be set.
1791 &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.
1792 # The value must be between 1 and 255 characters.
1793 &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.
1794 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1795 # The default is set to false.
1796 &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.
1797 # 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.
1798 # The value must be between 1 and 1024 characters.
1799 &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.
1800 # 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.
1801 # The value must be between 1 and 1024 characters.
1802 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
1803 # Supported values are:
1804 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1805 # - FOUND, which corresponds to 302.
1806 # - SEE_OTHER which corresponds to 303.
1807 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1808 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1809 &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.
1810 # The default is set to false.
1811 },
1812 },
1813 ],
1814 },
1815 ],
1816 &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.
1817 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1818 &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.
1819 { # Message for the expected URL mappings.
1820 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
1821 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL.
1822 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
1823 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService resource the given URL should be mapped to.
1824 },
1825 ],
1826 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -07001827</div>
1828
1829<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001830 <code class="details" id="insert">insert(project, body=None, requestId=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -07001831 <pre>Creates a UrlMap resource in the specified project using the data included in the request.
1832
1833Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001834 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001835 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -07001836 The object takes the form of:
1837
Dan O'Mearadd494642020-05-01 07:42:23 -07001838{ # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001839 #
1840 # Google Compute Engine has two URL Map resources:
1841 #
1842 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
1843 #
1844 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
1845 #
1846 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
1847 #
1848 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
1849 #
1850 # To use the global urlMaps resource, the backend service must have a loadBalancingScheme of either EXTERNAL or INTERNAL_SELF_MANAGED. To use the regionUrlMaps resource, the backend service must have a loadBalancingScheme of INTERNAL_MANAGED. For more information, read URL Map Concepts.
1851 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1852 &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.
1853 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
1854 &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
1855 &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.
1856 # Default is false.
1857 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
1858 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001859 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001860 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
1861 &quot;A String&quot;,
1862 ],
1863 &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
1864 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1865 &quot;A String&quot;,
1866 ],
1867 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
1868 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1869 &quot;A String&quot;,
1870 ],
1871 &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.
1872 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
1873 &quot;A String&quot;,
1874 ],
1875 &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.
1876 },
1877 &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.
1878 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1879 &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.
1880 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
1881 # The value must be between 200 and 599 inclusive.
1882 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1883 # The value must be between 0.0 and 100.0 inclusive.
1884 },
1885 &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.
1886 &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.
1887 &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.
1888 &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
1889 },
1890 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1891 # The value must be between 0.0 and 100.0 inclusive.
Dan O'Mearadd494642020-05-01 07:42:23 -07001892 },
1893 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001894 &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.
1895 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
1896 },
1897 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1898 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1899 &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.
1900 # 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.
1901 &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.
1902 &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
Craig Citro065b5302014-08-14 00:47:23 -07001903 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001904 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1905 # - 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.
1906 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1907 # -
1908 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1909 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1910 # - 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.
1911 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1912 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1913 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1914 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1915 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001916 ],
1917 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001918 &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.
1919 # If not specified, will use the largest timeout among all backend services associated with the route.
1920 &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.
1921 &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
1922 },
1923 &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.
1924 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001925 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001926 &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.
1927 # The value must be between 1 and 1024 characters.
Dan O'Mearadd494642020-05-01 07:42:23 -07001928 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001929 &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 0 number.
1930 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
1931 { # 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
1932 &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.
1933 &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.
1934 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1935 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1936 { # Specification determining how headers are added to requests or responses.
1937 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1938 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1939 &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.
1940 # The default value is false.
1941 },
1942 ],
1943 &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.
1944 &quot;A String&quot;,
1945 ],
1946 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1947 { # Specification determining how headers are added to requests or responses.
1948 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1949 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1950 &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.
1951 # The default value is false.
1952 },
1953 ],
1954 &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.
1955 &quot;A String&quot;,
1956 ],
1957 },
1958 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1959 # 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.
1960 # The value must be between 0 and 1000
Craig Citro065b5302014-08-14 00:47:23 -07001961 },
1962 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001963 },
1964 &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.
1965 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
1966 &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.
1967 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
1968 &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.
1969 # The value must be between 1 and 255 characters.
1970 &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.
1971 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1972 # The default is set to false.
1973 &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.
1974 # 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.
1975 # The value must be between 1 and 1024 characters.
1976 &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.
1977 # 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.
1978 # The value must be between 1 and 1024 characters.
1979 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
1980 # Supported values are:
1981 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1982 # - FOUND, which corresponds to 302.
1983 # - SEE_OTHER which corresponds to 303.
1984 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1985 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1986 &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.
1987 # The default is set to false.
1988 },
1989 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1990 &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.
1991 #
1992 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
1993 &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.
1994 # The headerAction specified here take effect after headerAction specified under pathMatcher.
1995 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1996 { # Specification determining how headers are added to requests or responses.
1997 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1998 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1999 &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.
2000 # The default value is false.
2001 },
2002 ],
2003 &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.
2004 &quot;A String&quot;,
2005 ],
2006 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2007 { # Specification determining how headers are added to requests or responses.
2008 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2009 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2010 &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.
2011 # The default value is false.
2012 },
2013 ],
2014 &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.
2015 &quot;A String&quot;,
2016 ],
2017 },
2018 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
2019 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
2020 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2021 &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 ..
2022 &quot;A String&quot;,
2023 ],
2024 &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.
2025 },
2026 ],
2027 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2028 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
2029 &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.
2030 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
2031 { # 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.
2032 &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.
2033 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
2034 &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
2035 &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.
2036 # Default is false.
2037 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2038 &quot;A String&quot;,
2039 ],
2040 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2041 &quot;A String&quot;,
2042 ],
2043 &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
2044 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2045 &quot;A String&quot;,
2046 ],
2047 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2048 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2049 &quot;A String&quot;,
2050 ],
2051 &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.
2052 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2053 &quot;A String&quot;,
2054 ],
2055 &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.
2056 },
2057 &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.
2058 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2059 &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.
2060 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2061 # The value must be between 200 and 599 inclusive.
2062 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2063 # The value must be between 0.0 and 100.0 inclusive.
2064 },
2065 &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.
2066 &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.
2067 &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.
2068 &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
2069 },
2070 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2071 # The value must be between 0.0 and 100.0 inclusive.
2072 },
2073 },
2074 &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.
2075 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2076 },
2077 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2078 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2079 &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.
2080 # 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.
2081 &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.
2082 &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
2083 },
2084 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2085 # - 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.
2086 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2087 # -
2088 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2089 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2090 # - 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.
2091 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2092 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2093 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2094 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2095 &quot;A String&quot;,
2096 ],
2097 },
2098 &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.
2099 # If not specified, will use the largest timeout among all backend services associated with the route.
2100 &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.
2101 &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
2102 },
2103 &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.
2104 &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.
2105 # The value must be between 1 and 255 characters.
2106 &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.
2107 # The value must be between 1 and 1024 characters.
2108 },
2109 &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 0 number.
2110 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
2111 { # 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
2112 &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.
2113 &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.
2114 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2115 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2116 { # Specification determining how headers are added to requests or responses.
2117 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2118 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2119 &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.
2120 # The default value is false.
2121 },
2122 ],
2123 &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.
2124 &quot;A String&quot;,
2125 ],
2126 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2127 { # Specification determining how headers are added to requests or responses.
2128 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2129 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2130 &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.
2131 # The default value is false.
2132 },
2133 ],
2134 &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.
2135 &quot;A String&quot;,
2136 ],
2137 },
2138 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2139 # 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.
2140 # The value must be between 0 and 1000
2141 },
2142 ],
2143 },
2144 &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:
2145 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
2146 # - compute/v1/projects/project/global/backendServices/backendService
2147 # - 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.
2148 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
2149 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
2150 # - compute.backendBuckets.use
2151 # - compute.backendServices.use
2152 &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.
2153 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
2154 &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.
2155 # The value must be between 1 and 255 characters.
2156 &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.
2157 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2158 # The default is set to false.
2159 &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.
2160 # 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.
2161 # The value must be between 1 and 1024 characters.
2162 &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.
2163 # 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.
2164 # The value must be between 1 and 1024 characters.
2165 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2166 # Supported values are:
2167 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2168 # - FOUND, which corresponds to 302.
2169 # - SEE_OTHER which corresponds to 303.
2170 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2171 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2172 &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.
2173 # The default is set to false.
2174 },
2175 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2176 &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.
2177 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
2178 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2179 { # Specification determining how headers are added to requests or responses.
2180 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2181 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2182 &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.
2183 # The default value is false.
2184 },
2185 ],
2186 &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.
2187 &quot;A String&quot;,
2188 ],
2189 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
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;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.
2198 &quot;A String&quot;,
2199 ],
2200 },
2201 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
2202 &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.
2203 # 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.
2204 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
2205 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
2206 &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.
2207 &quot;A String&quot;,
2208 ],
2209 &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.
2210 # Only one of routeAction or urlRedirect must be set.
2211 &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
2212 &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.
2213 # Default is false.
2214 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2215 &quot;A String&quot;,
2216 ],
2217 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2218 &quot;A String&quot;,
2219 ],
2220 &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
2221 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2222 &quot;A String&quot;,
2223 ],
2224 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2225 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2226 &quot;A String&quot;,
2227 ],
2228 &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.
2229 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2230 &quot;A String&quot;,
2231 ],
2232 &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.
2233 },
2234 &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.
2235 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2236 &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.
2237 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2238 # The value must be between 200 and 599 inclusive.
2239 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2240 # The value must be between 0.0 and 100.0 inclusive.
2241 },
2242 &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.
2243 &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.
2244 &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.
2245 &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
2246 },
2247 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2248 # The value must be between 0.0 and 100.0 inclusive.
2249 },
2250 },
2251 &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.
2252 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2253 },
2254 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2255 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2256 &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.
2257 # 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.
2258 &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.
2259 &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
2260 },
2261 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2262 # - 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.
2263 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2264 # -
2265 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2266 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2267 # - 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.
2268 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2269 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2270 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2271 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2272 &quot;A String&quot;,
2273 ],
2274 },
2275 &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.
2276 # If not specified, will use the largest timeout among all backend services associated with the route.
2277 &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.
2278 &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
2279 },
2280 &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.
2281 &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.
2282 # The value must be between 1 and 255 characters.
2283 &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.
2284 # The value must be between 1 and 1024 characters.
2285 },
2286 &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 0 number.
2287 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
2288 { # 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
2289 &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.
2290 &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.
2291 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2292 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2293 { # Specification determining how headers are added to requests or responses.
2294 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2295 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2296 &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.
2297 # The default value is false.
2298 },
2299 ],
2300 &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.
2301 &quot;A String&quot;,
2302 ],
2303 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2304 { # Specification determining how headers are added to requests or responses.
2305 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2306 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2307 &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.
2308 # The default value is false.
2309 },
2310 ],
2311 &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.
2312 &quot;A String&quot;,
2313 ],
2314 },
2315 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2316 # 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.
2317 # The value must be between 0 and 1000
2318 },
2319 ],
2320 },
2321 &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.
2322 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2323 &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.
2324 # If urlRedirect is specified, service or routeAction must not be set.
2325 &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.
2326 # The value must be between 1 and 255 characters.
2327 &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.
2328 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2329 # The default is set to false.
2330 &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.
2331 # 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.
2332 # The value must be between 1 and 1024 characters.
2333 &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.
2334 # 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.
2335 # The value must be between 1 and 1024 characters.
2336 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2337 # Supported values are:
2338 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2339 # - FOUND, which corresponds to 302.
2340 # - SEE_OTHER which corresponds to 303.
2341 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2342 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2343 &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.
2344 # The default is set to false.
2345 },
2346 },
2347 ],
2348 &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.
2349 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
2350 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
2351 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
2352 # The description can have a maximum length of 1024 characters.
2353 &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.
2354 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
2355 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2356 { # Specification determining how headers are added to requests or responses.
2357 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2358 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2359 &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.
2360 # The default value is false.
2361 },
2362 ],
2363 &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.
2364 &quot;A String&quot;,
2365 ],
2366 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2367 { # Specification determining how headers are added to requests or responses.
2368 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2369 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2370 &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.
2371 # The default value is false.
2372 },
2373 ],
2374 &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.
2375 &quot;A String&quot;,
2376 ],
2377 },
2378 &quot;matchRules&quot;: [
2379 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
2380 &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.
2381 # fullPathMatch must be between 1 and 1024 characters.
2382 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2383 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
2384 { # matchRule criteria for request header matches.
2385 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
2386 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2387 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
2388 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
2389 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
2390 &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.
2391 # The default setting is false.
2392 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
2393 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2394 &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.
2395 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2396 &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.
2397 # For example for a range [-5, 0]
2398 # - -3 will match.
2399 # - 0 will not match.
2400 # - 0.25 will not match.
2401 # - -3someString will not match.
2402 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2403 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2404 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
2405 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
2406 },
2407 &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
2408 # 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.
2409 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2410 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
2411 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
2412 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2413 },
2414 ],
2415 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
2416 # The default value is false.
2417 # ignoreCase must not be used with regexMatch.
2418 &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. If a match takes place, the relevant routing configuration is made available to those proxies.
2419 # 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.
2420 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
2421 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
2422 { # 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.
2423 # 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.
2424 # 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.
2425 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
2426 # This list must not be empty and can have at the most 64 entries.
2427 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
2428 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
2429 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
2430 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
2431 # value can have a maximum length of 1024 characters.
2432 },
2433 ],
2434 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
2435 # Supported values are:
2436 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
2437 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
2438 },
2439 ],
2440 &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 /.
2441 # The value must be between 1 and 1024 characters.
2442 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2443 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
2444 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
2445 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
2446 # Only one of presentMatch, exactMatch or regexMatch must be set.
2447 &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.
2448 &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.
2449 # Only one of presentMatch, exactMatch or regexMatch must be set.
2450 &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
2451 # Only one of presentMatch, exactMatch or regexMatch must be set.
2452 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
2453 },
2454 ],
2455 &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
2456 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2457 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
2458 },
2459 ],
2460 &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.
2461 # 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.
2462 # 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.
2463 &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.
2464 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2465 &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
2466 &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.
2467 # Default is false.
2468 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2469 &quot;A String&quot;,
2470 ],
2471 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2472 &quot;A String&quot;,
2473 ],
2474 &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
2475 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2476 &quot;A String&quot;,
2477 ],
2478 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2479 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2480 &quot;A String&quot;,
2481 ],
2482 &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.
2483 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2484 &quot;A String&quot;,
2485 ],
2486 &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.
2487 },
2488 &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.
2489 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2490 &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.
2491 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2492 # The value must be between 200 and 599 inclusive.
2493 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2494 # The value must be between 0.0 and 100.0 inclusive.
2495 },
2496 &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.
2497 &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.
2498 &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.
2499 &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
2500 },
2501 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2502 # The value must be between 0.0 and 100.0 inclusive.
2503 },
2504 },
2505 &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.
2506 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2507 },
2508 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2509 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2510 &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.
2511 # 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.
2512 &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.
2513 &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
2514 },
2515 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2516 # - 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.
2517 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2518 # -
2519 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2520 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2521 # - 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.
2522 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2523 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2524 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2525 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2526 &quot;A String&quot;,
2527 ],
2528 },
2529 &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.
2530 # If not specified, will use the largest timeout among all backend services associated with the route.
2531 &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.
2532 &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
2533 },
2534 &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.
2535 &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.
2536 # The value must be between 1 and 255 characters.
2537 &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.
2538 # The value must be between 1 and 1024 characters.
2539 },
2540 &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 0 number.
2541 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
2542 { # 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
2543 &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.
2544 &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.
2545 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2546 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2547 { # Specification determining how headers are added to requests or responses.
2548 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2549 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2550 &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.
2551 # The default value is false.
2552 },
2553 ],
2554 &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.
2555 &quot;A String&quot;,
2556 ],
2557 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2558 { # Specification determining how headers are added to requests or responses.
2559 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2560 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2561 &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.
2562 # The default value is false.
2563 },
2564 ],
2565 &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.
2566 &quot;A String&quot;,
2567 ],
2568 },
2569 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2570 # 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.
2571 # The value must be between 0 and 1000
2572 },
2573 ],
2574 },
2575 &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.
2576 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2577 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
2578 # If urlRedirect is specified, service or routeAction must not be set.
2579 &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.
2580 # The value must be between 1 and 255 characters.
2581 &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.
2582 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2583 # The default is set to false.
2584 &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.
2585 # 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.
2586 # The value must be between 1 and 1024 characters.
2587 &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.
2588 # 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.
2589 # The value must be between 1 and 1024 characters.
2590 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2591 # Supported values are:
2592 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2593 # - FOUND, which corresponds to 302.
2594 # - SEE_OTHER which corresponds to 303.
2595 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2596 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2597 &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.
2598 # The default is set to false.
2599 },
2600 },
2601 ],
2602 },
2603 ],
2604 &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.
2605 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2606 &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.
2607 { # Message for the expected URL mappings.
2608 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
2609 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL.
2610 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
2611 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService resource the given URL should be mapped to.
2612 },
2613 ],
2614}
Craig Citro065b5302014-08-14 00:47:23 -07002615
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002616 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2617
2618For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2619
2620The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Craig Citro065b5302014-08-14 00:47:23 -07002621
2622Returns:
2623 An object of the form:
2624
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002625 { # Represents an Operation resource.
2626 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002627 # Google Compute Engine has three Operation resources:
2628 #
2629 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2630 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002631 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2632 #
2633 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002634 # - For global operations, use the `globalOperations` resource.
2635 # - For regional operations, use the `regionOperations` resource.
2636 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002637 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002638 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002639 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2640 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2641 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2642 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2643 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2644 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -07002645 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002646 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2647 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2648 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Craig Citro065b5302014-08-14 00:47:23 -07002649 },
2650 ],
2651 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002652 &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`.
2653 &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.
2654 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2655 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2656 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2657 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2658 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2659 &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.
2660 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2661 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2662 &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.
2663 &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`.
2664 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2665 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2666 &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.
2667 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2668 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2669 {
2670 &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.
2671 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2672 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2673 {
2674 &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).
2675 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2676 },
2677 ],
2678 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2679 },
2680 ],
2681 &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.
Craig Citro065b5302014-08-14 00:47:23 -07002682 }</pre>
2683</div>
2684
2685<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002686 <code class="details" id="invalidateCache">invalidateCache(project, urlMap, body=None, requestId=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002687 <pre>Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.
2688
2689Args:
2690 project: string, Project ID for this request. (required)
2691 urlMap: string, Name of the UrlMap scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002692 body: object, The request body.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002693 The object takes the form of:
2694
2695{
Bu Sun Kim65020912020-05-20 12:08:20 -07002696 &quot;host&quot;: &quot;A String&quot;, # If set, this invalidation rule will only apply to requests with a Host header matching host.
2697 &quot;path&quot;: &quot;A String&quot;,
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002698 }
2699
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002700 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2701
2702For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2703
2704The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002705
2706Returns:
2707 An object of the form:
2708
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002709 { # Represents an Operation resource.
2710 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002711 # Google Compute Engine has three Operation resources:
2712 #
2713 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2714 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002715 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2716 #
2717 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002718 # - For global operations, use the `globalOperations` resource.
2719 # - For regional operations, use the `regionOperations` resource.
2720 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002721 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002722 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002723 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2724 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2725 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2726 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2727 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2728 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002729 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002730 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2731 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2732 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002733 },
2734 ],
2735 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002736 &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`.
2737 &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.
2738 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2739 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2740 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2741 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2742 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2743 &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.
2744 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2745 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2746 &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.
2747 &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`.
2748 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2749 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2750 &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.
2751 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2752 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2753 {
2754 &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.
2755 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2756 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2757 {
2758 &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).
2759 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2760 },
2761 ],
2762 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2763 },
2764 ],
2765 &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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002766 }</pre>
2767</div>
2768
2769<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002770 <code class="details" id="list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -07002771 <pre>Retrieves the list of UrlMap resources available to the specified project.
2772
2773Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002774 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002775 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Takashi Matsuo06694102015-09-11 13:55:40 -07002776
Dan O'Mearadd494642020-05-01 07:42:23 -07002777For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Takashi Matsuo06694102015-09-11 13:55:40 -07002778
Dan O'Mearadd494642020-05-01 07:42:23 -07002779You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002780
Bu Sun Kim65020912020-05-20 12:08:20 -07002781To 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) ```
2782 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`)
2783 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
2784
2785You 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.
2786
2787Currently, only sorting by `name` or `creationTimestamp desc` is supported.
2788 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.
Craig Citro065b5302014-08-14 00:47:23 -07002789
2790Returns:
2791 An object of the form:
2792
2793 { # Contains a list of UrlMap resources.
Bu Sun Kim65020912020-05-20 12:08:20 -07002794 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
2795 &quot;items&quot;: [ # A list of UrlMap resources.
Dan O'Mearadd494642020-05-01 07:42:23 -07002796 { # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002797 #
2798 # Google Compute Engine has two URL Map resources:
2799 #
2800 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
2801 #
2802 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
2803 #
2804 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
2805 #
2806 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
2807 #
2808 # 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.
2809 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2810 &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.
2811 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
2812 &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
2813 &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.
2814 # Default is false.
2815 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2816 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07002817 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002818 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2819 &quot;A String&quot;,
2820 ],
2821 &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
2822 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2823 &quot;A String&quot;,
2824 ],
2825 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2826 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2827 &quot;A String&quot;,
2828 ],
2829 &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.
2830 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2831 &quot;A String&quot;,
2832 ],
2833 &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.
2834 },
2835 &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.
2836 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2837 &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.
2838 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2839 # The value must be between 200 and 599 inclusive.
2840 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2841 # The value must be between 0.0 and 100.0 inclusive.
2842 },
2843 &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.
2844 &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.
2845 &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.
2846 &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
2847 },
2848 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2849 # The value must be between 0.0 and 100.0 inclusive.
Dan O'Mearadd494642020-05-01 07:42:23 -07002850 },
2851 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002852 &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.
2853 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2854 },
2855 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2856 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2857 &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.
2858 # 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.
2859 &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.
2860 &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
Craig Citro065b5302014-08-14 00:47:23 -07002861 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002862 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2863 # - 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.
2864 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2865 # -
2866 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2867 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2868 # - 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.
2869 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2870 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2871 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2872 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2873 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07002874 ],
2875 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002876 &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.
2877 # If not specified, will use the largest timeout among all backend services associated with the route.
2878 &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.
2879 &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
2880 },
2881 &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.
2882 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002883 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07002884 &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.
2885 # The value must be between 1 and 1024 characters.
Dan O'Mearadd494642020-05-01 07:42:23 -07002886 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002887 &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 0 number.
2888 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
2889 { # 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
2890 &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.
2891 &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.
2892 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2893 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2894 { # Specification determining how headers are added to requests or responses.
2895 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2896 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2897 &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.
2898 # The default value is false.
2899 },
2900 ],
2901 &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.
2902 &quot;A String&quot;,
2903 ],
2904 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2905 { # Specification determining how headers are added to requests or responses.
2906 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2907 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2908 &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.
2909 # The default value is false.
2910 },
2911 ],
2912 &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.
2913 &quot;A String&quot;,
2914 ],
2915 },
2916 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2917 # 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.
2918 # The value must be between 0 and 1000
Craig Citro065b5302014-08-14 00:47:23 -07002919 },
2920 ],
Craig Citro065b5302014-08-14 00:47:23 -07002921 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002922 &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.
2923 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
2924 &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.
2925 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
2926 &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.
2927 # The value must be between 1 and 255 characters.
2928 &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.
2929 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2930 # The default is set to false.
2931 &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.
2932 # 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.
2933 # The value must be between 1 and 1024 characters.
2934 &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.
2935 # 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.
2936 # The value must be between 1 and 1024 characters.
2937 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2938 # Supported values are:
2939 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2940 # - FOUND, which corresponds to 302.
2941 # - SEE_OTHER which corresponds to 303.
2942 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2943 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2944 &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.
2945 # The default is set to false.
2946 },
2947 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2948 &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.
2949 #
2950 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
2951 &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.
2952 # The headerAction specified here take effect after headerAction specified under pathMatcher.
2953 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2954 { # Specification determining how headers are added to requests or responses.
2955 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2956 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2957 &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.
2958 # The default value is false.
2959 },
2960 ],
2961 &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.
2962 &quot;A String&quot;,
2963 ],
2964 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2965 { # Specification determining how headers are added to requests or responses.
2966 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2967 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2968 &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.
2969 # The default value is false.
2970 },
2971 ],
2972 &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.
2973 &quot;A String&quot;,
2974 ],
2975 },
2976 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
2977 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
2978 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2979 &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 ..
2980 &quot;A String&quot;,
2981 ],
2982 &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.
2983 },
2984 ],
2985 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2986 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
2987 &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.
2988 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
2989 { # 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.
2990 &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.
2991 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
2992 &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
2993 &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.
2994 # Default is false.
2995 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2996 &quot;A String&quot;,
2997 ],
2998 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2999 &quot;A String&quot;,
3000 ],
3001 &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
3002 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3003 &quot;A String&quot;,
3004 ],
3005 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3006 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3007 &quot;A String&quot;,
3008 ],
3009 &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.
3010 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3011 &quot;A String&quot;,
3012 ],
3013 &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.
3014 },
3015 &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.
3016 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3017 &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.
3018 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3019 # The value must be between 200 and 599 inclusive.
3020 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3021 # The value must be between 0.0 and 100.0 inclusive.
3022 },
3023 &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.
3024 &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.
3025 &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.
3026 &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
3027 },
3028 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3029 # The value must be between 0.0 and 100.0 inclusive.
3030 },
3031 },
3032 &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.
3033 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3034 },
3035 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3036 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3037 &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.
3038 # 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.
3039 &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.
3040 &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
3041 },
3042 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3043 # - 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.
3044 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3045 # -
3046 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3047 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3048 # - 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.
3049 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3050 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3051 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3052 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3053 &quot;A String&quot;,
3054 ],
3055 },
3056 &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.
3057 # If not specified, will use the largest timeout among all backend services associated with the route.
3058 &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.
3059 &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
3060 },
3061 &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.
3062 &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.
3063 # The value must be between 1 and 255 characters.
3064 &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.
3065 # The value must be between 1 and 1024 characters.
3066 },
3067 &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 0 number.
3068 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
3069 { # 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
3070 &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.
3071 &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.
3072 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3073 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3074 { # Specification determining how headers are added to requests or responses.
3075 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3076 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3077 &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.
3078 # The default value is false.
3079 },
3080 ],
3081 &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.
3082 &quot;A String&quot;,
3083 ],
3084 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3085 { # Specification determining how headers are added to requests or responses.
3086 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3087 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3088 &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.
3089 # The default value is false.
3090 },
3091 ],
3092 &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.
3093 &quot;A String&quot;,
3094 ],
3095 },
3096 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3097 # 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.
3098 # The value must be between 0 and 1000
3099 },
3100 ],
3101 },
3102 &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:
3103 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
3104 # - compute/v1/projects/project/global/backendServices/backendService
3105 # - 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.
3106 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3107 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
3108 # - compute.backendBuckets.use
3109 # - compute.backendServices.use
3110 &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.
3111 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
3112 &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.
3113 # The value must be between 1 and 255 characters.
3114 &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.
3115 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3116 # The default is set to false.
3117 &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.
3118 # 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.
3119 # The value must be between 1 and 1024 characters.
3120 &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.
3121 # 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.
3122 # The value must be between 1 and 1024 characters.
3123 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3124 # Supported values are:
3125 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3126 # - FOUND, which corresponds to 302.
3127 # - SEE_OTHER which corresponds to 303.
3128 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3129 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3130 &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.
3131 # The default is set to false.
3132 },
3133 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3134 &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.
3135 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
3136 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3137 { # Specification determining how headers are added to requests or responses.
3138 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3139 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3140 &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.
3141 # The default value is false.
3142 },
3143 ],
3144 &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.
3145 &quot;A String&quot;,
3146 ],
3147 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3148 { # Specification determining how headers are added to requests or responses.
3149 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3150 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3151 &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.
3152 # The default value is false.
3153 },
3154 ],
3155 &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.
3156 &quot;A String&quot;,
3157 ],
3158 },
3159 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
3160 &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.
3161 # 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.
3162 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
3163 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
3164 &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.
3165 &quot;A String&quot;,
3166 ],
3167 &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.
3168 # Only one of routeAction or urlRedirect must be set.
3169 &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
3170 &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.
3171 # Default is false.
3172 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3173 &quot;A String&quot;,
3174 ],
3175 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3176 &quot;A String&quot;,
3177 ],
3178 &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
3179 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3180 &quot;A String&quot;,
3181 ],
3182 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3183 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3184 &quot;A String&quot;,
3185 ],
3186 &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.
3187 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3188 &quot;A String&quot;,
3189 ],
3190 &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.
3191 },
3192 &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.
3193 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3194 &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.
3195 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3196 # The value must be between 200 and 599 inclusive.
3197 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3198 # The value must be between 0.0 and 100.0 inclusive.
3199 },
3200 &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.
3201 &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.
3202 &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.
3203 &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
3204 },
3205 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3206 # The value must be between 0.0 and 100.0 inclusive.
3207 },
3208 },
3209 &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.
3210 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3211 },
3212 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3213 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3214 &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.
3215 # 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.
3216 &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.
3217 &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
3218 },
3219 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3220 # - 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.
3221 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3222 # -
3223 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3224 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3225 # - 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.
3226 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3227 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3228 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3229 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3230 &quot;A String&quot;,
3231 ],
3232 },
3233 &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.
3234 # If not specified, will use the largest timeout among all backend services associated with the route.
3235 &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.
3236 &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
3237 },
3238 &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.
3239 &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.
3240 # The value must be between 1 and 255 characters.
3241 &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.
3242 # The value must be between 1 and 1024 characters.
3243 },
3244 &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 0 number.
3245 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
3246 { # 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
3247 &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.
3248 &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.
3249 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3250 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3251 { # Specification determining how headers are added to requests or responses.
3252 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3253 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3254 &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.
3255 # The default value is false.
3256 },
3257 ],
3258 &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.
3259 &quot;A String&quot;,
3260 ],
3261 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3262 { # Specification determining how headers are added to requests or responses.
3263 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3264 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3265 &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.
3266 # The default value is false.
3267 },
3268 ],
3269 &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.
3270 &quot;A String&quot;,
3271 ],
3272 },
3273 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3274 # 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.
3275 # The value must be between 0 and 1000
3276 },
3277 ],
3278 },
3279 &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.
3280 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3281 &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.
3282 # If urlRedirect is specified, service or routeAction must not be set.
3283 &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.
3284 # The value must be between 1 and 255 characters.
3285 &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.
3286 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3287 # The default is set to false.
3288 &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.
3289 # 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.
3290 # The value must be between 1 and 1024 characters.
3291 &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.
3292 # 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.
3293 # The value must be between 1 and 1024 characters.
3294 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3295 # Supported values are:
3296 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3297 # - FOUND, which corresponds to 302.
3298 # - SEE_OTHER which corresponds to 303.
3299 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3300 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3301 &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.
3302 # The default is set to false.
3303 },
3304 },
3305 ],
3306 &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.
3307 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
3308 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
3309 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
3310 # The description can have a maximum length of 1024 characters.
3311 &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.
3312 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
3313 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3314 { # Specification determining how headers are added to requests or responses.
3315 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3316 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3317 &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.
3318 # The default value is false.
3319 },
3320 ],
3321 &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.
3322 &quot;A String&quot;,
3323 ],
3324 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3325 { # Specification determining how headers are added to requests or responses.
3326 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3327 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3328 &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.
3329 # The default value is false.
3330 },
3331 ],
3332 &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.
3333 &quot;A String&quot;,
3334 ],
3335 },
3336 &quot;matchRules&quot;: [
3337 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
3338 &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.
3339 # fullPathMatch must be between 1 and 1024 characters.
3340 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3341 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
3342 { # matchRule criteria for request header matches.
3343 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
3344 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3345 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
3346 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
3347 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
3348 &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.
3349 # The default setting is false.
3350 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
3351 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3352 &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.
3353 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3354 &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.
3355 # For example for a range [-5, 0]
3356 # - -3 will match.
3357 # - 0 will not match.
3358 # - 0.25 will not match.
3359 # - -3someString will not match.
3360 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3361 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3362 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
3363 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
3364 },
3365 &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
3366 # 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.
3367 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3368 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
3369 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
3370 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3371 },
3372 ],
3373 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
3374 # The default value is false.
3375 # ignoreCase must not be used with regexMatch.
3376 &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. If a match takes place, the relevant routing configuration is made available to those proxies.
3377 # 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.
3378 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
3379 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
3380 { # 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.
3381 # 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.
3382 # 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.
3383 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
3384 # This list must not be empty and can have at the most 64 entries.
3385 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
3386 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
3387 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
3388 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
3389 # value can have a maximum length of 1024 characters.
3390 },
3391 ],
3392 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
3393 # Supported values are:
3394 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
3395 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
3396 },
3397 ],
3398 &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 /.
3399 # The value must be between 1 and 1024 characters.
3400 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3401 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
3402 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
3403 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
3404 # Only one of presentMatch, exactMatch or regexMatch must be set.
3405 &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.
3406 &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.
3407 # Only one of presentMatch, exactMatch or regexMatch must be set.
3408 &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
3409 # Only one of presentMatch, exactMatch or regexMatch must be set.
3410 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
3411 },
3412 ],
3413 &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
3414 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3415 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
3416 },
3417 ],
3418 &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.
3419 # 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.
3420 # 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.
3421 &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.
3422 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3423 &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
3424 &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.
3425 # Default is false.
3426 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3427 &quot;A String&quot;,
3428 ],
3429 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3430 &quot;A String&quot;,
3431 ],
3432 &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
3433 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3434 &quot;A String&quot;,
3435 ],
3436 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3437 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3438 &quot;A String&quot;,
3439 ],
3440 &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.
3441 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3442 &quot;A String&quot;,
3443 ],
3444 &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.
3445 },
3446 &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.
3447 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3448 &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.
3449 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3450 # The value must be between 200 and 599 inclusive.
3451 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3452 # The value must be between 0.0 and 100.0 inclusive.
3453 },
3454 &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.
3455 &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.
3456 &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.
3457 &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
3458 },
3459 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3460 # The value must be between 0.0 and 100.0 inclusive.
3461 },
3462 },
3463 &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.
3464 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3465 },
3466 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3467 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3468 &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.
3469 # 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.
3470 &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.
3471 &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
3472 },
3473 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3474 # - 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.
3475 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3476 # -
3477 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3478 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3479 # - 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.
3480 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3481 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3482 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3483 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3484 &quot;A String&quot;,
3485 ],
3486 },
3487 &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.
3488 # If not specified, will use the largest timeout among all backend services associated with the route.
3489 &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.
3490 &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
3491 },
3492 &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.
3493 &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.
3494 # The value must be between 1 and 255 characters.
3495 &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.
3496 # The value must be between 1 and 1024 characters.
3497 },
3498 &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 0 number.
3499 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
3500 { # 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
3501 &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.
3502 &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.
3503 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3504 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3505 { # Specification determining how headers are added to requests or responses.
3506 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3507 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3508 &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.
3509 # The default value is false.
3510 },
3511 ],
3512 &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.
3513 &quot;A String&quot;,
3514 ],
3515 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3516 { # Specification determining how headers are added to requests or responses.
3517 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3518 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3519 &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.
3520 # The default value is false.
3521 },
3522 ],
3523 &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.
3524 &quot;A String&quot;,
3525 ],
3526 },
3527 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3528 # 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.
3529 # The value must be between 0 and 1000
3530 },
3531 ],
3532 },
3533 &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.
3534 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3535 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
3536 # If urlRedirect is specified, service or routeAction must not be set.
3537 &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.
3538 # The value must be between 1 and 255 characters.
3539 &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.
3540 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3541 # The default is set to false.
3542 &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.
3543 # 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.
3544 # The value must be between 1 and 1024 characters.
3545 &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.
3546 # 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.
3547 # The value must be between 1 and 1024 characters.
3548 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3549 # Supported values are:
3550 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3551 # - FOUND, which corresponds to 302.
3552 # - SEE_OTHER which corresponds to 303.
3553 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3554 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3555 &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.
3556 # The default is set to false.
3557 },
3558 },
3559 ],
3560 },
3561 ],
3562 &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.
3563 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3564 &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.
3565 { # Message for the expected URL mappings.
3566 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
3567 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL.
3568 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
3569 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService resource the given URL should be mapped to.
3570 },
3571 ],
3572 },
Craig Citro065b5302014-08-14 00:47:23 -07003573 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003574 &quot;kind&quot;: &quot;compute#urlMapList&quot;, # Type of resource.
3575 &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.
3576 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
3577 &quot;warning&quot;: { # [Output Only] Informational warning message.
3578 &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.
3579 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3580 # &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 -07003581 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003582 &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).
3583 &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 -07003584 },
3585 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003586 &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 -07003587 },
Craig Citro065b5302014-08-14 00:47:23 -07003588 }</pre>
3589</div>
3590
3591<div class="method">
3592 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
3593 <pre>Retrieves the next page of results.
3594
3595Args:
3596 previous_request: The request for the previous page. (required)
3597 previous_response: The response from the request for the previous page. (required)
3598
3599Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07003600 A request object that you can call &#x27;execute()&#x27; on to request the next
Craig Citro065b5302014-08-14 00:47:23 -07003601 page. Returns None if there are no more items in the collection.
3602 </pre>
3603</div>
3604
3605<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003606 <code class="details" id="patch">patch(project, urlMap, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003607 <pre>Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Craig Citro065b5302014-08-14 00:47:23 -07003608
3609Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003610 project: string, Project ID for this request. (required)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003611 urlMap: string, Name of the UrlMap resource to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003612 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -07003613 The object takes the form of:
3614
Dan O'Mearadd494642020-05-01 07:42:23 -07003615{ # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003616 #
3617 # Google Compute Engine has two URL Map resources:
3618 #
3619 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
3620 #
3621 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
3622 #
3623 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
3624 #
3625 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
3626 #
3627 # To use the global urlMaps resource, the backend service must have a loadBalancingScheme of either EXTERNAL or INTERNAL_SELF_MANAGED. To use the regionUrlMaps resource, the backend service must have a loadBalancingScheme of INTERNAL_MANAGED. For more information, read URL Map Concepts.
3628 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
3629 &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.
3630 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
3631 &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
3632 &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.
3633 # Default is false.
3634 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3635 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07003636 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003637 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3638 &quot;A String&quot;,
3639 ],
3640 &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
3641 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3642 &quot;A String&quot;,
3643 ],
3644 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3645 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3646 &quot;A String&quot;,
3647 ],
3648 &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.
3649 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3650 &quot;A String&quot;,
3651 ],
3652 &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.
3653 },
3654 &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.
3655 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3656 &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.
3657 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3658 # The value must be between 200 and 599 inclusive.
3659 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3660 # The value must be between 0.0 and 100.0 inclusive.
3661 },
3662 &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.
3663 &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.
3664 &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.
3665 &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
3666 },
3667 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3668 # The value must be between 0.0 and 100.0 inclusive.
Dan O'Mearadd494642020-05-01 07:42:23 -07003669 },
3670 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003671 &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.
3672 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3673 },
3674 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3675 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3676 &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.
3677 # 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.
3678 &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.
3679 &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
Craig Citro065b5302014-08-14 00:47:23 -07003680 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003681 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3682 # - 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.
3683 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3684 # -
3685 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3686 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3687 # - 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.
3688 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3689 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3690 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3691 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3692 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07003693 ],
3694 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003695 &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.
3696 # If not specified, will use the largest timeout among all backend services associated with the route.
3697 &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.
3698 &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
3699 },
3700 &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.
3701 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -07003702 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07003703 &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.
3704 # The value must be between 1 and 1024 characters.
Dan O'Mearadd494642020-05-01 07:42:23 -07003705 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003706 &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 0 number.
3707 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
3708 { # 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
3709 &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.
3710 &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.
3711 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3712 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3713 { # Specification determining how headers are added to requests or responses.
3714 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3715 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3716 &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.
3717 # The default value is false.
3718 },
3719 ],
3720 &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.
3721 &quot;A String&quot;,
3722 ],
3723 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3724 { # Specification determining how headers are added to requests or responses.
3725 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3726 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3727 &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.
3728 # The default value is false.
3729 },
3730 ],
3731 &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.
3732 &quot;A String&quot;,
3733 ],
3734 },
3735 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3736 # 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.
3737 # The value must be between 0 and 1000
Craig Citro065b5302014-08-14 00:47:23 -07003738 },
3739 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003740 },
3741 &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.
3742 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3743 &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.
3744 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
3745 &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.
3746 # The value must be between 1 and 255 characters.
3747 &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.
3748 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3749 # The default is set to false.
3750 &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.
3751 # 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.
3752 # The value must be between 1 and 1024 characters.
3753 &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.
3754 # 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.
3755 # The value must be between 1 and 1024 characters.
3756 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3757 # Supported values are:
3758 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3759 # - FOUND, which corresponds to 302.
3760 # - SEE_OTHER which corresponds to 303.
3761 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3762 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3763 &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.
3764 # The default is set to false.
3765 },
3766 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3767 &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.
3768 #
3769 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
3770 &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.
3771 # The headerAction specified here take effect after headerAction specified under pathMatcher.
3772 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3773 { # Specification determining how headers are added to requests or responses.
3774 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3775 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3776 &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.
3777 # The default value is false.
3778 },
3779 ],
3780 &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.
3781 &quot;A String&quot;,
3782 ],
3783 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3784 { # Specification determining how headers are added to requests or responses.
3785 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3786 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3787 &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.
3788 # The default value is false.
3789 },
3790 ],
3791 &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.
3792 &quot;A String&quot;,
3793 ],
3794 },
3795 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
3796 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
3797 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3798 &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 ..
3799 &quot;A String&quot;,
3800 ],
3801 &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.
3802 },
3803 ],
3804 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3805 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
3806 &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.
3807 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
3808 { # 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.
3809 &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.
3810 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
3811 &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
3812 &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.
3813 # Default is false.
3814 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3815 &quot;A String&quot;,
3816 ],
3817 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3818 &quot;A String&quot;,
3819 ],
3820 &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
3821 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3822 &quot;A String&quot;,
3823 ],
3824 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3825 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3826 &quot;A String&quot;,
3827 ],
3828 &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.
3829 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3830 &quot;A String&quot;,
3831 ],
3832 &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.
3833 },
3834 &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.
3835 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3836 &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.
3837 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3838 # The value must be between 200 and 599 inclusive.
3839 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3840 # The value must be between 0.0 and 100.0 inclusive.
3841 },
3842 &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.
3843 &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.
3844 &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.
3845 &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
3846 },
3847 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3848 # The value must be between 0.0 and 100.0 inclusive.
3849 },
3850 },
3851 &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.
3852 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3853 },
3854 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3855 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3856 &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.
3857 # 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.
3858 &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.
3859 &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
3860 },
3861 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3862 # - 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.
3863 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3864 # -
3865 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3866 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3867 # - 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.
3868 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3869 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3870 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3871 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3872 &quot;A String&quot;,
3873 ],
3874 },
3875 &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.
3876 # If not specified, will use the largest timeout among all backend services associated with the route.
3877 &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.
3878 &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
3879 },
3880 &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.
3881 &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.
3882 # The value must be between 1 and 255 characters.
3883 &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.
3884 # The value must be between 1 and 1024 characters.
3885 },
3886 &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 0 number.
3887 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
3888 { # 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
3889 &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.
3890 &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.
3891 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3892 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3893 { # Specification determining how headers are added to requests or responses.
3894 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3895 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3896 &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.
3897 # The default value is false.
3898 },
3899 ],
3900 &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.
3901 &quot;A String&quot;,
3902 ],
3903 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3904 { # Specification determining how headers are added to requests or responses.
3905 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3906 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3907 &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.
3908 # The default value is false.
3909 },
3910 ],
3911 &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.
3912 &quot;A String&quot;,
3913 ],
3914 },
3915 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3916 # 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.
3917 # The value must be between 0 and 1000
3918 },
3919 ],
3920 },
3921 &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:
3922 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
3923 # - compute/v1/projects/project/global/backendServices/backendService
3924 # - 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.
3925 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3926 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
3927 # - compute.backendBuckets.use
3928 # - compute.backendServices.use
3929 &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.
3930 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
3931 &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.
3932 # The value must be between 1 and 255 characters.
3933 &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.
3934 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3935 # The default is set to false.
3936 &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.
3937 # 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.
3938 # The value must be between 1 and 1024 characters.
3939 &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.
3940 # 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.
3941 # The value must be between 1 and 1024 characters.
3942 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3943 # Supported values are:
3944 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3945 # - FOUND, which corresponds to 302.
3946 # - SEE_OTHER which corresponds to 303.
3947 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3948 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3949 &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.
3950 # The default is set to false.
3951 },
3952 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3953 &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.
3954 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
3955 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3956 { # Specification determining how headers are added to requests or responses.
3957 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3958 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3959 &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.
3960 # The default value is false.
3961 },
3962 ],
3963 &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.
3964 &quot;A String&quot;,
3965 ],
3966 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3967 { # Specification determining how headers are added to requests or responses.
3968 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3969 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3970 &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.
3971 # The default value is false.
3972 },
3973 ],
3974 &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.
3975 &quot;A String&quot;,
3976 ],
3977 },
3978 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
3979 &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.
3980 # 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.
3981 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
3982 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
3983 &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.
3984 &quot;A String&quot;,
3985 ],
3986 &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.
3987 # Only one of routeAction or urlRedirect must be set.
3988 &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
3989 &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.
3990 # Default is false.
3991 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3992 &quot;A String&quot;,
3993 ],
3994 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3995 &quot;A String&quot;,
3996 ],
3997 &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
3998 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3999 &quot;A String&quot;,
4000 ],
4001 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4002 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4003 &quot;A String&quot;,
4004 ],
4005 &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.
4006 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4007 &quot;A String&quot;,
4008 ],
4009 &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.
4010 },
4011 &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.
4012 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4013 &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.
4014 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4015 # The value must be between 200 and 599 inclusive.
4016 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4017 # The value must be between 0.0 and 100.0 inclusive.
4018 },
4019 &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.
4020 &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.
4021 &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.
4022 &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
4023 },
4024 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4025 # The value must be between 0.0 and 100.0 inclusive.
4026 },
4027 },
4028 &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.
4029 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4030 },
4031 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4032 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4033 &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.
4034 # 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.
4035 &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.
4036 &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
4037 },
4038 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4039 # - 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.
4040 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4041 # -
4042 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4043 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4044 # - 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.
4045 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4046 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4047 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4048 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4049 &quot;A String&quot;,
4050 ],
4051 },
4052 &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.
4053 # If not specified, will use the largest timeout among all backend services associated with the route.
4054 &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.
4055 &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
4056 },
4057 &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.
4058 &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.
4059 # The value must be between 1 and 255 characters.
4060 &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.
4061 # The value must be between 1 and 1024 characters.
4062 },
4063 &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 0 number.
4064 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
4065 { # 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
4066 &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.
4067 &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.
4068 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4069 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4070 { # Specification determining how headers are added to requests or responses.
4071 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4072 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4073 &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.
4074 # The default value is false.
4075 },
4076 ],
4077 &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.
4078 &quot;A String&quot;,
4079 ],
4080 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4081 { # Specification determining how headers are added to requests or responses.
4082 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4083 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4084 &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.
4085 # The default value is false.
4086 },
4087 ],
4088 &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.
4089 &quot;A String&quot;,
4090 ],
4091 },
4092 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4093 # 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.
4094 # The value must be between 0 and 1000
4095 },
4096 ],
4097 },
4098 &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.
4099 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4100 &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.
4101 # If urlRedirect is specified, service or routeAction must not be set.
4102 &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.
4103 # The value must be between 1 and 255 characters.
4104 &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.
4105 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4106 # The default is set to false.
4107 &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.
4108 # 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.
4109 # The value must be between 1 and 1024 characters.
4110 &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.
4111 # 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.
4112 # The value must be between 1 and 1024 characters.
4113 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4114 # Supported values are:
4115 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4116 # - FOUND, which corresponds to 302.
4117 # - SEE_OTHER which corresponds to 303.
4118 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4119 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4120 &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.
4121 # The default is set to false.
4122 },
4123 },
4124 ],
4125 &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.
4126 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
4127 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
4128 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
4129 # The description can have a maximum length of 1024 characters.
4130 &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.
4131 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
4132 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4133 { # Specification determining how headers are added to requests or responses.
4134 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4135 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4136 &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.
4137 # The default value is false.
4138 },
4139 ],
4140 &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.
4141 &quot;A String&quot;,
4142 ],
4143 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4144 { # Specification determining how headers are added to requests or responses.
4145 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4146 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4147 &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.
4148 # The default value is false.
4149 },
4150 ],
4151 &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.
4152 &quot;A String&quot;,
4153 ],
4154 },
4155 &quot;matchRules&quot;: [
4156 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
4157 &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.
4158 # fullPathMatch must be between 1 and 1024 characters.
4159 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4160 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
4161 { # matchRule criteria for request header matches.
4162 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
4163 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4164 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
4165 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
4166 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
4167 &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.
4168 # The default setting is false.
4169 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
4170 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4171 &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.
4172 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4173 &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.
4174 # For example for a range [-5, 0]
4175 # - -3 will match.
4176 # - 0 will not match.
4177 # - 0.25 will not match.
4178 # - -3someString will not match.
4179 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4180 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4181 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
4182 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
4183 },
4184 &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
4185 # 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.
4186 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4187 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
4188 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
4189 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4190 },
4191 ],
4192 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
4193 # The default value is false.
4194 # ignoreCase must not be used with regexMatch.
4195 &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. If a match takes place, the relevant routing configuration is made available to those proxies.
4196 # 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.
4197 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
4198 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
4199 { # 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.
4200 # 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.
4201 # 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.
4202 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
4203 # This list must not be empty and can have at the most 64 entries.
4204 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
4205 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
4206 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
4207 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
4208 # value can have a maximum length of 1024 characters.
4209 },
4210 ],
4211 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
4212 # Supported values are:
4213 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
4214 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
4215 },
4216 ],
4217 &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 /.
4218 # The value must be between 1 and 1024 characters.
4219 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4220 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
4221 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
4222 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
4223 # Only one of presentMatch, exactMatch or regexMatch must be set.
4224 &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.
4225 &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.
4226 # Only one of presentMatch, exactMatch or regexMatch must be set.
4227 &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
4228 # Only one of presentMatch, exactMatch or regexMatch must be set.
4229 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
4230 },
4231 ],
4232 &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
4233 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4234 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
4235 },
4236 ],
4237 &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.
4238 # 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.
4239 # 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.
4240 &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.
4241 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4242 &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
4243 &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.
4244 # Default is false.
4245 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4246 &quot;A String&quot;,
4247 ],
4248 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4249 &quot;A String&quot;,
4250 ],
4251 &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
4252 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4253 &quot;A String&quot;,
4254 ],
4255 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4256 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4257 &quot;A String&quot;,
4258 ],
4259 &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.
4260 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4261 &quot;A String&quot;,
4262 ],
4263 &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.
4264 },
4265 &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.
4266 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4267 &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.
4268 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4269 # The value must be between 200 and 599 inclusive.
4270 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4271 # The value must be between 0.0 and 100.0 inclusive.
4272 },
4273 &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.
4274 &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.
4275 &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.
4276 &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
4277 },
4278 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4279 # The value must be between 0.0 and 100.0 inclusive.
4280 },
4281 },
4282 &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.
4283 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4284 },
4285 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4286 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4287 &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.
4288 # 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.
4289 &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.
4290 &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
4291 },
4292 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4293 # - 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.
4294 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4295 # -
4296 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4297 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4298 # - 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.
4299 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4300 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4301 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4302 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4303 &quot;A String&quot;,
4304 ],
4305 },
4306 &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.
4307 # If not specified, will use the largest timeout among all backend services associated with the route.
4308 &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.
4309 &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
4310 },
4311 &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.
4312 &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.
4313 # The value must be between 1 and 255 characters.
4314 &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.
4315 # The value must be between 1 and 1024 characters.
4316 },
4317 &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 0 number.
4318 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
4319 { # 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
4320 &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.
4321 &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.
4322 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4323 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4324 { # Specification determining how headers are added to requests or responses.
4325 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4326 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4327 &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.
4328 # The default value is false.
4329 },
4330 ],
4331 &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.
4332 &quot;A String&quot;,
4333 ],
4334 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4335 { # Specification determining how headers are added to requests or responses.
4336 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4337 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4338 &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.
4339 # The default value is false.
4340 },
4341 ],
4342 &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.
4343 &quot;A String&quot;,
4344 ],
4345 },
4346 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4347 # 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.
4348 # The value must be between 0 and 1000
4349 },
4350 ],
4351 },
4352 &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.
4353 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4354 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
4355 # If urlRedirect is specified, service or routeAction must not be set.
4356 &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.
4357 # The value must be between 1 and 255 characters.
4358 &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.
4359 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4360 # The default is set to false.
4361 &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.
4362 # 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.
4363 # The value must be between 1 and 1024 characters.
4364 &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.
4365 # 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.
4366 # The value must be between 1 and 1024 characters.
4367 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4368 # Supported values are:
4369 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4370 # - FOUND, which corresponds to 302.
4371 # - SEE_OTHER which corresponds to 303.
4372 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4373 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4374 &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.
4375 # The default is set to false.
4376 },
4377 },
4378 ],
4379 },
4380 ],
4381 &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.
4382 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4383 &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.
4384 { # Message for the expected URL mappings.
4385 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
4386 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL.
4387 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
4388 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService resource the given URL should be mapped to.
4389 },
4390 ],
4391}
Craig Citro065b5302014-08-14 00:47:23 -07004392
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004393 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
4394
4395For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
4396
4397The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Craig Citro065b5302014-08-14 00:47:23 -07004398
4399Returns:
4400 An object of the form:
4401
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004402 { # Represents an Operation resource.
4403 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004404 # Google Compute Engine has three Operation resources:
4405 #
4406 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4407 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004408 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4409 #
4410 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004411 # - For global operations, use the `globalOperations` resource.
4412 # - For regional operations, use the `regionOperations` resource.
4413 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004414 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004415 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07004416 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4417 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4418 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4419 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4420 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4421 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -07004422 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004423 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4424 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4425 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Craig Citro065b5302014-08-14 00:47:23 -07004426 },
4427 ],
4428 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004429 &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`.
4430 &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.
4431 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4432 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4433 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4434 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4435 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4436 &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.
4437 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4438 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4439 &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.
4440 &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`.
4441 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4442 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4443 &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.
4444 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4445 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4446 {
4447 &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.
4448 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4449 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4450 {
4451 &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).
4452 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4453 },
4454 ],
4455 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4456 },
4457 ],
4458 &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.
Craig Citro065b5302014-08-14 00:47:23 -07004459 }</pre>
4460</div>
4461
4462<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004463 <code class="details" id="update">update(project, urlMap, body=None, requestId=None)</code>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07004464 <pre>Updates the specified UrlMap resource with the data included in the request.
Craig Citro065b5302014-08-14 00:47:23 -07004465
4466Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004467 project: string, Project ID for this request. (required)
Craig Citro065b5302014-08-14 00:47:23 -07004468 urlMap: string, Name of the UrlMap resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004469 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -07004470 The object takes the form of:
4471
Dan O'Mearadd494642020-05-01 07:42:23 -07004472{ # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07004473 #
4474 # Google Compute Engine has two URL Map resources:
4475 #
4476 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
4477 #
4478 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
4479 #
4480 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
4481 #
4482 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
4483 #
4484 # To use the global urlMaps resource, the backend service must have a loadBalancingScheme of either EXTERNAL or INTERNAL_SELF_MANAGED. To use the regionUrlMaps resource, the backend service must have a loadBalancingScheme of INTERNAL_MANAGED. For more information, read URL Map Concepts.
4485 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
4486 &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.
4487 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
4488 &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
4489 &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.
4490 # Default is false.
4491 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4492 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07004493 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004494 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4495 &quot;A String&quot;,
4496 ],
4497 &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
4498 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4499 &quot;A String&quot;,
4500 ],
4501 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4502 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4503 &quot;A String&quot;,
4504 ],
4505 &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.
4506 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4507 &quot;A String&quot;,
4508 ],
4509 &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.
4510 },
4511 &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.
4512 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4513 &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.
4514 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4515 # The value must be between 200 and 599 inclusive.
4516 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4517 # The value must be between 0.0 and 100.0 inclusive.
4518 },
4519 &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.
4520 &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.
4521 &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.
4522 &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
4523 },
4524 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4525 # The value must be between 0.0 and 100.0 inclusive.
Dan O'Mearadd494642020-05-01 07:42:23 -07004526 },
4527 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004528 &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.
4529 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4530 },
4531 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4532 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4533 &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.
4534 # 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.
4535 &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.
4536 &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
Craig Citro065b5302014-08-14 00:47:23 -07004537 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004538 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4539 # - 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.
4540 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4541 # -
4542 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4543 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4544 # - 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.
4545 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4546 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4547 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4548 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4549 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07004550 ],
4551 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004552 &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.
4553 # If not specified, will use the largest timeout among all backend services associated with the route.
4554 &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.
4555 &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
4556 },
4557 &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.
4558 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -07004559 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07004560 &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.
4561 # The value must be between 1 and 1024 characters.
Dan O'Mearadd494642020-05-01 07:42:23 -07004562 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004563 &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 0 number.
4564 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
4565 { # 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
4566 &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.
4567 &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.
4568 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4569 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4570 { # Specification determining how headers are added to requests or responses.
4571 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4572 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4573 &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.
4574 # The default value is false.
4575 },
4576 ],
4577 &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.
4578 &quot;A String&quot;,
4579 ],
4580 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4581 { # Specification determining how headers are added to requests or responses.
4582 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4583 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4584 &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.
4585 # The default value is false.
4586 },
4587 ],
4588 &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.
4589 &quot;A String&quot;,
4590 ],
4591 },
4592 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4593 # 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.
4594 # The value must be between 0 and 1000
Craig Citro065b5302014-08-14 00:47:23 -07004595 },
4596 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004597 },
4598 &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.
4599 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
4600 &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.
4601 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
4602 &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.
4603 # The value must be between 1 and 255 characters.
4604 &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.
4605 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4606 # The default is set to false.
4607 &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.
4608 # 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.
4609 # The value must be between 1 and 1024 characters.
4610 &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.
4611 # 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.
4612 # The value must be between 1 and 1024 characters.
4613 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4614 # Supported values are:
4615 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4616 # - FOUND, which corresponds to 302.
4617 # - SEE_OTHER which corresponds to 303.
4618 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4619 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4620 &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.
4621 # The default is set to false.
4622 },
4623 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4624 &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.
4625 #
4626 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
4627 &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.
4628 # The headerAction specified here take effect after headerAction specified under pathMatcher.
4629 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4630 { # Specification determining how headers are added to requests or responses.
4631 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4632 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4633 &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.
4634 # The default value is false.
4635 },
4636 ],
4637 &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.
4638 &quot;A String&quot;,
4639 ],
4640 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4641 { # Specification determining how headers are added to requests or responses.
4642 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4643 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4644 &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.
4645 # The default value is false.
4646 },
4647 ],
4648 &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.
4649 &quot;A String&quot;,
4650 ],
4651 },
4652 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
4653 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
4654 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4655 &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 ..
4656 &quot;A String&quot;,
4657 ],
4658 &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.
4659 },
4660 ],
4661 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4662 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
4663 &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.
4664 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
4665 { # 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.
4666 &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.
4667 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
4668 &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
4669 &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.
4670 # Default is false.
4671 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4672 &quot;A String&quot;,
4673 ],
4674 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4675 &quot;A String&quot;,
4676 ],
4677 &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
4678 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4679 &quot;A String&quot;,
4680 ],
4681 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4682 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4683 &quot;A String&quot;,
4684 ],
4685 &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.
4686 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4687 &quot;A String&quot;,
4688 ],
4689 &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.
4690 },
4691 &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.
4692 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4693 &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.
4694 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4695 # The value must be between 200 and 599 inclusive.
4696 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4697 # The value must be between 0.0 and 100.0 inclusive.
4698 },
4699 &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.
4700 &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.
4701 &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.
4702 &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
4703 },
4704 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4705 # The value must be between 0.0 and 100.0 inclusive.
4706 },
4707 },
4708 &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.
4709 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4710 },
4711 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4712 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4713 &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.
4714 # 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.
4715 &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.
4716 &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
4717 },
4718 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4719 # - 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.
4720 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4721 # -
4722 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4723 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4724 # - 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.
4725 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4726 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4727 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4728 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4729 &quot;A String&quot;,
4730 ],
4731 },
4732 &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.
4733 # If not specified, will use the largest timeout among all backend services associated with the route.
4734 &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.
4735 &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
4736 },
4737 &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.
4738 &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.
4739 # The value must be between 1 and 255 characters.
4740 &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.
4741 # The value must be between 1 and 1024 characters.
4742 },
4743 &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 0 number.
4744 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
4745 { # 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
4746 &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.
4747 &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.
4748 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4749 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
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;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.
4758 &quot;A String&quot;,
4759 ],
4760 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4761 { # Specification determining how headers are added to requests or responses.
4762 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4763 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4764 &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.
4765 # The default value is false.
4766 },
4767 ],
4768 &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.
4769 &quot;A String&quot;,
4770 ],
4771 },
4772 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4773 # 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.
4774 # The value must be between 0 and 1000
4775 },
4776 ],
4777 },
4778 &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:
4779 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
4780 # - compute/v1/projects/project/global/backendServices/backendService
4781 # - 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.
4782 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
4783 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
4784 # - compute.backendBuckets.use
4785 # - compute.backendServices.use
4786 &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.
4787 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
4788 &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.
4789 # The value must be between 1 and 255 characters.
4790 &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.
4791 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4792 # The default is set to false.
4793 &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.
4794 # 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.
4795 # The value must be between 1 and 1024 characters.
4796 &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.
4797 # 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.
4798 # The value must be between 1 and 1024 characters.
4799 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4800 # Supported values are:
4801 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4802 # - FOUND, which corresponds to 302.
4803 # - SEE_OTHER which corresponds to 303.
4804 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4805 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4806 &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.
4807 # The default is set to false.
4808 },
4809 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4810 &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.
4811 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
4812 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4813 { # Specification determining how headers are added to requests or responses.
4814 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4815 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4816 &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.
4817 # The default value is false.
4818 },
4819 ],
4820 &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.
4821 &quot;A String&quot;,
4822 ],
4823 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4824 { # Specification determining how headers are added to requests or responses.
4825 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4826 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4827 &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.
4828 # The default value is false.
4829 },
4830 ],
4831 &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.
4832 &quot;A String&quot;,
4833 ],
4834 },
4835 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
4836 &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.
4837 # 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.
4838 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
4839 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
4840 &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.
4841 &quot;A String&quot;,
4842 ],
4843 &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.
4844 # Only one of routeAction or urlRedirect must be set.
4845 &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
4846 &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.
4847 # Default is false.
4848 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4849 &quot;A String&quot;,
4850 ],
4851 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4852 &quot;A String&quot;,
4853 ],
4854 &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
4855 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4856 &quot;A String&quot;,
4857 ],
4858 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4859 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4860 &quot;A String&quot;,
4861 ],
4862 &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.
4863 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4864 &quot;A String&quot;,
4865 ],
4866 &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.
4867 },
4868 &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.
4869 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4870 &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.
4871 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4872 # The value must be between 200 and 599 inclusive.
4873 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4874 # The value must be between 0.0 and 100.0 inclusive.
4875 },
4876 &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.
4877 &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.
4878 &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.
4879 &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
4880 },
4881 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4882 # The value must be between 0.0 and 100.0 inclusive.
4883 },
4884 },
4885 &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.
4886 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4887 },
4888 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4889 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4890 &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.
4891 # 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.
4892 &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.
4893 &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
4894 },
4895 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4896 # - 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.
4897 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4898 # -
4899 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4900 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4901 # - 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.
4902 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4903 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4904 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4905 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4906 &quot;A String&quot;,
4907 ],
4908 },
4909 &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.
4910 # If not specified, will use the largest timeout among all backend services associated with the route.
4911 &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.
4912 &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
4913 },
4914 &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.
4915 &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.
4916 # The value must be between 1 and 255 characters.
4917 &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.
4918 # The value must be between 1 and 1024 characters.
4919 },
4920 &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 0 number.
4921 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
4922 { # 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
4923 &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.
4924 &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.
4925 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4926 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4927 { # Specification determining how headers are added to requests or responses.
4928 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4929 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4930 &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.
4931 # The default value is false.
4932 },
4933 ],
4934 &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.
4935 &quot;A String&quot;,
4936 ],
4937 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4938 { # Specification determining how headers are added to requests or responses.
4939 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4940 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4941 &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.
4942 # The default value is false.
4943 },
4944 ],
4945 &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.
4946 &quot;A String&quot;,
4947 ],
4948 },
4949 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4950 # 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.
4951 # The value must be between 0 and 1000
4952 },
4953 ],
4954 },
4955 &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.
4956 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4957 &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.
4958 # If urlRedirect is specified, service or routeAction must not be set.
4959 &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.
4960 # The value must be between 1 and 255 characters.
4961 &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.
4962 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4963 # The default is set to false.
4964 &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.
4965 # 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.
4966 # The value must be between 1 and 1024 characters.
4967 &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.
4968 # 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.
4969 # The value must be between 1 and 1024 characters.
4970 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4971 # Supported values are:
4972 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4973 # - FOUND, which corresponds to 302.
4974 # - SEE_OTHER which corresponds to 303.
4975 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4976 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4977 &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.
4978 # The default is set to false.
4979 },
4980 },
4981 ],
4982 &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.
4983 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
4984 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
4985 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
4986 # The description can have a maximum length of 1024 characters.
4987 &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.
4988 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
4989 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4990 { # Specification determining how headers are added to requests or responses.
4991 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4992 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4993 &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.
4994 # The default value is false.
4995 },
4996 ],
4997 &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.
4998 &quot;A String&quot;,
4999 ],
5000 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5001 { # Specification determining how headers are added to requests or responses.
5002 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5003 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5004 &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.
5005 # The default value is false.
5006 },
5007 ],
5008 &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.
5009 &quot;A String&quot;,
5010 ],
5011 },
5012 &quot;matchRules&quot;: [
5013 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
5014 &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.
5015 # fullPathMatch must be between 1 and 1024 characters.
5016 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5017 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
5018 { # matchRule criteria for request header matches.
5019 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
5020 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5021 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
5022 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
5023 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
5024 &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.
5025 # The default setting is false.
5026 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
5027 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5028 &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.
5029 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5030 &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.
5031 # For example for a range [-5, 0]
5032 # - -3 will match.
5033 # - 0 will not match.
5034 # - 0.25 will not match.
5035 # - -3someString will not match.
5036 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5037 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5038 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
5039 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
5040 },
5041 &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
5042 # 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.
5043 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5044 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
5045 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
5046 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5047 },
5048 ],
5049 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
5050 # The default value is false.
5051 # ignoreCase must not be used with regexMatch.
5052 &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. If a match takes place, the relevant routing configuration is made available to those proxies.
5053 # 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.
5054 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
5055 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
5056 { # 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.
5057 # 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.
5058 # 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.
5059 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
5060 # This list must not be empty and can have at the most 64 entries.
5061 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
5062 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
5063 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
5064 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
5065 # value can have a maximum length of 1024 characters.
5066 },
5067 ],
5068 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
5069 # Supported values are:
5070 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
5071 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
5072 },
5073 ],
5074 &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 /.
5075 # The value must be between 1 and 1024 characters.
5076 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5077 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
5078 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
5079 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
5080 # Only one of presentMatch, exactMatch or regexMatch must be set.
5081 &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.
5082 &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.
5083 # Only one of presentMatch, exactMatch or regexMatch must be set.
5084 &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
5085 # Only one of presentMatch, exactMatch or regexMatch must be set.
5086 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
5087 },
5088 ],
5089 &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
5090 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5091 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
5092 },
5093 ],
5094 &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.
5095 # 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.
5096 # 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.
5097 &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.
5098 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5099 &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
5100 &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.
5101 # Default is false.
5102 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
5103 &quot;A String&quot;,
5104 ],
5105 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
5106 &quot;A String&quot;,
5107 ],
5108 &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
5109 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5110 &quot;A String&quot;,
5111 ],
5112 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
5113 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5114 &quot;A String&quot;,
5115 ],
5116 &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.
5117 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
5118 &quot;A String&quot;,
5119 ],
5120 &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.
5121 },
5122 &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.
5123 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
5124 &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.
5125 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
5126 # The value must be between 200 and 599 inclusive.
5127 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5128 # The value must be between 0.0 and 100.0 inclusive.
5129 },
5130 &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.
5131 &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.
5132 &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.
5133 &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
5134 },
5135 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5136 # The value must be between 0.0 and 100.0 inclusive.
5137 },
5138 },
5139 &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.
5140 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
5141 },
5142 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
5143 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5144 &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.
5145 # 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.
5146 &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.
5147 &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
5148 },
5149 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5150 # - 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.
5151 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5152 # -
5153 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5154 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5155 # - 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.
5156 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5157 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5158 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5159 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5160 &quot;A String&quot;,
5161 ],
5162 },
5163 &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.
5164 # If not specified, will use the largest timeout among all backend services associated with the route.
5165 &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.
5166 &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
5167 },
5168 &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.
5169 &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.
5170 # The value must be between 1 and 255 characters.
5171 &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.
5172 # The value must be between 1 and 1024 characters.
5173 },
5174 &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 0 number.
5175 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
5176 { # 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
5177 &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.
5178 &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.
5179 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
5180 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5181 { # Specification determining how headers are added to requests or responses.
5182 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5183 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5184 &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.
5185 # The default value is false.
5186 },
5187 ],
5188 &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.
5189 &quot;A String&quot;,
5190 ],
5191 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5192 { # Specification determining how headers are added to requests or responses.
5193 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5194 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5195 &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.
5196 # The default value is false.
5197 },
5198 ],
5199 &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.
5200 &quot;A String&quot;,
5201 ],
5202 },
5203 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5204 # 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.
5205 # The value must be between 0 and 1000
5206 },
5207 ],
5208 },
5209 &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.
5210 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5211 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
5212 # If urlRedirect is specified, service or routeAction must not be set.
5213 &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.
5214 # The value must be between 1 and 255 characters.
5215 &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.
5216 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5217 # The default is set to false.
5218 &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.
5219 # 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.
5220 # The value must be between 1 and 1024 characters.
5221 &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.
5222 # 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.
5223 # The value must be between 1 and 1024 characters.
5224 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5225 # Supported values are:
5226 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5227 # - FOUND, which corresponds to 302.
5228 # - SEE_OTHER which corresponds to 303.
5229 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5230 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5231 &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.
5232 # The default is set to false.
5233 },
5234 },
5235 ],
5236 },
5237 ],
5238 &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.
5239 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5240 &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.
5241 { # Message for the expected URL mappings.
5242 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
5243 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL.
5244 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
5245 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService resource the given URL should be mapped to.
5246 },
5247 ],
5248}
Craig Citro065b5302014-08-14 00:47:23 -07005249
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005250 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
5251
5252For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
5253
5254The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Craig Citro065b5302014-08-14 00:47:23 -07005255
5256Returns:
5257 An object of the form:
5258
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005259 { # Represents an Operation resource.
5260 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005261 # Google Compute Engine has three Operation resources:
5262 #
5263 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5264 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005265 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5266 #
5267 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005268 # - For global operations, use the `globalOperations` resource.
5269 # - For regional operations, use the `regionOperations` resource.
5270 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005271 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005272 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07005273 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5274 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5275 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5276 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5277 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5278 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -07005279 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005280 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5281 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5282 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Craig Citro065b5302014-08-14 00:47:23 -07005283 },
5284 ],
5285 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005286 &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`.
5287 &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.
5288 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5289 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5290 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5291 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5292 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5293 &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.
5294 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5295 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5296 &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.
5297 &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`.
5298 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5299 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5300 &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.
5301 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5302 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5303 {
5304 &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.
5305 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5306 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5307 {
5308 &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).
5309 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5310 },
5311 ],
5312 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5313 },
5314 ],
5315 &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.
Craig Citro065b5302014-08-14 00:47:23 -07005316 }</pre>
5317</div>
5318
5319<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005320 <code class="details" id="validate">validate(project, urlMap, body=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08005321 <pre>Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.
Craig Citro065b5302014-08-14 00:47:23 -07005322
5323Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08005324 project: string, Project ID for this request. (required)
Craig Citro065b5302014-08-14 00:47:23 -07005325 urlMap: string, Name of the UrlMap resource to be validated as. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005326 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -07005327 The object takes the form of:
5328
5329{
Bu Sun Kim65020912020-05-20 12:08:20 -07005330 &quot;resource&quot;: { # Represents a URL Map resource. # Content of the UrlMap to be validated.
5331 #
5332 # Google Compute Engine has two URL Map resources:
5333 #
5334 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
5335 #
5336 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
5337 #
5338 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
5339 #
5340 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
5341 #
5342 # To use the global urlMaps resource, the backend service must have a loadBalancingScheme of either EXTERNAL or INTERNAL_SELF_MANAGED. To use the regionUrlMaps resource, the backend service must have a loadBalancingScheme of INTERNAL_MANAGED. For more information, read URL Map Concepts.
5343 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
5344 &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.
5345 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
5346 &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
5347 &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.
5348 # Default is false.
5349 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
5350 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07005351 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005352 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
5353 &quot;A String&quot;,
5354 ],
5355 &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
5356 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5357 &quot;A String&quot;,
5358 ],
5359 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
5360 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5361 &quot;A String&quot;,
5362 ],
5363 &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.
5364 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
5365 &quot;A String&quot;,
5366 ],
5367 &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.
5368 },
5369 &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.
5370 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
5371 &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.
5372 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
5373 # The value must be between 200 and 599 inclusive.
5374 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5375 # The value must be between 0.0 and 100.0 inclusive.
5376 },
5377 &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.
5378 &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.
5379 &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.
5380 &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
5381 },
5382 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5383 # The value must be between 0.0 and 100.0 inclusive.
Dan O'Mearadd494642020-05-01 07:42:23 -07005384 },
5385 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005386 &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.
5387 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
5388 },
5389 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
5390 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5391 &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.
5392 # 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.
5393 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5394 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
Craig Citro065b5302014-08-14 00:47:23 -07005395 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005396 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5397 # - 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.
5398 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5399 # -
5400 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5401 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5402 # - 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.
5403 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5404 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5405 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5406 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5407 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07005408 ],
5409 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005410 &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.
5411 # If not specified, will use the largest timeout among all backend services associated with the route.
5412 &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.
5413 &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
5414 },
5415 &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.
5416 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -07005417 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07005418 &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.
5419 # The value must be between 1 and 1024 characters.
Dan O'Mearadd494642020-05-01 07:42:23 -07005420 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005421 &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 0 number.
5422 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
5423 { # 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
5424 &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.
5425 &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.
5426 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
5427 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5428 { # Specification determining how headers are added to requests or responses.
5429 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5430 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5431 &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.
5432 # The default value is false.
5433 },
5434 ],
5435 &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.
5436 &quot;A String&quot;,
5437 ],
5438 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5439 { # Specification determining how headers are added to requests or responses.
5440 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5441 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5442 &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.
5443 # The default value is false.
5444 },
5445 ],
5446 &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.
5447 &quot;A String&quot;,
5448 ],
5449 },
5450 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5451 # 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.
5452 # The value must be between 0 and 1000
Craig Citro065b5302014-08-14 00:47:23 -07005453 },
5454 ],
Craig Citro065b5302014-08-14 00:47:23 -07005455 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005456 &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.
5457 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
5458 &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.
5459 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
5460 &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.
5461 # The value must be between 1 and 255 characters.
5462 &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.
5463 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5464 # The default is set to false.
5465 &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.
5466 # 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.
5467 # The value must be between 1 and 1024 characters.
5468 &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.
5469 # 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.
5470 # The value must be between 1 and 1024 characters.
5471 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5472 # Supported values are:
5473 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5474 # - FOUND, which corresponds to 302.
5475 # - SEE_OTHER which corresponds to 303.
5476 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5477 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5478 &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.
5479 # The default is set to false.
5480 },
5481 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
5482 &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.
5483 #
5484 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
5485 &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.
5486 # The headerAction specified here take effect after headerAction specified under pathMatcher.
5487 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5488 { # Specification determining how headers are added to requests or responses.
5489 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5490 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5491 &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.
5492 # The default value is false.
5493 },
5494 ],
5495 &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.
5496 &quot;A String&quot;,
5497 ],
5498 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5499 { # Specification determining how headers are added to requests or responses.
5500 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5501 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5502 &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.
5503 # The default value is false.
5504 },
5505 ],
5506 &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.
5507 &quot;A String&quot;,
5508 ],
5509 },
5510 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
5511 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
5512 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
5513 &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 ..
5514 &quot;A String&quot;,
5515 ],
5516 &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.
5517 },
5518 ],
5519 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
5520 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
5521 &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.
5522 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
5523 { # 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.
5524 &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.
5525 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
5526 &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
5527 &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.
5528 # Default is false.
5529 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
5530 &quot;A String&quot;,
5531 ],
5532 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
5533 &quot;A String&quot;,
5534 ],
5535 &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
5536 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5537 &quot;A String&quot;,
5538 ],
5539 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
5540 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5541 &quot;A String&quot;,
5542 ],
5543 &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.
5544 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
5545 &quot;A String&quot;,
5546 ],
5547 &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.
5548 },
5549 &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.
5550 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
5551 &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.
5552 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
5553 # The value must be between 200 and 599 inclusive.
5554 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5555 # The value must be between 0.0 and 100.0 inclusive.
5556 },
5557 &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.
5558 &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.
5559 &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.
5560 &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
5561 },
5562 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5563 # The value must be between 0.0 and 100.0 inclusive.
5564 },
5565 },
5566 &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.
5567 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
5568 },
5569 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
5570 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5571 &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.
5572 # 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.
5573 &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.
5574 &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
5575 },
5576 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5577 # - 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.
5578 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5579 # -
5580 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5581 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5582 # - 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.
5583 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5584 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5585 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5586 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5587 &quot;A String&quot;,
5588 ],
5589 },
5590 &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.
5591 # If not specified, will use the largest timeout among all backend services associated with the route.
5592 &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.
5593 &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
5594 },
5595 &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.
5596 &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.
5597 # The value must be between 1 and 255 characters.
5598 &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.
5599 # The value must be between 1 and 1024 characters.
5600 },
5601 &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 0 number.
5602 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
5603 { # 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
5604 &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.
5605 &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.
5606 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
5607 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5608 { # Specification determining how headers are added to requests or responses.
5609 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5610 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5611 &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.
5612 # The default value is false.
5613 },
5614 ],
5615 &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.
5616 &quot;A String&quot;,
5617 ],
5618 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5619 { # Specification determining how headers are added to requests or responses.
5620 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5621 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5622 &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.
5623 # The default value is false.
5624 },
5625 ],
5626 &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.
5627 &quot;A String&quot;,
5628 ],
5629 },
5630 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5631 # 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.
5632 # The value must be between 0 and 1000
5633 },
5634 ],
5635 },
5636 &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:
5637 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
5638 # - compute/v1/projects/project/global/backendServices/backendService
5639 # - 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.
5640 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
5641 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
5642 # - compute.backendBuckets.use
5643 # - compute.backendServices.use
5644 &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.
5645 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
5646 &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.
5647 # The value must be between 1 and 255 characters.
5648 &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.
5649 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5650 # The default is set to false.
5651 &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.
5652 # 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.
5653 # The value must be between 1 and 1024 characters.
5654 &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.
5655 # 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.
5656 # The value must be between 1 and 1024 characters.
5657 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5658 # Supported values are:
5659 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5660 # - FOUND, which corresponds to 302.
5661 # - SEE_OTHER which corresponds to 303.
5662 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5663 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5664 &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.
5665 # The default is set to false.
5666 },
5667 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
5668 &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.
5669 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
5670 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5671 { # Specification determining how headers are added to requests or responses.
5672 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5673 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5674 &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.
5675 # The default value is false.
5676 },
5677 ],
5678 &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.
5679 &quot;A String&quot;,
5680 ],
5681 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5682 { # Specification determining how headers are added to requests or responses.
5683 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5684 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5685 &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.
5686 # The default value is false.
5687 },
5688 ],
5689 &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.
5690 &quot;A String&quot;,
5691 ],
5692 },
5693 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
5694 &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.
5695 # 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.
5696 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
5697 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
5698 &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.
5699 &quot;A String&quot;,
5700 ],
5701 &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.
5702 # Only one of routeAction or urlRedirect must be set.
5703 &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
5704 &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.
5705 # Default is false.
5706 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
5707 &quot;A String&quot;,
5708 ],
5709 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
5710 &quot;A String&quot;,
5711 ],
5712 &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
5713 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5714 &quot;A String&quot;,
5715 ],
5716 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
5717 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5718 &quot;A String&quot;,
5719 ],
5720 &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.
5721 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
5722 &quot;A String&quot;,
5723 ],
5724 &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.
5725 },
5726 &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.
5727 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
5728 &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.
5729 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
5730 # The value must be between 200 and 599 inclusive.
5731 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5732 # The value must be between 0.0 and 100.0 inclusive.
5733 },
5734 &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.
5735 &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.
5736 &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.
5737 &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
5738 },
5739 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5740 # The value must be between 0.0 and 100.0 inclusive.
5741 },
5742 },
5743 &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.
5744 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
5745 },
5746 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
5747 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5748 &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.
5749 # 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.
5750 &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.
5751 &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
5752 },
5753 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5754 # - 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.
5755 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5756 # -
5757 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5758 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5759 # - 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.
5760 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5761 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5762 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5763 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5764 &quot;A String&quot;,
5765 ],
5766 },
5767 &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.
5768 # If not specified, will use the largest timeout among all backend services associated with the route.
5769 &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.
5770 &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
5771 },
5772 &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.
5773 &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.
5774 # The value must be between 1 and 255 characters.
5775 &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.
5776 # The value must be between 1 and 1024 characters.
5777 },
5778 &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 0 number.
5779 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
5780 { # 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
5781 &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.
5782 &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.
5783 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
5784 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5785 { # Specification determining how headers are added to requests or responses.
5786 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5787 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5788 &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.
5789 # The default value is false.
5790 },
5791 ],
5792 &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.
5793 &quot;A String&quot;,
5794 ],
5795 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5796 { # Specification determining how headers are added to requests or responses.
5797 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5798 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5799 &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.
5800 # The default value is false.
5801 },
5802 ],
5803 &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.
5804 &quot;A String&quot;,
5805 ],
5806 },
5807 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5808 # 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.
5809 # The value must be between 0 and 1000
5810 },
5811 ],
5812 },
5813 &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.
5814 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5815 &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.
5816 # If urlRedirect is specified, service or routeAction must not be set.
5817 &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.
5818 # The value must be between 1 and 255 characters.
5819 &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.
5820 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5821 # The default is set to false.
5822 &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.
5823 # 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.
5824 # The value must be between 1 and 1024 characters.
5825 &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.
5826 # 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.
5827 # The value must be between 1 and 1024 characters.
5828 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5829 # Supported values are:
5830 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5831 # - FOUND, which corresponds to 302.
5832 # - SEE_OTHER which corresponds to 303.
5833 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5834 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5835 &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.
5836 # The default is set to false.
5837 },
5838 },
5839 ],
5840 &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.
5841 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
5842 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
5843 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
5844 # The description can have a maximum length of 1024 characters.
5845 &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.
5846 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
5847 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5848 { # Specification determining how headers are added to requests or responses.
5849 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5850 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5851 &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.
5852 # The default value is false.
5853 },
5854 ],
5855 &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.
5856 &quot;A String&quot;,
5857 ],
5858 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5859 { # Specification determining how headers are added to requests or responses.
5860 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5861 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5862 &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.
5863 # The default value is false.
5864 },
5865 ],
5866 &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.
5867 &quot;A String&quot;,
5868 ],
5869 },
5870 &quot;matchRules&quot;: [
5871 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
5872 &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.
5873 # fullPathMatch must be between 1 and 1024 characters.
5874 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5875 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
5876 { # matchRule criteria for request header matches.
5877 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
5878 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5879 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
5880 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
5881 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
5882 &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.
5883 # The default setting is false.
5884 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
5885 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5886 &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.
5887 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5888 &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.
5889 # For example for a range [-5, 0]
5890 # - -3 will match.
5891 # - 0 will not match.
5892 # - 0.25 will not match.
5893 # - -3someString will not match.
5894 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5895 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5896 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
5897 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
5898 },
5899 &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
5900 # 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.
5901 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5902 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
5903 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
5904 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5905 },
5906 ],
5907 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
5908 # The default value is false.
5909 # ignoreCase must not be used with regexMatch.
5910 &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. If a match takes place, the relevant routing configuration is made available to those proxies.
5911 # 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.
5912 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
5913 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
5914 { # 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.
5915 # 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.
5916 # 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.
5917 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
5918 # This list must not be empty and can have at the most 64 entries.
5919 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
5920 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
5921 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
5922 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
5923 # value can have a maximum length of 1024 characters.
5924 },
5925 ],
5926 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
5927 # Supported values are:
5928 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
5929 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
5930 },
5931 ],
5932 &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 /.
5933 # The value must be between 1 and 1024 characters.
5934 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5935 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
5936 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
5937 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
5938 # Only one of presentMatch, exactMatch or regexMatch must be set.
5939 &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.
5940 &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.
5941 # Only one of presentMatch, exactMatch or regexMatch must be set.
5942 &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
5943 # Only one of presentMatch, exactMatch or regexMatch must be set.
5944 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
5945 },
5946 ],
5947 &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
5948 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5949 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
5950 },
5951 ],
5952 &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.
5953 # 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.
5954 # 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.
5955 &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.
5956 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5957 &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
5958 &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.
5959 # Default is false.
5960 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
5961 &quot;A String&quot;,
5962 ],
5963 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
5964 &quot;A String&quot;,
5965 ],
5966 &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
5967 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5968 &quot;A String&quot;,
5969 ],
5970 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
5971 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5972 &quot;A String&quot;,
5973 ],
5974 &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.
5975 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
5976 &quot;A String&quot;,
5977 ],
5978 &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.
5979 },
5980 &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.
5981 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
5982 &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.
5983 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
5984 # The value must be between 200 and 599 inclusive.
5985 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5986 # The value must be between 0.0 and 100.0 inclusive.
5987 },
5988 &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.
5989 &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.
5990 &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.
5991 &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
5992 },
5993 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5994 # The value must be between 0.0 and 100.0 inclusive.
5995 },
5996 },
5997 &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.
5998 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
5999 },
6000 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
6001 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
6002 &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.
6003 # 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.
6004 &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.
6005 &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
6006 },
6007 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
6008 # - 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.
6009 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
6010 # -
6011 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
6012 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
6013 # - 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.
6014 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
6015 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
6016 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
6017 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
6018 &quot;A String&quot;,
6019 ],
6020 },
6021 &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.
6022 # If not specified, will use the largest timeout among all backend services associated with the route.
6023 &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.
6024 &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
6025 },
6026 &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.
6027 &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.
6028 # The value must be between 1 and 255 characters.
6029 &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.
6030 # The value must be between 1 and 1024 characters.
6031 },
6032 &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 0 number.
6033 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
6034 { # 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
6035 &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.
6036 &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.
6037 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
6038 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
6039 { # Specification determining how headers are added to requests or responses.
6040 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6041 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6042 &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.
6043 # The default value is false.
6044 },
6045 ],
6046 &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.
6047 &quot;A String&quot;,
6048 ],
6049 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
6050 { # Specification determining how headers are added to requests or responses.
6051 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
6052 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
6053 &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.
6054 # The default value is false.
6055 },
6056 ],
6057 &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.
6058 &quot;A String&quot;,
6059 ],
6060 },
6061 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
6062 # 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.
6063 # The value must be between 0 and 1000
6064 },
6065 ],
6066 },
6067 &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.
6068 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
6069 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
6070 # If urlRedirect is specified, service or routeAction must not be set.
6071 &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.
6072 # The value must be between 1 and 255 characters.
6073 &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.
6074 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
6075 # The default is set to false.
6076 &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.
6077 # 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.
6078 # The value must be between 1 and 1024 characters.
6079 &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.
6080 # 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.
6081 # The value must be between 1 and 1024 characters.
6082 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
6083 # Supported values are:
6084 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
6085 # - FOUND, which corresponds to 302.
6086 # - SEE_OTHER which corresponds to 303.
6087 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
6088 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
6089 &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.
6090 # The default is set to false.
6091 },
6092 },
6093 ],
6094 },
6095 ],
6096 &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.
6097 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6098 &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.
6099 { # Message for the expected URL mappings.
6100 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
6101 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL.
6102 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
6103 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService resource the given URL should be mapped to.
6104 },
6105 ],
6106 },
Craig Citro065b5302014-08-14 00:47:23 -07006107 }
6108
6109
6110Returns:
6111 An object of the form:
6112
6113 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006114 &quot;result&quot;: { # Message representing the validation result for a UrlMap.
6115 &quot;loadErrors&quot;: [
6116 &quot;A String&quot;,
6117 ],
6118 &quot;loadSucceeded&quot;: True or False, # Whether the given UrlMap can be successfully loaded. If false, &#x27;loadErrors&#x27; indicates the reasons.
6119 &quot;testFailures&quot;: [
Craig Citro065b5302014-08-14 00:47:23 -07006120 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006121 &quot;actualService&quot;: &quot;A String&quot;,
6122 &quot;expectedService&quot;: &quot;A String&quot;,
6123 &quot;host&quot;: &quot;A String&quot;,
6124 &quot;path&quot;: &quot;A String&quot;,
Craig Citro065b5302014-08-14 00:47:23 -07006125 },
6126 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07006127 &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.
Craig Citro065b5302014-08-14 00:47:23 -07006128 },
6129 }</pre>
6130</div>
6131
6132</body></html>