blob: 722b85abe273660dcedceef86c00f0381fd1427a [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_beta.html">Compute Engine API</a> . <a href="compute_beta.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 Kim715bd7f2019-06-14 16:50:42 -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">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#insert">insert(project, region, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Creates a UrlMap resource in the specified project using the data included in the request.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#invalidateCache">invalidateCache(project, region, urlMap, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.</p>
92<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070093 <code><a href="#list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Retrieves the list of UrlMap resources available to the specified project in the specified region.</p>
95<p class="toc_element">
96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#patch">patch(project, region, urlMap, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100<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>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#update">update(project, region, urlMap, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Updates the specified UrlMap resource with the data included in the request.</p>
104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#validate">validate(project, region, urlMap, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106<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>
107<h3>Method Details</h3>
108<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700109 <code class="details" id="close">close()</code>
110 <pre>Close httplib2 connections.</pre>
111</div>
112
113<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700114 <code class="details" id="delete">delete(project, region, urlMap, requestId=None)</code>
115 <pre>Deletes the specified UrlMap resource.
116
117Args:
118 project: string, Project ID for this request. (required)
119 region: string, Name of the region scoping this request. (required)
120 urlMap: string, Name of the UrlMap resource to delete. (required)
121 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
122
123Returns:
124 An object of the form:
125
126 { # Represents an Operation resource.
127 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700128 # Google Compute Engine has three Operation resources:
129 #
130 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
131 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700132 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
133 #
134 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700135 # - For global operations, use the `globalOperations` resource.
136 # - For regional operations, use the `regionOperations` resource.
137 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700138 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700139 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700140 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
141 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
142 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
143 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
144 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
145 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700146 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700147 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
148 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
149 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700150 },
151 ],
152 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700153 &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`.
154 &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.
155 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
156 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
157 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
158 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
159 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
160 &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.
161 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
162 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
163 &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.
164 &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`.
165 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
166 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
167 &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.
168 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
169 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
170 {
171 &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.
172 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
173 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
174 {
175 &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).
176 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
177 },
178 ],
179 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
180 },
181 ],
182 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700183 }</pre>
184</div>
185
186<div class="method">
187 <code class="details" id="get">get(project, region, urlMap)</code>
188 <pre>Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.
189
190Args:
191 project: string, Project ID for this request. (required)
192 region: string, Name of the region scoping this request. (required)
193 urlMap: string, Name of the UrlMap resource to return. (required)
194
195Returns:
196 An object of the form:
197
Dan O'Mearadd494642020-05-01 07:42:23 -0700198 { # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700199 #
200 # Google Compute Engine has two URL Map resources:
201 #
202 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
203 #
204 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
205 #
206 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
207 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700208 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
209 #
210 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
211 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700212 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
213 #
214 # 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.
215 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
216 &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.
217 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700218 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700219 # 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 -0700220 &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 -0700221 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700222 &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.
223 # Default is false.
224 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
225 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700226 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700227 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
228 &quot;A String&quot;,
229 ],
230 &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
231 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
232 &quot;A String&quot;,
233 ],
234 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
235 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
236 &quot;A String&quot;,
237 ],
238 &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.
239 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
240 &quot;A String&quot;,
241 ],
242 &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.
243 },
244 &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.
245 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700246 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700247 &quot;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.
248 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
249 # The value must be between 200 and 599 inclusive.
250 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
251 # The value must be between 0.0 and 100.0 inclusive.
252 },
253 &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.
254 &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.
255 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
256 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
257 },
258 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
259 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700260 },
261 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700262 &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 -0700263 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700264 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
265 },
266 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700267 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700268 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
269 &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.
270 # 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.
271 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
272 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700273 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700274 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
275 # - 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.
276 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
277 # -
278 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
279 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
280 # - 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.
281 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
282 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
283 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
284 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
285 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700286 ],
287 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700288 &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.
289 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700290 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700291 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
292 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
293 },
294 &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 -0700295 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700296 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700297 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700298 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700299 &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.
300 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700301 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700302 &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.
303 # 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 -0700304 { # 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
305 &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.
306 &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.
307 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700308 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
309 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700310 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
311 { # Specification determining how headers are added to requests or responses.
312 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
313 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
314 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
315 # The default value is false.
316 },
317 ],
318 &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.
319 &quot;A String&quot;,
320 ],
321 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
322 { # Specification determining how headers are added to requests or responses.
323 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
324 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
325 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
326 # The default value is false.
327 },
328 ],
329 &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.
330 &quot;A String&quot;,
331 ],
332 },
333 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
334 # 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.
335 # The value must be between 0 and 1000
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700336 },
337 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700338 },
339 &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.
340 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700341 # 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 -0700342 &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.
343 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700344 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700345 &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.
346 # The value must be between 1 and 255 characters.
347 &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.
348 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
349 # The default is set to false.
350 &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.
351 # 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.
352 # The value must be between 1 and 1024 characters.
353 &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.
354 # 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.
355 # The value must be between 1 and 1024 characters.
356 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
357 # Supported values are:
358 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
359 # - FOUND, which corresponds to 302.
360 # - SEE_OTHER which corresponds to 303.
361 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
362 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
363 &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.
364 # The default is set to false.
365 },
366 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
367 &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.
368 #
369 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
370 &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.
371 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700372 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
373 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700374 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
375 { # Specification determining how headers are added to requests or responses.
376 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
377 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
378 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
379 # The default value is false.
380 },
381 ],
382 &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.
383 &quot;A String&quot;,
384 ],
385 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
386 { # Specification determining how headers are added to requests or responses.
387 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
388 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
389 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
390 # The default value is false.
391 },
392 ],
393 &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.
394 &quot;A String&quot;,
395 ],
396 },
397 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
398 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
399 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
400 &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 -0700401 # * 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 -0700402 &quot;A String&quot;,
403 ],
404 &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.
405 },
406 ],
407 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
408 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
409 &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.
410 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
411 { # 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.
412 &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.
413 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700414 # 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 -0700415 &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 -0700416 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700417 &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.
418 # Default is false.
419 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
420 &quot;A String&quot;,
421 ],
422 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
423 &quot;A String&quot;,
424 ],
425 &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
426 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
427 &quot;A String&quot;,
428 ],
429 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
430 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
431 &quot;A String&quot;,
432 ],
433 &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.
434 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
435 &quot;A String&quot;,
436 ],
437 &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.
438 },
439 &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.
440 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700441 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700442 &quot;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.
443 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
444 # The value must be between 200 and 599 inclusive.
445 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
446 # The value must be between 0.0 and 100.0 inclusive.
447 },
448 &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.
449 &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.
450 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
451 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
452 },
453 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
454 # The value must be between 0.0 and 100.0 inclusive.
455 },
456 },
457 &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 -0700458 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700459 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
460 },
461 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700462 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700463 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
464 &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.
465 # 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.
466 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
467 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
468 },
469 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
470 # - 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.
471 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
472 # -
473 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
474 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
475 # - 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.
476 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
477 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
478 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
479 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
480 &quot;A String&quot;,
481 ],
482 },
483 &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.
484 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700485 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700486 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
487 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
488 },
489 &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 -0700490 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700491 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700492 &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.
493 # The value must be between 1 and 255 characters.
494 &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.
495 # The value must be between 1 and 1024 characters.
496 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700497 &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.
498 # 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 -0700499 { # 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
500 &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.
501 &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.
502 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700503 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
504 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700505 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
506 { # Specification determining how headers are added to requests or responses.
507 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
508 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
509 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
510 # The default value is false.
511 },
512 ],
513 &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.
514 &quot;A String&quot;,
515 ],
516 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
517 { # Specification determining how headers are added to requests or responses.
518 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
519 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
520 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
521 # The default value is false.
522 },
523 ],
524 &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.
525 &quot;A String&quot;,
526 ],
527 },
528 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
529 # 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.
530 # The value must be between 0 and 1000
531 },
532 ],
533 },
534 &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:
535 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
536 # - compute/v1/projects/project/global/backendServices/backendService
537 # - 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.
538 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
539 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
540 # - compute.backendBuckets.use
541 # - compute.backendServices.use
542 &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.
543 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700544 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700545 &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.
546 # The value must be between 1 and 255 characters.
547 &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.
548 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
549 # The default is set to false.
550 &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.
551 # 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.
552 # The value must be between 1 and 1024 characters.
553 &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.
554 # 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.
555 # The value must be between 1 and 1024 characters.
556 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
557 # Supported values are:
558 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
559 # - FOUND, which corresponds to 302.
560 # - SEE_OTHER which corresponds to 303.
561 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
562 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
563 &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.
564 # The default is set to false.
565 },
566 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
567 &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.
568 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700569 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
570 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700571 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
572 { # Specification determining how headers are added to requests or responses.
573 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
574 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
575 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
576 # The default value is false.
577 },
578 ],
579 &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.
580 &quot;A String&quot;,
581 ],
582 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
583 { # Specification determining how headers are added to requests or responses.
584 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
585 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
586 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
587 # The default value is false.
588 },
589 ],
590 &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.
591 &quot;A String&quot;,
592 ],
593 },
594 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
595 &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.
596 # 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.
597 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
598 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
599 &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.
600 &quot;A String&quot;,
601 ],
602 &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.
603 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700604 # 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 -0700605 &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 -0700606 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700607 &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.
608 # Default is false.
609 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
610 &quot;A String&quot;,
611 ],
612 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
613 &quot;A String&quot;,
614 ],
615 &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
616 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
617 &quot;A String&quot;,
618 ],
619 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
620 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
621 &quot;A String&quot;,
622 ],
623 &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.
624 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
625 &quot;A String&quot;,
626 ],
627 &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.
628 },
629 &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.
630 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700631 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700632 &quot;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.
633 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
634 # The value must be between 200 and 599 inclusive.
635 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
636 # The value must be between 0.0 and 100.0 inclusive.
637 },
638 &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.
639 &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.
640 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
641 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
642 },
643 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
644 # The value must be between 0.0 and 100.0 inclusive.
645 },
646 },
647 &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 -0700648 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700649 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
650 },
651 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700652 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700653 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
654 &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.
655 # 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.
656 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
657 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
658 },
659 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
660 # - 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.
661 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
662 # -
663 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
664 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
665 # - 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.
666 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
667 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
668 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
669 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
670 &quot;A String&quot;,
671 ],
672 },
673 &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.
674 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700675 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700676 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
677 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
678 },
679 &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 -0700680 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700681 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700682 &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.
683 # The value must be between 1 and 255 characters.
684 &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.
685 # The value must be between 1 and 1024 characters.
686 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700687 &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.
688 # 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 -0700689 { # 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
690 &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.
691 &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.
692 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700693 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
694 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700695 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
696 { # Specification determining how headers are added to requests or responses.
697 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
698 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
699 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
700 # The default value is false.
701 },
702 ],
703 &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.
704 &quot;A String&quot;,
705 ],
706 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
707 { # Specification determining how headers are added to requests or responses.
708 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
709 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
710 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
711 # The default value is false.
712 },
713 ],
714 &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.
715 &quot;A String&quot;,
716 ],
717 },
718 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
719 # 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.
720 # The value must be between 0 and 1000
721 },
722 ],
723 },
724 &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.
725 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
726 &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.
727 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700728 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700729 &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.
730 # The value must be between 1 and 255 characters.
731 &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.
732 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
733 # The default is set to false.
734 &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.
735 # 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.
736 # The value must be between 1 and 1024 characters.
737 &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.
738 # 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.
739 # The value must be between 1 and 1024 characters.
740 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
741 # Supported values are:
742 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
743 # - FOUND, which corresponds to 302.
744 # - SEE_OTHER which corresponds to 303.
745 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
746 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
747 &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.
748 # The default is set to false.
749 },
750 },
751 ],
752 &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.
753 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
754 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
755 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
756 # The description can have a maximum length of 1024 characters.
757 &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.
758 # 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 -0700759 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
760 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700761 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
762 { # Specification determining how headers are added to requests or responses.
763 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
764 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
765 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
766 # The default value is false.
767 },
768 ],
769 &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.
770 &quot;A String&quot;,
771 ],
772 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
773 { # Specification determining how headers are added to requests or responses.
774 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
775 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
776 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
777 # The default value is false.
778 },
779 ],
780 &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.
781 &quot;A String&quot;,
782 ],
783 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700784 &quot;httpFilterConfigs&quot;: [ # Outbound route specific configuration for networkservices.HttpFilter resources enabled by Traffic Director. httpFilterConfigs only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
785 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
786 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
787 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
788 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
789 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
790 },
791 ],
792 &quot;httpFilterMetadata&quot;: [ # Outbound route specific metadata supplied to networkservices.HttpFilter resources enabled by Traffic Director. httpFilterMetadata only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
793 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
794 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
795 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
796 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
797 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
798 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
799 },
800 ],
801 &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 -0700802 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
803 &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.
804 # fullPathMatch must be between 1 and 1024 characters.
805 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
806 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
807 { # matchRule criteria for request header matches.
808 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
809 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
810 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
811 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
812 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700813 # 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 -0700814 &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.
815 # The default setting is false.
816 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
817 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
818 &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.
819 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
820 &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.
821 # For example for a range [-5, 0]
822 # - -3 will match.
823 # - 0 will not match.
824 # - 0.25 will not match.
825 # - -3someString will not match.
826 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
827 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
828 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
829 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
830 },
831 &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
832 # 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.
833 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
834 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
835 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
836 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
837 },
838 ],
839 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
840 # The default value is false.
841 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700842 # Not supported when the URL map is bound to target gRPC proxy.
843 &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.
844 # 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 -0700845 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
846 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700847 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700848 { # 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.
849 # 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.
850 # 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.
851 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
852 # This list must not be empty and can have at the most 64 entries.
853 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
854 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
855 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
856 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
857 # value can have a maximum length of 1024 characters.
858 },
859 ],
860 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
861 # Supported values are:
862 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
863 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
864 },
865 ],
866 &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 /.
867 # The value must be between 1 and 1024 characters.
868 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
869 &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 -0700870 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700871 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
872 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
873 # Only one of presentMatch, exactMatch or regexMatch must be set.
874 &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.
875 &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.
876 # Only one of presentMatch, exactMatch or regexMatch must be set.
877 &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
878 # Only one of presentMatch, exactMatch or regexMatch must be set.
879 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
880 },
881 ],
882 &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
883 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
884 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
885 },
886 ],
887 &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.
888 # 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.
889 # 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.
890 &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.
891 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700892 # 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 -0700893 &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 -0700894 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700895 &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.
896 # Default is false.
897 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
898 &quot;A String&quot;,
899 ],
900 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
901 &quot;A String&quot;,
902 ],
903 &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
904 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
905 &quot;A String&quot;,
906 ],
907 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
908 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
909 &quot;A String&quot;,
910 ],
911 &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.
912 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
913 &quot;A String&quot;,
914 ],
915 &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.
916 },
917 &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.
918 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700919 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700920 &quot;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.
921 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
922 # The value must be between 200 and 599 inclusive.
923 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
924 # The value must be between 0.0 and 100.0 inclusive.
925 },
926 &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.
927 &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.
928 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
929 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
930 },
931 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
932 # The value must be between 0.0 and 100.0 inclusive.
933 },
934 },
935 &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 -0700936 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700937 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
938 },
939 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700940 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700941 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
942 &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.
943 # 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.
944 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less 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;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
948 # - 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.
949 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
950 # -
951 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
952 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
953 # - 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.
954 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
955 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
956 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
957 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
958 &quot;A String&quot;,
959 ],
960 },
961 &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.
962 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700963 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700964 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
965 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
966 },
967 &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 -0700968 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700969 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700970 &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.
971 # The value must be between 1 and 255 characters.
972 &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.
973 # The value must be between 1 and 1024 characters.
974 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700975 &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.
976 # 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 -0700977 { # 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
978 &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.
979 &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.
980 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700981 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
982 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700983 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
984 { # Specification determining how headers are added to requests or responses.
985 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
986 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
987 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
988 # The default value is false.
989 },
990 ],
991 &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.
992 &quot;A String&quot;,
993 ],
994 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
995 { # Specification determining how headers are added to requests or responses.
996 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
997 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
998 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
999 # The default value is false.
1000 },
1001 ],
1002 &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.
1003 &quot;A String&quot;,
1004 ],
1005 },
1006 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1007 # 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.
1008 # The value must be between 0 and 1000
1009 },
1010 ],
1011 },
1012 &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.
1013 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1014 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
1015 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001016 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001017 &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.
1018 # The value must be between 1 and 255 characters.
1019 &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.
1020 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1021 # The default is set to false.
1022 &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.
1023 # 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.
1024 # The value must be between 1 and 1024 characters.
1025 &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.
1026 # 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.
1027 # The value must be between 1 and 1024 characters.
1028 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
1029 # Supported values are:
1030 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1031 # - FOUND, which corresponds to 302.
1032 # - SEE_OTHER which corresponds to 303.
1033 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1034 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1035 &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.
1036 # The default is set to false.
1037 },
1038 },
1039 ],
1040 },
1041 ],
1042 &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.
1043 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1044 &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 -07001045 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001046 { # Message for the expected URL mappings.
1047 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001048 &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 -07001049 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001050 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
1051 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07001052 },
1053 ],
1054 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001055</div>
1056
1057<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001058 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001059 <pre>Creates a UrlMap resource in the specified project using the data included in the request.
1060
1061Args:
1062 project: string, Project ID for this request. (required)
1063 region: string, Name of the region scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001064 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001065 The object takes the form of:
1066
Dan O'Mearadd494642020-05-01 07:42:23 -07001067{ # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001068 #
1069 # Google Compute Engine has two URL Map resources:
1070 #
1071 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
1072 #
1073 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
1074 #
1075 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
1076 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001077 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
1078 #
1079 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
1080 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001081 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
1082 #
1083 # 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.
1084 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1085 &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.
1086 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001087 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001088 # 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 -07001089 &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 -07001090 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001091 &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.
1092 # Default is false.
1093 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
1094 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001095 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001096 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
1097 &quot;A String&quot;,
1098 ],
1099 &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
1100 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1101 &quot;A String&quot;,
1102 ],
1103 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
1104 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1105 &quot;A String&quot;,
1106 ],
1107 &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.
1108 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
1109 &quot;A String&quot;,
1110 ],
1111 &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.
1112 },
1113 &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.
1114 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001115 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001116 &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.
1117 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
1118 # The value must be between 200 and 599 inclusive.
1119 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1120 # The value must be between 0.0 and 100.0 inclusive.
1121 },
1122 &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.
1123 &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.
1124 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1125 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1126 },
1127 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1128 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001129 },
1130 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001131 &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 -07001132 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001133 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
1134 },
1135 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001136 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001137 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1138 &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.
1139 # 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.
1140 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less 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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001142 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001143 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1144 # - 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.
1145 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1146 # -
1147 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1148 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1149 # - 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.
1150 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1151 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1152 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1153 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1154 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001155 ],
1156 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001157 &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.
1158 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001159 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001160 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1161 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1162 },
1163 &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 -07001164 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001165 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001166 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001167 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001168 &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.
1169 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001170 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001171 &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.
1172 # 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 -07001173 { # 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
1174 &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.
1175 &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.
1176 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001177 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1178 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001179 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1180 { # Specification determining how headers are added to requests or responses.
1181 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1182 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1183 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1184 # The default value is false.
1185 },
1186 ],
1187 &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.
1188 &quot;A String&quot;,
1189 ],
1190 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1191 { # Specification determining how headers are added to requests or responses.
1192 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1193 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1194 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1195 # The default value is false.
1196 },
1197 ],
1198 &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.
1199 &quot;A String&quot;,
1200 ],
1201 },
1202 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1203 # 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.
1204 # The value must be between 0 and 1000
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001205 },
1206 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001207 },
1208 &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.
1209 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001210 # 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 -07001211 &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.
1212 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001213 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001214 &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.
1215 # The value must be between 1 and 255 characters.
1216 &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.
1217 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1218 # The default is set to false.
1219 &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.
1220 # 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.
1221 # The value must be between 1 and 1024 characters.
1222 &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.
1223 # 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.
1224 # The value must be between 1 and 1024 characters.
1225 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
1226 # Supported values are:
1227 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1228 # - FOUND, which corresponds to 302.
1229 # - SEE_OTHER which corresponds to 303.
1230 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1231 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1232 &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.
1233 # The default is set to false.
1234 },
1235 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1236 &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.
1237 #
1238 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
1239 &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.
1240 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001241 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1242 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001243 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1244 { # Specification determining how headers are added to requests or responses.
1245 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1246 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1247 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1248 # The default value is false.
1249 },
1250 ],
1251 &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.
1252 &quot;A String&quot;,
1253 ],
1254 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1255 { # Specification determining how headers are added to requests or responses.
1256 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1257 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1258 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1259 # The default value is false.
1260 },
1261 ],
1262 &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.
1263 &quot;A String&quot;,
1264 ],
1265 },
1266 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
1267 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
1268 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1269 &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 -07001270 # * 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 -07001271 &quot;A String&quot;,
1272 ],
1273 &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.
1274 },
1275 ],
1276 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1277 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
1278 &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.
1279 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
1280 { # 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.
1281 &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.
1282 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001283 # 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 -07001284 &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 -07001285 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001286 &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.
1287 # Default is false.
1288 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
1289 &quot;A String&quot;,
1290 ],
1291 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
1292 &quot;A String&quot;,
1293 ],
1294 &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
1295 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1296 &quot;A String&quot;,
1297 ],
1298 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
1299 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1300 &quot;A String&quot;,
1301 ],
1302 &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.
1303 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
1304 &quot;A String&quot;,
1305 ],
1306 &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.
1307 },
1308 &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.
1309 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001310 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001311 &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.
1312 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
1313 # The value must be between 200 and 599 inclusive.
1314 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1315 # The value must be between 0.0 and 100.0 inclusive.
1316 },
1317 &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.
1318 &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.
1319 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1320 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1321 },
1322 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1323 # The value must be between 0.0 and 100.0 inclusive.
1324 },
1325 },
1326 &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 -07001327 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001328 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
1329 },
1330 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001331 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001332 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1333 &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.
1334 # 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.
1335 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less 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;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1339 # - 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.
1340 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1341 # -
1342 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1343 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1344 # - 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.
1345 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1346 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1347 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1348 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1349 &quot;A String&quot;,
1350 ],
1351 },
1352 &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.
1353 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001354 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001355 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1356 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1357 },
1358 &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 -07001359 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001360 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001361 &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.
1362 # The value must be between 1 and 255 characters.
1363 &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.
1364 # The value must be between 1 and 1024 characters.
1365 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001366 &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.
1367 # 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 -07001368 { # 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
1369 &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.
1370 &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.
1371 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001372 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1373 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001374 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1375 { # Specification determining how headers are added to requests or responses.
1376 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1377 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1378 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1379 # The default value is false.
1380 },
1381 ],
1382 &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.
1383 &quot;A String&quot;,
1384 ],
1385 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1386 { # Specification determining how headers are added to requests or responses.
1387 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1388 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1389 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1390 # The default value is false.
1391 },
1392 ],
1393 &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.
1394 &quot;A String&quot;,
1395 ],
1396 },
1397 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1398 # 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.
1399 # The value must be between 0 and 1000
1400 },
1401 ],
1402 },
1403 &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:
1404 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
1405 # - compute/v1/projects/project/global/backendServices/backendService
1406 # - 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.
1407 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
1408 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
1409 # - compute.backendBuckets.use
1410 # - compute.backendServices.use
1411 &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.
1412 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001413 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001414 &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.
1415 # The value must be between 1 and 255 characters.
1416 &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.
1417 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1418 # The default is set to false.
1419 &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.
1420 # 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.
1421 # The value must be between 1 and 1024 characters.
1422 &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.
1423 # 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.
1424 # The value must be between 1 and 1024 characters.
1425 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
1426 # Supported values are:
1427 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1428 # - FOUND, which corresponds to 302.
1429 # - SEE_OTHER which corresponds to 303.
1430 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1431 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1432 &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.
1433 # The default is set to false.
1434 },
1435 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1436 &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.
1437 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001438 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1439 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001440 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1441 { # Specification determining how headers are added to requests or responses.
1442 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1443 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1444 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1445 # The default value is false.
1446 },
1447 ],
1448 &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.
1449 &quot;A String&quot;,
1450 ],
1451 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1452 { # Specification determining how headers are added to requests or responses.
1453 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1454 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1455 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1456 # The default value is false.
1457 },
1458 ],
1459 &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.
1460 &quot;A String&quot;,
1461 ],
1462 },
1463 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
1464 &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.
1465 # 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.
1466 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
1467 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
1468 &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.
1469 &quot;A String&quot;,
1470 ],
1471 &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.
1472 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001473 # 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 -07001474 &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 -07001475 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001476 &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.
1477 # Default is false.
1478 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
1479 &quot;A String&quot;,
1480 ],
1481 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
1482 &quot;A String&quot;,
1483 ],
1484 &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
1485 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1486 &quot;A String&quot;,
1487 ],
1488 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
1489 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1490 &quot;A String&quot;,
1491 ],
1492 &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.
1493 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
1494 &quot;A String&quot;,
1495 ],
1496 &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.
1497 },
1498 &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.
1499 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001500 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001501 &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.
1502 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
1503 # The value must be between 200 and 599 inclusive.
1504 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1505 # The value must be between 0.0 and 100.0 inclusive.
1506 },
1507 &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.
1508 &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.
1509 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1510 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1511 },
1512 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1513 # The value must be between 0.0 and 100.0 inclusive.
1514 },
1515 },
1516 &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 -07001517 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001518 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
1519 },
1520 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001521 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001522 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1523 &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.
1524 # 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.
1525 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less 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;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1529 # - 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.
1530 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1531 # -
1532 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1533 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1534 # - 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.
1535 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1536 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1537 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1538 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1539 &quot;A String&quot;,
1540 ],
1541 },
1542 &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.
1543 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001544 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001545 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1546 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1547 },
1548 &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 -07001549 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001550 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001551 &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.
1552 # The value must be between 1 and 255 characters.
1553 &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.
1554 # The value must be between 1 and 1024 characters.
1555 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001556 &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.
1557 # 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 -07001558 { # 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
1559 &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.
1560 &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.
1561 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001562 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1563 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001564 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1565 { # Specification determining how headers are added to requests or responses.
1566 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1567 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1568 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1569 # The default value is false.
1570 },
1571 ],
1572 &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.
1573 &quot;A String&quot;,
1574 ],
1575 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1576 { # Specification determining how headers are added to requests or responses.
1577 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1578 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1579 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1580 # The default value is false.
1581 },
1582 ],
1583 &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.
1584 &quot;A String&quot;,
1585 ],
1586 },
1587 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1588 # 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.
1589 # The value must be between 0 and 1000
1590 },
1591 ],
1592 },
1593 &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.
1594 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1595 &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.
1596 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001597 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001598 &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.
1599 # The value must be between 1 and 255 characters.
1600 &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.
1601 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1602 # The default is set to false.
1603 &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.
1604 # 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.
1605 # The value must be between 1 and 1024 characters.
1606 &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.
1607 # 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.
1608 # The value must be between 1 and 1024 characters.
1609 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
1610 # Supported values are:
1611 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1612 # - FOUND, which corresponds to 302.
1613 # - SEE_OTHER which corresponds to 303.
1614 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1615 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1616 &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.
1617 # The default is set to false.
1618 },
1619 },
1620 ],
1621 &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.
1622 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
1623 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
1624 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
1625 # The description can have a maximum length of 1024 characters.
1626 &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.
1627 # 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 -07001628 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1629 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001630 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1631 { # Specification determining how headers are added to requests or responses.
1632 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1633 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1634 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1635 # The default value is false.
1636 },
1637 ],
1638 &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.
1639 &quot;A String&quot;,
1640 ],
1641 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1642 { # Specification determining how headers are added to requests or responses.
1643 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1644 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1645 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1646 # The default value is false.
1647 },
1648 ],
1649 &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.
1650 &quot;A String&quot;,
1651 ],
1652 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001653 &quot;httpFilterConfigs&quot;: [ # Outbound route specific configuration for networkservices.HttpFilter resources enabled by Traffic Director. httpFilterConfigs only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
1654 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
1655 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
1656 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
1657 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
1658 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
1659 },
1660 ],
1661 &quot;httpFilterMetadata&quot;: [ # Outbound route specific metadata supplied to networkservices.HttpFilter resources enabled by Traffic Director. httpFilterMetadata only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
1662 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
1663 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
1664 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
1665 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
1666 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
1667 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
1668 },
1669 ],
1670 &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 -07001671 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
1672 &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.
1673 # fullPathMatch must be between 1 and 1024 characters.
1674 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
1675 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
1676 { # matchRule criteria for request header matches.
1677 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
1678 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1679 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
1680 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
1681 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001682 # 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 -07001683 &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.
1684 # The default setting is false.
1685 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
1686 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1687 &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.
1688 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1689 &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.
1690 # For example for a range [-5, 0]
1691 # - -3 will match.
1692 # - 0 will not match.
1693 # - 0.25 will not match.
1694 # - -3someString will not match.
1695 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1696 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1697 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
1698 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
1699 },
1700 &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
1701 # 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.
1702 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1703 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
1704 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
1705 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1706 },
1707 ],
1708 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
1709 # The default value is false.
1710 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001711 # Not supported when the URL map is bound to target gRPC proxy.
1712 &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.
1713 # 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 -07001714 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
1715 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001716 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001717 { # 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.
1718 # 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.
1719 # 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.
1720 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
1721 # This list must not be empty and can have at the most 64 entries.
1722 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
1723 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
1724 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
1725 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
1726 # value can have a maximum length of 1024 characters.
1727 },
1728 ],
1729 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
1730 # Supported values are:
1731 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
1732 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
1733 },
1734 ],
1735 &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 /.
1736 # The value must be between 1 and 1024 characters.
1737 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
1738 &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 -07001739 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001740 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
1741 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
1742 # Only one of presentMatch, exactMatch or regexMatch must be set.
1743 &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.
1744 &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.
1745 # Only one of presentMatch, exactMatch or regexMatch must be set.
1746 &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
1747 # Only one of presentMatch, exactMatch or regexMatch must be set.
1748 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
1749 },
1750 ],
1751 &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
1752 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
1753 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
1754 },
1755 ],
1756 &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.
1757 # 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.
1758 # 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.
1759 &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.
1760 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001761 # 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 -07001762 &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 -07001763 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001764 &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.
1765 # Default is false.
1766 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
1767 &quot;A String&quot;,
1768 ],
1769 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
1770 &quot;A String&quot;,
1771 ],
1772 &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
1773 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1774 &quot;A String&quot;,
1775 ],
1776 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
1777 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1778 &quot;A String&quot;,
1779 ],
1780 &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.
1781 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
1782 &quot;A String&quot;,
1783 ],
1784 &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.
1785 },
1786 &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.
1787 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001788 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001789 &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.
1790 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
1791 # The value must be between 200 and 599 inclusive.
1792 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1793 # The value must be between 0.0 and 100.0 inclusive.
1794 },
1795 &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.
1796 &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.
1797 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1798 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1799 },
1800 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1801 # The value must be between 0.0 and 100.0 inclusive.
1802 },
1803 },
1804 &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 -07001805 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001806 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
1807 },
1808 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001809 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001810 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1811 &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.
1812 # 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.
1813 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1814 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1815 },
1816 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1817 # - 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.
1818 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1819 # -
1820 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1821 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1822 # - 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.
1823 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1824 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1825 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1826 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1827 &quot;A String&quot;,
1828 ],
1829 },
1830 &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.
1831 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001832 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001833 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1834 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1835 },
1836 &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 -07001837 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001838 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001839 &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.
1840 # The value must be between 1 and 255 characters.
1841 &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.
1842 # The value must be between 1 and 1024 characters.
1843 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001844 &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.
1845 # 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 -07001846 { # 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
1847 &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.
1848 &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.
1849 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001850 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1851 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001852 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1853 { # Specification determining how headers are added to requests or responses.
1854 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1855 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1856 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1857 # The default value is false.
1858 },
1859 ],
1860 &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.
1861 &quot;A String&quot;,
1862 ],
1863 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1864 { # Specification determining how headers are added to requests or responses.
1865 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1866 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1867 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1868 # The default value is false.
1869 },
1870 ],
1871 &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.
1872 &quot;A String&quot;,
1873 ],
1874 },
1875 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1876 # 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.
1877 # The value must be between 0 and 1000
1878 },
1879 ],
1880 },
1881 &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.
1882 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1883 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
1884 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001885 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001886 &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.
1887 # The value must be between 1 and 255 characters.
1888 &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.
1889 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1890 # The default is set to false.
1891 &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.
1892 # 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.
1893 # The value must be between 1 and 1024 characters.
1894 &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.
1895 # 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.
1896 # The value must be between 1 and 1024 characters.
1897 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
1898 # Supported values are:
1899 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1900 # - FOUND, which corresponds to 302.
1901 # - SEE_OTHER which corresponds to 303.
1902 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1903 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1904 &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.
1905 # The default is set to false.
1906 },
1907 },
1908 ],
1909 },
1910 ],
1911 &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.
1912 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1913 &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 -07001914 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001915 { # Message for the expected URL mappings.
1916 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001917 &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 -07001918 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001919 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
1920 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07001921 },
1922 ],
1923}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001924
1925 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
1926
1927Returns:
1928 An object of the form:
1929
1930 { # Represents an Operation resource.
1931 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001932 # Google Compute Engine has three Operation resources:
1933 #
1934 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1935 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001936 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1937 #
1938 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001939 # - For global operations, use the `globalOperations` resource.
1940 # - For regional operations, use the `regionOperations` resource.
1941 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001942 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001943 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001944 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1945 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1946 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1947 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1948 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1949 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001950 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001951 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1952 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1953 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001954 },
1955 ],
1956 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001957 &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`.
1958 &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.
1959 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1960 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1961 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1962 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1963 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1964 &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.
1965 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1966 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1967 &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.
1968 &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`.
1969 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1970 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1971 &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.
1972 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1973 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1974 {
1975 &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.
1976 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1977 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1978 {
1979 &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).
1980 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1981 },
1982 ],
1983 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1984 },
1985 ],
1986 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001987 }</pre>
1988</div>
1989
1990<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001991 <code class="details" id="invalidateCache">invalidateCache(project, region, urlMap, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001992 <pre>Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.
1993
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001994For more information, see [Invalidating cached content](/cdn/docs/invalidating-cached-content).
1995
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001996Args:
1997 project: string, Project ID for this request. (required)
1998 region: string, Name of the region scoping this request. (required)
1999 urlMap: string, Name of the UrlMap scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002000 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002001 The object takes the form of:
2002
2003{
Bu Sun Kim65020912020-05-20 12:08:20 -07002004 &quot;host&quot;: &quot;A String&quot;, # If set, this invalidation rule will only apply to requests with a Host header matching host.
2005 &quot;path&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002006 }
2007
2008 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
2009
2010Returns:
2011 An object of the form:
2012
2013 { # Represents an Operation resource.
2014 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002015 # Google Compute Engine has three Operation resources:
2016 #
2017 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2018 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002019 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2020 #
2021 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002022 # - For global operations, use the `globalOperations` resource.
2023 # - For regional operations, use the `regionOperations` resource.
2024 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002025 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002026 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002027 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2028 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2029 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2030 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2031 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2032 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002033 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002034 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2035 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2036 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002037 },
2038 ],
2039 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002040 &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`.
2041 &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.
2042 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2043 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2044 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2045 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2046 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2047 &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.
2048 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2049 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2050 &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.
2051 &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`.
2052 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2053 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2054 &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.
2055 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2056 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2057 {
2058 &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.
2059 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2060 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2061 {
2062 &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).
2063 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2064 },
2065 ],
2066 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2067 },
2068 ],
2069 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002070 }</pre>
2071</div>
2072
2073<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002074 <code class="details" id="list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002075 <pre>Retrieves the list of UrlMap resources available to the specified project in the specified region.
2076
2077Args:
2078 project: string, Project ID for this request. (required)
2079 region: string, Name of the region scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002080 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002081
Dan O'Mearadd494642020-05-01 07:42:23 -07002082For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002083
Dan O'Mearadd494642020-05-01 07:42:23 -07002084You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002085
Bu Sun Kim65020912020-05-20 12:08:20 -07002086To 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) ```
2087 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`)
2088 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
2089
2090You 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.
2091
2092Currently, only sorting by `name` or `creationTimestamp desc` is supported.
2093 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 -07002094 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002095
2096Returns:
2097 An object of the form:
2098
2099 { # Contains a list of UrlMap resources.
Bu Sun Kim65020912020-05-20 12:08:20 -07002100 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
2101 &quot;items&quot;: [ # A list of UrlMap resources.
Dan O'Mearadd494642020-05-01 07:42:23 -07002102 { # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002103 #
2104 # Google Compute Engine has two URL Map resources:
2105 #
2106 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
2107 #
2108 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
2109 #
2110 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
2111 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002112 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
2113 #
2114 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
2115 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002116 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
2117 #
2118 # 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.
2119 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2120 &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.
2121 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002122 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002123 # 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 -07002124 &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 -07002125 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002126 &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.
2127 # Default is false.
2128 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2129 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002130 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002131 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2132 &quot;A String&quot;,
2133 ],
2134 &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
2135 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2136 &quot;A String&quot;,
2137 ],
2138 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2139 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2140 &quot;A String&quot;,
2141 ],
2142 &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.
2143 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2144 &quot;A String&quot;,
2145 ],
2146 &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.
2147 },
2148 &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.
2149 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002150 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002151 &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.
2152 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2153 # The value must be between 200 and 599 inclusive.
2154 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2155 # The value must be between 0.0 and 100.0 inclusive.
2156 },
2157 &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.
2158 &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.
2159 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2160 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2161 },
2162 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2163 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002164 },
2165 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002166 &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 -07002167 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002168 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2169 },
2170 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002171 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002172 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2173 &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.
2174 # 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.
2175 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2176 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002177 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002178 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2179 # - 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.
2180 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2181 # -
2182 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2183 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2184 # - 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.
2185 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2186 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2187 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2188 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2189 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002190 ],
2191 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002192 &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.
2193 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002194 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002195 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2196 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2197 },
2198 &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 -07002199 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002200 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002201 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002202 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07002203 &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.
2204 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002205 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002206 &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.
2207 # 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 -07002208 { # 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
2209 &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.
2210 &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.
2211 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002212 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2213 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002214 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2215 { # Specification determining how headers are added to requests or responses.
2216 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2217 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2218 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2219 # The default value is false.
2220 },
2221 ],
2222 &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.
2223 &quot;A String&quot;,
2224 ],
2225 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2226 { # Specification determining how headers are added to requests or responses.
2227 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2228 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2229 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2230 # The default value is false.
2231 },
2232 ],
2233 &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.
2234 &quot;A String&quot;,
2235 ],
2236 },
2237 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2238 # 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.
2239 # The value must be between 0 and 1000
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002240 },
2241 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002242 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002243 &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.
2244 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002245 # 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 -07002246 &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.
2247 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002248 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002249 &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.
2250 # The value must be between 1 and 255 characters.
2251 &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.
2252 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2253 # The default is set to false.
2254 &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.
2255 # 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.
2256 # The value must be between 1 and 1024 characters.
2257 &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.
2258 # 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.
2259 # The value must be between 1 and 1024 characters.
2260 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2261 # Supported values are:
2262 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2263 # - FOUND, which corresponds to 302.
2264 # - SEE_OTHER which corresponds to 303.
2265 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2266 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2267 &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.
2268 # The default is set to false.
2269 },
2270 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2271 &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.
2272 #
2273 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
2274 &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.
2275 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002276 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2277 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002278 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2279 { # Specification determining how headers are added to requests or responses.
2280 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2281 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2282 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2283 # The default value is false.
2284 },
2285 ],
2286 &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.
2287 &quot;A String&quot;,
2288 ],
2289 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
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;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.
2298 &quot;A String&quot;,
2299 ],
2300 },
2301 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
2302 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
2303 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2304 &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 -07002305 # * 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 -07002306 &quot;A String&quot;,
2307 ],
2308 &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.
2309 },
2310 ],
2311 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2312 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
2313 &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.
2314 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
2315 { # 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.
2316 &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.
2317 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002318 # 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 -07002319 &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 -07002320 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002321 &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.
2322 # Default is false.
2323 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2324 &quot;A String&quot;,
2325 ],
2326 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2327 &quot;A String&quot;,
2328 ],
2329 &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
2330 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2331 &quot;A String&quot;,
2332 ],
2333 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2334 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2335 &quot;A String&quot;,
2336 ],
2337 &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.
2338 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2339 &quot;A String&quot;,
2340 ],
2341 &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.
2342 },
2343 &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.
2344 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002345 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002346 &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.
2347 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2348 # The value must be between 200 and 599 inclusive.
2349 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2350 # The value must be between 0.0 and 100.0 inclusive.
2351 },
2352 &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.
2353 &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.
2354 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2355 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2356 },
2357 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2358 # The value must be between 0.0 and 100.0 inclusive.
2359 },
2360 },
2361 &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 -07002362 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002363 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2364 },
2365 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002366 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002367 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2368 &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.
2369 # 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.
2370 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2371 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2372 },
2373 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2374 # - 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.
2375 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2376 # -
2377 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2378 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2379 # - 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.
2380 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2381 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2382 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2383 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2384 &quot;A String&quot;,
2385 ],
2386 },
2387 &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.
2388 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002389 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002390 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2391 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2392 },
2393 &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 -07002394 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002395 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002396 &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.
2397 # The value must be between 1 and 255 characters.
2398 &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.
2399 # The value must be between 1 and 1024 characters.
2400 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002401 &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.
2402 # 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 -07002403 { # 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
2404 &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.
2405 &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.
2406 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002407 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2408 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002409 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2410 { # Specification determining how headers are added to requests or responses.
2411 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2412 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2413 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2414 # The default value is false.
2415 },
2416 ],
2417 &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.
2418 &quot;A String&quot;,
2419 ],
2420 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2421 { # Specification determining how headers are added to requests or responses.
2422 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2423 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2424 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2425 # The default value is false.
2426 },
2427 ],
2428 &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.
2429 &quot;A String&quot;,
2430 ],
2431 },
2432 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2433 # 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.
2434 # The value must be between 0 and 1000
2435 },
2436 ],
2437 },
2438 &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:
2439 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
2440 # - compute/v1/projects/project/global/backendServices/backendService
2441 # - 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.
2442 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
2443 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
2444 # - compute.backendBuckets.use
2445 # - compute.backendServices.use
2446 &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.
2447 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002448 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002449 &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.
2450 # The value must be between 1 and 255 characters.
2451 &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.
2452 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2453 # The default is set to false.
2454 &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.
2455 # 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.
2456 # The value must be between 1 and 1024 characters.
2457 &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.
2458 # 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.
2459 # The value must be between 1 and 1024 characters.
2460 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2461 # Supported values are:
2462 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2463 # - FOUND, which corresponds to 302.
2464 # - SEE_OTHER which corresponds to 303.
2465 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2466 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2467 &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.
2468 # The default is set to false.
2469 },
2470 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2471 &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.
2472 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002473 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2474 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002475 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2476 { # Specification determining how headers are added to requests or responses.
2477 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2478 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2479 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2480 # The default value is false.
2481 },
2482 ],
2483 &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.
2484 &quot;A String&quot;,
2485 ],
2486 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2487 { # Specification determining how headers are added to requests or responses.
2488 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2489 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2490 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2491 # The default value is false.
2492 },
2493 ],
2494 &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.
2495 &quot;A String&quot;,
2496 ],
2497 },
2498 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
2499 &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.
2500 # 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.
2501 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
2502 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
2503 &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.
2504 &quot;A String&quot;,
2505 ],
2506 &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.
2507 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002508 # 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 -07002509 &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 -07002510 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002511 &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.
2512 # Default is false.
2513 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2514 &quot;A String&quot;,
2515 ],
2516 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2517 &quot;A String&quot;,
2518 ],
2519 &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
2520 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2521 &quot;A String&quot;,
2522 ],
2523 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2524 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2525 &quot;A String&quot;,
2526 ],
2527 &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.
2528 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2529 &quot;A String&quot;,
2530 ],
2531 &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.
2532 },
2533 &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.
2534 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002535 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002536 &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.
2537 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2538 # The value must be between 200 and 599 inclusive.
2539 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2540 # The value must be between 0.0 and 100.0 inclusive.
2541 },
2542 &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.
2543 &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.
2544 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2545 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2546 },
2547 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2548 # The value must be between 0.0 and 100.0 inclusive.
2549 },
2550 },
2551 &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 -07002552 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002553 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2554 },
2555 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002556 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002557 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2558 &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.
2559 # 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.
2560 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2561 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2562 },
2563 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2564 # - 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.
2565 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2566 # -
2567 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2568 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2569 # - 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.
2570 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2571 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2572 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2573 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2574 &quot;A String&quot;,
2575 ],
2576 },
2577 &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.
2578 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002579 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002580 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2581 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2582 },
2583 &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 -07002584 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002585 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002586 &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.
2587 # The value must be between 1 and 255 characters.
2588 &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.
2589 # The value must be between 1 and 1024 characters.
2590 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002591 &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.
2592 # 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 -07002593 { # 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
2594 &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.
2595 &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.
2596 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002597 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2598 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002599 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2600 { # Specification determining how headers are added to requests or responses.
2601 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2602 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2603 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2604 # The default value is false.
2605 },
2606 ],
2607 &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.
2608 &quot;A String&quot;,
2609 ],
2610 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2611 { # Specification determining how headers are added to requests or responses.
2612 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2613 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2614 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2615 # The default value is false.
2616 },
2617 ],
2618 &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.
2619 &quot;A String&quot;,
2620 ],
2621 },
2622 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2623 # 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.
2624 # The value must be between 0 and 1000
2625 },
2626 ],
2627 },
2628 &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.
2629 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2630 &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.
2631 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002632 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002633 &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.
2634 # The value must be between 1 and 255 characters.
2635 &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.
2636 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2637 # The default is set to false.
2638 &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.
2639 # 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.
2640 # The value must be between 1 and 1024 characters.
2641 &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.
2642 # 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.
2643 # The value must be between 1 and 1024 characters.
2644 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2645 # Supported values are:
2646 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2647 # - FOUND, which corresponds to 302.
2648 # - SEE_OTHER which corresponds to 303.
2649 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2650 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2651 &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.
2652 # The default is set to false.
2653 },
2654 },
2655 ],
2656 &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.
2657 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
2658 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
2659 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
2660 # The description can have a maximum length of 1024 characters.
2661 &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.
2662 # 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 -07002663 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2664 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002665 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2666 { # Specification determining how headers are added to requests or responses.
2667 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2668 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2669 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2670 # The default value is false.
2671 },
2672 ],
2673 &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.
2674 &quot;A String&quot;,
2675 ],
2676 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2677 { # Specification determining how headers are added to requests or responses.
2678 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2679 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2680 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2681 # The default value is false.
2682 },
2683 ],
2684 &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.
2685 &quot;A String&quot;,
2686 ],
2687 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002688 &quot;httpFilterConfigs&quot;: [ # Outbound route specific configuration for networkservices.HttpFilter resources enabled by Traffic Director. httpFilterConfigs only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
2689 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
2690 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
2691 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
2692 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
2693 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
2694 },
2695 ],
2696 &quot;httpFilterMetadata&quot;: [ # Outbound route specific metadata supplied to networkservices.HttpFilter resources enabled by Traffic Director. httpFilterMetadata only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
2697 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
2698 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
2699 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
2700 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
2701 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
2702 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
2703 },
2704 ],
2705 &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 -07002706 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
2707 &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.
2708 # fullPathMatch must be between 1 and 1024 characters.
2709 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2710 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
2711 { # matchRule criteria for request header matches.
2712 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
2713 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2714 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
2715 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
2716 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002717 # 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 -07002718 &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.
2719 # The default setting is false.
2720 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
2721 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2722 &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.
2723 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2724 &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.
2725 # For example for a range [-5, 0]
2726 # - -3 will match.
2727 # - 0 will not match.
2728 # - 0.25 will not match.
2729 # - -3someString will not match.
2730 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2731 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2732 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
2733 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
2734 },
2735 &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
2736 # 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.
2737 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2738 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
2739 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
2740 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2741 },
2742 ],
2743 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
2744 # The default value is false.
2745 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002746 # Not supported when the URL map is bound to target gRPC proxy.
2747 &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.
2748 # 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 -07002749 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
2750 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002751 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002752 { # 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.
2753 # 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.
2754 # 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.
2755 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
2756 # This list must not be empty and can have at the most 64 entries.
2757 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
2758 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
2759 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
2760 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
2761 # value can have a maximum length of 1024 characters.
2762 },
2763 ],
2764 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
2765 # Supported values are:
2766 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
2767 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
2768 },
2769 ],
2770 &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 /.
2771 # The value must be between 1 and 1024 characters.
2772 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2773 &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 -07002774 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002775 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
2776 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
2777 # Only one of presentMatch, exactMatch or regexMatch must be set.
2778 &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.
2779 &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.
2780 # Only one of presentMatch, exactMatch or regexMatch must be set.
2781 &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
2782 # Only one of presentMatch, exactMatch or regexMatch must be set.
2783 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
2784 },
2785 ],
2786 &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
2787 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2788 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
2789 },
2790 ],
2791 &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.
2792 # 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.
2793 # 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.
2794 &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.
2795 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002796 # 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 -07002797 &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 -07002798 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002799 &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.
2800 # Default is false.
2801 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2802 &quot;A String&quot;,
2803 ],
2804 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2805 &quot;A String&quot;,
2806 ],
2807 &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
2808 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2809 &quot;A String&quot;,
2810 ],
2811 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2812 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2813 &quot;A String&quot;,
2814 ],
2815 &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.
2816 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2817 &quot;A String&quot;,
2818 ],
2819 &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.
2820 },
2821 &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.
2822 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002823 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002824 &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.
2825 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2826 # The value must be between 200 and 599 inclusive.
2827 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2828 # The value must be between 0.0 and 100.0 inclusive.
2829 },
2830 &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.
2831 &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.
2832 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2833 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2834 },
2835 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2836 # The value must be between 0.0 and 100.0 inclusive.
2837 },
2838 },
2839 &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 -07002840 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002841 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2842 },
2843 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002844 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002845 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2846 &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.
2847 # 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.
2848 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2849 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2850 },
2851 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2852 # - 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.
2853 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2854 # -
2855 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2856 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2857 # - 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.
2858 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2859 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2860 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2861 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2862 &quot;A String&quot;,
2863 ],
2864 },
2865 &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.
2866 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002867 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002868 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2869 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2870 },
2871 &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 -07002872 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002873 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002874 &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.
2875 # The value must be between 1 and 255 characters.
2876 &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.
2877 # The value must be between 1 and 1024 characters.
2878 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002879 &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.
2880 # 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 -07002881 { # 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
2882 &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.
2883 &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.
2884 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002885 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2886 # Not supported when 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;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2888 { # Specification determining how headers are added to requests or responses.
2889 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2890 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2891 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2892 # The default value is false.
2893 },
2894 ],
2895 &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.
2896 &quot;A String&quot;,
2897 ],
2898 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2899 { # Specification determining how headers are added to requests or responses.
2900 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2901 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2902 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2903 # The default value is false.
2904 },
2905 ],
2906 &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.
2907 &quot;A String&quot;,
2908 ],
2909 },
2910 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2911 # 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.
2912 # The value must be between 0 and 1000
2913 },
2914 ],
2915 },
2916 &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.
2917 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2918 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
2919 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002920 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002921 &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.
2922 # The value must be between 1 and 255 characters.
2923 &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.
2924 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2925 # The default is set to false.
2926 &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.
2927 # 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.
2928 # The value must be between 1 and 1024 characters.
2929 &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.
2930 # 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.
2931 # The value must be between 1 and 1024 characters.
2932 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2933 # Supported values are:
2934 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2935 # - FOUND, which corresponds to 302.
2936 # - SEE_OTHER which corresponds to 303.
2937 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2938 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2939 &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.
2940 # The default is set to false.
2941 },
2942 },
2943 ],
2944 },
2945 ],
2946 &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.
2947 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2948 &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 -07002949 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002950 { # Message for the expected URL mappings.
2951 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002952 &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 -07002953 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002954 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
2955 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07002956 },
2957 ],
2958 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002959 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002960 &quot;kind&quot;: &quot;compute#urlMapList&quot;, # Type of resource.
2961 &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.
2962 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2963 &quot;warning&quot;: { # [Output Only] Informational warning message.
2964 &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.
2965 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2966 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002967 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002968 &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).
2969 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002970 },
2971 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002972 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002973 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002974 }</pre>
2975</div>
2976
2977<div class="method">
2978 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2979 <pre>Retrieves the next page of results.
2980
2981Args:
2982 previous_request: The request for the previous page. (required)
2983 previous_response: The response from the request for the previous page. (required)
2984
2985Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07002986 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002987 page. Returns None if there are no more items in the collection.
2988 </pre>
2989</div>
2990
2991<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002992 <code class="details" id="patch">patch(project, region, urlMap, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002993 <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.
2994
2995Args:
2996 project: string, Project ID for this request. (required)
2997 region: string, Name of the region scoping this request. (required)
2998 urlMap: string, Name of the UrlMap resource to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002999 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003000 The object takes the form of:
3001
Dan O'Mearadd494642020-05-01 07:42:23 -07003002{ # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003003 #
3004 # Google Compute Engine has two URL Map resources:
3005 #
3006 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
3007 #
3008 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
3009 #
3010 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
3011 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003012 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
3013 #
3014 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
3015 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003016 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
3017 #
3018 # 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.
3019 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
3020 &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.
3021 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003022 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003023 # 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 -07003024 &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 -07003025 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003026 &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.
3027 # Default is false.
3028 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3029 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003030 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003031 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3032 &quot;A String&quot;,
3033 ],
3034 &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
3035 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3036 &quot;A String&quot;,
3037 ],
3038 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3039 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3040 &quot;A String&quot;,
3041 ],
3042 &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.
3043 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3044 &quot;A String&quot;,
3045 ],
3046 &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.
3047 },
3048 &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.
3049 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003050 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003051 &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.
3052 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3053 # The value must be between 200 and 599 inclusive.
3054 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3055 # The value must be between 0.0 and 100.0 inclusive.
3056 },
3057 &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.
3058 &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.
3059 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3060 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3061 },
3062 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3063 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003064 },
3065 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003066 &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 -07003067 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003068 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3069 },
3070 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003071 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003072 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3073 &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.
3074 # 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.
3075 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3076 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003077 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003078 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3079 # - 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.
3080 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3081 # -
3082 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3083 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3084 # - 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.
3085 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3086 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3087 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3088 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3089 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003090 ],
3091 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003092 &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.
3093 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003094 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003095 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3096 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3097 },
3098 &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 -07003099 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003100 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003101 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003102 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07003103 &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.
3104 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003105 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003106 &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.
3107 # 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 -07003108 { # 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
3109 &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.
3110 &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.
3111 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003112 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3113 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003114 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3115 { # Specification determining how headers are added to requests or responses.
3116 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3117 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3118 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3119 # The default value is false.
3120 },
3121 ],
3122 &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.
3123 &quot;A String&quot;,
3124 ],
3125 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3126 { # Specification determining how headers are added to requests or responses.
3127 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3128 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3129 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3130 # The default value is false.
3131 },
3132 ],
3133 &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.
3134 &quot;A String&quot;,
3135 ],
3136 },
3137 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3138 # 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.
3139 # The value must be between 0 and 1000
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003140 },
3141 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003142 },
3143 &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.
3144 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003145 # 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 -07003146 &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.
3147 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003148 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003149 &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.
3150 # The value must be between 1 and 255 characters.
3151 &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.
3152 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3153 # The default is set to false.
3154 &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.
3155 # 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.
3156 # The value must be between 1 and 1024 characters.
3157 &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.
3158 # 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.
3159 # The value must be between 1 and 1024 characters.
3160 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3161 # Supported values are:
3162 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3163 # - FOUND, which corresponds to 302.
3164 # - SEE_OTHER which corresponds to 303.
3165 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3166 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3167 &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.
3168 # The default is set to false.
3169 },
3170 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3171 &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.
3172 #
3173 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
3174 &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.
3175 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003176 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3177 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003178 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3179 { # Specification determining how headers are added to requests or responses.
3180 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3181 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3182 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3183 # The default value is false.
3184 },
3185 ],
3186 &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.
3187 &quot;A String&quot;,
3188 ],
3189 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3190 { # Specification determining how headers are added to requests or responses.
3191 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3192 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3193 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3194 # The default value is false.
3195 },
3196 ],
3197 &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.
3198 &quot;A String&quot;,
3199 ],
3200 },
3201 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
3202 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
3203 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3204 &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 -07003205 # * 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 -07003206 &quot;A String&quot;,
3207 ],
3208 &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.
3209 },
3210 ],
3211 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3212 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
3213 &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.
3214 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
3215 { # 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.
3216 &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.
3217 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003218 # 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 -07003219 &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 -07003220 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003221 &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.
3222 # Default is false.
3223 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3224 &quot;A String&quot;,
3225 ],
3226 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3227 &quot;A String&quot;,
3228 ],
3229 &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
3230 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3231 &quot;A String&quot;,
3232 ],
3233 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3234 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3235 &quot;A String&quot;,
3236 ],
3237 &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.
3238 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3239 &quot;A String&quot;,
3240 ],
3241 &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.
3242 },
3243 &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.
3244 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003245 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003246 &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.
3247 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3248 # The value must be between 200 and 599 inclusive.
3249 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3250 # The value must be between 0.0 and 100.0 inclusive.
3251 },
3252 &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.
3253 &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.
3254 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3255 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3256 },
3257 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3258 # The value must be between 0.0 and 100.0 inclusive.
3259 },
3260 },
3261 &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 -07003262 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003263 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3264 },
3265 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003266 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003267 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3268 &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.
3269 # 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.
3270 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3271 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3272 },
3273 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3274 # - 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.
3275 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3276 # -
3277 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3278 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3279 # - 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.
3280 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3281 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3282 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3283 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3284 &quot;A String&quot;,
3285 ],
3286 },
3287 &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.
3288 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003289 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003290 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3291 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3292 },
3293 &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 -07003294 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003295 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003296 &quot;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.
3297 # The value must be between 1 and 255 characters.
3298 &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.
3299 # The value must be between 1 and 1024 characters.
3300 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003301 &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.
3302 # 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 -07003303 { # 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
3304 &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.
3305 &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.
3306 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003307 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3308 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003309 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3310 { # Specification determining how headers are added to requests or responses.
3311 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3312 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3313 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3314 # The default value is false.
3315 },
3316 ],
3317 &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.
3318 &quot;A String&quot;,
3319 ],
3320 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3321 { # Specification determining how headers are added to requests or responses.
3322 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3323 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3324 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3325 # The default value is false.
3326 },
3327 ],
3328 &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.
3329 &quot;A String&quot;,
3330 ],
3331 },
3332 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3333 # 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.
3334 # The value must be between 0 and 1000
3335 },
3336 ],
3337 },
3338 &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:
3339 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
3340 # - compute/v1/projects/project/global/backendServices/backendService
3341 # - 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.
3342 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3343 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
3344 # - compute.backendBuckets.use
3345 # - compute.backendServices.use
3346 &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.
3347 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003348 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003349 &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.
3350 # The value must be between 1 and 255 characters.
3351 &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.
3352 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3353 # The default is set to false.
3354 &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.
3355 # 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.
3356 # The value must be between 1 and 1024 characters.
3357 &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.
3358 # 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.
3359 # The value must be between 1 and 1024 characters.
3360 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3361 # Supported values are:
3362 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3363 # - FOUND, which corresponds to 302.
3364 # - SEE_OTHER which corresponds to 303.
3365 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3366 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3367 &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.
3368 # The default is set to false.
3369 },
3370 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3371 &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.
3372 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003373 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3374 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003375 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3376 { # Specification determining how headers are added to requests or responses.
3377 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3378 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3379 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3380 # The default value is false.
3381 },
3382 ],
3383 &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.
3384 &quot;A String&quot;,
3385 ],
3386 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3387 { # Specification determining how headers are added to requests or responses.
3388 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3389 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3390 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3391 # The default value is false.
3392 },
3393 ],
3394 &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.
3395 &quot;A String&quot;,
3396 ],
3397 },
3398 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
3399 &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.
3400 # 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.
3401 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
3402 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
3403 &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.
3404 &quot;A String&quot;,
3405 ],
3406 &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.
3407 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003408 # 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 -07003409 &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 -07003410 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003411 &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.
3412 # Default is false.
3413 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3414 &quot;A String&quot;,
3415 ],
3416 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3417 &quot;A String&quot;,
3418 ],
3419 &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
3420 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3421 &quot;A String&quot;,
3422 ],
3423 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3424 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3425 &quot;A String&quot;,
3426 ],
3427 &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.
3428 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3429 &quot;A String&quot;,
3430 ],
3431 &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.
3432 },
3433 &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.
3434 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003435 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003436 &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.
3437 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3438 # The value must be between 200 and 599 inclusive.
3439 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3440 # The value must be between 0.0 and 100.0 inclusive.
3441 },
3442 &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.
3443 &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.
3444 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3445 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3446 },
3447 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3448 # The value must be between 0.0 and 100.0 inclusive.
3449 },
3450 },
3451 &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 -07003452 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003453 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3454 },
3455 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003456 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003457 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3458 &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.
3459 # 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.
3460 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3461 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3462 },
3463 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3464 # - 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.
3465 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3466 # -
3467 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3468 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3469 # - 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.
3470 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3471 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3472 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3473 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3474 &quot;A String&quot;,
3475 ],
3476 },
3477 &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.
3478 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003479 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003480 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3481 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3482 },
3483 &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 -07003484 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003485 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003486 &quot;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.
3487 # The value must be between 1 and 255 characters.
3488 &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.
3489 # The value must be between 1 and 1024 characters.
3490 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003491 &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.
3492 # 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 -07003493 { # 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
3494 &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.
3495 &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.
3496 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003497 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3498 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003499 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3500 { # Specification determining how headers are added to requests or responses.
3501 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3502 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3503 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3504 # The default value is false.
3505 },
3506 ],
3507 &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.
3508 &quot;A String&quot;,
3509 ],
3510 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3511 { # Specification determining how headers are added to requests or responses.
3512 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3513 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3514 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3515 # The default value is false.
3516 },
3517 ],
3518 &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.
3519 &quot;A String&quot;,
3520 ],
3521 },
3522 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3523 # 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.
3524 # The value must be between 0 and 1000
3525 },
3526 ],
3527 },
3528 &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.
3529 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3530 &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.
3531 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003532 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003533 &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.
3534 # The value must be between 1 and 255 characters.
3535 &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.
3536 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3537 # The default is set to false.
3538 &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.
3539 # 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.
3540 # The value must be between 1 and 1024 characters.
3541 &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.
3542 # 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.
3543 # The value must be between 1 and 1024 characters.
3544 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3545 # Supported values are:
3546 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3547 # - FOUND, which corresponds to 302.
3548 # - SEE_OTHER which corresponds to 303.
3549 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3550 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3551 &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.
3552 # The default is set to false.
3553 },
3554 },
3555 ],
3556 &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.
3557 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
3558 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
3559 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
3560 # The description can have a maximum length of 1024 characters.
3561 &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.
3562 # 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 -07003563 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3564 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003565 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3566 { # Specification determining how headers are added to requests or responses.
3567 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3568 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3569 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3570 # The default value is false.
3571 },
3572 ],
3573 &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.
3574 &quot;A String&quot;,
3575 ],
3576 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3577 { # Specification determining how headers are added to requests or responses.
3578 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3579 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3580 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3581 # The default value is false.
3582 },
3583 ],
3584 &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.
3585 &quot;A String&quot;,
3586 ],
3587 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003588 &quot;httpFilterConfigs&quot;: [ # Outbound route specific configuration for networkservices.HttpFilter resources enabled by Traffic Director. httpFilterConfigs only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
3589 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
3590 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
3591 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
3592 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
3593 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
3594 },
3595 ],
3596 &quot;httpFilterMetadata&quot;: [ # Outbound route specific metadata supplied to networkservices.HttpFilter resources enabled by Traffic Director. httpFilterMetadata only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
3597 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
3598 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
3599 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
3600 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
3601 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
3602 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
3603 },
3604 ],
3605 &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 -07003606 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
3607 &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.
3608 # fullPathMatch must be between 1 and 1024 characters.
3609 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3610 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
3611 { # matchRule criteria for request header matches.
3612 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
3613 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3614 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
3615 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
3616 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003617 # 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 -07003618 &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.
3619 # The default setting is false.
3620 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
3621 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3622 &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.
3623 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3624 &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.
3625 # For example for a range [-5, 0]
3626 # - -3 will match.
3627 # - 0 will not match.
3628 # - 0.25 will not match.
3629 # - -3someString will not match.
3630 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3631 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3632 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
3633 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
3634 },
3635 &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
3636 # 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.
3637 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3638 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
3639 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
3640 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3641 },
3642 ],
3643 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
3644 # The default value is false.
3645 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003646 # Not supported when the URL map is bound to target gRPC proxy.
3647 &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.
3648 # 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 -07003649 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
3650 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003651 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003652 { # 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.
3653 # 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.
3654 # 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.
3655 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
3656 # This list must not be empty and can have at the most 64 entries.
3657 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
3658 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
3659 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
3660 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
3661 # value can have a maximum length of 1024 characters.
3662 },
3663 ],
3664 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
3665 # Supported values are:
3666 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
3667 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
3668 },
3669 ],
3670 &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 /.
3671 # The value must be between 1 and 1024 characters.
3672 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3673 &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 -07003674 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003675 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
3676 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
3677 # Only one of presentMatch, exactMatch or regexMatch must be set.
3678 &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.
3679 &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.
3680 # Only one of presentMatch, exactMatch or regexMatch must be set.
3681 &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
3682 # Only one of presentMatch, exactMatch or regexMatch must be set.
3683 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
3684 },
3685 ],
3686 &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
3687 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3688 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
3689 },
3690 ],
3691 &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.
3692 # 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.
3693 # 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.
3694 &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.
3695 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003696 # 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 -07003697 &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 -07003698 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003699 &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.
3700 # Default is false.
3701 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3702 &quot;A String&quot;,
3703 ],
3704 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3705 &quot;A String&quot;,
3706 ],
3707 &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
3708 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3709 &quot;A String&quot;,
3710 ],
3711 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3712 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3713 &quot;A String&quot;,
3714 ],
3715 &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.
3716 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3717 &quot;A String&quot;,
3718 ],
3719 &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.
3720 },
3721 &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.
3722 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003723 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003724 &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.
3725 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3726 # The value must be between 200 and 599 inclusive.
3727 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3728 # The value must be between 0.0 and 100.0 inclusive.
3729 },
3730 &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.
3731 &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.
3732 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3733 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3734 },
3735 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3736 # The value must be between 0.0 and 100.0 inclusive.
3737 },
3738 },
3739 &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 -07003740 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003741 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3742 },
3743 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003744 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003745 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3746 &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.
3747 # 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.
3748 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3749 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3750 },
3751 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3752 # - 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.
3753 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3754 # -
3755 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3756 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3757 # - 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.
3758 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3759 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3760 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3761 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3762 &quot;A String&quot;,
3763 ],
3764 },
3765 &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.
3766 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003767 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003768 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3769 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3770 },
3771 &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 -07003772 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003773 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003774 &quot;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.
3775 # The value must be between 1 and 255 characters.
3776 &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.
3777 # The value must be between 1 and 1024 characters.
3778 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003779 &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.
3780 # 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 -07003781 { # 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
3782 &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.
3783 &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.
3784 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003785 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3786 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003787 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3788 { # Specification determining how headers are added to requests or responses.
3789 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3790 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3791 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3792 # The default value is false.
3793 },
3794 ],
3795 &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.
3796 &quot;A String&quot;,
3797 ],
3798 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3799 { # Specification determining how headers are added to requests or responses.
3800 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3801 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3802 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3803 # The default value is false.
3804 },
3805 ],
3806 &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.
3807 &quot;A String&quot;,
3808 ],
3809 },
3810 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3811 # 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.
3812 # The value must be between 0 and 1000
3813 },
3814 ],
3815 },
3816 &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.
3817 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3818 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
3819 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003820 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003821 &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.
3822 # The value must be between 1 and 255 characters.
3823 &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.
3824 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3825 # The default is set to false.
3826 &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.
3827 # 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.
3828 # The value must be between 1 and 1024 characters.
3829 &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.
3830 # 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.
3831 # The value must be between 1 and 1024 characters.
3832 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3833 # Supported values are:
3834 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3835 # - FOUND, which corresponds to 302.
3836 # - SEE_OTHER which corresponds to 303.
3837 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3838 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3839 &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.
3840 # The default is set to false.
3841 },
3842 },
3843 ],
3844 },
3845 ],
3846 &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.
3847 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3848 &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 -07003849 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003850 { # Message for the expected URL mappings.
3851 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003852 &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 -07003853 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003854 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
3855 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07003856 },
3857 ],
3858}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003859
3860 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
3861
3862Returns:
3863 An object of the form:
3864
3865 { # Represents an Operation resource.
3866 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003867 # Google Compute Engine has three Operation resources:
3868 #
3869 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3870 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003871 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3872 #
3873 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003874 # - For global operations, use the `globalOperations` resource.
3875 # - For regional operations, use the `regionOperations` resource.
3876 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003877 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003878 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07003879 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3880 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3881 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3882 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3883 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3884 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003885 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003886 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3887 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3888 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003889 },
3890 ],
3891 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003892 &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`.
3893 &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.
3894 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3895 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3896 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3897 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3898 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3899 &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.
3900 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3901 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3902 &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.
3903 &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`.
3904 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3905 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3906 &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.
3907 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3908 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3909 {
3910 &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.
3911 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3912 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3913 {
3914 &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).
3915 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3916 },
3917 ],
3918 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3919 },
3920 ],
3921 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003922 }</pre>
3923</div>
3924
3925<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003926 <code class="details" id="update">update(project, region, urlMap, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003927 <pre>Updates the specified UrlMap resource with the data included in the request.
3928
3929Args:
3930 project: string, Project ID for this request. (required)
3931 region: string, Name of the region scoping this request. (required)
3932 urlMap: string, Name of the UrlMap resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003933 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003934 The object takes the form of:
3935
Dan O'Mearadd494642020-05-01 07:42:23 -07003936{ # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003937 #
3938 # Google Compute Engine has two URL Map resources:
3939 #
3940 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
3941 #
3942 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
3943 #
3944 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
3945 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003946 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
3947 #
3948 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
3949 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003950 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
3951 #
3952 # 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.
3953 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
3954 &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.
3955 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003956 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003957 # 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 -07003958 &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 -07003959 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003960 &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.
3961 # Default is false.
3962 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3963 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003964 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003965 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3966 &quot;A String&quot;,
3967 ],
3968 &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
3969 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3970 &quot;A String&quot;,
3971 ],
3972 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3973 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3974 &quot;A String&quot;,
3975 ],
3976 &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.
3977 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3978 &quot;A String&quot;,
3979 ],
3980 &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.
3981 },
3982 &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.
3983 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003984 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003985 &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.
3986 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3987 # The value must be between 200 and 599 inclusive.
3988 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3989 # The value must be between 0.0 and 100.0 inclusive.
3990 },
3991 &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.
3992 &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.
3993 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3994 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3995 },
3996 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3997 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003998 },
3999 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004000 &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 -07004001 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004002 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4003 },
4004 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004005 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004006 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4007 &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.
4008 # 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.
4009 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4010 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004011 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004012 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4013 # - 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.
4014 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4015 # -
4016 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4017 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4018 # - 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.
4019 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4020 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4021 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4022 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4023 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004024 ],
4025 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004026 &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.
4027 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004028 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004029 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4030 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4031 },
4032 &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 -07004033 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004034 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004035 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004036 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07004037 &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.
4038 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004039 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004040 &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.
4041 # 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 -07004042 { # 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
4043 &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.
4044 &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.
4045 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004046 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4047 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004048 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4049 { # Specification determining how headers are added to requests or responses.
4050 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4051 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4052 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4053 # The default value is false.
4054 },
4055 ],
4056 &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.
4057 &quot;A String&quot;,
4058 ],
4059 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4060 { # Specification determining how headers are added to requests or responses.
4061 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4062 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4063 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4064 # The default value is false.
4065 },
4066 ],
4067 &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.
4068 &quot;A String&quot;,
4069 ],
4070 },
4071 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4072 # 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.
4073 # The value must be between 0 and 1000
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004074 },
4075 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004076 },
4077 &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.
4078 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004079 # 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 -07004080 &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.
4081 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004082 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004083 &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.
4084 # The value must be between 1 and 255 characters.
4085 &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.
4086 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4087 # The default is set to false.
4088 &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.
4089 # 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.
4090 # The value must be between 1 and 1024 characters.
4091 &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.
4092 # 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.
4093 # The value must be between 1 and 1024 characters.
4094 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4095 # Supported values are:
4096 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4097 # - FOUND, which corresponds to 302.
4098 # - SEE_OTHER which corresponds to 303.
4099 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4100 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4101 &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.
4102 # The default is set to false.
4103 },
4104 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4105 &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.
4106 #
4107 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
4108 &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.
4109 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004110 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4111 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004112 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4113 { # Specification determining how headers are added to requests or responses.
4114 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4115 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4116 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4117 # The default value is false.
4118 },
4119 ],
4120 &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.
4121 &quot;A String&quot;,
4122 ],
4123 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4124 { # Specification determining how headers are added to requests or responses.
4125 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4126 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4127 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4128 # The default value is false.
4129 },
4130 ],
4131 &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.
4132 &quot;A String&quot;,
4133 ],
4134 },
4135 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
4136 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
4137 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4138 &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 -07004139 # * 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 -07004140 &quot;A String&quot;,
4141 ],
4142 &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.
4143 },
4144 ],
4145 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4146 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
4147 &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.
4148 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
4149 { # 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.
4150 &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.
4151 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004152 # 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 -07004153 &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 -07004154 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004155 &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.
4156 # Default is false.
4157 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4158 &quot;A String&quot;,
4159 ],
4160 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4161 &quot;A String&quot;,
4162 ],
4163 &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
4164 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4165 &quot;A String&quot;,
4166 ],
4167 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4168 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4169 &quot;A String&quot;,
4170 ],
4171 &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.
4172 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4173 &quot;A String&quot;,
4174 ],
4175 &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.
4176 },
4177 &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.
4178 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004179 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004180 &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.
4181 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4182 # The value must be between 200 and 599 inclusive.
4183 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4184 # The value must be between 0.0 and 100.0 inclusive.
4185 },
4186 &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.
4187 &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.
4188 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4189 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4190 },
4191 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4192 # The value must be between 0.0 and 100.0 inclusive.
4193 },
4194 },
4195 &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 -07004196 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004197 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4198 },
4199 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004200 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004201 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4202 &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.
4203 # 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.
4204 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4205 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4206 },
4207 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4208 # - 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.
4209 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4210 # -
4211 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4212 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4213 # - 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.
4214 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4215 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4216 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4217 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4218 &quot;A String&quot;,
4219 ],
4220 },
4221 &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.
4222 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004223 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004224 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less 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;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 -07004228 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004229 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004230 &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.
4231 # The value must be between 1 and 255 characters.
4232 &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.
4233 # The value must be between 1 and 1024 characters.
4234 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004235 &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.
4236 # 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 -07004237 { # 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
4238 &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.
4239 &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.
4240 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004241 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4242 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004243 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4244 { # Specification determining how headers are added to requests or responses.
4245 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4246 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4247 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4248 # The default value is false.
4249 },
4250 ],
4251 &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.
4252 &quot;A String&quot;,
4253 ],
4254 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4255 { # Specification determining how headers are added to requests or responses.
4256 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4257 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4258 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4259 # The default value is false.
4260 },
4261 ],
4262 &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.
4263 &quot;A String&quot;,
4264 ],
4265 },
4266 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4267 # 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.
4268 # The value must be between 0 and 1000
4269 },
4270 ],
4271 },
4272 &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:
4273 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
4274 # - compute/v1/projects/project/global/backendServices/backendService
4275 # - 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.
4276 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
4277 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
4278 # - compute.backendBuckets.use
4279 # - compute.backendServices.use
4280 &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.
4281 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004282 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004283 &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.
4284 # The value must be between 1 and 255 characters.
4285 &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.
4286 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4287 # The default is set to false.
4288 &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.
4289 # 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.
4290 # The value must be between 1 and 1024 characters.
4291 &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.
4292 # 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.
4293 # The value must be between 1 and 1024 characters.
4294 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4295 # Supported values are:
4296 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4297 # - FOUND, which corresponds to 302.
4298 # - SEE_OTHER which corresponds to 303.
4299 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4300 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4301 &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.
4302 # The default is set to false.
4303 },
4304 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4305 &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.
4306 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004307 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4308 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004309 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4310 { # Specification determining how headers are added to requests or responses.
4311 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4312 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4313 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4314 # The default value is false.
4315 },
4316 ],
4317 &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.
4318 &quot;A String&quot;,
4319 ],
4320 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4321 { # Specification determining how headers are added to requests or responses.
4322 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4323 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4324 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4325 # The default value is false.
4326 },
4327 ],
4328 &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.
4329 &quot;A String&quot;,
4330 ],
4331 },
4332 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
4333 &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.
4334 # 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.
4335 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
4336 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
4337 &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.
4338 &quot;A String&quot;,
4339 ],
4340 &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.
4341 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004342 # 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 -07004343 &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 -07004344 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004345 &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.
4346 # Default is false.
4347 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4348 &quot;A String&quot;,
4349 ],
4350 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4351 &quot;A String&quot;,
4352 ],
4353 &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
4354 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4355 &quot;A String&quot;,
4356 ],
4357 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4358 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4359 &quot;A String&quot;,
4360 ],
4361 &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.
4362 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4363 &quot;A String&quot;,
4364 ],
4365 &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.
4366 },
4367 &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.
4368 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004369 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004370 &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.
4371 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4372 # The value must be between 200 and 599 inclusive.
4373 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4374 # The value must be between 0.0 and 100.0 inclusive.
4375 },
4376 &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.
4377 &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.
4378 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4379 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4380 },
4381 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4382 # The value must be between 0.0 and 100.0 inclusive.
4383 },
4384 },
4385 &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 -07004386 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004387 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4388 },
4389 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004390 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004391 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4392 &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.
4393 # 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.
4394 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4395 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4396 },
4397 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4398 # - 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.
4399 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4400 # -
4401 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4402 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4403 # - 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.
4404 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4405 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4406 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4407 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4408 &quot;A String&quot;,
4409 ],
4410 },
4411 &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.
4412 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004413 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004414 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4415 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4416 },
4417 &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 -07004418 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004419 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004420 &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.
4421 # The value must be between 1 and 255 characters.
4422 &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.
4423 # The value must be between 1 and 1024 characters.
4424 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004425 &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.
4426 # 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 -07004427 { # 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
4428 &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.
4429 &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.
4430 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004431 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4432 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004433 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4434 { # Specification determining how headers are added to requests or responses.
4435 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4436 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4437 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4438 # The default value is false.
4439 },
4440 ],
4441 &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.
4442 &quot;A String&quot;,
4443 ],
4444 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4445 { # Specification determining how headers are added to requests or responses.
4446 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4447 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4448 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4449 # The default value is false.
4450 },
4451 ],
4452 &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.
4453 &quot;A String&quot;,
4454 ],
4455 },
4456 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4457 # 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.
4458 # The value must be between 0 and 1000
4459 },
4460 ],
4461 },
4462 &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.
4463 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4464 &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.
4465 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004466 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004467 &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.
4468 # The value must be between 1 and 255 characters.
4469 &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.
4470 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4471 # The default is set to false.
4472 &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.
4473 # 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.
4474 # The value must be between 1 and 1024 characters.
4475 &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.
4476 # 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.
4477 # The value must be between 1 and 1024 characters.
4478 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4479 # Supported values are:
4480 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4481 # - FOUND, which corresponds to 302.
4482 # - SEE_OTHER which corresponds to 303.
4483 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4484 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4485 &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.
4486 # The default is set to false.
4487 },
4488 },
4489 ],
4490 &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.
4491 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
4492 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
4493 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
4494 # The description can have a maximum length of 1024 characters.
4495 &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.
4496 # 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 -07004497 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4498 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004499 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4500 { # Specification determining how headers are added to requests or responses.
4501 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4502 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4503 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4504 # The default value is false.
4505 },
4506 ],
4507 &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.
4508 &quot;A String&quot;,
4509 ],
4510 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4511 { # Specification determining how headers are added to requests or responses.
4512 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4513 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4514 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4515 # The default value is false.
4516 },
4517 ],
4518 &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.
4519 &quot;A String&quot;,
4520 ],
4521 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004522 &quot;httpFilterConfigs&quot;: [ # Outbound route specific configuration for networkservices.HttpFilter resources enabled by Traffic Director. httpFilterConfigs only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
4523 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
4524 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
4525 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
4526 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
4527 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
4528 },
4529 ],
4530 &quot;httpFilterMetadata&quot;: [ # Outbound route specific metadata supplied to networkservices.HttpFilter resources enabled by Traffic Director. httpFilterMetadata only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
4531 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
4532 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
4533 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
4534 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
4535 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
4536 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
4537 },
4538 ],
4539 &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 -07004540 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
4541 &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.
4542 # fullPathMatch must be between 1 and 1024 characters.
4543 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4544 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
4545 { # matchRule criteria for request header matches.
4546 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
4547 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4548 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
4549 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
4550 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004551 # 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 -07004552 &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.
4553 # The default setting is false.
4554 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
4555 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4556 &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.
4557 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4558 &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.
4559 # For example for a range [-5, 0]
4560 # - -3 will match.
4561 # - 0 will not match.
4562 # - 0.25 will not match.
4563 # - -3someString will not match.
4564 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4565 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4566 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
4567 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
4568 },
4569 &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
4570 # 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.
4571 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4572 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
4573 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
4574 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4575 },
4576 ],
4577 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
4578 # The default value is false.
4579 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004580 # Not supported when the URL map is bound to target gRPC proxy.
4581 &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.
4582 # 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 -07004583 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
4584 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004585 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004586 { # 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.
4587 # 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.
4588 # 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.
4589 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
4590 # This list must not be empty and can have at the most 64 entries.
4591 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
4592 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
4593 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
4594 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
4595 # value can have a maximum length of 1024 characters.
4596 },
4597 ],
4598 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
4599 # Supported values are:
4600 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
4601 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
4602 },
4603 ],
4604 &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 /.
4605 # The value must be between 1 and 1024 characters.
4606 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4607 &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 -07004608 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004609 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
4610 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
4611 # Only one of presentMatch, exactMatch or regexMatch must be set.
4612 &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.
4613 &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.
4614 # Only one of presentMatch, exactMatch or regexMatch must be set.
4615 &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
4616 # Only one of presentMatch, exactMatch or regexMatch must be set.
4617 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
4618 },
4619 ],
4620 &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
4621 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4622 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
4623 },
4624 ],
4625 &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.
4626 # 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.
4627 # 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.
4628 &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.
4629 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004630 # 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 -07004631 &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 -07004632 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004633 &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.
4634 # Default is false.
4635 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4636 &quot;A String&quot;,
4637 ],
4638 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4639 &quot;A String&quot;,
4640 ],
4641 &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
4642 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4643 &quot;A String&quot;,
4644 ],
4645 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4646 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4647 &quot;A String&quot;,
4648 ],
4649 &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.
4650 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4651 &quot;A String&quot;,
4652 ],
4653 &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.
4654 },
4655 &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.
4656 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004657 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004658 &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.
4659 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4660 # The value must be between 200 and 599 inclusive.
4661 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4662 # The value must be between 0.0 and 100.0 inclusive.
4663 },
4664 &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.
4665 &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.
4666 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4667 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4668 },
4669 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4670 # The value must be between 0.0 and 100.0 inclusive.
4671 },
4672 },
4673 &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 -07004674 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004675 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4676 },
4677 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004678 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004679 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4680 &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.
4681 # 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.
4682 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4683 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4684 },
4685 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4686 # - 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.
4687 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4688 # -
4689 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4690 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4691 # - 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.
4692 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4693 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4694 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4695 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4696 &quot;A String&quot;,
4697 ],
4698 },
4699 &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.
4700 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004701 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004702 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4703 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4704 },
4705 &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 -07004706 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004707 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004708 &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.
4709 # The value must be between 1 and 255 characters.
4710 &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.
4711 # The value must be between 1 and 1024 characters.
4712 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004713 &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.
4714 # 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 -07004715 { # 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
4716 &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.
4717 &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.
4718 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004719 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4720 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004721 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4722 { # Specification determining how headers are added to requests or responses.
4723 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4724 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4725 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4726 # The default value is false.
4727 },
4728 ],
4729 &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.
4730 &quot;A String&quot;,
4731 ],
4732 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4733 { # Specification determining how headers are added to requests or responses.
4734 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4735 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4736 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4737 # The default value is false.
4738 },
4739 ],
4740 &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.
4741 &quot;A String&quot;,
4742 ],
4743 },
4744 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4745 # 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.
4746 # The value must be between 0 and 1000
4747 },
4748 ],
4749 },
4750 &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.
4751 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4752 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
4753 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004754 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004755 &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.
4756 # The value must be between 1 and 255 characters.
4757 &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.
4758 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4759 # The default is set to false.
4760 &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.
4761 # 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.
4762 # The value must be between 1 and 1024 characters.
4763 &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.
4764 # 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.
4765 # The value must be between 1 and 1024 characters.
4766 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4767 # Supported values are:
4768 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4769 # - FOUND, which corresponds to 302.
4770 # - SEE_OTHER which corresponds to 303.
4771 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4772 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4773 &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.
4774 # The default is set to false.
4775 },
4776 },
4777 ],
4778 },
4779 ],
4780 &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.
4781 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4782 &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 -07004783 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004784 { # Message for the expected URL mappings.
4785 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004786 &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 -07004787 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004788 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
4789 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07004790 },
4791 ],
4792}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004793
4794 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
4795
4796Returns:
4797 An object of the form:
4798
4799 { # Represents an Operation resource.
4800 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004801 # Google Compute Engine has three Operation resources:
4802 #
4803 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4804 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004805 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4806 #
4807 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004808 # - For global operations, use the `globalOperations` resource.
4809 # - For regional operations, use the `regionOperations` resource.
4810 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004811 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004812 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07004813 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4814 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4815 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4816 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4817 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4818 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004819 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004820 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4821 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4822 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004823 },
4824 ],
4825 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004826 &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`.
4827 &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.
4828 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4829 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4830 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4831 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4832 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4833 &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.
4834 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4835 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4836 &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.
4837 &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`.
4838 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4839 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4840 &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.
4841 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4842 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4843 {
4844 &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.
4845 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4846 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4847 {
4848 &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).
4849 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4850 },
4851 ],
4852 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4853 },
4854 ],
4855 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004856 }</pre>
4857</div>
4858
4859<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004860 <code class="details" id="validate">validate(project, region, urlMap, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004861 <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.
4862
4863Args:
4864 project: string, Project ID for this request. (required)
4865 region: string, Name of the region scoping this request. (required)
4866 urlMap: string, Name of the UrlMap resource to be validated as. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004867 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004868 The object takes the form of:
4869
4870{
Bu Sun Kim65020912020-05-20 12:08:20 -07004871 &quot;resource&quot;: { # Represents a URL Map resource. # Content of the UrlMap to be validated.
4872 #
4873 # Google Compute Engine has two URL Map resources:
4874 #
4875 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
4876 #
4877 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
4878 #
4879 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
4880 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004881 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
4882 #
4883 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
4884 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004885 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
4886 #
4887 # 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.
4888 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
4889 &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.
4890 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004891 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004892 # 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 -07004893 &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 -07004894 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004895 &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.
4896 # Default is false.
4897 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4898 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004899 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004900 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4901 &quot;A String&quot;,
4902 ],
4903 &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
4904 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4905 &quot;A String&quot;,
4906 ],
4907 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4908 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4909 &quot;A String&quot;,
4910 ],
4911 &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.
4912 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4913 &quot;A String&quot;,
4914 ],
4915 &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.
4916 },
4917 &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.
4918 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004919 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004920 &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.
4921 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4922 # The value must be between 200 and 599 inclusive.
4923 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4924 # The value must be between 0.0 and 100.0 inclusive.
4925 },
4926 &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.
4927 &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.
4928 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4929 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4930 },
4931 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4932 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004933 },
4934 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004935 &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 -07004936 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004937 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4938 },
4939 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004940 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004941 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4942 &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.
4943 # 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.
4944 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4945 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004946 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004947 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4948 # - 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.
4949 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4950 # -
4951 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4952 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4953 # - 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.
4954 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4955 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4956 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4957 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4958 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004959 ],
4960 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004961 &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.
4962 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004963 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004964 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4965 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4966 },
4967 &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 -07004968 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004969 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004970 &quot;hostRewrite&quot;: &quot;A String&quot;, # Prior to forwarding the request to the selected service, the request&#x27;s host header is replaced with contents of hostRewrite.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004971 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07004972 &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.
4973 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004974 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004975 &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.
4976 # 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 -07004977 { # 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
4978 &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.
4979 &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.
4980 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004981 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4982 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004983 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4984 { # Specification determining how headers are added to requests or responses.
4985 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4986 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4987 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4988 # The default value is false.
4989 },
4990 ],
4991 &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.
4992 &quot;A String&quot;,
4993 ],
4994 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4995 { # Specification determining how headers are added to requests or responses.
4996 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4997 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4998 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4999 # The default value is false.
5000 },
5001 ],
5002 &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.
5003 &quot;A String&quot;,
5004 ],
5005 },
5006 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5007 # 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.
5008 # The value must be between 0 and 1000
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005009 },
5010 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005011 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005012 &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.
5013 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005014 # 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 -07005015 &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.
5016 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005017 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005018 &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.
5019 # The value must be between 1 and 255 characters.
5020 &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.
5021 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5022 # The default is set to false.
5023 &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.
5024 # 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.
5025 # The value must be between 1 and 1024 characters.
5026 &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.
5027 # 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.
5028 # The value must be between 1 and 1024 characters.
5029 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5030 # Supported values are:
5031 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5032 # - FOUND, which corresponds to 302.
5033 # - SEE_OTHER which corresponds to 303.
5034 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5035 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5036 &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.
5037 # The default is set to false.
5038 },
5039 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
5040 &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.
5041 #
5042 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
5043 &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.
5044 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005045 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5046 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005047 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5048 { # Specification determining how headers are added to requests or responses.
5049 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5050 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5051 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5052 # The default value is false.
5053 },
5054 ],
5055 &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.
5056 &quot;A String&quot;,
5057 ],
5058 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5059 { # Specification determining how headers are added to requests or responses.
5060 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5061 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5062 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5063 # The default value is false.
5064 },
5065 ],
5066 &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.
5067 &quot;A String&quot;,
5068 ],
5069 },
5070 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
5071 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
5072 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
5073 &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 -07005074 # * 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 -07005075 &quot;A String&quot;,
5076 ],
5077 &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.
5078 },
5079 ],
5080 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
5081 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
5082 &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.
5083 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
5084 { # 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.
5085 &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.
5086 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005087 # 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 -07005088 &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 -07005089 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005090 &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.
5091 # Default is false.
5092 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
5093 &quot;A String&quot;,
5094 ],
5095 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
5096 &quot;A String&quot;,
5097 ],
5098 &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
5099 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5100 &quot;A String&quot;,
5101 ],
5102 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
5103 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5104 &quot;A String&quot;,
5105 ],
5106 &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.
5107 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
5108 &quot;A String&quot;,
5109 ],
5110 &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.
5111 },
5112 &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.
5113 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005114 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005115 &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.
5116 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
5117 # The value must be between 200 and 599 inclusive.
5118 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5119 # The value must be between 0.0 and 100.0 inclusive.
5120 },
5121 &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.
5122 &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.
5123 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5124 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5125 },
5126 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5127 # The value must be between 0.0 and 100.0 inclusive.
5128 },
5129 },
5130 &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 -07005131 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005132 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
5133 },
5134 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005135 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005136 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5137 &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.
5138 # 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.
5139 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5140 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5141 },
5142 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5143 # - 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.
5144 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5145 # -
5146 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5147 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5148 # - 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.
5149 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5150 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5151 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5152 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5153 &quot;A String&quot;,
5154 ],
5155 },
5156 &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.
5157 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005158 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005159 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5160 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5161 },
5162 &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 -07005163 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005164 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005165 &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.
5166 # The value must be between 1 and 255 characters.
5167 &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.
5168 # The value must be between 1 and 1024 characters.
5169 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005170 &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.
5171 # 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 -07005172 { # 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
5173 &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.
5174 &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.
5175 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005176 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5177 # Not supported when 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;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5179 { # Specification determining how headers are added to requests or responses.
5180 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5181 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5182 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5183 # The default value is false.
5184 },
5185 ],
5186 &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.
5187 &quot;A String&quot;,
5188 ],
5189 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5190 { # Specification determining how headers are added to requests or responses.
5191 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5192 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5193 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5194 # The default value is false.
5195 },
5196 ],
5197 &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.
5198 &quot;A String&quot;,
5199 ],
5200 },
5201 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5202 # 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.
5203 # The value must be between 0 and 1000
5204 },
5205 ],
5206 },
5207 &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:
5208 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
5209 # - compute/v1/projects/project/global/backendServices/backendService
5210 # - 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.
5211 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
5212 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
5213 # - compute.backendBuckets.use
5214 # - compute.backendServices.use
5215 &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.
5216 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005217 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005218 &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.
5219 # The value must be between 1 and 255 characters.
5220 &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.
5221 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5222 # The default is set to false.
5223 &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.
5224 # 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.
5225 # The value must be between 1 and 1024 characters.
5226 &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.
5227 # 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.
5228 # The value must be between 1 and 1024 characters.
5229 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5230 # Supported values are:
5231 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5232 # - FOUND, which corresponds to 302.
5233 # - SEE_OTHER which corresponds to 303.
5234 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5235 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5236 &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.
5237 # The default is set to false.
5238 },
5239 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
5240 &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.
5241 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005242 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5243 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005244 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5245 { # Specification determining how headers are added to requests or responses.
5246 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5247 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5248 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5249 # The default value is false.
5250 },
5251 ],
5252 &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.
5253 &quot;A String&quot;,
5254 ],
5255 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5256 { # Specification determining how headers are added to requests or responses.
5257 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5258 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5259 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5260 # The default value is false.
5261 },
5262 ],
5263 &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.
5264 &quot;A String&quot;,
5265 ],
5266 },
5267 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
5268 &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.
5269 # 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.
5270 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
5271 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
5272 &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.
5273 &quot;A String&quot;,
5274 ],
5275 &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.
5276 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005277 # 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 -07005278 &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 -07005279 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005280 &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.
5281 # Default is false.
5282 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
5283 &quot;A String&quot;,
5284 ],
5285 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
5286 &quot;A String&quot;,
5287 ],
5288 &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
5289 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5290 &quot;A String&quot;,
5291 ],
5292 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
5293 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5294 &quot;A String&quot;,
5295 ],
5296 &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.
5297 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
5298 &quot;A String&quot;,
5299 ],
5300 &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.
5301 },
5302 &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.
5303 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005304 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005305 &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.
5306 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
5307 # The value must be between 200 and 599 inclusive.
5308 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5309 # The value must be between 0.0 and 100.0 inclusive.
5310 },
5311 &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.
5312 &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.
5313 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5314 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5315 },
5316 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5317 # The value must be between 0.0 and 100.0 inclusive.
5318 },
5319 },
5320 &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 -07005321 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005322 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
5323 },
5324 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005325 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005326 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5327 &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.
5328 # 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.
5329 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5330 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5331 },
5332 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5333 # - 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.
5334 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5335 # -
5336 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5337 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5338 # - 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.
5339 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5340 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5341 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5342 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5343 &quot;A String&quot;,
5344 ],
5345 },
5346 &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.
5347 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005348 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005349 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5350 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5351 },
5352 &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 -07005353 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005354 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005355 &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.
5356 # The value must be between 1 and 255 characters.
5357 &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.
5358 # The value must be between 1 and 1024 characters.
5359 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005360 &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.
5361 # 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 -07005362 { # 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
5363 &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.
5364 &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.
5365 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005366 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5367 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005368 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5369 { # Specification determining how headers are added to requests or responses.
5370 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5371 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5372 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5373 # The default value is false.
5374 },
5375 ],
5376 &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.
5377 &quot;A String&quot;,
5378 ],
5379 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5380 { # Specification determining how headers are added to requests or responses.
5381 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5382 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5383 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5384 # The default value is false.
5385 },
5386 ],
5387 &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.
5388 &quot;A String&quot;,
5389 ],
5390 },
5391 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5392 # 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.
5393 # The value must be between 0 and 1000
5394 },
5395 ],
5396 },
5397 &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.
5398 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5399 &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.
5400 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005401 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005402 &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.
5403 # The value must be between 1 and 255 characters.
5404 &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.
5405 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5406 # The default is set to false.
5407 &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.
5408 # 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.
5409 # The value must be between 1 and 1024 characters.
5410 &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.
5411 # 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.
5412 # The value must be between 1 and 1024 characters.
5413 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5414 # Supported values are:
5415 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5416 # - FOUND, which corresponds to 302.
5417 # - SEE_OTHER which corresponds to 303.
5418 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5419 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5420 &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.
5421 # The default is set to false.
5422 },
5423 },
5424 ],
5425 &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.
5426 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
5427 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
5428 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
5429 # The description can have a maximum length of 1024 characters.
5430 &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.
5431 # 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 -07005432 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5433 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005434 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5435 { # Specification determining how headers are added to requests or responses.
5436 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5437 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5438 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5439 # The default value is false.
5440 },
5441 ],
5442 &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.
5443 &quot;A String&quot;,
5444 ],
5445 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5446 { # Specification determining how headers are added to requests or responses.
5447 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5448 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5449 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5450 # The default value is false.
5451 },
5452 ],
5453 &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.
5454 &quot;A String&quot;,
5455 ],
5456 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005457 &quot;httpFilterConfigs&quot;: [ # Outbound route specific configuration for networkservices.HttpFilter resources enabled by Traffic Director. httpFilterConfigs only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
5458 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
5459 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
5460 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
5461 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
5462 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
5463 },
5464 ],
5465 &quot;httpFilterMetadata&quot;: [ # Outbound route specific metadata supplied to networkservices.HttpFilter resources enabled by Traffic Director. httpFilterMetadata only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
5466 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
5467 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
5468 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
5469 &quot;config&quot;: &quot;A String&quot;, # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
5470 &quot;configTypeUrl&quot;: &quot;A String&quot;, # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
5471 &quot;filterName&quot;: &quot;A String&quot;, # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
5472 },
5473 ],
5474 &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 -07005475 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
5476 &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.
5477 # fullPathMatch must be between 1 and 1024 characters.
5478 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5479 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
5480 { # matchRule criteria for request header matches.
5481 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
5482 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5483 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
5484 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
5485 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005486 # 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 -07005487 &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.
5488 # The default setting is false.
5489 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
5490 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5491 &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.
5492 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5493 &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.
5494 # For example for a range [-5, 0]
5495 # - -3 will match.
5496 # - 0 will not match.
5497 # - 0.25 will not match.
5498 # - -3someString will not match.
5499 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5500 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5501 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
5502 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
5503 },
5504 &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
5505 # 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.
5506 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5507 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
5508 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
5509 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5510 },
5511 ],
5512 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
5513 # The default value is false.
5514 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005515 # Not supported when the URL map is bound to target gRPC proxy.
5516 &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.
5517 # 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 -07005518 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
5519 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005520 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005521 { # 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.
5522 # 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.
5523 # 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.
5524 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
5525 # This list must not be empty and can have at the most 64 entries.
5526 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
5527 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
5528 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
5529 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
5530 # value can have a maximum length of 1024 characters.
5531 },
5532 ],
5533 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
5534 # Supported values are:
5535 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
5536 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
5537 },
5538 ],
5539 &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 /.
5540 # The value must be between 1 and 1024 characters.
5541 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5542 &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 -07005543 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005544 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
5545 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
5546 # Only one of presentMatch, exactMatch or regexMatch must be set.
5547 &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.
5548 &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.
5549 # Only one of presentMatch, exactMatch or regexMatch must be set.
5550 &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
5551 # Only one of presentMatch, exactMatch or regexMatch must be set.
5552 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
5553 },
5554 ],
5555 &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
5556 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5557 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
5558 },
5559 ],
5560 &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.
5561 # 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.
5562 # 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.
5563 &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.
5564 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005565 # 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 -07005566 &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 -07005567 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005568 &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.
5569 # Default is false.
5570 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
5571 &quot;A String&quot;,
5572 ],
5573 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
5574 &quot;A String&quot;,
5575 ],
5576 &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
5577 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5578 &quot;A String&quot;,
5579 ],
5580 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
5581 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5582 &quot;A String&quot;,
5583 ],
5584 &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.
5585 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
5586 &quot;A String&quot;,
5587 ],
5588 &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.
5589 },
5590 &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.
5591 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005592 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005593 &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.
5594 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
5595 # The value must be between 200 and 599 inclusive.
5596 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5597 # The value must be between 0.0 and 100.0 inclusive.
5598 },
5599 &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.
5600 &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.
5601 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5602 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5603 },
5604 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5605 # The value must be between 0.0 and 100.0 inclusive.
5606 },
5607 },
5608 &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 -07005609 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005610 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
5611 },
5612 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005613 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005614 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5615 &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.
5616 # 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.
5617 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5618 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5619 },
5620 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5621 # - 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.
5622 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5623 # -
5624 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5625 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5626 # - 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.
5627 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5628 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5629 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5630 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5631 &quot;A String&quot;,
5632 ],
5633 },
5634 &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.
5635 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005636 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005637 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5638 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5639 },
5640 &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 -07005641 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005642 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005643 &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.
5644 # The value must be between 1 and 255 characters.
5645 &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.
5646 # The value must be between 1 and 1024 characters.
5647 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005648 &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.
5649 # 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 -07005650 { # 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
5651 &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.
5652 &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.
5653 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005654 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5655 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005656 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5657 { # Specification determining how headers are added to requests or responses.
5658 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5659 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5660 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5661 # The default value is false.
5662 },
5663 ],
5664 &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.
5665 &quot;A String&quot;,
5666 ],
5667 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5668 { # Specification determining how headers are added to requests or responses.
5669 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5670 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5671 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5672 # The default value is false.
5673 },
5674 ],
5675 &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.
5676 &quot;A String&quot;,
5677 ],
5678 },
5679 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5680 # 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.
5681 # The value must be between 0 and 1000
5682 },
5683 ],
5684 },
5685 &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.
5686 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5687 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
5688 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005689 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005690 &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.
5691 # The value must be between 1 and 255 characters.
5692 &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.
5693 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5694 # The default is set to false.
5695 &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.
5696 # 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.
5697 # The value must be between 1 and 1024 characters.
5698 &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.
5699 # 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.
5700 # The value must be between 1 and 1024 characters.
5701 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5702 # Supported values are:
5703 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5704 # - FOUND, which corresponds to 302.
5705 # - SEE_OTHER which corresponds to 303.
5706 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5707 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5708 &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.
5709 # The default is set to false.
5710 },
5711 },
5712 ],
5713 },
5714 ],
5715 &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.
5716 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5717 &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 -07005718 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005719 { # Message for the expected URL mappings.
5720 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005721 &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 -07005722 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005723 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
5724 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07005725 },
5726 ],
5727 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005728 }
5729
5730
5731Returns:
5732 An object of the form:
5733
5734 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005735 &quot;result&quot;: { # Message representing the validation result for a UrlMap.
5736 &quot;loadErrors&quot;: [
5737 &quot;A String&quot;,
5738 ],
5739 &quot;loadSucceeded&quot;: True or False, # Whether the given UrlMap can be successfully loaded. If false, &#x27;loadErrors&#x27; indicates the reasons.
5740 &quot;testFailures&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005741 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005742 &quot;actualService&quot;: &quot;A String&quot;, # BackendService or BackendBucket returned by load balancer.
5743 &quot;expectedService&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
5744 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL.
5745 &quot;path&quot;: &quot;A String&quot;, # Path portion including query parameters in the URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005746 },
5747 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005748 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005749 },
5750 }</pre>
5751</div>
5752
5753</body></html>