blob: 3680b4b85c5d6b8afaddb0e51f9074ab21e6662d [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
1994Args:
1995 project: string, Project ID for this request. (required)
1996 region: string, Name of the region scoping this request. (required)
1997 urlMap: string, Name of the UrlMap scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001998 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001999 The object takes the form of:
2000
2001{
Bu Sun Kim65020912020-05-20 12:08:20 -07002002 &quot;host&quot;: &quot;A String&quot;, # If set, this invalidation rule will only apply to requests with a Host header matching host.
2003 &quot;path&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002004 }
2005
2006 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
2007
2008Returns:
2009 An object of the form:
2010
2011 { # Represents an Operation resource.
2012 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002013 # Google Compute Engine has three Operation resources:
2014 #
2015 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2016 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002017 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2018 #
2019 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002020 # - For global operations, use the `globalOperations` resource.
2021 # - For regional operations, use the `regionOperations` resource.
2022 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002023 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002024 # 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 -07002025 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2026 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2027 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2028 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2029 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2030 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002031 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002032 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2033 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2034 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002035 },
2036 ],
2037 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002038 &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`.
2039 &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.
2040 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2041 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2042 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2043 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2044 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2045 &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.
2046 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2047 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2048 &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.
2049 &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`.
2050 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2051 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2052 &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.
2053 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2054 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2055 {
2056 &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.
2057 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2058 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2059 {
2060 &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).
2061 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2062 },
2063 ],
2064 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2065 },
2066 ],
2067 &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 -07002068 }</pre>
2069</div>
2070
2071<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002072 <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 -07002073 <pre>Retrieves the list of UrlMap resources available to the specified project in the specified region.
2074
2075Args:
2076 project: string, Project ID for this request. (required)
2077 region: string, Name of the region scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002078 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 -07002079
Dan O'Mearadd494642020-05-01 07:42:23 -07002080For 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 -07002081
Dan O'Mearadd494642020-05-01 07:42:23 -07002082You 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 -07002083
Bu Sun Kim65020912020-05-20 12:08:20 -07002084To 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) ```
2085 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`)
2086 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
2087
2088You 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.
2089
2090Currently, only sorting by `name` or `creationTimestamp desc` is supported.
2091 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 -07002092 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 -07002093
2094Returns:
2095 An object of the form:
2096
2097 { # Contains a list of UrlMap resources.
Bu Sun Kim65020912020-05-20 12:08:20 -07002098 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
2099 &quot;items&quot;: [ # A list of UrlMap resources.
Dan O'Mearadd494642020-05-01 07:42:23 -07002100 { # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002101 #
2102 # Google Compute Engine has two URL Map resources:
2103 #
2104 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
2105 #
2106 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
2107 #
2108 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
2109 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002110 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
2111 #
2112 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
2113 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002114 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
2115 #
2116 # 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.
2117 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2118 &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.
2119 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002120 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002121 # 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 -07002122 &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 -07002123 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002124 &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.
2125 # Default is false.
2126 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2127 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002128 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002129 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2130 &quot;A String&quot;,
2131 ],
2132 &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
2133 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2134 &quot;A String&quot;,
2135 ],
2136 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2137 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2138 &quot;A String&quot;,
2139 ],
2140 &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.
2141 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2142 &quot;A String&quot;,
2143 ],
2144 &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.
2145 },
2146 &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.
2147 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002148 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002149 &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.
2150 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2151 # The value must be between 200 and 599 inclusive.
2152 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2153 # The value must be between 0.0 and 100.0 inclusive.
2154 },
2155 &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.
2156 &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.
2157 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2158 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2159 },
2160 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2161 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002162 },
2163 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002164 &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 -07002165 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002166 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2167 },
2168 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002169 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002170 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2171 &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.
2172 # 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.
2173 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2174 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,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 -07002175 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002176 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2177 # - 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.
2178 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2179 # -
2180 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2181 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2182 # - 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.
2183 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2184 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2185 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2186 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2187 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002188 ],
2189 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002190 &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.
2191 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002192 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002193 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2194 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2195 },
2196 &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 -07002197 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002198 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002199 &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 -07002200 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07002201 &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.
2202 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002203 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002204 &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.
2205 # 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 -07002206 { # 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
2207 &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.
2208 &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.
2209 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002210 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2211 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002212 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2213 { # Specification determining how headers are added to requests or responses.
2214 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2215 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2216 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2217 # The default value is false.
2218 },
2219 ],
2220 &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.
2221 &quot;A String&quot;,
2222 ],
2223 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2224 { # Specification determining how headers are added to requests or responses.
2225 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2226 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2227 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2228 # The default value is false.
2229 },
2230 ],
2231 &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.
2232 &quot;A String&quot;,
2233 ],
2234 },
2235 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2236 # 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.
2237 # The value must be between 0 and 1000
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002238 },
2239 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002240 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002241 &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.
2242 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002243 # 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 -07002244 &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.
2245 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002246 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002247 &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.
2248 # The value must be between 1 and 255 characters.
2249 &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.
2250 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2251 # The default is set to false.
2252 &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.
2253 # 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.
2254 # The value must be between 1 and 1024 characters.
2255 &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.
2256 # 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.
2257 # The value must be between 1 and 1024 characters.
2258 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2259 # Supported values are:
2260 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2261 # - FOUND, which corresponds to 302.
2262 # - SEE_OTHER which corresponds to 303.
2263 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2264 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2265 &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.
2266 # The default is set to false.
2267 },
2268 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2269 &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.
2270 #
2271 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
2272 &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.
2273 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002274 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2275 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002276 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2277 { # Specification determining how headers are added to requests or responses.
2278 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2279 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2280 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2281 # The default value is false.
2282 },
2283 ],
2284 &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.
2285 &quot;A String&quot;,
2286 ],
2287 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2288 { # Specification determining how headers are added to requests or responses.
2289 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2290 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2291 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2292 # The default value is false.
2293 },
2294 ],
2295 &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.
2296 &quot;A String&quot;,
2297 ],
2298 },
2299 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
2300 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
2301 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2302 &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 -07002303 # * 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 -07002304 &quot;A String&quot;,
2305 ],
2306 &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.
2307 },
2308 ],
2309 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2310 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
2311 &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.
2312 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
2313 { # 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.
2314 &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.
2315 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002316 # 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 -07002317 &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 -07002318 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002319 &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.
2320 # Default is false.
2321 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2322 &quot;A String&quot;,
2323 ],
2324 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2325 &quot;A String&quot;,
2326 ],
2327 &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
2328 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2329 &quot;A String&quot;,
2330 ],
2331 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2332 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2333 &quot;A String&quot;,
2334 ],
2335 &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.
2336 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2337 &quot;A String&quot;,
2338 ],
2339 &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.
2340 },
2341 &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.
2342 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002343 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002344 &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.
2345 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2346 # The value must be between 200 and 599 inclusive.
2347 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2348 # The value must be between 0.0 and 100.0 inclusive.
2349 },
2350 &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.
2351 &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.
2352 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2353 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2354 },
2355 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2356 # The value must be between 0.0 and 100.0 inclusive.
2357 },
2358 },
2359 &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 -07002360 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002361 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2362 },
2363 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002364 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002365 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2366 &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.
2367 # 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.
2368 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2369 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2370 },
2371 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2372 # - 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.
2373 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2374 # -
2375 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2376 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2377 # - 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.
2378 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2379 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2380 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2381 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2382 &quot;A String&quot;,
2383 ],
2384 },
2385 &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.
2386 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002387 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002388 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2389 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2390 },
2391 &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 -07002392 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002393 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002394 &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.
2395 # The value must be between 1 and 255 characters.
2396 &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.
2397 # The value must be between 1 and 1024 characters.
2398 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002399 &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.
2400 # 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 -07002401 { # 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
2402 &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.
2403 &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.
2404 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002405 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2406 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002407 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2408 { # Specification determining how headers are added to requests or responses.
2409 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2410 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2411 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2412 # The default value is false.
2413 },
2414 ],
2415 &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.
2416 &quot;A String&quot;,
2417 ],
2418 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2419 { # Specification determining how headers are added to requests or responses.
2420 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2421 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2422 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2423 # The default value is false.
2424 },
2425 ],
2426 &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.
2427 &quot;A String&quot;,
2428 ],
2429 },
2430 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2431 # 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.
2432 # The value must be between 0 and 1000
2433 },
2434 ],
2435 },
2436 &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:
2437 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
2438 # - compute/v1/projects/project/global/backendServices/backendService
2439 # - 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.
2440 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
2441 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
2442 # - compute.backendBuckets.use
2443 # - compute.backendServices.use
2444 &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.
2445 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002446 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002447 &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.
2448 # The value must be between 1 and 255 characters.
2449 &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.
2450 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2451 # The default is set to false.
2452 &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.
2453 # 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.
2454 # The value must be between 1 and 1024 characters.
2455 &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.
2456 # 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.
2457 # The value must be between 1 and 1024 characters.
2458 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2459 # Supported values are:
2460 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2461 # - FOUND, which corresponds to 302.
2462 # - SEE_OTHER which corresponds to 303.
2463 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2464 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2465 &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.
2466 # The default is set to false.
2467 },
2468 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2469 &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.
2470 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002471 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2472 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002473 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2474 { # Specification determining how headers are added to requests or responses.
2475 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2476 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2477 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2478 # The default value is false.
2479 },
2480 ],
2481 &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.
2482 &quot;A String&quot;,
2483 ],
2484 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2485 { # Specification determining how headers are added to requests or responses.
2486 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2487 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2488 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2489 # The default value is false.
2490 },
2491 ],
2492 &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.
2493 &quot;A String&quot;,
2494 ],
2495 },
2496 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
2497 &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.
2498 # 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.
2499 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
2500 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
2501 &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.
2502 &quot;A String&quot;,
2503 ],
2504 &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.
2505 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002506 # 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 -07002507 &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 -07002508 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002509 &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.
2510 # Default is false.
2511 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2512 &quot;A String&quot;,
2513 ],
2514 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2515 &quot;A String&quot;,
2516 ],
2517 &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
2518 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2519 &quot;A String&quot;,
2520 ],
2521 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2522 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2523 &quot;A String&quot;,
2524 ],
2525 &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.
2526 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2527 &quot;A String&quot;,
2528 ],
2529 &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.
2530 },
2531 &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.
2532 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002533 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002534 &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.
2535 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2536 # The value must be between 200 and 599 inclusive.
2537 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2538 # The value must be between 0.0 and 100.0 inclusive.
2539 },
2540 &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.
2541 &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.
2542 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2543 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2544 },
2545 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2546 # The value must be between 0.0 and 100.0 inclusive.
2547 },
2548 },
2549 &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 -07002550 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002551 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2552 },
2553 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002554 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002555 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2556 &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.
2557 # 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.
2558 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2559 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2560 },
2561 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2562 # - 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.
2563 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2564 # -
2565 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2566 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2567 # - 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.
2568 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2569 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2570 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2571 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2572 &quot;A String&quot;,
2573 ],
2574 },
2575 &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.
2576 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002577 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002578 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2579 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2580 },
2581 &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 -07002582 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002583 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002584 &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.
2585 # The value must be between 1 and 255 characters.
2586 &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.
2587 # The value must be between 1 and 1024 characters.
2588 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002589 &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.
2590 # 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 -07002591 { # 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
2592 &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.
2593 &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.
2594 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002595 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2596 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002597 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2598 { # Specification determining how headers are added to requests or responses.
2599 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2600 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2601 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2602 # The default value is false.
2603 },
2604 ],
2605 &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.
2606 &quot;A String&quot;,
2607 ],
2608 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2609 { # Specification determining how headers are added to requests or responses.
2610 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2611 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2612 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2613 # The default value is false.
2614 },
2615 ],
2616 &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.
2617 &quot;A String&quot;,
2618 ],
2619 },
2620 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2621 # 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.
2622 # The value must be between 0 and 1000
2623 },
2624 ],
2625 },
2626 &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.
2627 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2628 &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.
2629 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002630 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002631 &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.
2632 # The value must be between 1 and 255 characters.
2633 &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.
2634 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2635 # The default is set to false.
2636 &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.
2637 # 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.
2638 # The value must be between 1 and 1024 characters.
2639 &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.
2640 # 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.
2641 # The value must be between 1 and 1024 characters.
2642 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2643 # Supported values are:
2644 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2645 # - FOUND, which corresponds to 302.
2646 # - SEE_OTHER which corresponds to 303.
2647 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2648 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2649 &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.
2650 # The default is set to false.
2651 },
2652 },
2653 ],
2654 &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.
2655 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
2656 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
2657 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
2658 # The description can have a maximum length of 1024 characters.
2659 &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.
2660 # 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 -07002661 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2662 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002663 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2664 { # Specification determining how headers are added to requests or responses.
2665 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2666 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2667 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2668 # The default value is false.
2669 },
2670 ],
2671 &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.
2672 &quot;A String&quot;,
2673 ],
2674 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2675 { # Specification determining how headers are added to requests or responses.
2676 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2677 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2678 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2679 # The default value is false.
2680 },
2681 ],
2682 &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.
2683 &quot;A String&quot;,
2684 ],
2685 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002686 &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.
2687 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
2688 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
2689 &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
2690 &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
2691 &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
2692 },
2693 ],
2694 &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.
2695 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
2696 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
2697 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
2698 &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
2699 &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
2700 &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
2701 },
2702 ],
2703 &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 -07002704 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
2705 &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.
2706 # fullPathMatch must be between 1 and 1024 characters.
2707 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2708 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
2709 { # matchRule criteria for request header matches.
2710 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
2711 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2712 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
2713 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
2714 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002715 # 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 -07002716 &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.
2717 # The default setting is false.
2718 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
2719 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2720 &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.
2721 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2722 &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.
2723 # For example for a range [-5, 0]
2724 # - -3 will match.
2725 # - 0 will not match.
2726 # - 0.25 will not match.
2727 # - -3someString will not match.
2728 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2729 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2730 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
2731 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
2732 },
2733 &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
2734 # 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.
2735 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2736 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
2737 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
2738 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2739 },
2740 ],
2741 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
2742 # The default value is false.
2743 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002744 # Not supported when the URL map is bound to target gRPC proxy.
2745 &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.
2746 # 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 -07002747 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
2748 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002749 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002750 { # 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.
2751 # 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.
2752 # 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.
2753 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
2754 # This list must not be empty and can have at the most 64 entries.
2755 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
2756 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
2757 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
2758 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
2759 # value can have a maximum length of 1024 characters.
2760 },
2761 ],
2762 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
2763 # Supported values are:
2764 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
2765 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
2766 },
2767 ],
2768 &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 /.
2769 # The value must be between 1 and 1024 characters.
2770 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2771 &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 -07002772 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002773 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
2774 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
2775 # Only one of presentMatch, exactMatch or regexMatch must be set.
2776 &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.
2777 &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.
2778 # Only one of presentMatch, exactMatch or regexMatch must be set.
2779 &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
2780 # Only one of presentMatch, exactMatch or regexMatch must be set.
2781 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
2782 },
2783 ],
2784 &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
2785 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2786 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
2787 },
2788 ],
2789 &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.
2790 # 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.
2791 # 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.
2792 &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.
2793 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002794 # 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 -07002795 &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 -07002796 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002797 &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.
2798 # Default is false.
2799 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2800 &quot;A String&quot;,
2801 ],
2802 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2803 &quot;A String&quot;,
2804 ],
2805 &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
2806 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2807 &quot;A String&quot;,
2808 ],
2809 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2810 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2811 &quot;A String&quot;,
2812 ],
2813 &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.
2814 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2815 &quot;A String&quot;,
2816 ],
2817 &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.
2818 },
2819 &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.
2820 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002821 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002822 &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.
2823 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2824 # The value must be between 200 and 599 inclusive.
2825 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2826 # The value must be between 0.0 and 100.0 inclusive.
2827 },
2828 &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.
2829 &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.
2830 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2831 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2832 },
2833 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2834 # The value must be between 0.0 and 100.0 inclusive.
2835 },
2836 },
2837 &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 -07002838 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002839 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2840 },
2841 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002842 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002843 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2844 &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.
2845 # 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.
2846 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2847 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2848 },
2849 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2850 # - 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.
2851 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2852 # -
2853 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2854 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2855 # - 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.
2856 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2857 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2858 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2859 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2860 &quot;A String&quot;,
2861 ],
2862 },
2863 &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.
2864 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002865 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002866 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2867 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2868 },
2869 &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 -07002870 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002871 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002872 &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.
2873 # The value must be between 1 and 255 characters.
2874 &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.
2875 # The value must be between 1 and 1024 characters.
2876 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002877 &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.
2878 # 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 -07002879 { # 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
2880 &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.
2881 &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.
2882 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002883 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2884 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002885 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2886 { # Specification determining how headers are added to requests or responses.
2887 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2888 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2889 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2890 # The default value is false.
2891 },
2892 ],
2893 &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.
2894 &quot;A String&quot;,
2895 ],
2896 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2897 { # Specification determining how headers are added to requests or responses.
2898 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2899 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2900 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2901 # The default value is false.
2902 },
2903 ],
2904 &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.
2905 &quot;A String&quot;,
2906 ],
2907 },
2908 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2909 # 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.
2910 # The value must be between 0 and 1000
2911 },
2912 ],
2913 },
2914 &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.
2915 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2916 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
2917 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002918 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002919 &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.
2920 # The value must be between 1 and 255 characters.
2921 &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.
2922 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2923 # The default is set to false.
2924 &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.
2925 # 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.
2926 # The value must be between 1 and 1024 characters.
2927 &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.
2928 # 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.
2929 # The value must be between 1 and 1024 characters.
2930 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2931 # Supported values are:
2932 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2933 # - FOUND, which corresponds to 302.
2934 # - SEE_OTHER which corresponds to 303.
2935 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2936 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2937 &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.
2938 # The default is set to false.
2939 },
2940 },
2941 ],
2942 },
2943 ],
2944 &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.
2945 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2946 &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 -07002947 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002948 { # Message for the expected URL mappings.
2949 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002950 &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 -07002951 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002952 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
2953 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07002954 },
2955 ],
2956 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002957 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002958 &quot;kind&quot;: &quot;compute#urlMapList&quot;, # Type of resource.
2959 &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.
2960 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2961 &quot;warning&quot;: { # [Output Only] Informational warning message.
2962 &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.
2963 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2964 # &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 -07002965 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002966 &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).
2967 &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 -07002968 },
2969 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002970 &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 -07002971 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002972 }</pre>
2973</div>
2974
2975<div class="method">
2976 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2977 <pre>Retrieves the next page of results.
2978
2979Args:
2980 previous_request: The request for the previous page. (required)
2981 previous_response: The response from the request for the previous page. (required)
2982
2983Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07002984 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002985 page. Returns None if there are no more items in the collection.
2986 </pre>
2987</div>
2988
2989<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002990 <code class="details" id="patch">patch(project, region, urlMap, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002991 <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.
2992
2993Args:
2994 project: string, Project ID for this request. (required)
2995 region: string, Name of the region scoping this request. (required)
2996 urlMap: string, Name of the UrlMap resource to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002997 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002998 The object takes the form of:
2999
Dan O'Mearadd494642020-05-01 07:42:23 -07003000{ # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003001 #
3002 # Google Compute Engine has two URL Map resources:
3003 #
3004 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
3005 #
3006 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
3007 #
3008 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
3009 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003010 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
3011 #
3012 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
3013 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003014 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
3015 #
3016 # 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.
3017 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
3018 &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.
3019 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003020 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003021 # 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 -07003022 &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 -07003023 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003024 &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.
3025 # Default is false.
3026 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3027 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003028 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003029 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3030 &quot;A String&quot;,
3031 ],
3032 &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
3033 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3034 &quot;A String&quot;,
3035 ],
3036 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3037 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3038 &quot;A String&quot;,
3039 ],
3040 &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.
3041 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3042 &quot;A String&quot;,
3043 ],
3044 &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.
3045 },
3046 &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.
3047 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003048 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003049 &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.
3050 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3051 # The value must be between 200 and 599 inclusive.
3052 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3053 # The value must be between 0.0 and 100.0 inclusive.
3054 },
3055 &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.
3056 &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.
3057 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3058 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3059 },
3060 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3061 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003062 },
3063 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003064 &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 -07003065 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003066 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3067 },
3068 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003069 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003070 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3071 &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.
3072 # 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.
3073 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3074 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,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 -07003075 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003076 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3077 # - 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.
3078 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3079 # -
3080 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3081 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3082 # - 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.
3083 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3084 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3085 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3086 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3087 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003088 ],
3089 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003090 &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.
3091 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003092 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003093 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3094 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3095 },
3096 &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 -07003097 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003098 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003099 &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 -07003100 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07003101 &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.
3102 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003103 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003104 &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.
3105 # 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 -07003106 { # 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
3107 &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.
3108 &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.
3109 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003110 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3111 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003112 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3113 { # Specification determining how headers are added to requests or responses.
3114 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3115 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3116 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3117 # The default value is false.
3118 },
3119 ],
3120 &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.
3121 &quot;A String&quot;,
3122 ],
3123 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3124 { # Specification determining how headers are added to requests or responses.
3125 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3126 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3127 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3128 # The default value is false.
3129 },
3130 ],
3131 &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.
3132 &quot;A String&quot;,
3133 ],
3134 },
3135 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3136 # 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.
3137 # The value must be between 0 and 1000
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003138 },
3139 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003140 },
3141 &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.
3142 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003143 # 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 -07003144 &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.
3145 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003146 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003147 &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.
3148 # The value must be between 1 and 255 characters.
3149 &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.
3150 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3151 # The default is set to false.
3152 &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.
3153 # 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.
3154 # The value must be between 1 and 1024 characters.
3155 &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.
3156 # 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.
3157 # The value must be between 1 and 1024 characters.
3158 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3159 # Supported values are:
3160 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3161 # - FOUND, which corresponds to 302.
3162 # - SEE_OTHER which corresponds to 303.
3163 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3164 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3165 &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.
3166 # The default is set to false.
3167 },
3168 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3169 &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.
3170 #
3171 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
3172 &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.
3173 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003174 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3175 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003176 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3177 { # Specification determining how headers are added to requests or responses.
3178 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3179 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3180 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3181 # The default value is false.
3182 },
3183 ],
3184 &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.
3185 &quot;A String&quot;,
3186 ],
3187 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3188 { # Specification determining how headers are added to requests or responses.
3189 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3190 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3191 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3192 # The default value is false.
3193 },
3194 ],
3195 &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.
3196 &quot;A String&quot;,
3197 ],
3198 },
3199 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
3200 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
3201 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3202 &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 -07003203 # * 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 -07003204 &quot;A String&quot;,
3205 ],
3206 &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.
3207 },
3208 ],
3209 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3210 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
3211 &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.
3212 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
3213 { # 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.
3214 &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.
3215 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003216 # 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 -07003217 &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 -07003218 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003219 &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.
3220 # Default is false.
3221 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3222 &quot;A String&quot;,
3223 ],
3224 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3225 &quot;A String&quot;,
3226 ],
3227 &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
3228 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3229 &quot;A String&quot;,
3230 ],
3231 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3232 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3233 &quot;A String&quot;,
3234 ],
3235 &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.
3236 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3237 &quot;A String&quot;,
3238 ],
3239 &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.
3240 },
3241 &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.
3242 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003243 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003244 &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.
3245 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3246 # The value must be between 200 and 599 inclusive.
3247 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3248 # The value must be between 0.0 and 100.0 inclusive.
3249 },
3250 &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.
3251 &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.
3252 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3253 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3254 },
3255 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3256 # The value must be between 0.0 and 100.0 inclusive.
3257 },
3258 },
3259 &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 -07003260 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003261 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3262 },
3263 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003264 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003265 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3266 &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.
3267 # 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.
3268 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3269 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3270 },
3271 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3272 # - 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.
3273 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3274 # -
3275 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3276 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3277 # - 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.
3278 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3279 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3280 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3281 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3282 &quot;A String&quot;,
3283 ],
3284 },
3285 &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.
3286 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003287 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003288 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3289 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3290 },
3291 &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 -07003292 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003293 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003294 &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.
3295 # The value must be between 1 and 255 characters.
3296 &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.
3297 # The value must be between 1 and 1024 characters.
3298 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003299 &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.
3300 # 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 -07003301 { # 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
3302 &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.
3303 &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.
3304 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003305 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3306 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003307 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3308 { # Specification determining how headers are added to requests or responses.
3309 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3310 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3311 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3312 # The default value is false.
3313 },
3314 ],
3315 &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.
3316 &quot;A String&quot;,
3317 ],
3318 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3319 { # Specification determining how headers are added to requests or responses.
3320 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3321 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3322 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3323 # The default value is false.
3324 },
3325 ],
3326 &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.
3327 &quot;A String&quot;,
3328 ],
3329 },
3330 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3331 # 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.
3332 # The value must be between 0 and 1000
3333 },
3334 ],
3335 },
3336 &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:
3337 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
3338 # - compute/v1/projects/project/global/backendServices/backendService
3339 # - 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.
3340 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3341 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
3342 # - compute.backendBuckets.use
3343 # - compute.backendServices.use
3344 &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.
3345 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003346 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003347 &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.
3348 # The value must be between 1 and 255 characters.
3349 &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.
3350 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3351 # The default is set to false.
3352 &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.
3353 # 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.
3354 # The value must be between 1 and 1024 characters.
3355 &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.
3356 # 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.
3357 # The value must be between 1 and 1024 characters.
3358 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3359 # Supported values are:
3360 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3361 # - FOUND, which corresponds to 302.
3362 # - SEE_OTHER which corresponds to 303.
3363 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3364 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3365 &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.
3366 # The default is set to false.
3367 },
3368 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3369 &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.
3370 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003371 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3372 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003373 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3374 { # Specification determining how headers are added to requests or responses.
3375 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3376 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3377 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3378 # The default value is false.
3379 },
3380 ],
3381 &quot;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.
3382 &quot;A String&quot;,
3383 ],
3384 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3385 { # Specification determining how headers are added to requests or responses.
3386 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3387 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3388 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3389 # The default value is false.
3390 },
3391 ],
3392 &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.
3393 &quot;A String&quot;,
3394 ],
3395 },
3396 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
3397 &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.
3398 # 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.
3399 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
3400 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
3401 &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.
3402 &quot;A String&quot;,
3403 ],
3404 &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.
3405 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003406 # 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 -07003407 &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 -07003408 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003409 &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.
3410 # Default is false.
3411 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3412 &quot;A String&quot;,
3413 ],
3414 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3415 &quot;A String&quot;,
3416 ],
3417 &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
3418 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3419 &quot;A String&quot;,
3420 ],
3421 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3422 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3423 &quot;A String&quot;,
3424 ],
3425 &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.
3426 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3427 &quot;A String&quot;,
3428 ],
3429 &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.
3430 },
3431 &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.
3432 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003433 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003434 &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.
3435 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3436 # The value must be between 200 and 599 inclusive.
3437 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3438 # The value must be between 0.0 and 100.0 inclusive.
3439 },
3440 &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.
3441 &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.
3442 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3443 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3444 },
3445 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3446 # The value must be between 0.0 and 100.0 inclusive.
3447 },
3448 },
3449 &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 -07003450 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003451 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3452 },
3453 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003454 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003455 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3456 &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.
3457 # 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.
3458 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3459 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3460 },
3461 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3462 # - 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.
3463 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3464 # -
3465 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3466 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3467 # - 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.
3468 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3469 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3470 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3471 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3472 &quot;A String&quot;,
3473 ],
3474 },
3475 &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.
3476 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003477 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003478 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3479 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3480 },
3481 &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 -07003482 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003483 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003484 &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.
3485 # The value must be between 1 and 255 characters.
3486 &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.
3487 # The value must be between 1 and 1024 characters.
3488 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003489 &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.
3490 # 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 -07003491 { # 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
3492 &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.
3493 &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.
3494 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003495 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3496 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003497 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3498 { # Specification determining how headers are added to requests or responses.
3499 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3500 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3501 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3502 # The default value is false.
3503 },
3504 ],
3505 &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.
3506 &quot;A String&quot;,
3507 ],
3508 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3509 { # Specification determining how headers are added to requests or responses.
3510 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3511 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3512 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3513 # The default value is false.
3514 },
3515 ],
3516 &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.
3517 &quot;A String&quot;,
3518 ],
3519 },
3520 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3521 # 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.
3522 # The value must be between 0 and 1000
3523 },
3524 ],
3525 },
3526 &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.
3527 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3528 &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.
3529 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003530 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003531 &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.
3532 # The value must be between 1 and 255 characters.
3533 &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.
3534 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3535 # The default is set to false.
3536 &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.
3537 # 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.
3538 # The value must be between 1 and 1024 characters.
3539 &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.
3540 # 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.
3541 # The value must be between 1 and 1024 characters.
3542 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3543 # Supported values are:
3544 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3545 # - FOUND, which corresponds to 302.
3546 # - SEE_OTHER which corresponds to 303.
3547 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3548 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3549 &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.
3550 # The default is set to false.
3551 },
3552 },
3553 ],
3554 &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.
3555 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
3556 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
3557 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
3558 # The description can have a maximum length of 1024 characters.
3559 &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.
3560 # 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 -07003561 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3562 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003563 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3564 { # Specification determining how headers are added to requests or responses.
3565 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3566 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3567 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3568 # The default value is false.
3569 },
3570 ],
3571 &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.
3572 &quot;A String&quot;,
3573 ],
3574 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3575 { # Specification determining how headers are added to requests or responses.
3576 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3577 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3578 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3579 # The default value is false.
3580 },
3581 ],
3582 &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.
3583 &quot;A String&quot;,
3584 ],
3585 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003586 &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.
3587 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
3588 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
3589 &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
3590 &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
3591 &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
3592 },
3593 ],
3594 &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.
3595 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
3596 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
3597 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
3598 &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
3599 &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
3600 &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
3601 },
3602 ],
3603 &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 -07003604 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
3605 &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.
3606 # fullPathMatch must be between 1 and 1024 characters.
3607 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3608 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
3609 { # matchRule criteria for request header matches.
3610 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
3611 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3612 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
3613 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
3614 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003615 # 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 -07003616 &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.
3617 # The default setting is false.
3618 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
3619 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3620 &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.
3621 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3622 &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.
3623 # For example for a range [-5, 0]
3624 # - -3 will match.
3625 # - 0 will not match.
3626 # - 0.25 will not match.
3627 # - -3someString will not match.
3628 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3629 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3630 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
3631 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
3632 },
3633 &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
3634 # 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.
3635 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3636 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
3637 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
3638 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3639 },
3640 ],
3641 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
3642 # The default value is false.
3643 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003644 # Not supported when the URL map is bound to target gRPC proxy.
3645 &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.
3646 # 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 -07003647 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
3648 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003649 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003650 { # 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.
3651 # 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.
3652 # 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.
3653 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
3654 # This list must not be empty and can have at the most 64 entries.
3655 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
3656 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
3657 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
3658 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
3659 # value can have a maximum length of 1024 characters.
3660 },
3661 ],
3662 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
3663 # Supported values are:
3664 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
3665 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
3666 },
3667 ],
3668 &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 /.
3669 # The value must be between 1 and 1024 characters.
3670 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3671 &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 -07003672 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003673 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
3674 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
3675 # Only one of presentMatch, exactMatch or regexMatch must be set.
3676 &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.
3677 &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.
3678 # Only one of presentMatch, exactMatch or regexMatch must be set.
3679 &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
3680 # Only one of presentMatch, exactMatch or regexMatch must be set.
3681 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
3682 },
3683 ],
3684 &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
3685 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3686 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
3687 },
3688 ],
3689 &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.
3690 # 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.
3691 # 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.
3692 &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.
3693 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003694 # 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 -07003695 &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 -07003696 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003697 &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.
3698 # Default is false.
3699 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3700 &quot;A String&quot;,
3701 ],
3702 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3703 &quot;A String&quot;,
3704 ],
3705 &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
3706 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3707 &quot;A String&quot;,
3708 ],
3709 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3710 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3711 &quot;A String&quot;,
3712 ],
3713 &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.
3714 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3715 &quot;A String&quot;,
3716 ],
3717 &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.
3718 },
3719 &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.
3720 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003721 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003722 &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.
3723 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3724 # The value must be between 200 and 599 inclusive.
3725 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3726 # The value must be between 0.0 and 100.0 inclusive.
3727 },
3728 &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.
3729 &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.
3730 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3731 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3732 },
3733 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3734 # The value must be between 0.0 and 100.0 inclusive.
3735 },
3736 },
3737 &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 -07003738 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003739 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3740 },
3741 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003742 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003743 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3744 &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.
3745 # 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.
3746 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3747 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3748 },
3749 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3750 # - 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.
3751 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3752 # -
3753 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3754 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3755 # - 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.
3756 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3757 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3758 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3759 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3760 &quot;A String&quot;,
3761 ],
3762 },
3763 &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.
3764 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003765 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003766 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3767 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3768 },
3769 &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 -07003770 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003771 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003772 &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.
3773 # The value must be between 1 and 255 characters.
3774 &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.
3775 # The value must be between 1 and 1024 characters.
3776 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003777 &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.
3778 # 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 -07003779 { # 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
3780 &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.
3781 &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.
3782 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003783 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3784 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003785 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3786 { # Specification determining how headers are added to requests or responses.
3787 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3788 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3789 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3790 # The default value is false.
3791 },
3792 ],
3793 &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.
3794 &quot;A String&quot;,
3795 ],
3796 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3797 { # Specification determining how headers are added to requests or responses.
3798 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3799 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3800 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3801 # The default value is false.
3802 },
3803 ],
3804 &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.
3805 &quot;A String&quot;,
3806 ],
3807 },
3808 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3809 # 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.
3810 # The value must be between 0 and 1000
3811 },
3812 ],
3813 },
3814 &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.
3815 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3816 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
3817 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003818 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003819 &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.
3820 # The value must be between 1 and 255 characters.
3821 &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.
3822 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3823 # The default is set to false.
3824 &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.
3825 # 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.
3826 # The value must be between 1 and 1024 characters.
3827 &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.
3828 # 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.
3829 # The value must be between 1 and 1024 characters.
3830 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3831 # Supported values are:
3832 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3833 # - FOUND, which corresponds to 302.
3834 # - SEE_OTHER which corresponds to 303.
3835 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3836 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3837 &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.
3838 # The default is set to false.
3839 },
3840 },
3841 ],
3842 },
3843 ],
3844 &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.
3845 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3846 &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 -07003847 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003848 { # Message for the expected URL mappings.
3849 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003850 &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 -07003851 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003852 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
3853 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07003854 },
3855 ],
3856}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003857
3858 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
3859
3860Returns:
3861 An object of the form:
3862
3863 { # Represents an Operation resource.
3864 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003865 # Google Compute Engine has three Operation resources:
3866 #
3867 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3868 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003869 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3870 #
3871 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003872 # - For global operations, use the `globalOperations` resource.
3873 # - For regional operations, use the `regionOperations` resource.
3874 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003875 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003876 # 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 -07003877 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3878 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3879 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3880 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3881 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3882 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003883 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003884 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3885 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3886 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003887 },
3888 ],
3889 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003890 &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`.
3891 &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.
3892 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3893 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3894 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3895 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3896 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3897 &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.
3898 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3899 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3900 &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.
3901 &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`.
3902 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3903 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3904 &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.
3905 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3906 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3907 {
3908 &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.
3909 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3910 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3911 {
3912 &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).
3913 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3914 },
3915 ],
3916 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3917 },
3918 ],
3919 &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 -07003920 }</pre>
3921</div>
3922
3923<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003924 <code class="details" id="update">update(project, region, urlMap, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003925 <pre>Updates the specified UrlMap resource with the data included in the request.
3926
3927Args:
3928 project: string, Project ID for this request. (required)
3929 region: string, Name of the region scoping this request. (required)
3930 urlMap: string, Name of the UrlMap resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003931 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003932 The object takes the form of:
3933
Dan O'Mearadd494642020-05-01 07:42:23 -07003934{ # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003935 #
3936 # Google Compute Engine has two URL Map resources:
3937 #
3938 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
3939 #
3940 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
3941 #
3942 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
3943 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003944 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
3945 #
3946 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
3947 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003948 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
3949 #
3950 # 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.
3951 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
3952 &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.
3953 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003954 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003955 # 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 -07003956 &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 -07003957 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07003958 &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.
3959 # Default is false.
3960 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3961 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003962 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003963 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3964 &quot;A String&quot;,
3965 ],
3966 &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
3967 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3968 &quot;A String&quot;,
3969 ],
3970 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3971 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3972 &quot;A String&quot;,
3973 ],
3974 &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.
3975 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3976 &quot;A String&quot;,
3977 ],
3978 &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.
3979 },
3980 &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.
3981 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003982 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003983 &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.
3984 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3985 # The value must be between 200 and 599 inclusive.
3986 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3987 # The value must be between 0.0 and 100.0 inclusive.
3988 },
3989 &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.
3990 &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.
3991 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3992 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3993 },
3994 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3995 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003996 },
3997 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003998 &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 -07003999 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004000 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4001 },
4002 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004003 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004004 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4005 &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.
4006 # 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.
4007 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4008 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,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 -07004009 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004010 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4011 # - 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.
4012 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4013 # -
4014 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4015 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4016 # - 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.
4017 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4018 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4019 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4020 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4021 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004022 ],
4023 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004024 &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.
4025 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004026 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004027 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4028 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4029 },
4030 &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 -07004031 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004032 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004033 &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 -07004034 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07004035 &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.
4036 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004037 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004038 &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.
4039 # 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 -07004040 { # 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
4041 &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.
4042 &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.
4043 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004044 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4045 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004046 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4047 { # Specification determining how headers are added to requests or responses.
4048 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4049 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4050 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4051 # The default value is false.
4052 },
4053 ],
4054 &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.
4055 &quot;A String&quot;,
4056 ],
4057 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4058 { # Specification determining how headers are added to requests or responses.
4059 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4060 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4061 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4062 # The default value is false.
4063 },
4064 ],
4065 &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.
4066 &quot;A String&quot;,
4067 ],
4068 },
4069 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4070 # 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.
4071 # The value must be between 0 and 1000
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004072 },
4073 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004074 },
4075 &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.
4076 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004077 # 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 -07004078 &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.
4079 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004080 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004081 &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.
4082 # The value must be between 1 and 255 characters.
4083 &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.
4084 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4085 # The default is set to false.
4086 &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.
4087 # 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.
4088 # The value must be between 1 and 1024 characters.
4089 &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.
4090 # 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.
4091 # The value must be between 1 and 1024 characters.
4092 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4093 # Supported values are:
4094 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4095 # - FOUND, which corresponds to 302.
4096 # - SEE_OTHER which corresponds to 303.
4097 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4098 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4099 &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.
4100 # The default is set to false.
4101 },
4102 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4103 &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.
4104 #
4105 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
4106 &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.
4107 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004108 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4109 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004110 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4111 { # Specification determining how headers are added to requests or responses.
4112 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4113 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4114 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4115 # The default value is false.
4116 },
4117 ],
4118 &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.
4119 &quot;A String&quot;,
4120 ],
4121 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4122 { # Specification determining how headers are added to requests or responses.
4123 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4124 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4125 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4126 # The default value is false.
4127 },
4128 ],
4129 &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.
4130 &quot;A String&quot;,
4131 ],
4132 },
4133 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
4134 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
4135 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4136 &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 -07004137 # * 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 -07004138 &quot;A String&quot;,
4139 ],
4140 &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.
4141 },
4142 ],
4143 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4144 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
4145 &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.
4146 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
4147 { # 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.
4148 &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.
4149 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004150 # 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 -07004151 &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 -07004152 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004153 &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.
4154 # Default is false.
4155 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4156 &quot;A String&quot;,
4157 ],
4158 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4159 &quot;A String&quot;,
4160 ],
4161 &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
4162 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4163 &quot;A String&quot;,
4164 ],
4165 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4166 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4167 &quot;A String&quot;,
4168 ],
4169 &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.
4170 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4171 &quot;A String&quot;,
4172 ],
4173 &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.
4174 },
4175 &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.
4176 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004177 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004178 &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.
4179 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4180 # The value must be between 200 and 599 inclusive.
4181 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4182 # The value must be between 0.0 and 100.0 inclusive.
4183 },
4184 &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.
4185 &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.
4186 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4187 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4188 },
4189 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4190 # The value must be between 0.0 and 100.0 inclusive.
4191 },
4192 },
4193 &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 -07004194 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004195 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4196 },
4197 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004198 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004199 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4200 &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.
4201 # 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.
4202 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4203 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4204 },
4205 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4206 # - 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.
4207 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4208 # -
4209 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4210 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4211 # - 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.
4212 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4213 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4214 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4215 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4216 &quot;A String&quot;,
4217 ],
4218 },
4219 &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.
4220 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004221 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004222 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4223 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4224 },
4225 &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 -07004226 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004227 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004228 &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.
4229 # The value must be between 1 and 255 characters.
4230 &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.
4231 # The value must be between 1 and 1024 characters.
4232 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004233 &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.
4234 # 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 -07004235 { # 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
4236 &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.
4237 &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.
4238 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004239 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4240 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004241 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4242 { # Specification determining how headers are added to requests or responses.
4243 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4244 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4245 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4246 # The default value is false.
4247 },
4248 ],
4249 &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.
4250 &quot;A String&quot;,
4251 ],
4252 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4253 { # Specification determining how headers are added to requests or responses.
4254 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4255 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4256 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4257 # The default value is false.
4258 },
4259 ],
4260 &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.
4261 &quot;A String&quot;,
4262 ],
4263 },
4264 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4265 # 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.
4266 # The value must be between 0 and 1000
4267 },
4268 ],
4269 },
4270 &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:
4271 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
4272 # - compute/v1/projects/project/global/backendServices/backendService
4273 # - 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.
4274 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
4275 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
4276 # - compute.backendBuckets.use
4277 # - compute.backendServices.use
4278 &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.
4279 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004280 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004281 &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.
4282 # The value must be between 1 and 255 characters.
4283 &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.
4284 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4285 # The default is set to false.
4286 &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.
4287 # 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.
4288 # The value must be between 1 and 1024 characters.
4289 &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.
4290 # 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.
4291 # The value must be between 1 and 1024 characters.
4292 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4293 # Supported values are:
4294 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4295 # - FOUND, which corresponds to 302.
4296 # - SEE_OTHER which corresponds to 303.
4297 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4298 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4299 &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.
4300 # The default is set to false.
4301 },
4302 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4303 &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.
4304 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004305 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4306 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004307 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4308 { # Specification determining how headers are added to requests or responses.
4309 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4310 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4311 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4312 # The default value is false.
4313 },
4314 ],
4315 &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.
4316 &quot;A String&quot;,
4317 ],
4318 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4319 { # Specification determining how headers are added to requests or responses.
4320 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4321 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4322 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4323 # The default value is false.
4324 },
4325 ],
4326 &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.
4327 &quot;A String&quot;,
4328 ],
4329 },
4330 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
4331 &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.
4332 # 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.
4333 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
4334 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
4335 &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.
4336 &quot;A String&quot;,
4337 ],
4338 &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.
4339 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004340 # 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 -07004341 &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 -07004342 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004343 &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.
4344 # Default is false.
4345 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4346 &quot;A String&quot;,
4347 ],
4348 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4349 &quot;A String&quot;,
4350 ],
4351 &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
4352 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4353 &quot;A String&quot;,
4354 ],
4355 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4356 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4357 &quot;A String&quot;,
4358 ],
4359 &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.
4360 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4361 &quot;A String&quot;,
4362 ],
4363 &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.
4364 },
4365 &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.
4366 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004367 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004368 &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.
4369 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4370 # The value must be between 200 and 599 inclusive.
4371 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4372 # The value must be between 0.0 and 100.0 inclusive.
4373 },
4374 &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.
4375 &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.
4376 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4377 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4378 },
4379 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4380 # The value must be between 0.0 and 100.0 inclusive.
4381 },
4382 },
4383 &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 -07004384 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004385 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4386 },
4387 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004388 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004389 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4390 &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.
4391 # 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.
4392 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4393 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4394 },
4395 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4396 # - 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.
4397 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4398 # -
4399 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4400 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4401 # - 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.
4402 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4403 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4404 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4405 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4406 &quot;A String&quot;,
4407 ],
4408 },
4409 &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.
4410 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004411 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004412 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4413 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4414 },
4415 &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 -07004416 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004417 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004418 &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.
4419 # The value must be between 1 and 255 characters.
4420 &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.
4421 # The value must be between 1 and 1024 characters.
4422 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004423 &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.
4424 # 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 -07004425 { # 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
4426 &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.
4427 &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.
4428 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004429 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4430 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004431 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4432 { # Specification determining how headers are added to requests or responses.
4433 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4434 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4435 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4436 # The default value is false.
4437 },
4438 ],
4439 &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.
4440 &quot;A String&quot;,
4441 ],
4442 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4443 { # Specification determining how headers are added to requests or responses.
4444 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4445 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4446 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4447 # The default value is false.
4448 },
4449 ],
4450 &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.
4451 &quot;A String&quot;,
4452 ],
4453 },
4454 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4455 # 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.
4456 # The value must be between 0 and 1000
4457 },
4458 ],
4459 },
4460 &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.
4461 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4462 &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.
4463 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004464 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004465 &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.
4466 # The value must be between 1 and 255 characters.
4467 &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.
4468 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4469 # The default is set to false.
4470 &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.
4471 # 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.
4472 # The value must be between 1 and 1024 characters.
4473 &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.
4474 # 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.
4475 # The value must be between 1 and 1024 characters.
4476 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4477 # Supported values are:
4478 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4479 # - FOUND, which corresponds to 302.
4480 # - SEE_OTHER which corresponds to 303.
4481 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4482 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4483 &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.
4484 # The default is set to false.
4485 },
4486 },
4487 ],
4488 &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.
4489 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
4490 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
4491 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
4492 # The description can have a maximum length of 1024 characters.
4493 &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.
4494 # 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 -07004495 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4496 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004497 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4498 { # Specification determining how headers are added to requests or responses.
4499 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4500 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4501 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4502 # The default value is false.
4503 },
4504 ],
4505 &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.
4506 &quot;A String&quot;,
4507 ],
4508 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4509 { # Specification determining how headers are added to requests or responses.
4510 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4511 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4512 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4513 # The default value is false.
4514 },
4515 ],
4516 &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.
4517 &quot;A String&quot;,
4518 ],
4519 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004520 &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.
4521 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
4522 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
4523 &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
4524 &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
4525 &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
4526 },
4527 ],
4528 &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.
4529 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
4530 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
4531 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
4532 &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
4533 &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
4534 &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
4535 },
4536 ],
4537 &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 -07004538 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
4539 &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.
4540 # fullPathMatch must be between 1 and 1024 characters.
4541 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4542 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
4543 { # matchRule criteria for request header matches.
4544 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
4545 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4546 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
4547 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
4548 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004549 # 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 -07004550 &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.
4551 # The default setting is false.
4552 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
4553 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4554 &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.
4555 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4556 &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.
4557 # For example for a range [-5, 0]
4558 # - -3 will match.
4559 # - 0 will not match.
4560 # - 0.25 will not match.
4561 # - -3someString will not match.
4562 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4563 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4564 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
4565 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
4566 },
4567 &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
4568 # 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.
4569 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4570 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
4571 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
4572 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4573 },
4574 ],
4575 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
4576 # The default value is false.
4577 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004578 # Not supported when the URL map is bound to target gRPC proxy.
4579 &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.
4580 # 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 -07004581 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
4582 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004583 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004584 { # 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.
4585 # 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.
4586 # 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.
4587 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
4588 # This list must not be empty and can have at the most 64 entries.
4589 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
4590 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
4591 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
4592 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
4593 # value can have a maximum length of 1024 characters.
4594 },
4595 ],
4596 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
4597 # Supported values are:
4598 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
4599 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
4600 },
4601 ],
4602 &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 /.
4603 # The value must be between 1 and 1024 characters.
4604 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4605 &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 -07004606 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004607 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
4608 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
4609 # Only one of presentMatch, exactMatch or regexMatch must be set.
4610 &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.
4611 &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.
4612 # Only one of presentMatch, exactMatch or regexMatch must be set.
4613 &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
4614 # Only one of presentMatch, exactMatch or regexMatch must be set.
4615 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
4616 },
4617 ],
4618 &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
4619 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4620 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
4621 },
4622 ],
4623 &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.
4624 # 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.
4625 # 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.
4626 &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.
4627 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004628 # 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 -07004629 &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 -07004630 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004631 &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.
4632 # Default is false.
4633 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4634 &quot;A String&quot;,
4635 ],
4636 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4637 &quot;A String&quot;,
4638 ],
4639 &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
4640 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4641 &quot;A String&quot;,
4642 ],
4643 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4644 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4645 &quot;A String&quot;,
4646 ],
4647 &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.
4648 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4649 &quot;A String&quot;,
4650 ],
4651 &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.
4652 },
4653 &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.
4654 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004655 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004656 &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.
4657 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4658 # The value must be between 200 and 599 inclusive.
4659 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4660 # The value must be between 0.0 and 100.0 inclusive.
4661 },
4662 &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.
4663 &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.
4664 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4665 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4666 },
4667 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4668 # The value must be between 0.0 and 100.0 inclusive.
4669 },
4670 },
4671 &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 -07004672 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004673 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4674 },
4675 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004676 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004677 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4678 &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.
4679 # 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.
4680 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4681 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4682 },
4683 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4684 # - 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.
4685 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4686 # -
4687 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4688 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4689 # - 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.
4690 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4691 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4692 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4693 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4694 &quot;A String&quot;,
4695 ],
4696 },
4697 &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.
4698 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004699 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004700 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4701 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4702 },
4703 &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 -07004704 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004705 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004706 &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.
4707 # The value must be between 1 and 255 characters.
4708 &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.
4709 # The value must be between 1 and 1024 characters.
4710 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004711 &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.
4712 # 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 -07004713 { # 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
4714 &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.
4715 &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.
4716 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004717 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4718 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004719 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4720 { # Specification determining how headers are added to requests or responses.
4721 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4722 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4723 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4724 # The default value is false.
4725 },
4726 ],
4727 &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.
4728 &quot;A String&quot;,
4729 ],
4730 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4731 { # Specification determining how headers are added to requests or responses.
4732 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4733 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4734 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4735 # The default value is false.
4736 },
4737 ],
4738 &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.
4739 &quot;A String&quot;,
4740 ],
4741 },
4742 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4743 # 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.
4744 # The value must be between 0 and 1000
4745 },
4746 ],
4747 },
4748 &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.
4749 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4750 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
4751 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004752 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004753 &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.
4754 # The value must be between 1 and 255 characters.
4755 &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.
4756 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4757 # The default is set to false.
4758 &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.
4759 # 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.
4760 # The value must be between 1 and 1024 characters.
4761 &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.
4762 # 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.
4763 # The value must be between 1 and 1024 characters.
4764 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4765 # Supported values are:
4766 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4767 # - FOUND, which corresponds to 302.
4768 # - SEE_OTHER which corresponds to 303.
4769 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4770 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4771 &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.
4772 # The default is set to false.
4773 },
4774 },
4775 ],
4776 },
4777 ],
4778 &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.
4779 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4780 &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 -07004781 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004782 { # Message for the expected URL mappings.
4783 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004784 &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 -07004785 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004786 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
4787 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07004788 },
4789 ],
4790}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004791
4792 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
4793
4794Returns:
4795 An object of the form:
4796
4797 { # Represents an Operation resource.
4798 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004799 # Google Compute Engine has three Operation resources:
4800 #
4801 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4802 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004803 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4804 #
4805 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004806 # - For global operations, use the `globalOperations` resource.
4807 # - For regional operations, use the `regionOperations` resource.
4808 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004809 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004810 # 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 -07004811 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4812 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4813 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4814 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4815 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4816 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004817 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004818 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4819 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4820 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004821 },
4822 ],
4823 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004824 &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`.
4825 &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.
4826 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4827 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4828 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4829 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4830 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4831 &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.
4832 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4833 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4834 &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.
4835 &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`.
4836 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4837 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4838 &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.
4839 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4840 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4841 {
4842 &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.
4843 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4844 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4845 {
4846 &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).
4847 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4848 },
4849 ],
4850 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4851 },
4852 ],
4853 &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 -07004854 }</pre>
4855</div>
4856
4857<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004858 <code class="details" id="validate">validate(project, region, urlMap, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004859 <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.
4860
4861Args:
4862 project: string, Project ID for this request. (required)
4863 region: string, Name of the region scoping this request. (required)
4864 urlMap: string, Name of the UrlMap resource to be validated as. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004865 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004866 The object takes the form of:
4867
4868{
Bu Sun Kim65020912020-05-20 12:08:20 -07004869 &quot;resource&quot;: { # Represents a URL Map resource. # Content of the UrlMap to be validated.
4870 #
4871 # Google Compute Engine has two URL Map resources:
4872 #
4873 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
4874 #
4875 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
4876 #
4877 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
4878 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004879 # For a list of supported URL map features by load balancer type, see the Load balancing features: Routing and traffic management table.
4880 #
4881 # For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
4882 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004883 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
4884 #
4885 # 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.
4886 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
4887 &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.
4888 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004889 # UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004890 # 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 -07004891 &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 -07004892 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07004893 &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.
4894 # Default is false.
4895 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4896 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004897 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004898 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4899 &quot;A String&quot;,
4900 ],
4901 &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
4902 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4903 &quot;A String&quot;,
4904 ],
4905 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4906 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4907 &quot;A String&quot;,
4908 ],
4909 &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.
4910 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4911 &quot;A String&quot;,
4912 ],
4913 &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.
4914 },
4915 &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.
4916 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004917 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004918 &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.
4919 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4920 # The value must be between 200 and 599 inclusive.
4921 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4922 # The value must be between 0.0 and 100.0 inclusive.
4923 },
4924 &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.
4925 &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.
4926 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4927 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4928 },
4929 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4930 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004931 },
4932 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004933 &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 -07004934 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004935 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4936 },
4937 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004938 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004939 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4940 &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.
4941 # 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.
4942 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4943 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,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 -07004944 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004945 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4946 # - 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.
4947 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4948 # -
4949 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4950 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4951 # - 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.
4952 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4953 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4954 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4955 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4956 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004957 ],
4958 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004959 &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.
4960 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004961 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004962 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4963 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4964 },
4965 &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 -07004966 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004967 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004968 &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 -07004969 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07004970 &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.
4971 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004972 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004973 &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.
4974 # 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 -07004975 { # 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
4976 &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.
4977 &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.
4978 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004979 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4980 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004981 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4982 { # Specification determining how headers are added to requests or responses.
4983 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4984 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4985 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4986 # The default value is false.
4987 },
4988 ],
4989 &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.
4990 &quot;A String&quot;,
4991 ],
4992 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4993 { # Specification determining how headers are added to requests or responses.
4994 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4995 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4996 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4997 # The default value is false.
4998 },
4999 ],
5000 &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.
5001 &quot;A String&quot;,
5002 ],
5003 },
5004 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5005 # 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.
5006 # The value must be between 0 and 1000
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005007 },
5008 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005009 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005010 &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.
5011 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005012 # 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 -07005013 &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.
5014 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005015 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005016 &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.
5017 # The value must be between 1 and 255 characters.
5018 &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.
5019 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5020 # The default is set to false.
5021 &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.
5022 # 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.
5023 # The value must be between 1 and 1024 characters.
5024 &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.
5025 # 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.
5026 # The value must be between 1 and 1024 characters.
5027 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5028 # Supported values are:
5029 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5030 # - FOUND, which corresponds to 302.
5031 # - SEE_OTHER which corresponds to 303.
5032 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5033 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5034 &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.
5035 # The default is set to false.
5036 },
5037 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
5038 &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.
5039 #
5040 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
5041 &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.
5042 # The headerAction specified here take effect after headerAction specified under pathMatcher.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005043 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5044 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005045 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5046 { # Specification determining how headers are added to requests or responses.
5047 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5048 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5049 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5050 # The default value is false.
5051 },
5052 ],
5053 &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.
5054 &quot;A String&quot;,
5055 ],
5056 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5057 { # Specification determining how headers are added to requests or responses.
5058 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5059 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5060 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5061 # The default value is false.
5062 },
5063 ],
5064 &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.
5065 &quot;A String&quot;,
5066 ],
5067 },
5068 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
5069 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
5070 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
5071 &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 -07005072 # * 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 -07005073 &quot;A String&quot;,
5074 ],
5075 &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.
5076 },
5077 ],
5078 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
5079 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
5080 &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.
5081 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
5082 { # 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.
5083 &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.
5084 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005085 # 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 -07005086 &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 -07005087 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005088 &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.
5089 # Default is false.
5090 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
5091 &quot;A String&quot;,
5092 ],
5093 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
5094 &quot;A String&quot;,
5095 ],
5096 &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
5097 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5098 &quot;A String&quot;,
5099 ],
5100 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
5101 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5102 &quot;A String&quot;,
5103 ],
5104 &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.
5105 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
5106 &quot;A String&quot;,
5107 ],
5108 &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.
5109 },
5110 &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.
5111 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005112 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005113 &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.
5114 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
5115 # The value must be between 200 and 599 inclusive.
5116 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5117 # The value must be between 0.0 and 100.0 inclusive.
5118 },
5119 &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.
5120 &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.
5121 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5122 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5123 },
5124 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5125 # The value must be between 0.0 and 100.0 inclusive.
5126 },
5127 },
5128 &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 -07005129 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005130 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
5131 },
5132 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005133 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005134 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5135 &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.
5136 # 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.
5137 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5138 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5139 },
5140 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5141 # - 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.
5142 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5143 # -
5144 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5145 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5146 # - 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.
5147 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5148 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5149 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5150 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5151 &quot;A String&quot;,
5152 ],
5153 },
5154 &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.
5155 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005156 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005157 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5158 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5159 },
5160 &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 -07005161 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005162 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005163 &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.
5164 # The value must be between 1 and 255 characters.
5165 &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.
5166 # The value must be between 1 and 1024 characters.
5167 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005168 &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.
5169 # 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 -07005170 { # 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
5171 &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.
5172 &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.
5173 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005174 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5175 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005176 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5177 { # Specification determining how headers are added to requests or responses.
5178 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5179 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5180 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5181 # The default value is false.
5182 },
5183 ],
5184 &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.
5185 &quot;A String&quot;,
5186 ],
5187 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5188 { # Specification determining how headers are added to requests or responses.
5189 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5190 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5191 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5192 # The default value is false.
5193 },
5194 ],
5195 &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.
5196 &quot;A String&quot;,
5197 ],
5198 },
5199 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5200 # 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.
5201 # The value must be between 0 and 1000
5202 },
5203 ],
5204 },
5205 &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:
5206 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
5207 # - compute/v1/projects/project/global/backendServices/backendService
5208 # - 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.
5209 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
5210 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
5211 # - compute.backendBuckets.use
5212 # - compute.backendServices.use
5213 &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.
5214 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005215 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005216 &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.
5217 # The value must be between 1 and 255 characters.
5218 &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.
5219 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5220 # The default is set to false.
5221 &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.
5222 # 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.
5223 # The value must be between 1 and 1024 characters.
5224 &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.
5225 # 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.
5226 # The value must be between 1 and 1024 characters.
5227 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5228 # Supported values are:
5229 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5230 # - FOUND, which corresponds to 302.
5231 # - SEE_OTHER which corresponds to 303.
5232 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5233 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5234 &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.
5235 # The default is set to false.
5236 },
5237 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
5238 &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.
5239 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005240 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5241 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005242 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5243 { # Specification determining how headers are added to requests or responses.
5244 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5245 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5246 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5247 # The default value is false.
5248 },
5249 ],
5250 &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.
5251 &quot;A String&quot;,
5252 ],
5253 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5254 { # Specification determining how headers are added to requests or responses.
5255 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5256 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5257 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5258 # The default value is false.
5259 },
5260 ],
5261 &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.
5262 &quot;A String&quot;,
5263 ],
5264 },
5265 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
5266 &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.
5267 # 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.
5268 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
5269 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
5270 &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.
5271 &quot;A String&quot;,
5272 ],
5273 &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.
5274 # Only one of routeAction or urlRedirect must be set.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005275 # 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 -07005276 &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 -07005277 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005278 &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.
5279 # Default is false.
5280 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
5281 &quot;A String&quot;,
5282 ],
5283 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
5284 &quot;A String&quot;,
5285 ],
5286 &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
5287 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5288 &quot;A String&quot;,
5289 ],
5290 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
5291 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5292 &quot;A String&quot;,
5293 ],
5294 &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.
5295 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
5296 &quot;A String&quot;,
5297 ],
5298 &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.
5299 },
5300 &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.
5301 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005302 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005303 &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.
5304 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
5305 # The value must be between 200 and 599 inclusive.
5306 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5307 # The value must be between 0.0 and 100.0 inclusive.
5308 },
5309 &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.
5310 &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.
5311 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5312 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5313 },
5314 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5315 # The value must be between 0.0 and 100.0 inclusive.
5316 },
5317 },
5318 &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 -07005319 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005320 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
5321 },
5322 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005323 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005324 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5325 &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.
5326 # 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.
5327 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5328 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5329 },
5330 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5331 # - 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.
5332 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5333 # -
5334 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5335 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5336 # - 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.
5337 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5338 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5339 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5340 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5341 &quot;A String&quot;,
5342 ],
5343 },
5344 &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.
5345 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005346 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005347 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5348 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5349 },
5350 &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 -07005351 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005352 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005353 &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.
5354 # The value must be between 1 and 255 characters.
5355 &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.
5356 # The value must be between 1 and 1024 characters.
5357 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005358 &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.
5359 # 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 -07005360 { # 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
5361 &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.
5362 &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.
5363 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005364 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5365 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005366 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5367 { # Specification determining how headers are added to requests or responses.
5368 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5369 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5370 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5371 # The default value is false.
5372 },
5373 ],
5374 &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.
5375 &quot;A String&quot;,
5376 ],
5377 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5378 { # Specification determining how headers are added to requests or responses.
5379 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5380 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5381 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5382 # The default value is false.
5383 },
5384 ],
5385 &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.
5386 &quot;A String&quot;,
5387 ],
5388 },
5389 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5390 # 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.
5391 # The value must be between 0 and 1000
5392 },
5393 ],
5394 },
5395 &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.
5396 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5397 &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.
5398 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005399 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005400 &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.
5401 # The value must be between 1 and 255 characters.
5402 &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.
5403 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5404 # The default is set to false.
5405 &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.
5406 # 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.
5407 # The value must be between 1 and 1024 characters.
5408 &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.
5409 # 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.
5410 # The value must be between 1 and 1024 characters.
5411 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5412 # Supported values are:
5413 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5414 # - FOUND, which corresponds to 302.
5415 # - SEE_OTHER which corresponds to 303.
5416 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5417 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5418 &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.
5419 # The default is set to false.
5420 },
5421 },
5422 ],
5423 &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.
5424 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
5425 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
5426 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
5427 # The description can have a maximum length of 1024 characters.
5428 &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.
5429 # 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 -07005430 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5431 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005432 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5433 { # Specification determining how headers are added to requests or responses.
5434 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5435 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5436 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5437 # The default value is false.
5438 },
5439 ],
5440 &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.
5441 &quot;A String&quot;,
5442 ],
5443 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5444 { # Specification determining how headers are added to requests or responses.
5445 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5446 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5447 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5448 # The default value is false.
5449 },
5450 ],
5451 &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.
5452 &quot;A String&quot;,
5453 ],
5454 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005455 &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.
5456 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
5457 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
5458 &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
5459 &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
5460 &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
5461 },
5462 ],
5463 &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.
5464 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
5465 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
5466 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
5467 &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
5468 &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
5469 &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
5470 },
5471 ],
5472 &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 -07005473 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
5474 &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.
5475 # fullPathMatch must be between 1 and 1024 characters.
5476 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5477 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
5478 { # matchRule criteria for request header matches.
5479 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
5480 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5481 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
5482 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
5483 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005484 # 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 -07005485 &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.
5486 # The default setting is false.
5487 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
5488 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5489 &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.
5490 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5491 &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.
5492 # For example for a range [-5, 0]
5493 # - -3 will match.
5494 # - 0 will not match.
5495 # - 0.25 will not match.
5496 # - -3someString will not match.
5497 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5498 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5499 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
5500 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
5501 },
5502 &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
5503 # 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.
5504 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5505 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
5506 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
5507 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5508 },
5509 ],
5510 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
5511 # The default value is false.
5512 # ignoreCase must not be used with regexMatch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005513 # Not supported when the URL map is bound to target gRPC proxy.
5514 &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.
5515 # 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 -07005516 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
5517 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005518 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005519 { # 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.
5520 # 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.
5521 # 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.
5522 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
5523 # This list must not be empty and can have at the most 64 entries.
5524 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
5525 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
5526 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
5527 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
5528 # value can have a maximum length of 1024 characters.
5529 },
5530 ],
5531 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
5532 # Supported values are:
5533 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
5534 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
5535 },
5536 ],
5537 &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 /.
5538 # The value must be between 1 and 1024 characters.
5539 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5540 &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 -07005541 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005542 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
5543 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
5544 # Only one of presentMatch, exactMatch or regexMatch must be set.
5545 &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.
5546 &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.
5547 # Only one of presentMatch, exactMatch or regexMatch must be set.
5548 &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
5549 # Only one of presentMatch, exactMatch or regexMatch must be set.
5550 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
5551 },
5552 ],
5553 &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
5554 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5555 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
5556 },
5557 ],
5558 &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.
5559 # 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.
5560 # 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.
5561 &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.
5562 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005563 # 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 -07005564 &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 -07005565 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005566 &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.
5567 # Default is false.
5568 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
5569 &quot;A String&quot;,
5570 ],
5571 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
5572 &quot;A String&quot;,
5573 ],
5574 &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
5575 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5576 &quot;A String&quot;,
5577 ],
5578 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
5579 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5580 &quot;A String&quot;,
5581 ],
5582 &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.
5583 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
5584 &quot;A String&quot;,
5585 ],
5586 &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.
5587 },
5588 &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.
5589 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005590 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005591 &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.
5592 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
5593 # The value must be between 200 and 599 inclusive.
5594 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5595 # The value must be between 0.0 and 100.0 inclusive.
5596 },
5597 &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.
5598 &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.
5599 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5600 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5601 },
5602 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5603 # The value must be between 0.0 and 100.0 inclusive.
5604 },
5605 },
5606 &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 -07005607 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005608 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
5609 },
5610 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005611 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005612 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5613 &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.
5614 # 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.
5615 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5616 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5617 },
5618 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5619 # - 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.
5620 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5621 # -
5622 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5623 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5624 # - 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.
5625 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5626 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5627 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5628 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5629 &quot;A String&quot;,
5630 ],
5631 },
5632 &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.
5633 # If not specified, will use the largest timeout among all backend services associated with the route.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005634 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005635 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5636 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5637 },
5638 &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 -07005639 # urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005640 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005641 &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.
5642 # The value must be between 1 and 255 characters.
5643 &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.
5644 # The value must be between 1 and 1024 characters.
5645 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005646 &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.
5647 # 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 -07005648 { # 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
5649 &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.
5650 &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.
5651 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005652 # Note that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5653 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005654 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5655 { # Specification determining how headers are added to requests or responses.
5656 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5657 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5658 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5659 # The default value is false.
5660 },
5661 ],
5662 &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.
5663 &quot;A String&quot;,
5664 ],
5665 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5666 { # Specification determining how headers are added to requests or responses.
5667 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5668 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5669 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5670 # The default value is false.
5671 },
5672 ],
5673 &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.
5674 &quot;A String&quot;,
5675 ],
5676 },
5677 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5678 # 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.
5679 # The value must be between 0 and 1000
5680 },
5681 ],
5682 },
5683 &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.
5684 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5685 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
5686 # If urlRedirect is specified, service or routeAction must not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005687 # Not supported when the URL map is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005688 &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.
5689 # The value must be between 1 and 255 characters.
5690 &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.
5691 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5692 # The default is set to false.
5693 &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.
5694 # 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.
5695 # The value must be between 1 and 1024 characters.
5696 &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.
5697 # 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.
5698 # The value must be between 1 and 1024 characters.
5699 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5700 # Supported values are:
5701 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5702 # - FOUND, which corresponds to 302.
5703 # - SEE_OTHER which corresponds to 303.
5704 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5705 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5706 &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.
5707 # The default is set to false.
5708 },
5709 },
5710 ],
5711 },
5712 ],
5713 &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.
5714 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5715 &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 -07005716 # Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07005717 { # Message for the expected URL mappings.
5718 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005719 &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 -07005720 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005721 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
5722 # service cannot be set if expectedRedirectResponseCode is set.
Bu Sun Kim65020912020-05-20 12:08:20 -07005723 },
5724 ],
5725 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005726 }
5727
5728
5729Returns:
5730 An object of the form:
5731
5732 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005733 &quot;result&quot;: { # Message representing the validation result for a UrlMap.
5734 &quot;loadErrors&quot;: [
5735 &quot;A String&quot;,
5736 ],
5737 &quot;loadSucceeded&quot;: True or False, # Whether the given UrlMap can be successfully loaded. If false, &#x27;loadErrors&#x27; indicates the reasons.
5738 &quot;testFailures&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005739 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005740 &quot;actualService&quot;: &quot;A String&quot;, # BackendService or BackendBucket returned by load balancer.
5741 &quot;expectedService&quot;: &quot;A String&quot;, # Expected BackendService or BackendBucket resource the given URL should be mapped to.
5742 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL.
5743 &quot;path&quot;: &quot;A String&quot;, # Path portion including query parameters in the URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005744 },
5745 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005746 &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 -07005747 },
5748 }</pre>
5749</div>
5750
5751</body></html>