blob: 359d56915f04a8a3004099bd4eaecb602a576238 [file] [log] [blame]
Bu Sun Kim65020912020-05-20 12:08:20 -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.regionUrlMaps.html">regionUrlMaps</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070081 <code><a href="#delete">delete(project, region, urlMap, requestId=None)</a></code></p>
82<p class="firstline">Deletes the specified UrlMap resource.</p>
83<p class="toc_element">
84 <code><a href="#get">get(project, region, urlMap)</a></code></p>
85<p class="firstline">Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.</p>
86<p class="toc_element">
87 <code><a href="#insert">insert(project, region, body=None, requestId=None)</a></code></p>
88<p class="firstline">Creates a UrlMap resource in the specified project using the data included in the request.</p>
89<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070090 <code><a href="#list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kim65020912020-05-20 12:08:20 -070091<p class="firstline">Retrieves the list of UrlMap resources available to the specified project in the specified region.</p>
92<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
96 <code><a href="#patch">patch(project, region, urlMap, body=None, requestId=None)</a></code></p>
97<p class="firstline">Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.</p>
98<p class="toc_element">
99 <code><a href="#update">update(project, region, urlMap, body=None, requestId=None)</a></code></p>
100<p class="firstline">Updates the specified UrlMap resource with the data included in the request.</p>
101<p class="toc_element">
102 <code><a href="#validate">validate(project, region, urlMap, body=None)</a></code></p>
103<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>
104<h3>Method Details</h3>
105<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700106 <code class="details" id="close">close()</code>
107 <pre>Close httplib2 connections.</pre>
108</div>
109
110<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700111 <code class="details" id="delete">delete(project, region, urlMap, requestId=None)</code>
112 <pre>Deletes the specified UrlMap resource.
113
114Args:
115 project: string, Project ID for this request. (required)
116 region: string, Name of the region scoping this request. (required)
117 urlMap: string, Name of the UrlMap resource to delete. (required)
118 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
119
120Returns:
121 An object of the form:
122
123 { # Represents an Operation resource.
124 #
125 # Google Compute Engine has three Operation resources:
126 #
127 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
128 #
129 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
130 #
131 # Operations can be global, regional or zonal.
132 # - For global operations, use the `globalOperations` resource.
133 # - For regional operations, use the `regionOperations` resource.
134 # - For zonal operations, use the `zonalOperations` resource.
135 #
136 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
137 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
138 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
139 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
140 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
141 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
142 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
143 {
144 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
145 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
146 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
147 },
148 ],
149 },
150 &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`.
151 &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.
152 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
153 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
154 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
155 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
156 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
157 &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.
158 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
159 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
160 &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.
161 &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`.
162 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
163 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
164 &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.
165 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
166 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
167 {
168 &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.
169 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
170 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
171 {
172 &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).
173 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
174 },
175 ],
176 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
177 },
178 ],
179 &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.
180 }</pre>
181</div>
182
183<div class="method">
184 <code class="details" id="get">get(project, region, urlMap)</code>
185 <pre>Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.
186
187Args:
188 project: string, Project ID for this request. (required)
189 region: string, Name of the region scoping this request. (required)
190 urlMap: string, Name of the UrlMap resource to return. (required)
191
192Returns:
193 An object of the form:
194
195 { # Represents a URL Map resource.
196 #
197 # Google Compute Engine has two URL Map resources:
198 #
199 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
200 #
201 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
202 #
203 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
204 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700205 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
206 #
207 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
208 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700209 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
210 #
211 # 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.
212 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
213 &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.
214 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700215 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700216 # defaultRouteAction has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700217 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700218 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700219 &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.
220 # Default is false.
221 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
222 &quot;A String&quot;,
223 ],
224 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
225 &quot;A String&quot;,
226 ],
227 &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
228 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
229 &quot;A String&quot;,
230 ],
231 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
232 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
233 &quot;A String&quot;,
234 ],
235 &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.
236 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
237 &quot;A String&quot;,
238 ],
239 &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.
240 },
241 &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.
242 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700243 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700244 &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.
245 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
246 # The value must be between 200 and 599 inclusive.
247 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
248 # The value must be between 0.0 and 100.0 inclusive.
249 },
250 &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.
251 &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.
252 &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.
253 &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
254 },
255 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
256 # The value must be between 0.0 and 100.0 inclusive.
257 },
258 },
259 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700260 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700261 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
262 },
263 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700264 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700265 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
266 &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.
267 # 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.
268 &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.
269 &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
270 },
271 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
272 # - 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.
273 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
274 # -
275 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
276 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
277 # - 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.
278 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
279 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
280 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
281 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
282 &quot;A String&quot;,
283 ],
284 },
285 &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.
286 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700287 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700288 &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.
289 &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
290 },
291 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700292 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700293 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700294 &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.
295 # The value must be between 1 and 255 characters.
296 &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.
297 # The value must be between 1 and 1024 characters.
298 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700299 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
300 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -0700301 { # 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
302 &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.
303 &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.
304 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700305 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
306 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700307 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
308 { # Specification determining how headers are added to requests or responses.
309 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
310 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
311 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
312 # The default value is false.
313 },
314 ],
315 &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.
316 &quot;A String&quot;,
317 ],
318 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
319 { # Specification determining how headers are added to requests or responses.
320 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
321 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
322 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
323 # The default value is false.
324 },
325 ],
326 &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.
327 &quot;A String&quot;,
328 ],
329 },
330 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
331 # 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.
332 # The value must be between 0 and 1000
333 },
334 ],
335 },
336 &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.
337 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700338 # defaultService has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700339 &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.
340 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700341 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700342 &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.
343 # The value must be between 1 and 255 characters.
344 &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.
345 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
346 # The default is set to false.
347 &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.
348 # 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.
349 # The value must be between 1 and 1024 characters.
350 &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.
351 # 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.
352 # The value must be between 1 and 1024 characters.
353 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
354 # Supported values are:
355 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
356 # - FOUND, which corresponds to 302.
357 # - SEE_OTHER which corresponds to 303.
358 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
359 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
360 &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.
361 # The default is set to false.
362 },
363 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
364 &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.
365 #
366 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
367 &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.
368 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700369 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
370 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700371 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
372 { # Specification determining how headers are added to requests or responses.
373 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
374 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
375 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
376 # The default value is false.
377 },
378 ],
379 &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.
380 &quot;A String&quot;,
381 ],
382 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
383 { # Specification determining how headers are added to requests or responses.
384 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
385 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
386 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
387 # The default value is false.
388 },
389 ],
390 &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.
391 &quot;A String&quot;,
392 ],
393 },
394 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
395 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
396 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
397 &quot;hosts&quot;: [ # The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or ..
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700398 # * based matching is not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700399 &quot;A String&quot;,
400 ],
401 &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.
402 },
403 ],
404 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
405 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
406 &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.
407 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
408 { # 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.
409 &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.
410 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700411 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathMatcher&#x27;s defaultRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -0700412 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700413 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700414 &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.
415 # Default is false.
416 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
417 &quot;A String&quot;,
418 ],
419 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
420 &quot;A String&quot;,
421 ],
422 &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
423 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
424 &quot;A String&quot;,
425 ],
426 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
427 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
428 &quot;A String&quot;,
429 ],
430 &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.
431 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
432 &quot;A String&quot;,
433 ],
434 &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.
435 },
436 &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.
437 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700438 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700439 &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.
440 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
441 # The value must be between 200 and 599 inclusive.
442 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
443 # The value must be between 0.0 and 100.0 inclusive.
444 },
445 &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.
446 &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.
447 &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.
448 &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
449 },
450 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
451 # The value must be between 0.0 and 100.0 inclusive.
452 },
453 },
454 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700455 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700456 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
457 },
458 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700459 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700460 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
461 &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.
462 # 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.
463 &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.
464 &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
465 },
466 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
467 # - 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.
468 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
469 # -
470 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
471 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
472 # - 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.
473 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
474 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
475 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
476 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
477 &quot;A String&quot;,
478 ],
479 },
480 &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.
481 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700482 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700483 &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.
484 &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
485 },
486 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700487 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700488 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700489 &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.
490 # The value must be between 1 and 255 characters.
491 &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.
492 # The value must be between 1 and 1024 characters.
493 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700494 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
495 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -0700496 { # 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
497 &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.
498 &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.
499 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700500 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
501 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700502 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
503 { # Specification determining how headers are added to requests or responses.
504 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
505 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
506 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
507 # The default value is false.
508 },
509 ],
510 &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.
511 &quot;A String&quot;,
512 ],
513 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
514 { # Specification determining how headers are added to requests or responses.
515 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
516 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
517 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
518 # The default value is false.
519 },
520 ],
521 &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.
522 &quot;A String&quot;,
523 ],
524 },
525 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
526 # 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.
527 # The value must be between 0 and 1000
528 },
529 ],
530 },
531 &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:
532 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
533 # - compute/v1/projects/project/global/backendServices/backendService
534 # - 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.
535 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
536 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
537 # - compute.backendBuckets.use
538 # - compute.backendServices.use
539 &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.
540 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700541 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700542 &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.
543 # The value must be between 1 and 255 characters.
544 &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.
545 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
546 # The default is set to false.
547 &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.
548 # 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.
549 # The value must be between 1 and 1024 characters.
550 &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.
551 # 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.
552 # The value must be between 1 and 1024 characters.
553 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
554 # Supported values are:
555 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
556 # - FOUND, which corresponds to 302.
557 # - SEE_OTHER which corresponds to 303.
558 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
559 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
560 &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.
561 # The default is set to false.
562 },
563 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
564 &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.
565 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700566 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
567 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700568 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
569 { # Specification determining how headers are added to requests or responses.
570 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
571 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
572 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
573 # The default value is false.
574 },
575 ],
576 &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.
577 &quot;A String&quot;,
578 ],
579 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
580 { # Specification determining how headers are added to requests or responses.
581 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
582 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
583 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
584 # The default value is false.
585 },
586 ],
587 &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.
588 &quot;A String&quot;,
589 ],
590 },
591 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
592 &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.
593 # 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.
594 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
595 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
596 &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.
597 &quot;A String&quot;,
598 ],
599 &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.
600 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700601 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -0700602 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700603 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700604 &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.
605 # Default is false.
606 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
607 &quot;A String&quot;,
608 ],
609 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
610 &quot;A String&quot;,
611 ],
612 &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
613 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
614 &quot;A String&quot;,
615 ],
616 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
617 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
618 &quot;A String&quot;,
619 ],
620 &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.
621 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
622 &quot;A String&quot;,
623 ],
624 &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.
625 },
626 &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.
627 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700628 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700629 &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.
630 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
631 # The value must be between 200 and 599 inclusive.
632 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
633 # The value must be between 0.0 and 100.0 inclusive.
634 },
635 &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.
636 &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.
637 &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.
638 &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
639 },
640 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
641 # The value must be between 0.0 and 100.0 inclusive.
642 },
643 },
644 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700645 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700646 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
647 },
648 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700649 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700650 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
651 &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.
652 # 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.
653 &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.
654 &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
655 },
656 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
657 # - 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.
658 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
659 # -
660 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
661 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
662 # - 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.
663 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
664 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
665 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
666 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
667 &quot;A String&quot;,
668 ],
669 },
670 &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.
671 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700672 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700673 &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.
674 &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
675 },
676 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700677 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700678 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700679 &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.
680 # The value must be between 1 and 255 characters.
681 &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.
682 # The value must be between 1 and 1024 characters.
683 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700684 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
685 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -0700686 { # 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
687 &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.
688 &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.
689 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700690 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
691 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700692 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
693 { # Specification determining how headers are added to requests or responses.
694 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
695 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
696 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
697 # The default value is false.
698 },
699 ],
700 &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.
701 &quot;A String&quot;,
702 ],
703 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
704 { # Specification determining how headers are added to requests or responses.
705 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
706 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
707 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
708 # The default value is false.
709 },
710 ],
711 &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.
712 &quot;A String&quot;,
713 ],
714 },
715 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
716 # 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.
717 # The value must be between 0 and 1000
718 },
719 ],
720 },
721 &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.
722 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
723 &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.
724 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700725 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700726 &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.
727 # The value must be between 1 and 255 characters.
728 &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.
729 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
730 # The default is set to false.
731 &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.
732 # 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.
733 # The value must be between 1 and 1024 characters.
734 &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.
735 # 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.
736 # The value must be between 1 and 1024 characters.
737 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
738 # Supported values are:
739 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
740 # - FOUND, which corresponds to 302.
741 # - SEE_OTHER which corresponds to 303.
742 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
743 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
744 &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.
745 # The default is set to false.
746 },
747 },
748 ],
749 &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.
750 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
751 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
752 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
753 # The description can have a maximum length of 1024 characters.
754 &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.
755 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700756 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
757 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700758 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
759 { # Specification determining how headers are added to requests or responses.
760 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
761 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
762 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
763 # The default value is false.
764 },
765 ],
766 &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.
767 &quot;A String&quot;,
768 ],
769 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
770 { # Specification determining how headers are added to requests or responses.
771 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
772 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
773 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
774 # The default value is false.
775 },
776 ],
777 &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.
778 &quot;A String&quot;,
779 ],
780 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700781 &quot;matchRules&quot;: [ # The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
Bu Sun Kim65020912020-05-20 12:08:20 -0700782 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
783 &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.
784 # fullPathMatch must be between 1 and 1024 characters.
785 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
786 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
787 { # matchRule criteria for request header matches.
788 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
789 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
790 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
791 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
792 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700793 # When the URL map is bound to target gRPC proxy that has validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin.
Bu Sun Kim65020912020-05-20 12:08:20 -0700794 &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.
795 # The default setting is false.
796 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
797 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
798 &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.
799 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
800 &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.
801 # For example for a range [-5, 0]
802 # - -3 will match.
803 # - 0 will not match.
804 # - 0.25 will not match.
805 # - -3someString will not match.
806 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
807 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
808 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
809 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
810 },
811 &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
812 # 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.
813 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
814 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
815 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
816 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
817 },
818 ],
819 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
820 # The default value is false.
821 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700822 # Not supported when the URL map is bound to target gRPC proxy.
823 &quot;metadataFilters&quot;: [ # Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set of xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. When there is a match, the relevant routing configuration is made available to those proxies.
824 # For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata. If multiple metadataFilters are specified, all of them need to be satisfied in order to be considered a match.
Bu Sun Kim65020912020-05-20 12:08:20 -0700825 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
826 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700827 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700828 { # 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.
829 # 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.
830 # 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.
831 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
832 # This list must not be empty and can have at the most 64 entries.
833 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
834 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
835 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
836 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
837 # value can have a maximum length of 1024 characters.
838 },
839 ],
840 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
841 # Supported values are:
842 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
843 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
844 },
845 ],
846 &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 /.
847 # The value must be between 1 and 1024 characters.
848 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
849 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700850 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700851 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
852 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
853 # Only one of presentMatch, exactMatch or regexMatch must be set.
854 &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.
855 &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.
856 # Only one of presentMatch, exactMatch or regexMatch must be set.
857 &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
858 # Only one of presentMatch, exactMatch or regexMatch must be set.
859 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
860 },
861 ],
862 &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
863 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
864 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
865 },
866 ],
867 &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.
868 # 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.
869 # 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.
870 &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.
871 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700872 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a routeRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -0700873 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700874 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700875 &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.
876 # Default is false.
877 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
878 &quot;A String&quot;,
879 ],
880 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
881 &quot;A String&quot;,
882 ],
883 &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
884 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
885 &quot;A String&quot;,
886 ],
887 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
888 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
889 &quot;A String&quot;,
890 ],
891 &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.
892 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
893 &quot;A String&quot;,
894 ],
895 &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.
896 },
897 &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.
898 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700899 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700900 &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.
901 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
902 # The value must be between 200 and 599 inclusive.
903 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
904 # The value must be between 0.0 and 100.0 inclusive.
905 },
906 &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.
907 &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.
908 &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.
909 &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
910 },
911 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
912 # The value must be between 0.0 and 100.0 inclusive.
913 },
914 },
915 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700916 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700917 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
918 },
919 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700920 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700921 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
922 &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.
923 # 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.
924 &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.
925 &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
926 },
927 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
928 # - 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.
929 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
930 # -
931 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
932 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
933 # - 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.
934 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
935 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
936 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
937 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
938 &quot;A String&quot;,
939 ],
940 },
941 &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.
942 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700943 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700944 &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.
945 &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
946 },
947 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700948 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700949 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700950 &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.
951 # The value must be between 1 and 255 characters.
952 &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.
953 # The value must be between 1 and 1024 characters.
954 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700955 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
956 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -0700957 { # 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
958 &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.
959 &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.
960 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700961 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
962 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700963 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
964 { # Specification determining how headers are added to requests or responses.
965 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
966 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
967 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
968 # The default value is false.
969 },
970 ],
971 &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.
972 &quot;A String&quot;,
973 ],
974 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
975 { # Specification determining how headers are added to requests or responses.
976 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
977 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
978 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
979 # The default value is false.
980 },
981 ],
982 &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.
983 &quot;A String&quot;,
984 ],
985 },
986 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
987 # 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.
988 # The value must be between 0 and 1000
989 },
990 ],
991 },
992 &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.
993 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
994 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
995 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700996 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700997 &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.
998 # The value must be between 1 and 255 characters.
999 &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.
1000 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1001 # The default is set to false.
1002 &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.
1003 # 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.
1004 # The value must be between 1 and 1024 characters.
1005 &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.
1006 # 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.
1007 # The value must be between 1 and 1024 characters.
1008 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
1009 # Supported values are:
1010 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1011 # - FOUND, which corresponds to 302.
1012 # - SEE_OTHER which corresponds to 303.
1013 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1014 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1015 &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.
1016 # The default is set to false.
1017 },
1018 },
1019 ],
1020 },
1021 ],
1022 &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.
1023 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1024 &quot;tests&quot;: [ # The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001025 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001026 { # Message for the expected URL mappings.
1027 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001028 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL. If headers contains a host header, then host must also match the header value.
Bu Sun Kim65020912020-05-20 12:08:20 -07001029 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001030 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
1031 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07001032 },
1033 ],
1034 }</pre>
1035</div>
1036
1037<div class="method">
1038 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
1039 <pre>Creates a UrlMap resource in the specified project using the data included in the request.
1040
1041Args:
1042 project: string, Project ID for this request. (required)
1043 region: string, Name of the region scoping this request. (required)
1044 body: object, The request body.
1045 The object takes the form of:
1046
1047{ # Represents a URL Map resource.
1048 #
1049 # Google Compute Engine has two URL Map resources:
1050 #
1051 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
1052 #
1053 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
1054 #
1055 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
1056 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001057 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
1058 #
1059 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
1060 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001061 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
1062 #
1063 # 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.
1064 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1065 &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.
1066 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001067 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001068 # defaultRouteAction has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001069 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001070 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001071 &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.
1072 # Default is false.
1073 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
1074 &quot;A String&quot;,
1075 ],
1076 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
1077 &quot;A String&quot;,
1078 ],
1079 &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
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;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
1084 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1085 &quot;A String&quot;,
1086 ],
1087 &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.
1088 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
1089 &quot;A String&quot;,
1090 ],
1091 &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.
1092 },
1093 &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.
1094 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001095 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001096 &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.
1097 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
1098 # The value must be between 200 and 599 inclusive.
1099 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1100 # The value must be between 0.0 and 100.0 inclusive.
1101 },
1102 &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.
1103 &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.
1104 &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.
1105 &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
1106 },
1107 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1108 # The value must be between 0.0 and 100.0 inclusive.
1109 },
1110 },
1111 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001112 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001113 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
1114 },
1115 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001116 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001117 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1118 &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.
1119 # 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.
1120 &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.
1121 &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
1122 },
1123 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1124 # - 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.
1125 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1126 # -
1127 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1128 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1129 # - 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.
1130 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1131 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1132 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1133 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1134 &quot;A String&quot;,
1135 ],
1136 },
1137 &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.
1138 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001139 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001140 &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.
1141 &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
1142 },
1143 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001144 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001145 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001146 &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.
1147 # The value must be between 1 and 255 characters.
1148 &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.
1149 # The value must be between 1 and 1024 characters.
1150 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001151 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
1152 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07001153 { # 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
1154 &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.
1155 &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.
1156 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001157 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1158 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001159 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1160 { # Specification determining how headers are added to requests or responses.
1161 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1162 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1163 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1164 # The default value is false.
1165 },
1166 ],
1167 &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.
1168 &quot;A String&quot;,
1169 ],
1170 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1171 { # Specification determining how headers are added to requests or responses.
1172 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1173 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1174 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1175 # The default value is false.
1176 },
1177 ],
1178 &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.
1179 &quot;A String&quot;,
1180 ],
1181 },
1182 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1183 # 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.
1184 # The value must be between 0 and 1000
1185 },
1186 ],
1187 },
1188 &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.
1189 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001190 # defaultService has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001191 &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.
1192 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001193 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001194 &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.
1195 # The value must be between 1 and 255 characters.
1196 &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.
1197 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1198 # The default is set to false.
1199 &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.
1200 # 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.
1201 # The value must be between 1 and 1024 characters.
1202 &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.
1203 # 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.
1204 # The value must be between 1 and 1024 characters.
1205 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
1206 # Supported values are:
1207 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1208 # - FOUND, which corresponds to 302.
1209 # - SEE_OTHER which corresponds to 303.
1210 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1211 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1212 &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.
1213 # The default is set to false.
1214 },
1215 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1216 &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.
1217 #
1218 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
1219 &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.
1220 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001221 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1222 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001223 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1224 { # Specification determining how headers are added to requests or responses.
1225 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1226 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1227 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1228 # The default value is false.
1229 },
1230 ],
1231 &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.
1232 &quot;A String&quot;,
1233 ],
1234 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1235 { # Specification determining how headers are added to requests or responses.
1236 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1237 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1238 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1239 # The default value is false.
1240 },
1241 ],
1242 &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.
1243 &quot;A String&quot;,
1244 ],
1245 },
1246 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
1247 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
1248 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1249 &quot;hosts&quot;: [ # The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or ..
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001250 # * based matching is not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001251 &quot;A String&quot;,
1252 ],
1253 &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.
1254 },
1255 ],
1256 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1257 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
1258 &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.
1259 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
1260 { # 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.
1261 &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.
1262 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001263 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathMatcher&#x27;s defaultRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07001264 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001265 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001266 &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.
1267 # Default is false.
1268 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
1269 &quot;A String&quot;,
1270 ],
1271 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
1272 &quot;A String&quot;,
1273 ],
1274 &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
1275 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1276 &quot;A String&quot;,
1277 ],
1278 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
1279 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1280 &quot;A String&quot;,
1281 ],
1282 &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.
1283 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
1284 &quot;A String&quot;,
1285 ],
1286 &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.
1287 },
1288 &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.
1289 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001290 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001291 &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.
1292 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
1293 # The value must be between 200 and 599 inclusive.
1294 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1295 # The value must be between 0.0 and 100.0 inclusive.
1296 },
1297 &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.
1298 &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.
1299 &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.
1300 &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
1301 },
1302 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1303 # The value must be between 0.0 and 100.0 inclusive.
1304 },
1305 },
1306 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001307 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001308 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
1309 },
1310 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001311 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001312 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1313 &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.
1314 # 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.
1315 &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.
1316 &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
1317 },
1318 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1319 # - 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.
1320 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1321 # -
1322 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1323 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1324 # - 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.
1325 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1326 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1327 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1328 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1329 &quot;A String&quot;,
1330 ],
1331 },
1332 &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.
1333 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001334 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001335 &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.
1336 &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
1337 },
1338 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001339 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001340 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001341 &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.
1342 # The value must be between 1 and 255 characters.
1343 &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.
1344 # The value must be between 1 and 1024 characters.
1345 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001346 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
1347 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07001348 { # 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
1349 &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.
1350 &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.
1351 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001352 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1353 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001354 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1355 { # Specification determining how headers are added to requests or responses.
1356 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1357 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1358 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1359 # The default value is false.
1360 },
1361 ],
1362 &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.
1363 &quot;A String&quot;,
1364 ],
1365 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1366 { # Specification determining how headers are added to requests or responses.
1367 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1368 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1369 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1370 # The default value is false.
1371 },
1372 ],
1373 &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.
1374 &quot;A String&quot;,
1375 ],
1376 },
1377 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1378 # 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.
1379 # The value must be between 0 and 1000
1380 },
1381 ],
1382 },
1383 &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:
1384 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
1385 # - compute/v1/projects/project/global/backendServices/backendService
1386 # - 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.
1387 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
1388 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
1389 # - compute.backendBuckets.use
1390 # - compute.backendServices.use
1391 &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.
1392 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001393 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001394 &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.
1395 # The value must be between 1 and 255 characters.
1396 &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.
1397 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1398 # The default is set to false.
1399 &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.
1400 # 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.
1401 # The value must be between 1 and 1024 characters.
1402 &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.
1403 # 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.
1404 # The value must be between 1 and 1024 characters.
1405 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
1406 # Supported values are:
1407 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1408 # - FOUND, which corresponds to 302.
1409 # - SEE_OTHER which corresponds to 303.
1410 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1411 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1412 &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.
1413 # The default is set to false.
1414 },
1415 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1416 &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.
1417 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001418 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1419 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001420 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1421 { # Specification determining how headers are added to requests or responses.
1422 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1423 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1424 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1425 # The default value is false.
1426 },
1427 ],
1428 &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.
1429 &quot;A String&quot;,
1430 ],
1431 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1432 { # Specification determining how headers are added to requests or responses.
1433 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1434 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1435 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1436 # The default value is false.
1437 },
1438 ],
1439 &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.
1440 &quot;A String&quot;,
1441 ],
1442 },
1443 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
1444 &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.
1445 # 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.
1446 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
1447 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
1448 &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.
1449 &quot;A String&quot;,
1450 ],
1451 &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.
1452 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001453 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07001454 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001455 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001456 &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.
1457 # Default is false.
1458 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
1459 &quot;A String&quot;,
1460 ],
1461 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
1462 &quot;A String&quot;,
1463 ],
1464 &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
1465 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1466 &quot;A String&quot;,
1467 ],
1468 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
1469 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1470 &quot;A String&quot;,
1471 ],
1472 &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.
1473 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
1474 &quot;A String&quot;,
1475 ],
1476 &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.
1477 },
1478 &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.
1479 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001480 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001481 &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.
1482 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
1483 # The value must be between 200 and 599 inclusive.
1484 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1485 # The value must be between 0.0 and 100.0 inclusive.
1486 },
1487 &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.
1488 &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.
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;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1493 # The value must be between 0.0 and 100.0 inclusive.
1494 },
1495 },
1496 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001497 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001498 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
1499 },
1500 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001501 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001502 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1503 &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.
1504 # 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.
1505 &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.
1506 &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
1507 },
1508 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1509 # - 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.
1510 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1511 # -
1512 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1513 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1514 # - 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.
1515 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1516 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1517 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1518 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1519 &quot;A String&quot;,
1520 ],
1521 },
1522 &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.
1523 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001524 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001525 &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.
1526 &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
1527 },
1528 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001529 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001530 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001531 &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.
1532 # The value must be between 1 and 255 characters.
1533 &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.
1534 # The value must be between 1 and 1024 characters.
1535 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001536 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
1537 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07001538 { # 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
1539 &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.
1540 &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.
1541 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001542 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1543 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001544 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1545 { # Specification determining how headers are added to requests or responses.
1546 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1547 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1548 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1549 # The default value is false.
1550 },
1551 ],
1552 &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.
1553 &quot;A String&quot;,
1554 ],
1555 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1556 { # Specification determining how headers are added to requests or responses.
1557 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1558 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1559 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1560 # The default value is false.
1561 },
1562 ],
1563 &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.
1564 &quot;A String&quot;,
1565 ],
1566 },
1567 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1568 # 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.
1569 # The value must be between 0 and 1000
1570 },
1571 ],
1572 },
1573 &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.
1574 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1575 &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.
1576 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001577 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001578 &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.
1579 # The value must be between 1 and 255 characters.
1580 &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.
1581 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1582 # The default is set to false.
1583 &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.
1584 # 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.
1585 # The value must be between 1 and 1024 characters.
1586 &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.
1587 # 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.
1588 # The value must be between 1 and 1024 characters.
1589 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
1590 # Supported values are:
1591 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1592 # - FOUND, which corresponds to 302.
1593 # - SEE_OTHER which corresponds to 303.
1594 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1595 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1596 &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.
1597 # The default is set to false.
1598 },
1599 },
1600 ],
1601 &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.
1602 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
1603 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
1604 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
1605 # The description can have a maximum length of 1024 characters.
1606 &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.
1607 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001608 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1609 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001610 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1611 { # Specification determining how headers are added to requests or responses.
1612 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1613 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1614 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1615 # The default value is false.
1616 },
1617 ],
1618 &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.
1619 &quot;A String&quot;,
1620 ],
1621 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1622 { # Specification determining how headers are added to requests or responses.
1623 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1624 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1625 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1626 # The default value is false.
1627 },
1628 ],
1629 &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.
1630 &quot;A String&quot;,
1631 ],
1632 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001633 &quot;matchRules&quot;: [ # The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
Bu Sun Kim65020912020-05-20 12:08:20 -07001634 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
1635 &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.
1636 # fullPathMatch must be between 1 and 1024 characters.
1637 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
1638 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
1639 { # matchRule criteria for request header matches.
1640 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
1641 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1642 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
1643 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
1644 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001645 # When the URL map is bound to target gRPC proxy that has validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin.
Bu Sun Kim65020912020-05-20 12:08:20 -07001646 &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.
1647 # The default setting is false.
1648 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
1649 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1650 &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.
1651 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1652 &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.
1653 # For example for a range [-5, 0]
1654 # - -3 will match.
1655 # - 0 will not match.
1656 # - 0.25 will not match.
1657 # - -3someString will not match.
1658 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1659 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1660 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
1661 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
1662 },
1663 &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
1664 # 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.
1665 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1666 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
1667 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
1668 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1669 },
1670 ],
1671 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
1672 # The default value is false.
1673 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001674 # Not supported when the URL map is bound to target gRPC proxy.
1675 &quot;metadataFilters&quot;: [ # Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set of xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. When there is a match, the relevant routing configuration is made available to those proxies.
1676 # For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata. If multiple metadataFilters are specified, all of them need to be satisfied in order to be considered a match.
Bu Sun Kim65020912020-05-20 12:08:20 -07001677 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
1678 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001679 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001680 { # 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.
1681 # 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.
1682 # 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.
1683 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
1684 # This list must not be empty and can have at the most 64 entries.
1685 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
1686 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
1687 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
1688 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
1689 # value can have a maximum length of 1024 characters.
1690 },
1691 ],
1692 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
1693 # Supported values are:
1694 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
1695 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
1696 },
1697 ],
1698 &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 /.
1699 # The value must be between 1 and 1024 characters.
1700 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
1701 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001702 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001703 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
1704 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
1705 # Only one of presentMatch, exactMatch or regexMatch must be set.
1706 &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.
1707 &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.
1708 # Only one of presentMatch, exactMatch or regexMatch must be set.
1709 &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
1710 # Only one of presentMatch, exactMatch or regexMatch must be set.
1711 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
1712 },
1713 ],
1714 &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
1715 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
1716 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
1717 },
1718 ],
1719 &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.
1720 # 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.
1721 # 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.
1722 &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.
1723 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001724 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a routeRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07001725 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001726 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001727 &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.
1728 # Default is false.
1729 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
1730 &quot;A String&quot;,
1731 ],
1732 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
1733 &quot;A String&quot;,
1734 ],
1735 &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
1736 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1737 &quot;A String&quot;,
1738 ],
1739 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
1740 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1741 &quot;A String&quot;,
1742 ],
1743 &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.
1744 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
1745 &quot;A String&quot;,
1746 ],
1747 &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.
1748 },
1749 &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.
1750 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001751 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001752 &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.
1753 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
1754 # The value must be between 200 and 599 inclusive.
1755 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1756 # The value must be between 0.0 and 100.0 inclusive.
1757 },
1758 &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.
1759 &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.
1760 &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.
1761 &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
1762 },
1763 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1764 # The value must be between 0.0 and 100.0 inclusive.
1765 },
1766 },
1767 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001768 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001769 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
1770 },
1771 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001772 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001773 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1774 &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.
1775 # 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.
1776 &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.
1777 &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
1778 },
1779 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1780 # - 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.
1781 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1782 # -
1783 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1784 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1785 # - 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.
1786 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1787 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1788 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1789 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1790 &quot;A String&quot;,
1791 ],
1792 },
1793 &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.
1794 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001795 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001796 &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.
1797 &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
1798 },
1799 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001800 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001801 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001802 &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.
1803 # The value must be between 1 and 255 characters.
1804 &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.
1805 # The value must be between 1 and 1024 characters.
1806 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001807 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
1808 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07001809 { # 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
1810 &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.
1811 &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.
1812 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001813 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1814 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001815 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1816 { # Specification determining how headers are added to requests or responses.
1817 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1818 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1819 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1820 # The default value is false.
1821 },
1822 ],
1823 &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.
1824 &quot;A String&quot;,
1825 ],
1826 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1827 { # Specification determining how headers are added to requests or responses.
1828 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1829 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1830 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1831 # The default value is false.
1832 },
1833 ],
1834 &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.
1835 &quot;A String&quot;,
1836 ],
1837 },
1838 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1839 # 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.
1840 # The value must be between 0 and 1000
1841 },
1842 ],
1843 },
1844 &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.
1845 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1846 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
1847 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001848 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001849 &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.
1850 # The value must be between 1 and 255 characters.
1851 &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.
1852 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1853 # The default is set to false.
1854 &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.
1855 # 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.
1856 # The value must be between 1 and 1024 characters.
1857 &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.
1858 # 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.
1859 # The value must be between 1 and 1024 characters.
1860 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
1861 # Supported values are:
1862 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1863 # - FOUND, which corresponds to 302.
1864 # - SEE_OTHER which corresponds to 303.
1865 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1866 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1867 &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.
1868 # The default is set to false.
1869 },
1870 },
1871 ],
1872 },
1873 ],
1874 &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.
1875 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1876 &quot;tests&quot;: [ # The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001877 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001878 { # Message for the expected URL mappings.
1879 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001880 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL. If headers contains a host header, then host must also match the header value.
Bu Sun Kim65020912020-05-20 12:08:20 -07001881 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001882 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
1883 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07001884 },
1885 ],
1886}
1887
1888 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
1889
1890Returns:
1891 An object of the form:
1892
1893 { # Represents an Operation resource.
1894 #
1895 # Google Compute Engine has three Operation resources:
1896 #
1897 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1898 #
1899 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1900 #
1901 # Operations can be global, regional or zonal.
1902 # - For global operations, use the `globalOperations` resource.
1903 # - For regional operations, use the `regionOperations` resource.
1904 # - For zonal operations, use the `zonalOperations` resource.
1905 #
1906 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1907 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1908 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1909 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1910 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1911 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1912 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1913 {
1914 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1915 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1916 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1917 },
1918 ],
1919 },
1920 &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`.
1921 &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.
1922 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1923 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1924 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1925 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1926 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1927 &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.
1928 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1929 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1930 &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.
1931 &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`.
1932 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1933 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1934 &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.
1935 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1936 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1937 {
1938 &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.
1939 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1940 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1941 {
1942 &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).
1943 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1944 },
1945 ],
1946 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1947 },
1948 ],
1949 &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.
1950 }</pre>
1951</div>
1952
1953<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001954 <code class="details" id="list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07001955 <pre>Retrieves the list of UrlMap resources available to the specified project in the specified region.
1956
1957Args:
1958 project: string, Project ID for this request. (required)
1959 region: string, Name of the region scoping this request. (required)
1960 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;`.
1961
1962For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
1963
1964You 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.
1965
1966To 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) ```
1967 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`)
1968 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1969
1970You 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.
1971
1972Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1973 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001974 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Bu Sun Kim65020912020-05-20 12:08:20 -07001975
1976Returns:
1977 An object of the form:
1978
1979 { # Contains a list of UrlMap resources.
1980 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1981 &quot;items&quot;: [ # A list of UrlMap resources.
1982 { # Represents a URL Map resource.
1983 #
1984 # Google Compute Engine has two URL Map resources:
1985 #
1986 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
1987 #
1988 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
1989 #
1990 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
1991 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001992 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
1993 #
1994 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
1995 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001996 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
1997 #
1998 # 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.
1999 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2000 &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.
2001 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002002 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002003 # defaultRouteAction has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002004 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002005 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002006 &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.
2007 # Default is false.
2008 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2009 &quot;A String&quot;,
2010 ],
2011 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2012 &quot;A String&quot;,
2013 ],
2014 &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
2015 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2016 &quot;A String&quot;,
2017 ],
2018 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2019 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2020 &quot;A String&quot;,
2021 ],
2022 &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.
2023 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2024 &quot;A String&quot;,
2025 ],
2026 &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.
2027 },
2028 &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.
2029 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002030 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002031 &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.
2032 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2033 # The value must be between 200 and 599 inclusive.
2034 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2035 # The value must be between 0.0 and 100.0 inclusive.
2036 },
2037 &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.
2038 &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.
2039 &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.
2040 &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
2041 },
2042 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2043 # The value must be between 0.0 and 100.0 inclusive.
2044 },
2045 },
2046 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002047 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002048 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2049 },
2050 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002051 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002052 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2053 &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.
2054 # 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.
2055 &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.
2056 &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
2057 },
2058 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2059 # - 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.
2060 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2061 # -
2062 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2063 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2064 # - 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.
2065 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2066 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2067 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2068 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2069 &quot;A String&quot;,
2070 ],
2071 },
2072 &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.
2073 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002074 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002075 &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.
2076 &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
2077 },
2078 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002079 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002080 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002081 &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.
2082 # The value must be between 1 and 255 characters.
2083 &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.
2084 # The value must be between 1 and 1024 characters.
2085 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002086 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
2087 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07002088 { # 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
2089 &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.
2090 &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.
2091 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002092 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2093 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002094 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2095 { # Specification determining how headers are added to requests or responses.
2096 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2097 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2098 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2099 # The default value is false.
2100 },
2101 ],
2102 &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.
2103 &quot;A String&quot;,
2104 ],
2105 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2106 { # Specification determining how headers are added to requests or responses.
2107 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2108 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2109 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2110 # The default value is false.
2111 },
2112 ],
2113 &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.
2114 &quot;A String&quot;,
2115 ],
2116 },
2117 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2118 # 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.
2119 # The value must be between 0 and 1000
2120 },
2121 ],
2122 },
2123 &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.
2124 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002125 # defaultService has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002126 &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.
2127 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002128 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002129 &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.
2130 # The value must be between 1 and 255 characters.
2131 &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.
2132 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2133 # The default is set to false.
2134 &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.
2135 # 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.
2136 # The value must be between 1 and 1024 characters.
2137 &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.
2138 # 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.
2139 # The value must be between 1 and 1024 characters.
2140 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2141 # Supported values are:
2142 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2143 # - FOUND, which corresponds to 302.
2144 # - SEE_OTHER which corresponds to 303.
2145 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2146 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2147 &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.
2148 # The default is set to false.
2149 },
2150 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2151 &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.
2152 #
2153 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
2154 &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.
2155 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002156 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2157 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002158 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2159 { # Specification determining how headers are added to requests or responses.
2160 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2161 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2162 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2163 # The default value is false.
2164 },
2165 ],
2166 &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.
2167 &quot;A String&quot;,
2168 ],
2169 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2170 { # Specification determining how headers are added to requests or responses.
2171 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2172 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2173 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2174 # The default value is false.
2175 },
2176 ],
2177 &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.
2178 &quot;A String&quot;,
2179 ],
2180 },
2181 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
2182 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
2183 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2184 &quot;hosts&quot;: [ # The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or ..
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002185 # * based matching is not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002186 &quot;A String&quot;,
2187 ],
2188 &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.
2189 },
2190 ],
2191 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2192 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
2193 &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.
2194 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
2195 { # 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.
2196 &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.
2197 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002198 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathMatcher&#x27;s defaultRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07002199 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002200 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002201 &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.
2202 # Default is false.
2203 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2204 &quot;A String&quot;,
2205 ],
2206 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2207 &quot;A String&quot;,
2208 ],
2209 &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
2210 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2211 &quot;A String&quot;,
2212 ],
2213 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2214 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2215 &quot;A String&quot;,
2216 ],
2217 &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.
2218 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2219 &quot;A String&quot;,
2220 ],
2221 &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.
2222 },
2223 &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.
2224 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002225 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002226 &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.
2227 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2228 # The value must be between 200 and 599 inclusive.
2229 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2230 # The value must be between 0.0 and 100.0 inclusive.
2231 },
2232 &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.
2233 &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.
2234 &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.
2235 &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
2236 },
2237 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2238 # The value must be between 0.0 and 100.0 inclusive.
2239 },
2240 },
2241 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002242 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002243 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2244 },
2245 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002246 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002247 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2248 &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.
2249 # 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.
2250 &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.
2251 &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
2252 },
2253 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2254 # - 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.
2255 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2256 # -
2257 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2258 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2259 # - 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.
2260 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2261 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2262 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2263 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2264 &quot;A String&quot;,
2265 ],
2266 },
2267 &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.
2268 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002269 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002270 &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.
2271 &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
2272 },
2273 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002274 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002275 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002276 &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.
2277 # The value must be between 1 and 255 characters.
2278 &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.
2279 # The value must be between 1 and 1024 characters.
2280 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002281 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
2282 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07002283 { # 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
2284 &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.
2285 &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.
2286 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002287 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2288 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002289 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2290 { # Specification determining how headers are added to requests or responses.
2291 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2292 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2293 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2294 # The default value is false.
2295 },
2296 ],
2297 &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.
2298 &quot;A String&quot;,
2299 ],
2300 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2301 { # Specification determining how headers are added to requests or responses.
2302 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2303 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2304 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2305 # The default value is false.
2306 },
2307 ],
2308 &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.
2309 &quot;A String&quot;,
2310 ],
2311 },
2312 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2313 # 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.
2314 # The value must be between 0 and 1000
2315 },
2316 ],
2317 },
2318 &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:
2319 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
2320 # - compute/v1/projects/project/global/backendServices/backendService
2321 # - 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.
2322 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
2323 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
2324 # - compute.backendBuckets.use
2325 # - compute.backendServices.use
2326 &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.
2327 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002328 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002329 &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.
2330 # The value must be between 1 and 255 characters.
2331 &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.
2332 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2333 # The default is set to false.
2334 &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.
2335 # 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.
2336 # The value must be between 1 and 1024 characters.
2337 &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.
2338 # 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.
2339 # The value must be between 1 and 1024 characters.
2340 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2341 # Supported values are:
2342 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2343 # - FOUND, which corresponds to 302.
2344 # - SEE_OTHER which corresponds to 303.
2345 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2346 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2347 &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.
2348 # The default is set to false.
2349 },
2350 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2351 &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.
2352 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002353 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2354 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002355 &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;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
2379 &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.
2380 # 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.
2381 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
2382 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
2383 &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.
2384 &quot;A String&quot;,
2385 ],
2386 &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.
2387 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002388 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07002389 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002390 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002391 &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.
2392 # Default is false.
2393 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2394 &quot;A String&quot;,
2395 ],
2396 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2397 &quot;A String&quot;,
2398 ],
2399 &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
2400 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2401 &quot;A String&quot;,
2402 ],
2403 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2404 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2405 &quot;A String&quot;,
2406 ],
2407 &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.
2408 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2409 &quot;A String&quot;,
2410 ],
2411 &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.
2412 },
2413 &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.
2414 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002415 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002416 &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.
2417 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2418 # The value must be between 200 and 599 inclusive.
2419 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2420 # The value must be between 0.0 and 100.0 inclusive.
2421 },
2422 &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.
2423 &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.
2424 &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.
2425 &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
2426 },
2427 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2428 # The value must be between 0.0 and 100.0 inclusive.
2429 },
2430 },
2431 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002432 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002433 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2434 },
2435 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002436 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002437 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2438 &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.
2439 # 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.
2440 &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.
2441 &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
2442 },
2443 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2444 # - 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.
2445 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2446 # -
2447 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2448 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2449 # - 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.
2450 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2451 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2452 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2453 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2454 &quot;A String&quot;,
2455 ],
2456 },
2457 &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.
2458 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002459 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002460 &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.
2461 &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
2462 },
2463 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002464 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002465 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002466 &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.
2467 # The value must be between 1 and 255 characters.
2468 &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.
2469 # The value must be between 1 and 1024 characters.
2470 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002471 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
2472 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07002473 { # 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
2474 &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.
2475 &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.
2476 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002477 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2478 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002479 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2480 { # Specification determining how headers are added to requests or responses.
2481 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2482 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2483 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2484 # The default value is false.
2485 },
2486 ],
2487 &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.
2488 &quot;A String&quot;,
2489 ],
2490 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2491 { # Specification determining how headers are added to requests or responses.
2492 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2493 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2494 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2495 # The default value is false.
2496 },
2497 ],
2498 &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.
2499 &quot;A String&quot;,
2500 ],
2501 },
2502 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2503 # 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.
2504 # The value must be between 0 and 1000
2505 },
2506 ],
2507 },
2508 &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.
2509 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2510 &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.
2511 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002512 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002513 &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.
2514 # The value must be between 1 and 255 characters.
2515 &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.
2516 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2517 # The default is set to false.
2518 &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.
2519 # 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.
2520 # The value must be between 1 and 1024 characters.
2521 &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.
2522 # 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.
2523 # The value must be between 1 and 1024 characters.
2524 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2525 # Supported values are:
2526 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2527 # - FOUND, which corresponds to 302.
2528 # - SEE_OTHER which corresponds to 303.
2529 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2530 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2531 &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.
2532 # The default is set to false.
2533 },
2534 },
2535 ],
2536 &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.
2537 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
2538 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
2539 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
2540 # The description can have a maximum length of 1024 characters.
2541 &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.
2542 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002543 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2544 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002545 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2546 { # Specification determining how headers are added to requests or responses.
2547 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2548 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2549 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2550 # The default value is false.
2551 },
2552 ],
2553 &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.
2554 &quot;A String&quot;,
2555 ],
2556 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2557 { # Specification determining how headers are added to requests or responses.
2558 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2559 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2560 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2561 # The default value is false.
2562 },
2563 ],
2564 &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.
2565 &quot;A String&quot;,
2566 ],
2567 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002568 &quot;matchRules&quot;: [ # The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
Bu Sun Kim65020912020-05-20 12:08:20 -07002569 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
2570 &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.
2571 # fullPathMatch must be between 1 and 1024 characters.
2572 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2573 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
2574 { # matchRule criteria for request header matches.
2575 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
2576 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2577 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
2578 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
2579 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002580 # When the URL map is bound to target gRPC proxy that has validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin.
Bu Sun Kim65020912020-05-20 12:08:20 -07002581 &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.
2582 # The default setting is false.
2583 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
2584 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2585 &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.
2586 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2587 &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.
2588 # For example for a range [-5, 0]
2589 # - -3 will match.
2590 # - 0 will not match.
2591 # - 0.25 will not match.
2592 # - -3someString will not match.
2593 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2594 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2595 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
2596 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
2597 },
2598 &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
2599 # 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.
2600 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2601 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
2602 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
2603 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2604 },
2605 ],
2606 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
2607 # The default value is false.
2608 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002609 # Not supported when the URL map is bound to target gRPC proxy.
2610 &quot;metadataFilters&quot;: [ # Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set of xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. When there is a match, the relevant routing configuration is made available to those proxies.
2611 # For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata. If multiple metadataFilters are specified, all of them need to be satisfied in order to be considered a match.
Bu Sun Kim65020912020-05-20 12:08:20 -07002612 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
2613 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002614 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002615 { # 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.
2616 # 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.
2617 # 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.
2618 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
2619 # This list must not be empty and can have at the most 64 entries.
2620 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
2621 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
2622 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
2623 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
2624 # value can have a maximum length of 1024 characters.
2625 },
2626 ],
2627 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
2628 # Supported values are:
2629 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
2630 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
2631 },
2632 ],
2633 &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 /.
2634 # The value must be between 1 and 1024 characters.
2635 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2636 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002637 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002638 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
2639 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
2640 # Only one of presentMatch, exactMatch or regexMatch must be set.
2641 &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.
2642 &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.
2643 # Only one of presentMatch, exactMatch or regexMatch must be set.
2644 &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
2645 # Only one of presentMatch, exactMatch or regexMatch must be set.
2646 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
2647 },
2648 ],
2649 &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
2650 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2651 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
2652 },
2653 ],
2654 &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.
2655 # 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.
2656 # 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.
2657 &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.
2658 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002659 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a routeRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07002660 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002661 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002662 &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.
2663 # Default is false.
2664 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2665 &quot;A String&quot;,
2666 ],
2667 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2668 &quot;A String&quot;,
2669 ],
2670 &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
2671 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2672 &quot;A String&quot;,
2673 ],
2674 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2675 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2676 &quot;A String&quot;,
2677 ],
2678 &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.
2679 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2680 &quot;A String&quot;,
2681 ],
2682 &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.
2683 },
2684 &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.
2685 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002686 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002687 &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.
2688 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2689 # The value must be between 200 and 599 inclusive.
2690 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2691 # The value must be between 0.0 and 100.0 inclusive.
2692 },
2693 &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.
2694 &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.
2695 &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.
2696 &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
2697 },
2698 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2699 # The value must be between 0.0 and 100.0 inclusive.
2700 },
2701 },
2702 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002703 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002704 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2705 },
2706 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002707 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002708 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2709 &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.
2710 # 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.
2711 &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.
2712 &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
2713 },
2714 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2715 # - 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.
2716 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2717 # -
2718 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2719 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2720 # - 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.
2721 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2722 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2723 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2724 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2725 &quot;A String&quot;,
2726 ],
2727 },
2728 &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.
2729 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002730 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002731 &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.
2732 &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
2733 },
2734 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002735 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002736 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002737 &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.
2738 # The value must be between 1 and 255 characters.
2739 &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.
2740 # The value must be between 1 and 1024 characters.
2741 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002742 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
2743 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07002744 { # 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
2745 &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.
2746 &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.
2747 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002748 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2749 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002750 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2751 { # Specification determining how headers are added to requests or responses.
2752 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2753 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2754 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2755 # The default value is false.
2756 },
2757 ],
2758 &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.
2759 &quot;A String&quot;,
2760 ],
2761 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2762 { # Specification determining how headers are added to requests or responses.
2763 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2764 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2765 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2766 # The default value is false.
2767 },
2768 ],
2769 &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.
2770 &quot;A String&quot;,
2771 ],
2772 },
2773 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2774 # 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.
2775 # The value must be between 0 and 1000
2776 },
2777 ],
2778 },
2779 &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.
2780 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2781 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
2782 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002783 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002784 &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.
2785 # The value must be between 1 and 255 characters.
2786 &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.
2787 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2788 # The default is set to false.
2789 &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.
2790 # 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.
2791 # The value must be between 1 and 1024 characters.
2792 &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.
2793 # 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.
2794 # The value must be between 1 and 1024 characters.
2795 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2796 # Supported values are:
2797 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2798 # - FOUND, which corresponds to 302.
2799 # - SEE_OTHER which corresponds to 303.
2800 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2801 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2802 &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.
2803 # The default is set to false.
2804 },
2805 },
2806 ],
2807 },
2808 ],
2809 &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.
2810 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2811 &quot;tests&quot;: [ # The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002812 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002813 { # Message for the expected URL mappings.
2814 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002815 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL. If headers contains a host header, then host must also match the header value.
Bu Sun Kim65020912020-05-20 12:08:20 -07002816 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002817 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
2818 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07002819 },
2820 ],
2821 },
2822 ],
2823 &quot;kind&quot;: &quot;compute#urlMapList&quot;, # Type of resource.
2824 &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.
2825 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2826 &quot;warning&quot;: { # [Output Only] Informational warning message.
2827 &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.
2828 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2829 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2830 {
2831 &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).
2832 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2833 },
2834 ],
2835 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2836 },
2837 }</pre>
2838</div>
2839
2840<div class="method">
2841 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2842 <pre>Retrieves the next page of results.
2843
2844Args:
2845 previous_request: The request for the previous page. (required)
2846 previous_response: The response from the request for the previous page. (required)
2847
2848Returns:
2849 A request object that you can call &#x27;execute()&#x27; on to request the next
2850 page. Returns None if there are no more items in the collection.
2851 </pre>
2852</div>
2853
2854<div class="method">
2855 <code class="details" id="patch">patch(project, region, urlMap, body=None, requestId=None)</code>
2856 <pre>Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
2857
2858Args:
2859 project: string, Project ID for this request. (required)
2860 region: string, Name of the region scoping this request. (required)
2861 urlMap: string, Name of the UrlMap resource to patch. (required)
2862 body: object, The request body.
2863 The object takes the form of:
2864
2865{ # Represents a URL Map resource.
2866 #
2867 # Google Compute Engine has two URL Map resources:
2868 #
2869 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
2870 #
2871 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
2872 #
2873 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
2874 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002875 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
2876 #
2877 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
2878 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002879 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
2880 #
2881 # 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.
2882 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2883 &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.
2884 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002885 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002886 # defaultRouteAction has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002887 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002888 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002889 &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.
2890 # Default is false.
2891 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2892 &quot;A String&quot;,
2893 ],
2894 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2895 &quot;A String&quot;,
2896 ],
2897 &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
2898 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2899 &quot;A String&quot;,
2900 ],
2901 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2902 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2903 &quot;A String&quot;,
2904 ],
2905 &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.
2906 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2907 &quot;A String&quot;,
2908 ],
2909 &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.
2910 },
2911 &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.
2912 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002913 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002914 &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.
2915 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2916 # The value must be between 200 and 599 inclusive.
2917 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2918 # The value must be between 0.0 and 100.0 inclusive.
2919 },
2920 &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.
2921 &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.
2922 &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.
2923 &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
2924 },
2925 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2926 # The value must be between 0.0 and 100.0 inclusive.
2927 },
2928 },
2929 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002930 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002931 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2932 },
2933 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002934 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002935 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2936 &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.
2937 # 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.
2938 &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.
2939 &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
2940 },
2941 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2942 # - 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.
2943 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2944 # -
2945 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2946 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2947 # - 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.
2948 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2949 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2950 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2951 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2952 &quot;A String&quot;,
2953 ],
2954 },
2955 &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.
2956 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002957 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002958 &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.
2959 &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
2960 },
2961 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002962 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002963 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002964 &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.
2965 # The value must be between 1 and 255 characters.
2966 &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.
2967 # The value must be between 1 and 1024 characters.
2968 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002969 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
2970 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07002971 { # 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
2972 &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.
2973 &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.
2974 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002975 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2976 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002977 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2978 { # Specification determining how headers are added to requests or responses.
2979 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2980 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2981 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2982 # The default value is false.
2983 },
2984 ],
2985 &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.
2986 &quot;A String&quot;,
2987 ],
2988 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2989 { # Specification determining how headers are added to requests or responses.
2990 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2991 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2992 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2993 # The default value is false.
2994 },
2995 ],
2996 &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.
2997 &quot;A String&quot;,
2998 ],
2999 },
3000 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3001 # 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.
3002 # The value must be between 0 and 1000
3003 },
3004 ],
3005 },
3006 &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.
3007 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003008 # defaultService has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003009 &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.
3010 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003011 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003012 &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.
3013 # The value must be between 1 and 255 characters.
3014 &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.
3015 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3016 # The default is set to false.
3017 &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.
3018 # 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.
3019 # The value must be between 1 and 1024 characters.
3020 &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.
3021 # 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.
3022 # The value must be between 1 and 1024 characters.
3023 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3024 # Supported values are:
3025 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3026 # - FOUND, which corresponds to 302.
3027 # - SEE_OTHER which corresponds to 303.
3028 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3029 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3030 &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.
3031 # The default is set to false.
3032 },
3033 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3034 &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.
3035 #
3036 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
3037 &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.
3038 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003039 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3040 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003041 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3042 { # Specification determining how headers are added to requests or responses.
3043 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3044 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3045 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3046 # The default value is false.
3047 },
3048 ],
3049 &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.
3050 &quot;A String&quot;,
3051 ],
3052 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3053 { # Specification determining how headers are added to requests or responses.
3054 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3055 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3056 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3057 # The default value is false.
3058 },
3059 ],
3060 &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.
3061 &quot;A String&quot;,
3062 ],
3063 },
3064 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
3065 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
3066 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3067 &quot;hosts&quot;: [ # The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or ..
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003068 # * based matching is not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003069 &quot;A String&quot;,
3070 ],
3071 &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.
3072 },
3073 ],
3074 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3075 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
3076 &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.
3077 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
3078 { # 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.
3079 &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.
3080 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003081 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathMatcher&#x27;s defaultRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07003082 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003083 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003084 &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.
3085 # Default is false.
3086 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3087 &quot;A String&quot;,
3088 ],
3089 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3090 &quot;A String&quot;,
3091 ],
3092 &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
3093 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3094 &quot;A String&quot;,
3095 ],
3096 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3097 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3098 &quot;A String&quot;,
3099 ],
3100 &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.
3101 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3102 &quot;A String&quot;,
3103 ],
3104 &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.
3105 },
3106 &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.
3107 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003108 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003109 &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.
3110 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3111 # The value must be between 200 and 599 inclusive.
3112 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3113 # The value must be between 0.0 and 100.0 inclusive.
3114 },
3115 &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.
3116 &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.
3117 &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.
3118 &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
3119 },
3120 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3121 # The value must be between 0.0 and 100.0 inclusive.
3122 },
3123 },
3124 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003125 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003126 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3127 },
3128 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003129 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003130 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3131 &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.
3132 # 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.
3133 &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.
3134 &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
3135 },
3136 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3137 # - 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.
3138 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3139 # -
3140 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3141 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3142 # - 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.
3143 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3144 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3145 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3146 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3147 &quot;A String&quot;,
3148 ],
3149 },
3150 &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.
3151 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003152 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003153 &quot;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.
3154 &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
3155 },
3156 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003157 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003158 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003159 &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.
3160 # The value must be between 1 and 255 characters.
3161 &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.
3162 # The value must be between 1 and 1024 characters.
3163 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003164 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
3165 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07003166 { # 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
3167 &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.
3168 &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.
3169 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003170 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3171 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003172 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3173 { # Specification determining how headers are added to requests or responses.
3174 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3175 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3176 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3177 # The default value is false.
3178 },
3179 ],
3180 &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.
3181 &quot;A String&quot;,
3182 ],
3183 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3184 { # Specification determining how headers are added to requests or responses.
3185 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3186 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3187 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3188 # The default value is false.
3189 },
3190 ],
3191 &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.
3192 &quot;A String&quot;,
3193 ],
3194 },
3195 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3196 # 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.
3197 # The value must be between 0 and 1000
3198 },
3199 ],
3200 },
3201 &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:
3202 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
3203 # - compute/v1/projects/project/global/backendServices/backendService
3204 # - 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.
3205 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3206 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
3207 # - compute.backendBuckets.use
3208 # - compute.backendServices.use
3209 &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.
3210 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003211 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003212 &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.
3213 # The value must be between 1 and 255 characters.
3214 &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.
3215 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3216 # The default is set to false.
3217 &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.
3218 # 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.
3219 # The value must be between 1 and 1024 characters.
3220 &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.
3221 # 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.
3222 # The value must be between 1 and 1024 characters.
3223 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3224 # Supported values are:
3225 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3226 # - FOUND, which corresponds to 302.
3227 # - SEE_OTHER which corresponds to 303.
3228 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3229 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3230 &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.
3231 # The default is set to false.
3232 },
3233 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3234 &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.
3235 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003236 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3237 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003238 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3239 { # Specification determining how headers are added to requests or responses.
3240 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3241 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3242 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3243 # The default value is false.
3244 },
3245 ],
3246 &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.
3247 &quot;A String&quot;,
3248 ],
3249 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3250 { # Specification determining how headers are added to requests or responses.
3251 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3252 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3253 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3254 # The default value is false.
3255 },
3256 ],
3257 &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.
3258 &quot;A String&quot;,
3259 ],
3260 },
3261 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
3262 &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.
3263 # 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.
3264 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
3265 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
3266 &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.
3267 &quot;A String&quot;,
3268 ],
3269 &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.
3270 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003271 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07003272 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003273 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003274 &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.
3275 # Default is false.
3276 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3277 &quot;A String&quot;,
3278 ],
3279 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3280 &quot;A String&quot;,
3281 ],
3282 &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
3283 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3284 &quot;A String&quot;,
3285 ],
3286 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3287 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3288 &quot;A String&quot;,
3289 ],
3290 &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.
3291 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3292 &quot;A String&quot;,
3293 ],
3294 &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.
3295 },
3296 &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.
3297 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003298 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003299 &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.
3300 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3301 # The value must be between 200 and 599 inclusive.
3302 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3303 # The value must be between 0.0 and 100.0 inclusive.
3304 },
3305 &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.
3306 &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.
3307 &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.
3308 &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
3309 },
3310 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3311 # The value must be between 0.0 and 100.0 inclusive.
3312 },
3313 },
3314 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003315 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003316 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3317 },
3318 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003319 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003320 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3321 &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.
3322 # 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.
3323 &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.
3324 &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
3325 },
3326 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3327 # - 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.
3328 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3329 # -
3330 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3331 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3332 # - 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.
3333 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3334 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3335 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3336 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3337 &quot;A String&quot;,
3338 ],
3339 },
3340 &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.
3341 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003342 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003343 &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.
3344 &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
3345 },
3346 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003347 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003348 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003349 &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.
3350 # The value must be between 1 and 255 characters.
3351 &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.
3352 # The value must be between 1 and 1024 characters.
3353 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003354 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
3355 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07003356 { # 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
3357 &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.
3358 &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.
3359 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003360 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3361 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003362 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3363 { # Specification determining how headers are added to requests or responses.
3364 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3365 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3366 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3367 # The default value is false.
3368 },
3369 ],
3370 &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.
3371 &quot;A String&quot;,
3372 ],
3373 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3374 { # Specification determining how headers are added to requests or responses.
3375 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3376 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3377 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3378 # The default value is false.
3379 },
3380 ],
3381 &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.
3382 &quot;A String&quot;,
3383 ],
3384 },
3385 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3386 # 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.
3387 # The value must be between 0 and 1000
3388 },
3389 ],
3390 },
3391 &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.
3392 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3393 &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.
3394 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003395 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003396 &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.
3397 # The value must be between 1 and 255 characters.
3398 &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.
3399 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3400 # The default is set to false.
3401 &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.
3402 # 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.
3403 # The value must be between 1 and 1024 characters.
3404 &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.
3405 # 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.
3406 # The value must be between 1 and 1024 characters.
3407 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3408 # Supported values are:
3409 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3410 # - FOUND, which corresponds to 302.
3411 # - SEE_OTHER which corresponds to 303.
3412 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3413 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3414 &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.
3415 # The default is set to false.
3416 },
3417 },
3418 ],
3419 &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.
3420 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
3421 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
3422 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
3423 # The description can have a maximum length of 1024 characters.
3424 &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.
3425 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003426 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3427 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003428 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3429 { # Specification determining how headers are added to requests or responses.
3430 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3431 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3432 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3433 # The default value is false.
3434 },
3435 ],
3436 &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.
3437 &quot;A String&quot;,
3438 ],
3439 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3440 { # Specification determining how headers are added to requests or responses.
3441 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3442 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3443 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3444 # The default value is false.
3445 },
3446 ],
3447 &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.
3448 &quot;A String&quot;,
3449 ],
3450 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003451 &quot;matchRules&quot;: [ # The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
Bu Sun Kim65020912020-05-20 12:08:20 -07003452 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
3453 &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.
3454 # fullPathMatch must be between 1 and 1024 characters.
3455 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3456 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
3457 { # matchRule criteria for request header matches.
3458 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
3459 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3460 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
3461 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
3462 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003463 # When the URL map is bound to target gRPC proxy that has validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin.
Bu Sun Kim65020912020-05-20 12:08:20 -07003464 &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.
3465 # The default setting is false.
3466 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
3467 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3468 &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.
3469 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3470 &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.
3471 # For example for a range [-5, 0]
3472 # - -3 will match.
3473 # - 0 will not match.
3474 # - 0.25 will not match.
3475 # - -3someString will not match.
3476 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3477 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3478 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
3479 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
3480 },
3481 &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
3482 # 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.
3483 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3484 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
3485 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
3486 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3487 },
3488 ],
3489 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
3490 # The default value is false.
3491 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003492 # Not supported when the URL map is bound to target gRPC proxy.
3493 &quot;metadataFilters&quot;: [ # Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set of xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. When there is a match, the relevant routing configuration is made available to those proxies.
3494 # For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata. If multiple metadataFilters are specified, all of them need to be satisfied in order to be considered a match.
Bu Sun Kim65020912020-05-20 12:08:20 -07003495 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
3496 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003497 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003498 { # 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.
3499 # 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.
3500 # 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.
3501 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
3502 # This list must not be empty and can have at the most 64 entries.
3503 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
3504 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
3505 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
3506 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
3507 # value can have a maximum length of 1024 characters.
3508 },
3509 ],
3510 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
3511 # Supported values are:
3512 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
3513 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
3514 },
3515 ],
3516 &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 /.
3517 # The value must be between 1 and 1024 characters.
3518 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3519 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003520 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003521 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
3522 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
3523 # Only one of presentMatch, exactMatch or regexMatch must be set.
3524 &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.
3525 &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.
3526 # Only one of presentMatch, exactMatch or regexMatch must be set.
3527 &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
3528 # Only one of presentMatch, exactMatch or regexMatch must be set.
3529 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
3530 },
3531 ],
3532 &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
3533 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3534 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
3535 },
3536 ],
3537 &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.
3538 # 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.
3539 # 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.
3540 &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.
3541 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003542 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a routeRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07003543 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003544 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003545 &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.
3546 # Default is false.
3547 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3548 &quot;A String&quot;,
3549 ],
3550 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3551 &quot;A String&quot;,
3552 ],
3553 &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
3554 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3555 &quot;A String&quot;,
3556 ],
3557 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3558 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3559 &quot;A String&quot;,
3560 ],
3561 &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.
3562 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3563 &quot;A String&quot;,
3564 ],
3565 &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.
3566 },
3567 &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.
3568 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003569 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003570 &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.
3571 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3572 # The value must be between 200 and 599 inclusive.
3573 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3574 # The value must be between 0.0 and 100.0 inclusive.
3575 },
3576 &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.
3577 &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.
3578 &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.
3579 &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
3580 },
3581 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3582 # The value must be between 0.0 and 100.0 inclusive.
3583 },
3584 },
3585 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003586 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003587 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3588 },
3589 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003590 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003591 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3592 &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.
3593 # 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.
3594 &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.
3595 &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
3596 },
3597 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3598 # - 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.
3599 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3600 # -
3601 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3602 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3603 # - 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.
3604 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3605 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3606 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3607 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3608 &quot;A String&quot;,
3609 ],
3610 },
3611 &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.
3612 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003613 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003614 &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.
3615 &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
3616 },
3617 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003618 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003619 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003620 &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.
3621 # The value must be between 1 and 255 characters.
3622 &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.
3623 # The value must be between 1 and 1024 characters.
3624 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003625 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
3626 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07003627 { # 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
3628 &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.
3629 &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.
3630 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003631 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3632 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003633 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3634 { # Specification determining how headers are added to requests or responses.
3635 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3636 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3637 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3638 # The default value is false.
3639 },
3640 ],
3641 &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.
3642 &quot;A String&quot;,
3643 ],
3644 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3645 { # Specification determining how headers are added to requests or responses.
3646 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3647 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3648 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3649 # The default value is false.
3650 },
3651 ],
3652 &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.
3653 &quot;A String&quot;,
3654 ],
3655 },
3656 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3657 # 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.
3658 # The value must be between 0 and 1000
3659 },
3660 ],
3661 },
3662 &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.
3663 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3664 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
3665 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003666 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003667 &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.
3668 # The value must be between 1 and 255 characters.
3669 &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.
3670 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3671 # The default is set to false.
3672 &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.
3673 # 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.
3674 # The value must be between 1 and 1024 characters.
3675 &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.
3676 # 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.
3677 # The value must be between 1 and 1024 characters.
3678 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3679 # Supported values are:
3680 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3681 # - FOUND, which corresponds to 302.
3682 # - SEE_OTHER which corresponds to 303.
3683 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3684 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3685 &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.
3686 # The default is set to false.
3687 },
3688 },
3689 ],
3690 },
3691 ],
3692 &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.
3693 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3694 &quot;tests&quot;: [ # The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003695 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003696 { # Message for the expected URL mappings.
3697 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003698 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL. If headers contains a host header, then host must also match the header value.
Bu Sun Kim65020912020-05-20 12:08:20 -07003699 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003700 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
3701 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07003702 },
3703 ],
3704}
3705
3706 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
3707
3708Returns:
3709 An object of the form:
3710
3711 { # Represents an Operation resource.
3712 #
3713 # Google Compute Engine has three Operation resources:
3714 #
3715 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3716 #
3717 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3718 #
3719 # Operations can be global, regional or zonal.
3720 # - For global operations, use the `globalOperations` resource.
3721 # - For regional operations, use the `regionOperations` resource.
3722 # - For zonal operations, use the `zonalOperations` resource.
3723 #
3724 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
3725 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3726 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3727 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3728 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3729 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3730 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
3731 {
3732 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3733 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3734 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
3735 },
3736 ],
3737 },
3738 &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`.
3739 &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.
3740 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3741 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3742 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3743 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3744 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3745 &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.
3746 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3747 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3748 &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.
3749 &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`.
3750 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3751 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3752 &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.
3753 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3754 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3755 {
3756 &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.
3757 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3758 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3759 {
3760 &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).
3761 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3762 },
3763 ],
3764 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3765 },
3766 ],
3767 &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.
3768 }</pre>
3769</div>
3770
3771<div class="method">
3772 <code class="details" id="update">update(project, region, urlMap, body=None, requestId=None)</code>
3773 <pre>Updates the specified UrlMap resource with the data included in the request.
3774
3775Args:
3776 project: string, Project ID for this request. (required)
3777 region: string, Name of the region scoping this request. (required)
3778 urlMap: string, Name of the UrlMap resource to update. (required)
3779 body: object, The request body.
3780 The object takes the form of:
3781
3782{ # Represents a URL Map resource.
3783 #
3784 # Google Compute Engine has two URL Map resources:
3785 #
3786 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
3787 #
3788 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
3789 #
3790 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
3791 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003792 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
3793 #
3794 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
3795 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003796 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
3797 #
3798 # 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.
3799 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
3800 &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.
3801 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003802 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003803 # defaultRouteAction has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003804 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003805 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003806 &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.
3807 # Default is false.
3808 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3809 &quot;A String&quot;,
3810 ],
3811 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3812 &quot;A String&quot;,
3813 ],
3814 &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
3815 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3816 &quot;A String&quot;,
3817 ],
3818 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3819 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3820 &quot;A String&quot;,
3821 ],
3822 &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.
3823 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3824 &quot;A String&quot;,
3825 ],
3826 &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.
3827 },
3828 &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.
3829 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003830 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003831 &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.
3832 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3833 # The value must be between 200 and 599 inclusive.
3834 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3835 # The value must be between 0.0 and 100.0 inclusive.
3836 },
3837 &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.
3838 &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.
3839 &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.
3840 &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
3841 },
3842 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3843 # The value must be between 0.0 and 100.0 inclusive.
3844 },
3845 },
3846 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003847 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003848 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3849 },
3850 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003851 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003852 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3853 &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.
3854 # 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.
3855 &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.
3856 &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
3857 },
3858 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3859 # - 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.
3860 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3861 # -
3862 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3863 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3864 # - 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.
3865 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3866 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3867 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3868 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3869 &quot;A String&quot;,
3870 ],
3871 },
3872 &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.
3873 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003874 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003875 &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.
3876 &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
3877 },
3878 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003879 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003880 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003881 &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 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003886 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
3887 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07003888 { # 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003892 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3893 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003894 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3895 { # Specification determining how headers are added to requests or responses.
3896 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3897 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3898 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3899 # The default value is false.
3900 },
3901 ],
3902 &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.
3903 &quot;A String&quot;,
3904 ],
3905 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3906 { # Specification determining how headers are added to requests or responses.
3907 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3908 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3909 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3910 # The default value is false.
3911 },
3912 ],
3913 &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.
3914 &quot;A String&quot;,
3915 ],
3916 },
3917 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3918 # 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.
3919 # The value must be between 0 and 1000
3920 },
3921 ],
3922 },
3923 &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.
3924 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003925 # defaultService has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003926 &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.
3927 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003928 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003929 &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.
3930 # The value must be between 1 and 255 characters.
3931 &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.
3932 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3933 # The default is set to false.
3934 &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.
3935 # 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.
3936 # The value must be between 1 and 1024 characters.
3937 &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.
3938 # 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.
3939 # The value must be between 1 and 1024 characters.
3940 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3941 # Supported values are:
3942 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3943 # - FOUND, which corresponds to 302.
3944 # - SEE_OTHER which corresponds to 303.
3945 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3946 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3947 &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.
3948 # The default is set to false.
3949 },
3950 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3951 &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.
3952 #
3953 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
3954 &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.
3955 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003956 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3957 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003958 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3959 { # Specification determining how headers are added to requests or responses.
3960 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3961 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3962 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3963 # The default value is false.
3964 },
3965 ],
3966 &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.
3967 &quot;A String&quot;,
3968 ],
3969 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3970 { # Specification determining how headers are added to requests or responses.
3971 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3972 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3973 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3974 # The default value is false.
3975 },
3976 ],
3977 &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.
3978 &quot;A String&quot;,
3979 ],
3980 },
3981 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
3982 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
3983 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3984 &quot;hosts&quot;: [ # The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or ..
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003985 # * based matching is not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003986 &quot;A String&quot;,
3987 ],
3988 &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.
3989 },
3990 ],
3991 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3992 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
3993 &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.
3994 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
3995 { # 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.
3996 &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.
3997 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003998 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathMatcher&#x27;s defaultRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07003999 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004000 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004001 &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.
4002 # Default is false.
4003 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4004 &quot;A String&quot;,
4005 ],
4006 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4007 &quot;A String&quot;,
4008 ],
4009 &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
4010 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4011 &quot;A String&quot;,
4012 ],
4013 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4014 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4015 &quot;A String&quot;,
4016 ],
4017 &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.
4018 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4019 &quot;A String&quot;,
4020 ],
4021 &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.
4022 },
4023 &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.
4024 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004025 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004026 &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.
4027 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4028 # The value must be between 200 and 599 inclusive.
4029 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4030 # The value must be between 0.0 and 100.0 inclusive.
4031 },
4032 &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.
4033 &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.
4034 &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.
4035 &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
4036 },
4037 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4038 # The value must be between 0.0 and 100.0 inclusive.
4039 },
4040 },
4041 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004042 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004043 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4044 },
4045 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004046 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004047 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4048 &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.
4049 # 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.
4050 &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.
4051 &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
4052 },
4053 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4054 # - 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.
4055 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4056 # -
4057 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4058 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4059 # - 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.
4060 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4061 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4062 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4063 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4064 &quot;A String&quot;,
4065 ],
4066 },
4067 &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.
4068 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004069 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004070 &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.
4071 &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
4072 },
4073 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004074 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004075 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004076 &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.
4077 # The value must be between 1 and 255 characters.
4078 &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.
4079 # The value must be between 1 and 1024 characters.
4080 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004081 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
4082 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07004083 { # 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
4084 &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.
4085 &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.
4086 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004087 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4088 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004089 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4090 { # Specification determining how headers are added to requests or responses.
4091 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4092 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4093 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4094 # The default value is false.
4095 },
4096 ],
4097 &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.
4098 &quot;A String&quot;,
4099 ],
4100 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4101 { # Specification determining how headers are added to requests or responses.
4102 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4103 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4104 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4105 # The default value is false.
4106 },
4107 ],
4108 &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.
4109 &quot;A String&quot;,
4110 ],
4111 },
4112 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4113 # 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.
4114 # The value must be between 0 and 1000
4115 },
4116 ],
4117 },
4118 &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:
4119 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
4120 # - compute/v1/projects/project/global/backendServices/backendService
4121 # - 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.
4122 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
4123 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
4124 # - compute.backendBuckets.use
4125 # - compute.backendServices.use
4126 &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.
4127 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004128 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004129 &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.
4130 # The value must be between 1 and 255 characters.
4131 &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.
4132 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4133 # The default is set to false.
4134 &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.
4135 # 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.
4136 # The value must be between 1 and 1024 characters.
4137 &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.
4138 # 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.
4139 # The value must be between 1 and 1024 characters.
4140 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4141 # Supported values are:
4142 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4143 # - FOUND, which corresponds to 302.
4144 # - SEE_OTHER which corresponds to 303.
4145 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4146 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4147 &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.
4148 # The default is set to false.
4149 },
4150 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4151 &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.
4152 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004153 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4154 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004155 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4156 { # Specification determining how headers are added to requests or responses.
4157 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4158 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4159 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4160 # The default value is false.
4161 },
4162 ],
4163 &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.
4164 &quot;A String&quot;,
4165 ],
4166 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4167 { # Specification determining how headers are added to requests or responses.
4168 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4169 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4170 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4171 # The default value is false.
4172 },
4173 ],
4174 &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.
4175 &quot;A String&quot;,
4176 ],
4177 },
4178 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
4179 &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.
4180 # 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.
4181 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
4182 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
4183 &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.
4184 &quot;A String&quot;,
4185 ],
4186 &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.
4187 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004188 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07004189 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004190 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004191 &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.
4192 # Default is false.
4193 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4194 &quot;A String&quot;,
4195 ],
4196 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4197 &quot;A String&quot;,
4198 ],
4199 &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
4200 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4201 &quot;A String&quot;,
4202 ],
4203 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4204 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4205 &quot;A String&quot;,
4206 ],
4207 &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.
4208 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4209 &quot;A String&quot;,
4210 ],
4211 &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.
4212 },
4213 &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.
4214 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004215 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004216 &quot;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.
4217 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4218 # The value must be between 200 and 599 inclusive.
4219 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4220 # The value must be between 0.0 and 100.0 inclusive.
4221 },
4222 &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.
4223 &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.
4224 &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.
4225 &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
4226 },
4227 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4228 # The value must be between 0.0 and 100.0 inclusive.
4229 },
4230 },
4231 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004232 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004233 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4234 },
4235 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004236 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004237 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4238 &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.
4239 # 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.
4240 &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.
4241 &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
4242 },
4243 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4244 # - 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.
4245 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4246 # -
4247 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4248 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4249 # - 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.
4250 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4251 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4252 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4253 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4254 &quot;A String&quot;,
4255 ],
4256 },
4257 &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.
4258 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004259 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004260 &quot;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.
4261 &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
4262 },
4263 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004264 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004265 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004266 &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.
4267 # The value must be between 1 and 255 characters.
4268 &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.
4269 # The value must be between 1 and 1024 characters.
4270 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004271 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
4272 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07004273 { # 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
4274 &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.
4275 &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.
4276 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004277 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4278 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004279 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4280 { # Specification determining how headers are added to requests or responses.
4281 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4282 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4283 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4284 # The default value is false.
4285 },
4286 ],
4287 &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.
4288 &quot;A String&quot;,
4289 ],
4290 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4291 { # Specification determining how headers are added to requests or responses.
4292 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4293 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4294 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4295 # The default value is false.
4296 },
4297 ],
4298 &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.
4299 &quot;A String&quot;,
4300 ],
4301 },
4302 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4303 # 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.
4304 # The value must be between 0 and 1000
4305 },
4306 ],
4307 },
4308 &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.
4309 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4310 &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.
4311 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004312 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004313 &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.
4314 # The value must be between 1 and 255 characters.
4315 &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.
4316 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4317 # The default is set to false.
4318 &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.
4319 # 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.
4320 # The value must be between 1 and 1024 characters.
4321 &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.
4322 # 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.
4323 # The value must be between 1 and 1024 characters.
4324 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4325 # Supported values are:
4326 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4327 # - FOUND, which corresponds to 302.
4328 # - SEE_OTHER which corresponds to 303.
4329 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4330 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4331 &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.
4332 # The default is set to false.
4333 },
4334 },
4335 ],
4336 &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.
4337 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
4338 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
4339 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
4340 # The description can have a maximum length of 1024 characters.
4341 &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.
4342 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004343 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4344 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004345 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4346 { # Specification determining how headers are added to requests or responses.
4347 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4348 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4349 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4350 # The default value is false.
4351 },
4352 ],
4353 &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.
4354 &quot;A String&quot;,
4355 ],
4356 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4357 { # Specification determining how headers are added to requests or responses.
4358 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4359 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4360 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4361 # The default value is false.
4362 },
4363 ],
4364 &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.
4365 &quot;A String&quot;,
4366 ],
4367 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004368 &quot;matchRules&quot;: [ # The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
Bu Sun Kim65020912020-05-20 12:08:20 -07004369 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
4370 &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.
4371 # fullPathMatch must be between 1 and 1024 characters.
4372 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4373 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
4374 { # matchRule criteria for request header matches.
4375 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
4376 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4377 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
4378 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
4379 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004380 # When the URL map is bound to target gRPC proxy that has validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin.
Bu Sun Kim65020912020-05-20 12:08:20 -07004381 &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.
4382 # The default setting is false.
4383 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
4384 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4385 &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.
4386 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4387 &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.
4388 # For example for a range [-5, 0]
4389 # - -3 will match.
4390 # - 0 will not match.
4391 # - 0.25 will not match.
4392 # - -3someString will not match.
4393 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4394 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4395 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
4396 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
4397 },
4398 &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
4399 # 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.
4400 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4401 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
4402 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
4403 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4404 },
4405 ],
4406 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
4407 # The default value is false.
4408 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004409 # Not supported when the URL map is bound to target gRPC proxy.
4410 &quot;metadataFilters&quot;: [ # Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set of xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. When there is a match, the relevant routing configuration is made available to those proxies.
4411 # For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata. If multiple metadataFilters are specified, all of them need to be satisfied in order to be considered a match.
Bu Sun Kim65020912020-05-20 12:08:20 -07004412 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
4413 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004414 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004415 { # 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.
4416 # 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.
4417 # 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.
4418 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
4419 # This list must not be empty and can have at the most 64 entries.
4420 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
4421 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
4422 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
4423 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
4424 # value can have a maximum length of 1024 characters.
4425 },
4426 ],
4427 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
4428 # Supported values are:
4429 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
4430 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
4431 },
4432 ],
4433 &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 /.
4434 # The value must be between 1 and 1024 characters.
4435 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4436 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004437 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004438 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
4439 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
4440 # Only one of presentMatch, exactMatch or regexMatch must be set.
4441 &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.
4442 &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.
4443 # Only one of presentMatch, exactMatch or regexMatch must be set.
4444 &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
4445 # Only one of presentMatch, exactMatch or regexMatch must be set.
4446 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
4447 },
4448 ],
4449 &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
4450 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4451 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
4452 },
4453 ],
4454 &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.
4455 # 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.
4456 # 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.
4457 &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.
4458 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004459 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a routeRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07004460 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004461 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004462 &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.
4463 # Default is false.
4464 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4465 &quot;A String&quot;,
4466 ],
4467 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4468 &quot;A String&quot;,
4469 ],
4470 &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
4471 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4472 &quot;A String&quot;,
4473 ],
4474 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4475 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4476 &quot;A String&quot;,
4477 ],
4478 &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.
4479 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4480 &quot;A String&quot;,
4481 ],
4482 &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.
4483 },
4484 &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.
4485 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004486 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004487 &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.
4488 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4489 # The value must be between 200 and 599 inclusive.
4490 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4491 # The value must be between 0.0 and 100.0 inclusive.
4492 },
4493 &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.
4494 &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.
4495 &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.
4496 &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
4497 },
4498 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4499 # The value must be between 0.0 and 100.0 inclusive.
4500 },
4501 },
4502 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004503 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004504 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4505 },
4506 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004507 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004508 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4509 &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.
4510 # 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.
4511 &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.
4512 &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
4513 },
4514 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4515 # - 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.
4516 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4517 # -
4518 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4519 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4520 # - 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.
4521 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4522 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4523 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4524 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4525 &quot;A String&quot;,
4526 ],
4527 },
4528 &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.
4529 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004530 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004531 &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.
4532 &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
4533 },
4534 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004535 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004536 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004537 &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.
4538 # The value must be between 1 and 255 characters.
4539 &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.
4540 # The value must be between 1 and 1024 characters.
4541 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004542 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
4543 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07004544 { # 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
4545 &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.
4546 &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.
4547 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004548 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4549 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004550 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4551 { # Specification determining how headers are added to requests or responses.
4552 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4553 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4554 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4555 # The default value is false.
4556 },
4557 ],
4558 &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.
4559 &quot;A String&quot;,
4560 ],
4561 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4562 { # Specification determining how headers are added to requests or responses.
4563 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4564 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4565 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4566 # The default value is false.
4567 },
4568 ],
4569 &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.
4570 &quot;A String&quot;,
4571 ],
4572 },
4573 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4574 # 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.
4575 # The value must be between 0 and 1000
4576 },
4577 ],
4578 },
4579 &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.
4580 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4581 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
4582 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004583 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004584 &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.
4585 # The value must be between 1 and 255 characters.
4586 &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.
4587 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4588 # The default is set to false.
4589 &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.
4590 # 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.
4591 # The value must be between 1 and 1024 characters.
4592 &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.
4593 # 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.
4594 # The value must be between 1 and 1024 characters.
4595 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4596 # Supported values are:
4597 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4598 # - FOUND, which corresponds to 302.
4599 # - SEE_OTHER which corresponds to 303.
4600 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4601 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4602 &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.
4603 # The default is set to false.
4604 },
4605 },
4606 ],
4607 },
4608 ],
4609 &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.
4610 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4611 &quot;tests&quot;: [ # The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004612 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004613 { # Message for the expected URL mappings.
4614 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004615 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL. If headers contains a host header, then host must also match the header value.
Bu Sun Kim65020912020-05-20 12:08:20 -07004616 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004617 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
4618 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07004619 },
4620 ],
4621}
4622
4623 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
4624
4625Returns:
4626 An object of the form:
4627
4628 { # Represents an Operation resource.
4629 #
4630 # Google Compute Engine has three Operation resources:
4631 #
4632 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4633 #
4634 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4635 #
4636 # Operations can be global, regional or zonal.
4637 # - For global operations, use the `globalOperations` resource.
4638 # - For regional operations, use the `regionOperations` resource.
4639 # - For zonal operations, use the `zonalOperations` resource.
4640 #
4641 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
4642 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4643 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4644 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4645 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4646 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4647 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
4648 {
4649 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4650 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4651 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
4652 },
4653 ],
4654 },
4655 &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`.
4656 &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.
4657 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4658 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4659 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4660 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4661 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4662 &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.
4663 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4664 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4665 &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.
4666 &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`.
4667 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4668 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4669 &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.
4670 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4671 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4672 {
4673 &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.
4674 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4675 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4676 {
4677 &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).
4678 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4679 },
4680 ],
4681 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4682 },
4683 ],
4684 &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.
4685 }</pre>
4686</div>
4687
4688<div class="method">
4689 <code class="details" id="validate">validate(project, region, urlMap, body=None)</code>
4690 <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.
4691
4692Args:
4693 project: string, Project ID for this request. (required)
4694 region: string, Name of the region scoping this request. (required)
4695 urlMap: string, Name of the UrlMap resource to be validated as. (required)
4696 body: object, The request body.
4697 The object takes the form of:
4698
4699{
4700 &quot;resource&quot;: { # Represents a URL Map resource. # Content of the UrlMap to be validated.
4701 #
4702 # Google Compute Engine has two URL Map resources:
4703 #
4704 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
4705 #
4706 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
4707 #
4708 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
4709 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004710 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
4711 #
4712 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
4713 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004714 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
4715 #
4716 # 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.
4717 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
4718 &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.
4719 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004720 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004721 # defaultRouteAction has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004722 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004723 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004724 &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.
4725 # Default is false.
4726 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4727 &quot;A String&quot;,
4728 ],
4729 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4730 &quot;A String&quot;,
4731 ],
4732 &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
4733 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4734 &quot;A String&quot;,
4735 ],
4736 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4737 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4738 &quot;A String&quot;,
4739 ],
4740 &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.
4741 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4742 &quot;A String&quot;,
4743 ],
4744 &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.
4745 },
4746 &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.
4747 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004748 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004749 &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.
4750 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4751 # The value must be between 200 and 599 inclusive.
4752 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4753 # The value must be between 0.0 and 100.0 inclusive.
4754 },
4755 &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.
4756 &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.
4757 &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.
4758 &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
4759 },
4760 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4761 # The value must be between 0.0 and 100.0 inclusive.
4762 },
4763 },
4764 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004765 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004766 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4767 },
4768 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004769 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004770 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4771 &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.
4772 # 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.
4773 &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.
4774 &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
4775 },
4776 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4777 # - 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.
4778 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4779 # -
4780 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4781 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4782 # - 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.
4783 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4784 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4785 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4786 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4787 &quot;A String&quot;,
4788 ],
4789 },
4790 &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.
4791 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004792 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004793 &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.
4794 &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
4795 },
4796 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004797 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004798 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004799 &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.
4800 # The value must be between 1 and 255 characters.
4801 &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.
4802 # The value must be between 1 and 1024 characters.
4803 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004804 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
4805 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07004806 { # 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
4807 &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.
4808 &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.
4809 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004810 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4811 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004812 &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;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4836 # 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.
4837 # The value must be between 0 and 1000
4838 },
4839 ],
4840 },
4841 &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.
4842 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004843 # defaultService has no effect when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004844 &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.
4845 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004846 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004847 &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.
4848 # The value must be between 1 and 255 characters.
4849 &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.
4850 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4851 # The default is set to false.
4852 &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.
4853 # 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.
4854 # The value must be between 1 and 1024 characters.
4855 &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.
4856 # 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.
4857 # The value must be between 1 and 1024 characters.
4858 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4859 # Supported values are:
4860 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4861 # - FOUND, which corresponds to 302.
4862 # - SEE_OTHER which corresponds to 303.
4863 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4864 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4865 &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.
4866 # The default is set to false.
4867 },
4868 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4869 &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.
4870 #
4871 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
4872 &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.
4873 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004874 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4875 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004876 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4877 { # Specification determining how headers are added to requests or responses.
4878 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4879 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4880 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4881 # The default value is false.
4882 },
4883 ],
4884 &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.
4885 &quot;A String&quot;,
4886 ],
4887 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4888 { # Specification determining how headers are added to requests or responses.
4889 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4890 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4891 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4892 # The default value is false.
4893 },
4894 ],
4895 &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.
4896 &quot;A String&quot;,
4897 ],
4898 },
4899 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
4900 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
4901 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4902 &quot;hosts&quot;: [ # The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or ..
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004903 # * based matching is not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004904 &quot;A String&quot;,
4905 ],
4906 &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.
4907 },
4908 ],
4909 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4910 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
4911 &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.
4912 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
4913 { # 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.
4914 &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.
4915 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004916 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathMatcher&#x27;s defaultRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07004917 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004918 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004919 &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.
4920 # Default is false.
4921 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4922 &quot;A String&quot;,
4923 ],
4924 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4925 &quot;A String&quot;,
4926 ],
4927 &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
4928 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4929 &quot;A String&quot;,
4930 ],
4931 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4932 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4933 &quot;A String&quot;,
4934 ],
4935 &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.
4936 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4937 &quot;A String&quot;,
4938 ],
4939 &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.
4940 },
4941 &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.
4942 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004943 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004944 &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.
4945 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4946 # The value must be between 200 and 599 inclusive.
4947 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4948 # The value must be between 0.0 and 100.0 inclusive.
4949 },
4950 &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.
4951 &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.
4952 &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.
4953 &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
4954 },
4955 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4956 # The value must be between 0.0 and 100.0 inclusive.
4957 },
4958 },
4959 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004960 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004961 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4962 },
4963 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004964 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004965 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4966 &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.
4967 # 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.
4968 &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.
4969 &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
4970 },
4971 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4972 # - 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.
4973 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4974 # -
4975 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4976 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4977 # - 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.
4978 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4979 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4980 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4981 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4982 &quot;A String&quot;,
4983 ],
4984 },
4985 &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.
4986 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004987 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004988 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4989 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4990 },
4991 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004992 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004993 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004994 &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.
4995 # The value must be between 1 and 255 characters.
4996 &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.
4997 # The value must be between 1 and 1024 characters.
4998 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004999 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
5000 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07005001 { # 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
5002 &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.
5003 &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.
5004 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005005 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5006 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005007 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5008 { # Specification determining how headers are added to requests or responses.
5009 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5010 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5011 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5012 # The default value is false.
5013 },
5014 ],
5015 &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.
5016 &quot;A String&quot;,
5017 ],
5018 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5019 { # Specification determining how headers are added to requests or responses.
5020 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5021 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5022 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5023 # The default value is false.
5024 },
5025 ],
5026 &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.
5027 &quot;A String&quot;,
5028 ],
5029 },
5030 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5031 # 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.
5032 # The value must be between 0 and 1000
5033 },
5034 ],
5035 },
5036 &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:
5037 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
5038 # - compute/v1/projects/project/global/backendServices/backendService
5039 # - 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.
5040 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
5041 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
5042 # - compute.backendBuckets.use
5043 # - compute.backendServices.use
5044 &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.
5045 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005046 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005047 &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.
5048 # The value must be between 1 and 255 characters.
5049 &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.
5050 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5051 # The default is set to false.
5052 &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.
5053 # 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.
5054 # The value must be between 1 and 1024 characters.
5055 &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.
5056 # 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.
5057 # The value must be between 1 and 1024 characters.
5058 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5059 # Supported values are:
5060 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5061 # - FOUND, which corresponds to 302.
5062 # - SEE_OTHER which corresponds to 303.
5063 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5064 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5065 &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.
5066 # The default is set to false.
5067 },
5068 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
5069 &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.
5070 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005071 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5072 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005073 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5074 { # Specification determining how headers are added to requests or responses.
5075 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5076 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5077 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5078 # The default value is false.
5079 },
5080 ],
5081 &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.
5082 &quot;A String&quot;,
5083 ],
5084 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5085 { # Specification determining how headers are added to requests or responses.
5086 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5087 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5088 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5089 # The default value is false.
5090 },
5091 ],
5092 &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.
5093 &quot;A String&quot;,
5094 ],
5095 },
5096 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
5097 &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.
5098 # 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.
5099 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
5100 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
5101 &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.
5102 &quot;A String&quot;,
5103 ],
5104 &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.
5105 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005106 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07005107 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005108 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005109 &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.
5110 # Default is false.
5111 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
5112 &quot;A String&quot;,
5113 ],
5114 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
5115 &quot;A String&quot;,
5116 ],
5117 &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
5118 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5119 &quot;A String&quot;,
5120 ],
5121 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
5122 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5123 &quot;A String&quot;,
5124 ],
5125 &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.
5126 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
5127 &quot;A String&quot;,
5128 ],
5129 &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.
5130 },
5131 &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.
5132 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005133 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005134 &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.
5135 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
5136 # The value must be between 200 and 599 inclusive.
5137 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5138 # The value must be between 0.0 and 100.0 inclusive.
5139 },
5140 &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.
5141 &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.
5142 &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.
5143 &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
5144 },
5145 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5146 # The value must be between 0.0 and 100.0 inclusive.
5147 },
5148 },
5149 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005150 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005151 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
5152 },
5153 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005154 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005155 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5156 &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.
5157 # 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.
5158 &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.
5159 &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
5160 },
5161 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5162 # - 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.
5163 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5164 # -
5165 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5166 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5167 # - 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.
5168 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5169 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5170 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5171 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5172 &quot;A String&quot;,
5173 ],
5174 },
5175 &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.
5176 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005177 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005178 &quot;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.
5179 &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
5180 },
5181 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005182 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005183 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005184 &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.
5185 # The value must be between 1 and 255 characters.
5186 &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.
5187 # The value must be between 1 and 1024 characters.
5188 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005189 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
5190 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07005191 { # 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
5192 &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.
5193 &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.
5194 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005195 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5196 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005197 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5198 { # Specification determining how headers are added to requests or responses.
5199 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5200 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5201 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5202 # The default value is false.
5203 },
5204 ],
5205 &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.
5206 &quot;A String&quot;,
5207 ],
5208 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5209 { # Specification determining how headers are added to requests or responses.
5210 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5211 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5212 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5213 # The default value is false.
5214 },
5215 ],
5216 &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.
5217 &quot;A String&quot;,
5218 ],
5219 },
5220 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5221 # 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.
5222 # The value must be between 0 and 1000
5223 },
5224 ],
5225 },
5226 &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.
5227 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5228 &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.
5229 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005230 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005231 &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.
5232 # The value must be between 1 and 255 characters.
5233 &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.
5234 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5235 # The default is set to false.
5236 &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.
5237 # 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.
5238 # The value must be between 1 and 1024 characters.
5239 &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.
5240 # 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.
5241 # The value must be between 1 and 1024 characters.
5242 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5243 # Supported values are:
5244 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5245 # - FOUND, which corresponds to 302.
5246 # - SEE_OTHER which corresponds to 303.
5247 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5248 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5249 &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.
5250 # The default is set to false.
5251 },
5252 },
5253 ],
5254 &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.
5255 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
5256 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
5257 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
5258 # The description can have a maximum length of 1024 characters.
5259 &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.
5260 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005261 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5262 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005263 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5264 { # Specification determining how headers are added to requests or responses.
5265 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5266 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5267 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5268 # The default value is false.
5269 },
5270 ],
5271 &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.
5272 &quot;A String&quot;,
5273 ],
5274 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5275 { # Specification determining how headers are added to requests or responses.
5276 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5277 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5278 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5279 # The default value is false.
5280 },
5281 ],
5282 &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.
5283 &quot;A String&quot;,
5284 ],
5285 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005286 &quot;matchRules&quot;: [ # The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
Bu Sun Kim65020912020-05-20 12:08:20 -07005287 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
5288 &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.
5289 # fullPathMatch must be between 1 and 1024 characters.
5290 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5291 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
5292 { # matchRule criteria for request header matches.
5293 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
5294 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5295 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
5296 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
5297 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005298 # When the URL map is bound to target gRPC proxy that has validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin.
Bu Sun Kim65020912020-05-20 12:08:20 -07005299 &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.
5300 # The default setting is false.
5301 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
5302 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5303 &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.
5304 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5305 &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.
5306 # For example for a range [-5, 0]
5307 # - -3 will match.
5308 # - 0 will not match.
5309 # - 0.25 will not match.
5310 # - -3someString will not match.
5311 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5312 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5313 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
5314 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
5315 },
5316 &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
5317 # 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.
5318 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5319 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
5320 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
5321 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5322 },
5323 ],
5324 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
5325 # The default value is false.
5326 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005327 # Not supported when the URL map is bound to target gRPC proxy.
5328 &quot;metadataFilters&quot;: [ # Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set of xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. When there is a match, the relevant routing configuration is made available to those proxies.
5329 # For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata. If multiple metadataFilters are specified, all of them need to be satisfied in order to be considered a match.
Bu Sun Kim65020912020-05-20 12:08:20 -07005330 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
5331 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005332 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005333 { # 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.
5334 # 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.
5335 # 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.
5336 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
5337 # This list must not be empty and can have at the most 64 entries.
5338 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
5339 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
5340 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
5341 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
5342 # value can have a maximum length of 1024 characters.
5343 },
5344 ],
5345 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
5346 # Supported values are:
5347 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
5348 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
5349 },
5350 ],
5351 &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 /.
5352 # The value must be between 1 and 1024 characters.
5353 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5354 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005355 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005356 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
5357 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
5358 # Only one of presentMatch, exactMatch or regexMatch must be set.
5359 &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.
5360 &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.
5361 # Only one of presentMatch, exactMatch or regexMatch must be set.
5362 &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
5363 # Only one of presentMatch, exactMatch or regexMatch must be set.
5364 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
5365 },
5366 ],
5367 &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
5368 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5369 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
5370 },
5371 ],
5372 &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.
5373 # 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.
5374 # 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.
5375 &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.
5376 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005377 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a routeRule&#x27;s routeAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07005378 &quot;corsPolicy&quot;: { # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing # The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005379 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005380 &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.
5381 # Default is false.
5382 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
5383 &quot;A String&quot;,
5384 ],
5385 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
5386 &quot;A String&quot;,
5387 ],
5388 &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
5389 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5390 &quot;A String&quot;,
5391 ],
5392 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
5393 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5394 &quot;A String&quot;,
5395 ],
5396 &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.
5397 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
5398 &quot;A String&quot;,
5399 ],
5400 &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.
5401 },
5402 &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.
5403 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005404 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005405 &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.
5406 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
5407 # The value must be between 200 and 599 inclusive.
5408 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5409 # The value must be between 0.0 and 100.0 inclusive.
5410 },
5411 &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.
5412 &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.
5413 &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.
5414 &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
5415 },
5416 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5417 # The value must be between 0.0 and 100.0 inclusive.
5418 },
5419 },
5420 &quot;requestMirrorPolicy&quot;: { # A policy that specifies how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. # Specifies the policy on how requests intended for the route&#x27;s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005421 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005422 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
5423 },
5424 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005425 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005426 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5427 &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.
5428 # 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.
5429 &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.
5430 &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
5431 },
5432 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5433 # - 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.
5434 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5435 # -
5436 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5437 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5438 # - 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.
5439 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5440 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5441 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5442 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5443 &quot;A String&quot;,
5444 ],
5445 },
5446 &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.
5447 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005448 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005449 &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.
5450 &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
5451 },
5452 &quot;urlRewrite&quot;: { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005453 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005454 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005455 &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.
5456 # The value must be between 1 and 255 characters.
5457 &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.
5458 # The value must be between 1 and 1024 characters.
5459 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005460 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number.
5461 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
Bu Sun Kim65020912020-05-20 12:08:20 -07005462 { # 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
5463 &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.
5464 &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.
5465 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005466 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5467 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005468 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5469 { # Specification determining how headers are added to requests or responses.
5470 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5471 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5472 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5473 # The default value is false.
5474 },
5475 ],
5476 &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.
5477 &quot;A String&quot;,
5478 ],
5479 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5480 { # Specification determining how headers are added to requests or responses.
5481 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5482 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5483 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5484 # The default value is false.
5485 },
5486 ],
5487 &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.
5488 &quot;A String&quot;,
5489 ],
5490 },
5491 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5492 # 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.
5493 # The value must be between 0 and 1000
5494 },
5495 ],
5496 },
5497 &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.
5498 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5499 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
5500 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005501 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005502 &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.
5503 # The value must be between 1 and 255 characters.
5504 &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.
5505 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5506 # The default is set to false.
5507 &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.
5508 # 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.
5509 # The value must be between 1 and 1024 characters.
5510 &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.
5511 # 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.
5512 # The value must be between 1 and 1024 characters.
5513 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5514 # Supported values are:
5515 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5516 # - FOUND, which corresponds to 302.
5517 # - SEE_OTHER which corresponds to 303.
5518 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5519 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5520 &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.
5521 # The default is set to false.
5522 },
5523 },
5524 ],
5525 },
5526 ],
5527 &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.
5528 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5529 &quot;tests&quot;: [ # The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005530 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005531 { # Message for the expected URL mappings.
5532 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005533 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL. If headers contains a host header, then host must also match the header value.
Bu Sun Kim65020912020-05-20 12:08:20 -07005534 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005535 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
5536 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07005537 },
5538 ],
5539 },
5540 }
5541
5542
5543Returns:
5544 An object of the form:
5545
5546 {
5547 &quot;result&quot;: { # Message representing the validation result for a UrlMap.
5548 &quot;loadErrors&quot;: [
5549 &quot;A String&quot;,
5550 ],
5551 &quot;loadSucceeded&quot;: True or False, # Whether the given UrlMap can be successfully loaded. If false, &#x27;loadErrors&#x27; indicates the reasons.
5552 &quot;testFailures&quot;: [
5553 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005554 &quot;actualService&quot;: &quot;A String&quot;, # BackendService or BackendBucket returned by load balancer.
5555 &quot;expectedService&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
5556 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL.
5557 &quot;path&quot;: &quot;A String&quot;, # Path portion including query parameters in the URL.
Bu Sun Kim65020912020-05-20 12:08:20 -07005558 },
5559 ],
5560 &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.
5561 },
5562 }</pre>
5563</div>
5564
5565</body></html>