blob: f244c4ed6ebcde1749724993700d9f290eaa29ab [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_alpha.html">Compute Engine API</a> . <a href="compute_alpha.regionUrlMaps.html">regionUrlMaps</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#delete">delete(project, region, urlMap, requestId=None)</a></code></p>
79<p class="firstline">Deletes the specified UrlMap resource.</p>
80<p class="toc_element">
81 <code><a href="#get">get(project, region, urlMap)</a></code></p>
82<p class="firstline">Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.</p>
83<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#insert">insert(project, region, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070085<p class="firstline">Creates a UrlMap resource in the specified project using the data included in the request.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#invalidateCache">invalidateCache(project, region, urlMap, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.</p>
89<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070090 <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 -070091<p class="firstline">Retrieves the list of UrlMap resources available to the specified project in the specified region.</p>
92<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#patch">patch(project, region, urlMap, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100<p class="firstline">Returns permissions that a caller has on the specified resource.</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">
109 <code class="details" id="delete">delete(project, region, urlMap, requestId=None)</code>
110 <pre>Deletes the specified UrlMap resource.
111
112Args:
113 project: string, Project ID for this request. (required)
114 region: string, Name of the region scoping this request. (required)
115 urlMap: string, Name of the UrlMap resource to delete. (required)
116 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
117
118Returns:
119 An object of the form:
120
121 { # Represents an Operation resource.
122 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700123 # Google Compute Engine has three Operation resources:
124 #
125 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
126 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700127 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
128 #
129 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700130 # - For global operations, use the `globalOperations` resource.
131 # - For regional operations, use the `regionOperations` resource.
132 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700133 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700134 # 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 -0700135 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
136 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
137 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
138 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
139 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
140 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700141 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700142 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
143 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
144 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700145 },
146 ],
147 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700148 &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`.
149 &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.
150 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
151 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
152 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
153 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
154 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
155 &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.
156 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
157 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
158 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
159 &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.
160 &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`.
161 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
162 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
163 &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.
164 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
165 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
166 {
167 &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.
168 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
169 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
170 {
171 &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).
172 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
173 },
174 ],
175 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
176 },
177 ],
178 &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 -0700179 }</pre>
180</div>
181
182<div class="method">
183 <code class="details" id="get">get(project, region, urlMap)</code>
184 <pre>Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.
185
186Args:
187 project: string, Project ID for this request. (required)
188 region: string, Name of the region scoping this request. (required)
189 urlMap: string, Name of the UrlMap resource to return. (required)
190
191Returns:
192 An object of the form:
193
Dan O'Mearadd494642020-05-01 07:42:23 -0700194 { # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700195 #
196 # Google Compute Engine has two URL Map resources:
197 #
198 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
199 #
200 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
201 #
202 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
203 #
204 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
205 #
206 # 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.
207 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
208 &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.
209 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
210 &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
211 &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.
212 # Default is false.
213 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
214 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700215 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700216 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
217 &quot;A String&quot;,
218 ],
219 &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
220 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
221 &quot;A String&quot;,
222 ],
223 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
224 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
225 &quot;A String&quot;,
226 ],
227 &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.
228 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
229 &quot;A String&quot;,
230 ],
231 &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.
232 },
233 &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.
234 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
235 &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.
236 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
237 # The value must be between 200 and 599 inclusive.
238 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
239 # The value must be between 0.0 and 100.0 inclusive.
240 },
241 &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.
242 &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.
243 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
244 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
245 },
246 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
247 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700248 },
249 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700250 &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.
251 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
252 },
253 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
254 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
255 &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.
256 # 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.
257 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
258 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,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 -0700259 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700260 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
261 # - 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.
262 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
263 # -
264 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
265 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
266 # - 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.
267 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
268 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
269 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
270 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
271 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700272 ],
273 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700274 &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.
275 # If not specified, will use the largest timeout among all backend services associated with the route.
276 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
277 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
278 },
279 &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.
280 &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 -0700281 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700282 &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.
283 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700284 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700285 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
286 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
287 { # 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
288 &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.
289 &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.
290 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
291 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
292 { # Specification determining how headers are added to requests or responses.
293 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
294 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
295 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
296 # The default value is false.
297 },
298 ],
299 &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.
300 &quot;A String&quot;,
301 ],
302 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
303 { # Specification determining how headers are added to requests or responses.
304 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
305 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
306 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
307 # The default value is false.
308 },
309 ],
310 &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.
311 &quot;A String&quot;,
312 ],
313 },
314 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
315 # 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.
316 # The value must be between 0 and 1000
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700317 },
318 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700319 },
320 &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.
321 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
322 &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.
323 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
324 &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.
325 # The value must be between 1 and 255 characters.
326 &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.
327 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
328 # The default is set to false.
329 &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.
330 # 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.
331 # The value must be between 1 and 1024 characters.
332 &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.
333 # 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.
334 # The value must be between 1 and 1024 characters.
335 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
336 # Supported values are:
337 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
338 # - FOUND, which corresponds to 302.
339 # - SEE_OTHER which corresponds to 303.
340 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
341 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
342 &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.
343 # The default is set to false.
344 },
345 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
346 &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.
347 #
348 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
349 &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.
350 # The headerAction specified here take effect after headerAction specified under pathMatcher.
351 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
352 { # Specification determining how headers are added to requests or responses.
353 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
354 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
355 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
356 # The default value is false.
357 },
358 ],
359 &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.
360 &quot;A String&quot;,
361 ],
362 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
363 { # Specification determining how headers are added to requests or responses.
364 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
365 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
366 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
367 # The default value is false.
368 },
369 ],
370 &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.
371 &quot;A String&quot;,
372 ],
373 },
374 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
375 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
376 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
377 &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 ..
378 &quot;A String&quot;,
379 ],
380 &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.
381 },
382 ],
383 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
384 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
385 &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.
386 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
387 { # 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.
388 &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.
389 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
390 &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
391 &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.
392 # Default is false.
393 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
394 &quot;A String&quot;,
395 ],
396 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
397 &quot;A String&quot;,
398 ],
399 &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
400 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
401 &quot;A String&quot;,
402 ],
403 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
404 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
405 &quot;A String&quot;,
406 ],
407 &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.
408 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
409 &quot;A String&quot;,
410 ],
411 &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.
412 },
413 &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.
414 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
415 &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.
416 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
417 # The value must be between 200 and 599 inclusive.
418 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
419 # The value must be between 0.0 and 100.0 inclusive.
420 },
421 &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.
422 &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.
423 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
424 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
425 },
426 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
427 # The value must be between 0.0 and 100.0 inclusive.
428 },
429 },
430 &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.
431 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
432 },
433 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
434 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
435 &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.
436 # 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.
437 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
438 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
439 },
440 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
441 # - 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.
442 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
443 # -
444 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
445 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
446 # - 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.
447 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
448 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
449 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
450 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
451 &quot;A String&quot;,
452 ],
453 },
454 &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.
455 # If not specified, will use the largest timeout among all backend services associated with the route.
456 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
457 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
458 },
459 &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.
460 &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.
461 # The value must be between 1 and 255 characters.
462 &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.
463 # The value must be between 1 and 1024 characters.
464 },
465 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
466 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
467 { # 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
468 &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.
469 &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.
470 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
471 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
472 { # Specification determining how headers are added to requests or responses.
473 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
474 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
475 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
476 # The default value is false.
477 },
478 ],
479 &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.
480 &quot;A String&quot;,
481 ],
482 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
483 { # Specification determining how headers are added to requests or responses.
484 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
485 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
486 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
487 # The default value is false.
488 },
489 ],
490 &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.
491 &quot;A String&quot;,
492 ],
493 },
494 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
495 # 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.
496 # The value must be between 0 and 1000
497 },
498 ],
499 },
500 &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:
501 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
502 # - compute/v1/projects/project/global/backendServices/backendService
503 # - 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.
504 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
505 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
506 # - compute.backendBuckets.use
507 # - compute.backendServices.use
508 &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.
509 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
510 &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.
511 # The value must be between 1 and 255 characters.
512 &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.
513 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
514 # The default is set to false.
515 &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.
516 # 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.
517 # The value must be between 1 and 1024 characters.
518 &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.
519 # 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.
520 # The value must be between 1 and 1024 characters.
521 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
522 # Supported values are:
523 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
524 # - FOUND, which corresponds to 302.
525 # - SEE_OTHER which corresponds to 303.
526 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
527 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
528 &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.
529 # The default is set to false.
530 },
531 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
532 &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.
533 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
534 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
535 { # Specification determining how headers are added to requests or responses.
536 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
537 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
538 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
539 # The default value is false.
540 },
541 ],
542 &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.
543 &quot;A String&quot;,
544 ],
545 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
546 { # Specification determining how headers are added to requests or responses.
547 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
548 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
549 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
550 # The default value is false.
551 },
552 ],
553 &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.
554 &quot;A String&quot;,
555 ],
556 },
557 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
558 &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.
559 # 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.
560 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
561 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
562 &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.
563 &quot;A String&quot;,
564 ],
565 &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.
566 # Only one of routeAction or urlRedirect must be set.
567 &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
568 &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.
569 # Default is false.
570 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
571 &quot;A String&quot;,
572 ],
573 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
574 &quot;A String&quot;,
575 ],
576 &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
577 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
578 &quot;A String&quot;,
579 ],
580 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
581 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
582 &quot;A String&quot;,
583 ],
584 &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.
585 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
586 &quot;A String&quot;,
587 ],
588 &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.
589 },
590 &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.
591 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
592 &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.
593 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
594 # The value must be between 200 and 599 inclusive.
595 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
596 # The value must be between 0.0 and 100.0 inclusive.
597 },
598 &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.
599 &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.
600 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
601 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
602 },
603 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
604 # The value must be between 0.0 and 100.0 inclusive.
605 },
606 },
607 &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.
608 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
609 },
610 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
611 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
612 &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.
613 # 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.
614 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
615 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
616 },
617 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
618 # - 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.
619 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
620 # -
621 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
622 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
623 # - 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.
624 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
625 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
626 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
627 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
628 &quot;A String&quot;,
629 ],
630 },
631 &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.
632 # If not specified, will use the largest timeout among all backend services associated with the route.
633 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
634 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
635 },
636 &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.
637 &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.
638 # The value must be between 1 and 255 characters.
639 &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.
640 # The value must be between 1 and 1024 characters.
641 },
642 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
643 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
644 { # 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
645 &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.
646 &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.
647 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
648 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
649 { # Specification determining how headers are added to requests or responses.
650 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
651 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
652 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
653 # The default value is false.
654 },
655 ],
656 &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.
657 &quot;A String&quot;,
658 ],
659 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
660 { # Specification determining how headers are added to requests or responses.
661 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
662 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
663 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
664 # The default value is false.
665 },
666 ],
667 &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.
668 &quot;A String&quot;,
669 ],
670 },
671 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
672 # 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.
673 # The value must be between 0 and 1000
674 },
675 ],
676 },
677 &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.
678 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
679 &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.
680 # If urlRedirect is specified, service or routeAction must not be set.
681 &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.
682 # The value must be between 1 and 255 characters.
683 &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.
684 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
685 # The default is set to false.
686 &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.
687 # 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.
688 # The value must be between 1 and 1024 characters.
689 &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.
690 # 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.
691 # The value must be between 1 and 1024 characters.
692 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
693 # Supported values are:
694 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
695 # - FOUND, which corresponds to 302.
696 # - SEE_OTHER which corresponds to 303.
697 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
698 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
699 &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.
700 # The default is set to false.
701 },
702 },
703 ],
704 &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.
705 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
706 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
707 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
708 # The description can have a maximum length of 1024 characters.
709 &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.
710 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
711 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
712 { # Specification determining how headers are added to requests or responses.
713 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
714 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
715 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
716 # The default value is false.
717 },
718 ],
719 &quot;requestHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
720 &quot;A String&quot;,
721 ],
722 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
723 { # Specification determining how headers are added to requests or responses.
724 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
725 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
726 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
727 # The default value is false.
728 },
729 ],
730 &quot;responseHeadersToRemove&quot;: [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
731 &quot;A String&quot;,
732 ],
733 },
734 &quot;httpFilterConfigs&quot;: [ # Outbound route specific configuration for networkservices.HttpFilter resources enabled by Traffic Director. httpFilterConfigs only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
735 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
736 &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
737 &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
738 &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
739 },
740 ],
741 &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.
742 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
743 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
744 &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
745 &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
746 &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
747 },
748 ],
749 &quot;matchRules&quot;: [
750 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
751 &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.
752 # fullPathMatch must be between 1 and 1024 characters.
753 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
754 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
755 { # matchRule criteria for request header matches.
756 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
757 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
758 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
759 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
760 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
761 &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.
762 # The default setting is false.
763 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
764 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
765 &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.
766 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
767 &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.
768 # For example for a range [-5, 0]
769 # - -3 will match.
770 # - 0 will not match.
771 # - 0.25 will not match.
772 # - -3someString will not match.
773 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
774 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
775 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
776 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
777 },
778 &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
779 # 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.
780 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
781 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
782 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
783 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
784 },
785 ],
786 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
787 # The default value is false.
788 # ignoreCase must not be used with regexMatch.
789 &quot;metadataFilters&quot;: [ # Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set of xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies.
790 # 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.
791 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
792 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
793 { # 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.
794 # For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata.
795 # 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.
796 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
797 # This list must not be empty and can have at the most 64 entries.
798 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
799 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
800 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
801 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
802 # value can have a maximum length of 1024 characters.
803 },
804 ],
805 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
806 # Supported values are:
807 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
808 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
809 },
810 ],
811 &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 /.
812 # The value must be between 1 and 1024 characters.
813 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
814 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
815 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
816 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
817 # Only one of presentMatch, exactMatch or regexMatch must be set.
818 &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.
819 &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.
820 # Only one of presentMatch, exactMatch or regexMatch must be set.
821 &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
822 # Only one of presentMatch, exactMatch or regexMatch must be set.
823 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
824 },
825 ],
826 &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
827 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
828 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
829 },
830 ],
831 &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.
832 # 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.
833 # 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.
834 &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.
835 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
836 &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
837 &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.
838 # Default is false.
839 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
840 &quot;A String&quot;,
841 ],
842 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
843 &quot;A String&quot;,
844 ],
845 &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
846 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
847 &quot;A String&quot;,
848 ],
849 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
850 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
851 &quot;A String&quot;,
852 ],
853 &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.
854 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
855 &quot;A String&quot;,
856 ],
857 &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.
858 },
859 &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.
860 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
861 &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.
862 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
863 # The value must be between 200 and 599 inclusive.
864 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
865 # The value must be between 0.0 and 100.0 inclusive.
866 },
867 &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.
868 &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.
869 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
870 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
871 },
872 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
873 # The value must be between 0.0 and 100.0 inclusive.
874 },
875 },
876 &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.
877 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
878 },
879 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
880 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
881 &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.
882 # 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.
883 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
884 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
885 },
886 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
887 # - 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.
888 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
889 # -
890 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
891 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
892 # - 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.
893 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
894 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
895 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
896 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
897 &quot;A String&quot;,
898 ],
899 },
900 &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.
901 # If not specified, will use the largest timeout among all backend services associated with the route.
902 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
903 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
904 },
905 &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.
906 &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.
907 # The value must be between 1 and 255 characters.
908 &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.
909 # The value must be between 1 and 1024 characters.
910 },
911 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
912 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
913 { # 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
914 &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.
915 &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.
916 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
917 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
918 { # Specification determining how headers are added to requests or responses.
919 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
920 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
921 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
922 # The default value is false.
923 },
924 ],
925 &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.
926 &quot;A String&quot;,
927 ],
928 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
929 { # Specification determining how headers are added to requests or responses.
930 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
931 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
932 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
933 # The default value is false.
934 },
935 ],
936 &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.
937 &quot;A String&quot;,
938 ],
939 },
940 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
941 # 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.
942 # The value must be between 0 and 1000
943 },
944 ],
945 },
946 &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.
947 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
948 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
949 # If urlRedirect is specified, service or routeAction must not be set.
950 &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.
951 # The value must be between 1 and 255 characters.
952 &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.
953 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
954 # The default is set to false.
955 &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.
956 # 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.
957 # The value must be between 1 and 1024 characters.
958 &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.
959 # 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.
960 # The value must be between 1 and 1024 characters.
961 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
962 # Supported values are:
963 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
964 # - FOUND, which corresponds to 302.
965 # - SEE_OTHER which corresponds to 303.
966 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
967 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
968 &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.
969 # The default is set to false.
970 },
971 },
972 ],
973 },
974 ],
975 &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.
976 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
977 &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.
978 { # Message for the expected URL mappings.
979 &quot;backendServiceWeight&quot;: 42, # The weight to use for the supplied host and path when using advanced routing rules that involve traffic splitting.
980 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
981 &quot;expectedUrlRedirect&quot;: &quot;A String&quot;, # The expected URL that should be redirected to for the host and path being tested.
982 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL.
983 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
984 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService resource the given URL should be mapped to.
985 },
986 ],
987 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700988</div>
989
990<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700991 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700992 <pre>Creates a UrlMap resource in the specified project using the data included in the request.
993
994Args:
995 project: string, Project ID for this request. (required)
996 region: string, Name of the region scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700997 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700998 The object takes the form of:
999
Dan O'Mearadd494642020-05-01 07:42:23 -07001000{ # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001001 #
1002 # Google Compute Engine has two URL Map resources:
1003 #
1004 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
1005 #
1006 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
1007 #
1008 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
1009 #
1010 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
1011 #
1012 # 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.
1013 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1014 &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.
1015 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
1016 &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
1017 &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.
1018 # Default is false.
1019 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
1020 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001021 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001022 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
1023 &quot;A String&quot;,
1024 ],
1025 &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
1026 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1027 &quot;A String&quot;,
1028 ],
1029 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
1030 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1031 &quot;A String&quot;,
1032 ],
1033 &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.
1034 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
1035 &quot;A String&quot;,
1036 ],
1037 &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.
1038 },
1039 &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.
1040 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1041 &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.
1042 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
1043 # The value must be between 200 and 599 inclusive.
1044 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1045 # The value must be between 0.0 and 100.0 inclusive.
1046 },
1047 &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.
1048 &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.
1049 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1050 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1051 },
1052 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1053 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001054 },
1055 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001056 &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.
1057 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
1058 },
1059 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1060 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1061 &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.
1062 # 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.
1063 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1064 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,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 -07001065 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001066 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1067 # - 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.
1068 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1069 # -
1070 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1071 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1072 # - 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.
1073 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1074 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1075 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1076 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1077 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001078 ],
1079 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001080 &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.
1081 # If not specified, will use the largest timeout among all backend services associated with the route.
1082 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1083 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1084 },
1085 &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.
1086 &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 -07001087 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001088 &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.
1089 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001090 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001091 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
1092 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
1093 { # 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
1094 &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.
1095 &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.
1096 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1097 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1098 { # Specification determining how headers are added to requests or responses.
1099 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1100 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1101 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1102 # The default value is false.
1103 },
1104 ],
1105 &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.
1106 &quot;A String&quot;,
1107 ],
1108 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1109 { # Specification determining how headers are added to requests or responses.
1110 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1111 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1112 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1113 # The default value is false.
1114 },
1115 ],
1116 &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.
1117 &quot;A String&quot;,
1118 ],
1119 },
1120 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1121 # 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.
1122 # The value must be between 0 and 1000
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001123 },
1124 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001125 },
1126 &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.
1127 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
1128 &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.
1129 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
1130 &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.
1131 # The value must be between 1 and 255 characters.
1132 &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.
1133 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1134 # The default is set to false.
1135 &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.
1136 # 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.
1137 # The value must be between 1 and 1024 characters.
1138 &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.
1139 # 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.
1140 # The value must be between 1 and 1024 characters.
1141 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
1142 # Supported values are:
1143 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1144 # - FOUND, which corresponds to 302.
1145 # - SEE_OTHER which corresponds to 303.
1146 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1147 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1148 &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.
1149 # The default is set to false.
1150 },
1151 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1152 &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.
1153 #
1154 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
1155 &quot;headerAction&quot;: { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
1156 # The headerAction specified here take effect after headerAction specified under pathMatcher.
1157 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1158 { # Specification determining how headers are added to requests or responses.
1159 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1160 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1161 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1162 # The default value is false.
1163 },
1164 ],
1165 &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.
1166 &quot;A String&quot;,
1167 ],
1168 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1169 { # Specification determining how headers are added to requests or responses.
1170 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1171 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1172 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1173 # The default value is false.
1174 },
1175 ],
1176 &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.
1177 &quot;A String&quot;,
1178 ],
1179 },
1180 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
1181 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
1182 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1183 &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 ..
1184 &quot;A String&quot;,
1185 ],
1186 &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.
1187 },
1188 ],
1189 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1190 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
1191 &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.
1192 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
1193 { # 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.
1194 &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.
1195 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
1196 &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
1197 &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.
1198 # Default is false.
1199 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
1200 &quot;A String&quot;,
1201 ],
1202 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
1203 &quot;A String&quot;,
1204 ],
1205 &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
1206 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1207 &quot;A String&quot;,
1208 ],
1209 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
1210 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1211 &quot;A String&quot;,
1212 ],
1213 &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.
1214 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
1215 &quot;A String&quot;,
1216 ],
1217 &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.
1218 },
1219 &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.
1220 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1221 &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.
1222 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
1223 # The value must be between 200 and 599 inclusive.
1224 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1225 # The value must be between 0.0 and 100.0 inclusive.
1226 },
1227 &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.
1228 &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.
1229 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1230 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1231 },
1232 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1233 # The value must be between 0.0 and 100.0 inclusive.
1234 },
1235 },
1236 &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.
1237 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
1238 },
1239 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1240 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1241 &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.
1242 # 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.
1243 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1244 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1245 },
1246 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1247 # - 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.
1248 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1249 # -
1250 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1251 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1252 # - 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.
1253 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1254 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1255 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1256 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1257 &quot;A String&quot;,
1258 ],
1259 },
1260 &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.
1261 # If not specified, will use the largest timeout among all backend services associated with the route.
1262 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1263 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1264 },
1265 &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.
1266 &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.
1267 # The value must be between 1 and 255 characters.
1268 &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.
1269 # The value must be between 1 and 1024 characters.
1270 },
1271 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
1272 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
1273 { # 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
1274 &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.
1275 &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.
1276 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1277 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1278 { # Specification determining how headers are added to requests or responses.
1279 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1280 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1281 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1282 # The default value is false.
1283 },
1284 ],
1285 &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.
1286 &quot;A String&quot;,
1287 ],
1288 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1289 { # Specification determining how headers are added to requests or responses.
1290 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1291 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1292 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1293 # The default value is false.
1294 },
1295 ],
1296 &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.
1297 &quot;A String&quot;,
1298 ],
1299 },
1300 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1301 # 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.
1302 # The value must be between 0 and 1000
1303 },
1304 ],
1305 },
1306 &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:
1307 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
1308 # - compute/v1/projects/project/global/backendServices/backendService
1309 # - 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.
1310 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
1311 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
1312 # - compute.backendBuckets.use
1313 # - compute.backendServices.use
1314 &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.
1315 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
1316 &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.
1317 # The value must be between 1 and 255 characters.
1318 &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.
1319 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1320 # The default is set to false.
1321 &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.
1322 # 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.
1323 # The value must be between 1 and 1024 characters.
1324 &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.
1325 # 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.
1326 # The value must be between 1 and 1024 characters.
1327 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
1328 # Supported values are:
1329 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1330 # - FOUND, which corresponds to 302.
1331 # - SEE_OTHER which corresponds to 303.
1332 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1333 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1334 &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.
1335 # The default is set to false.
1336 },
1337 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1338 &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.
1339 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
1340 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1341 { # Specification determining how headers are added to requests or responses.
1342 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1343 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1344 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1345 # The default value is false.
1346 },
1347 ],
1348 &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.
1349 &quot;A String&quot;,
1350 ],
1351 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1352 { # Specification determining how headers are added to requests or responses.
1353 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1354 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1355 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1356 # The default value is false.
1357 },
1358 ],
1359 &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.
1360 &quot;A String&quot;,
1361 ],
1362 },
1363 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
1364 &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.
1365 # 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.
1366 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
1367 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
1368 &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.
1369 &quot;A String&quot;,
1370 ],
1371 &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.
1372 # Only one of routeAction or urlRedirect must be set.
1373 &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
1374 &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.
1375 # Default is false.
1376 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
1377 &quot;A String&quot;,
1378 ],
1379 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
1380 &quot;A String&quot;,
1381 ],
1382 &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
1383 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1384 &quot;A String&quot;,
1385 ],
1386 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
1387 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1388 &quot;A String&quot;,
1389 ],
1390 &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.
1391 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
1392 &quot;A String&quot;,
1393 ],
1394 &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.
1395 },
1396 &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.
1397 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1398 &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.
1399 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
1400 # The value must be between 200 and 599 inclusive.
1401 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1402 # The value must be between 0.0 and 100.0 inclusive.
1403 },
1404 &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.
1405 &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.
1406 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1407 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1408 },
1409 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1410 # The value must be between 0.0 and 100.0 inclusive.
1411 },
1412 },
1413 &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.
1414 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
1415 },
1416 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1417 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1418 &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.
1419 # 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.
1420 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1421 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1422 },
1423 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1424 # - 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.
1425 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1426 # -
1427 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1428 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1429 # - 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.
1430 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1431 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1432 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1433 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1434 &quot;A String&quot;,
1435 ],
1436 },
1437 &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.
1438 # If not specified, will use the largest timeout among all backend services associated with the route.
1439 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1440 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1441 },
1442 &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.
1443 &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.
1444 # The value must be between 1 and 255 characters.
1445 &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.
1446 # The value must be between 1 and 1024 characters.
1447 },
1448 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
1449 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
1450 { # 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
1451 &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.
1452 &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.
1453 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1454 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1455 { # Specification determining how headers are added to requests or responses.
1456 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1457 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1458 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1459 # The default value is false.
1460 },
1461 ],
1462 &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.
1463 &quot;A String&quot;,
1464 ],
1465 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1466 { # Specification determining how headers are added to requests or responses.
1467 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1468 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1469 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1470 # The default value is false.
1471 },
1472 ],
1473 &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.
1474 &quot;A String&quot;,
1475 ],
1476 },
1477 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1478 # 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.
1479 # The value must be between 0 and 1000
1480 },
1481 ],
1482 },
1483 &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.
1484 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1485 &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.
1486 # If urlRedirect is specified, service or routeAction must not be set.
1487 &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.
1488 # The value must be between 1 and 255 characters.
1489 &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.
1490 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1491 # The default is set to false.
1492 &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.
1493 # 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.
1494 # The value must be between 1 and 1024 characters.
1495 &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.
1496 # 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.
1497 # The value must be between 1 and 1024 characters.
1498 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
1499 # Supported values are:
1500 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1501 # - FOUND, which corresponds to 302.
1502 # - SEE_OTHER which corresponds to 303.
1503 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1504 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1505 &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.
1506 # The default is set to false.
1507 },
1508 },
1509 ],
1510 &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.
1511 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
1512 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
1513 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
1514 # The description can have a maximum length of 1024 characters.
1515 &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.
1516 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
1517 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1518 { # Specification determining how headers are added to requests or responses.
1519 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1520 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1521 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1522 # The default value is false.
1523 },
1524 ],
1525 &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.
1526 &quot;A String&quot;,
1527 ],
1528 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1529 { # Specification determining how headers are added to requests or responses.
1530 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1531 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1532 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1533 # The default value is false.
1534 },
1535 ],
1536 &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.
1537 &quot;A String&quot;,
1538 ],
1539 },
1540 &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.
1541 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
1542 &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
1543 &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
1544 &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
1545 },
1546 ],
1547 &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.
1548 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
1549 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
1550 &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
1551 &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
1552 &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
1553 },
1554 ],
1555 &quot;matchRules&quot;: [
1556 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
1557 &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.
1558 # fullPathMatch must be between 1 and 1024 characters.
1559 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
1560 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
1561 { # matchRule criteria for request header matches.
1562 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
1563 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1564 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
1565 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
1566 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
1567 &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.
1568 # The default setting is false.
1569 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
1570 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1571 &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.
1572 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1573 &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.
1574 # For example for a range [-5, 0]
1575 # - -3 will match.
1576 # - 0 will not match.
1577 # - 0.25 will not match.
1578 # - -3someString will not match.
1579 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1580 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
1581 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
1582 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
1583 },
1584 &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
1585 # 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.
1586 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1587 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
1588 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
1589 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1590 },
1591 ],
1592 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
1593 # The default value is false.
1594 # ignoreCase must not be used with regexMatch.
1595 &quot;metadataFilters&quot;: [ # Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set of xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies.
1596 # 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.
1597 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
1598 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
1599 { # 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.
1600 # 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.
1601 # 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.
1602 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
1603 # This list must not be empty and can have at the most 64 entries.
1604 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
1605 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
1606 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
1607 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
1608 # value can have a maximum length of 1024 characters.
1609 },
1610 ],
1611 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
1612 # Supported values are:
1613 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
1614 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
1615 },
1616 ],
1617 &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 /.
1618 # The value must be between 1 and 1024 characters.
1619 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
1620 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
1621 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
1622 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
1623 # Only one of presentMatch, exactMatch or regexMatch must be set.
1624 &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.
1625 &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.
1626 # Only one of presentMatch, exactMatch or regexMatch must be set.
1627 &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
1628 # Only one of presentMatch, exactMatch or regexMatch must be set.
1629 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
1630 },
1631 ],
1632 &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
1633 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
1634 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
1635 },
1636 ],
1637 &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.
1638 # 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.
1639 # 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.
1640 &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.
1641 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1642 &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
1643 &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.
1644 # Default is false.
1645 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
1646 &quot;A String&quot;,
1647 ],
1648 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
1649 &quot;A String&quot;,
1650 ],
1651 &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
1652 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1653 &quot;A String&quot;,
1654 ],
1655 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
1656 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1657 &quot;A String&quot;,
1658 ],
1659 &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.
1660 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
1661 &quot;A String&quot;,
1662 ],
1663 &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.
1664 },
1665 &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.
1666 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1667 &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.
1668 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
1669 # The value must be between 200 and 599 inclusive.
1670 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1671 # The value must be between 0.0 and 100.0 inclusive.
1672 },
1673 &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.
1674 &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.
1675 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1676 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1677 },
1678 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1679 # The value must be between 0.0 and 100.0 inclusive.
1680 },
1681 },
1682 &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.
1683 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
1684 },
1685 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1686 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1687 &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.
1688 # 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.
1689 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1690 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1691 },
1692 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1693 # - 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.
1694 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1695 # -
1696 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1697 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1698 # - 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.
1699 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1700 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1701 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1702 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1703 &quot;A String&quot;,
1704 ],
1705 },
1706 &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.
1707 # If not specified, will use the largest timeout among all backend services associated with the route.
1708 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1709 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1710 },
1711 &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.
1712 &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.
1713 # The value must be between 1 and 255 characters.
1714 &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.
1715 # The value must be between 1 and 1024 characters.
1716 },
1717 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
1718 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
1719 { # 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
1720 &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.
1721 &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.
1722 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1723 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1724 { # Specification determining how headers are added to requests or responses.
1725 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1726 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1727 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1728 # The default value is false.
1729 },
1730 ],
1731 &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.
1732 &quot;A String&quot;,
1733 ],
1734 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
1735 { # Specification determining how headers are added to requests or responses.
1736 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
1737 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
1738 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1739 # The default value is false.
1740 },
1741 ],
1742 &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.
1743 &quot;A String&quot;,
1744 ],
1745 },
1746 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1747 # 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.
1748 # The value must be between 0 and 1000
1749 },
1750 ],
1751 },
1752 &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.
1753 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1754 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
1755 # If urlRedirect is specified, service or routeAction must not be set.
1756 &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.
1757 # The value must be between 1 and 255 characters.
1758 &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.
1759 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1760 # The default is set to false.
1761 &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.
1762 # 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.
1763 # The value must be between 1 and 1024 characters.
1764 &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.
1765 # 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.
1766 # The value must be between 1 and 1024 characters.
1767 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
1768 # Supported values are:
1769 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1770 # - FOUND, which corresponds to 302.
1771 # - SEE_OTHER which corresponds to 303.
1772 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1773 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1774 &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.
1775 # The default is set to false.
1776 },
1777 },
1778 ],
1779 },
1780 ],
1781 &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.
1782 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1783 &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.
1784 { # Message for the expected URL mappings.
1785 &quot;backendServiceWeight&quot;: 42, # The weight to use for the supplied host and path when using advanced routing rules that involve traffic splitting.
1786 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
1787 &quot;expectedUrlRedirect&quot;: &quot;A String&quot;, # The expected URL that should be redirected to for the host and path being tested.
1788 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL.
1789 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
1790 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService resource the given URL should be mapped to.
1791 },
1792 ],
1793}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001794
1795 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
1796
1797Returns:
1798 An object of the form:
1799
1800 { # Represents an Operation resource.
1801 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001802 # Google Compute Engine has three Operation resources:
1803 #
1804 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1805 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001806 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1807 #
1808 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001809 # - For global operations, use the `globalOperations` resource.
1810 # - For regional operations, use the `regionOperations` resource.
1811 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001812 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001813 # 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 -07001814 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1815 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1816 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1817 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1818 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1819 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001820 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001821 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1822 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1823 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001824 },
1825 ],
1826 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001827 &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`.
1828 &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.
1829 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1830 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1831 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1832 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1833 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1834 &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.
1835 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1836 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1837 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1838 &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.
1839 &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`.
1840 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1841 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1842 &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.
1843 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1844 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1845 {
1846 &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.
1847 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1848 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1849 {
1850 &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).
1851 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1852 },
1853 ],
1854 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1855 },
1856 ],
1857 &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 -07001858 }</pre>
1859</div>
1860
1861<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001862 <code class="details" id="invalidateCache">invalidateCache(project, region, urlMap, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001863 <pre>Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.
1864
1865Args:
1866 project: string, Project ID for this request. (required)
1867 region: string, Name of the region scoping this request. (required)
1868 urlMap: string, Name of the UrlMap scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001869 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001870 The object takes the form of:
1871
1872{
Bu Sun Kim65020912020-05-20 12:08:20 -07001873 &quot;host&quot;: &quot;A String&quot;, # If set, this invalidation rule will only apply to requests with a Host header matching host.
1874 &quot;path&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001875 }
1876
1877 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
1878
1879Returns:
1880 An object of the form:
1881
1882 { # Represents an Operation resource.
1883 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001884 # Google Compute Engine has three Operation resources:
1885 #
1886 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1887 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001888 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1889 #
1890 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001891 # - For global operations, use the `globalOperations` resource.
1892 # - For regional operations, use the `regionOperations` resource.
1893 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001894 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001895 # 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 -07001896 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1897 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1898 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1899 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1900 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1901 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001902 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001903 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1904 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1905 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001906 },
1907 ],
1908 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001909 &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`.
1910 &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.
1911 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1912 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1913 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1914 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1915 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1916 &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.
1917 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1918 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1919 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1920 &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.
1921 &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`.
1922 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1923 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1924 &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.
1925 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1926 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1927 {
1928 &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.
1929 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1930 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1931 {
1932 &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).
1933 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1934 },
1935 ],
1936 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1937 },
1938 ],
1939 &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 -07001940 }</pre>
1941</div>
1942
1943<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001944 <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 -07001945 <pre>Retrieves the list of UrlMap resources available to the specified project in the specified region.
1946
1947Args:
1948 project: string, Project ID for this request. (required)
1949 region: string, Name of the region scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001950 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 -07001951
Dan O'Mearadd494642020-05-01 07:42:23 -07001952For 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 -07001953
Dan O'Mearadd494642020-05-01 07:42:23 -07001954You 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 -07001955
Bu Sun Kim65020912020-05-20 12:08:20 -07001956To 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) ```
1957 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`)
1958 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1959
1960You 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.
1961
1962Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1963 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.
1964 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 -07001965
1966Returns:
1967 An object of the form:
1968
1969 { # Contains a list of UrlMap resources.
Bu Sun Kim65020912020-05-20 12:08:20 -07001970 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1971 &quot;items&quot;: [ # A list of UrlMap resources.
Dan O'Mearadd494642020-05-01 07:42:23 -07001972 { # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001973 #
1974 # Google Compute Engine has two URL Map resources:
1975 #
1976 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
1977 #
1978 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
1979 #
1980 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
1981 #
1982 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
1983 #
1984 # 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.
1985 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1986 &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.
1987 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
1988 &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
1989 &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.
1990 # Default is false.
1991 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
1992 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001993 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001994 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
1995 &quot;A String&quot;,
1996 ],
1997 &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
1998 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1999 &quot;A String&quot;,
2000 ],
2001 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2002 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2003 &quot;A String&quot;,
2004 ],
2005 &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.
2006 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2007 &quot;A String&quot;,
2008 ],
2009 &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.
2010 },
2011 &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.
2012 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2013 &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.
2014 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2015 # The value must be between 200 and 599 inclusive.
2016 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2017 # The value must be between 0.0 and 100.0 inclusive.
2018 },
2019 &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.
2020 &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.
2021 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2022 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2023 },
2024 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2025 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002026 },
2027 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002028 &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.
2029 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2030 },
2031 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2032 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2033 &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.
2034 # 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.
2035 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2036 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,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 -07002037 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002038 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2039 # - 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.
2040 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2041 # -
2042 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2043 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2044 # - 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.
2045 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2046 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2047 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2048 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2049 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002050 ],
2051 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002052 &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.
2053 # If not specified, will use the largest timeout among all backend services associated with the route.
2054 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2055 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2056 },
2057 &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.
2058 &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 -07002059 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07002060 &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.
2061 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002062 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002063 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
2064 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
2065 { # 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
2066 &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.
2067 &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.
2068 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2069 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2070 { # Specification determining how headers are added to requests or responses.
2071 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2072 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2073 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2074 # The default value is false.
2075 },
2076 ],
2077 &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.
2078 &quot;A String&quot;,
2079 ],
2080 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2081 { # Specification determining how headers are added to requests or responses.
2082 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2083 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2084 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2085 # The default value is false.
2086 },
2087 ],
2088 &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.
2089 &quot;A String&quot;,
2090 ],
2091 },
2092 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2093 # 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.
2094 # The value must be between 0 and 1000
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002095 },
2096 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002097 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002098 &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.
2099 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
2100 &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.
2101 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
2102 &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.
2103 # The value must be between 1 and 255 characters.
2104 &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.
2105 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2106 # The default is set to false.
2107 &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.
2108 # 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.
2109 # The value must be between 1 and 1024 characters.
2110 &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.
2111 # 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.
2112 # The value must be between 1 and 1024 characters.
2113 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2114 # Supported values are:
2115 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2116 # - FOUND, which corresponds to 302.
2117 # - SEE_OTHER which corresponds to 303.
2118 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2119 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2120 &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.
2121 # The default is set to false.
2122 },
2123 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2124 &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.
2125 #
2126 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
2127 &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.
2128 # The headerAction specified here take effect after headerAction specified under pathMatcher.
2129 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2130 { # Specification determining how headers are added to requests or responses.
2131 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2132 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2133 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2134 # The default value is false.
2135 },
2136 ],
2137 &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.
2138 &quot;A String&quot;,
2139 ],
2140 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2141 { # Specification determining how headers are added to requests or responses.
2142 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2143 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2144 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2145 # The default value is false.
2146 },
2147 ],
2148 &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.
2149 &quot;A String&quot;,
2150 ],
2151 },
2152 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
2153 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
2154 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2155 &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 ..
2156 &quot;A String&quot;,
2157 ],
2158 &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.
2159 },
2160 ],
2161 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2162 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
2163 &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.
2164 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
2165 { # 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.
2166 &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.
2167 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
2168 &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
2169 &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.
2170 # Default is false.
2171 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2172 &quot;A String&quot;,
2173 ],
2174 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2175 &quot;A String&quot;,
2176 ],
2177 &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
2178 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2179 &quot;A String&quot;,
2180 ],
2181 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2182 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2183 &quot;A String&quot;,
2184 ],
2185 &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.
2186 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2187 &quot;A String&quot;,
2188 ],
2189 &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.
2190 },
2191 &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.
2192 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2193 &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.
2194 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2195 # The value must be between 200 and 599 inclusive.
2196 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2197 # The value must be between 0.0 and 100.0 inclusive.
2198 },
2199 &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.
2200 &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.
2201 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2202 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2203 },
2204 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2205 # The value must be between 0.0 and 100.0 inclusive.
2206 },
2207 },
2208 &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.
2209 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2210 },
2211 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2212 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2213 &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.
2214 # 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.
2215 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2216 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2217 },
2218 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2219 # - 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.
2220 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2221 # -
2222 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2223 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2224 # - 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.
2225 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2226 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2227 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2228 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2229 &quot;A String&quot;,
2230 ],
2231 },
2232 &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.
2233 # If not specified, will use the largest timeout among all backend services associated with the route.
2234 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2235 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2236 },
2237 &quot;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.
2238 &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.
2239 # The value must be between 1 and 255 characters.
2240 &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.
2241 # The value must be between 1 and 1024 characters.
2242 },
2243 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
2244 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
2245 { # 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
2246 &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.
2247 &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.
2248 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2249 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2250 { # Specification determining how headers are added to requests or responses.
2251 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2252 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2253 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2254 # The default value is false.
2255 },
2256 ],
2257 &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.
2258 &quot;A String&quot;,
2259 ],
2260 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2261 { # Specification determining how headers are added to requests or responses.
2262 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2263 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2264 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2265 # The default value is false.
2266 },
2267 ],
2268 &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.
2269 &quot;A String&quot;,
2270 ],
2271 },
2272 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2273 # 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.
2274 # The value must be between 0 and 1000
2275 },
2276 ],
2277 },
2278 &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:
2279 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
2280 # - compute/v1/projects/project/global/backendServices/backendService
2281 # - 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.
2282 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
2283 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
2284 # - compute.backendBuckets.use
2285 # - compute.backendServices.use
2286 &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.
2287 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
2288 &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.
2289 # The value must be between 1 and 255 characters.
2290 &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.
2291 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2292 # The default is set to false.
2293 &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.
2294 # 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.
2295 # The value must be between 1 and 1024 characters.
2296 &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.
2297 # 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.
2298 # The value must be between 1 and 1024 characters.
2299 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2300 # Supported values are:
2301 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2302 # - FOUND, which corresponds to 302.
2303 # - SEE_OTHER which corresponds to 303.
2304 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2305 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2306 &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.
2307 # The default is set to false.
2308 },
2309 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2310 &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.
2311 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
2312 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2313 { # Specification determining how headers are added to requests or responses.
2314 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2315 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2316 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2317 # The default value is false.
2318 },
2319 ],
2320 &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.
2321 &quot;A String&quot;,
2322 ],
2323 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2324 { # Specification determining how headers are added to requests or responses.
2325 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2326 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2327 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2328 # The default value is false.
2329 },
2330 ],
2331 &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.
2332 &quot;A String&quot;,
2333 ],
2334 },
2335 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
2336 &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.
2337 # 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.
2338 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
2339 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
2340 &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.
2341 &quot;A String&quot;,
2342 ],
2343 &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.
2344 # Only one of routeAction or urlRedirect must be set.
2345 &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
2346 &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.
2347 # Default is false.
2348 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2349 &quot;A String&quot;,
2350 ],
2351 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2352 &quot;A String&quot;,
2353 ],
2354 &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
2355 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2356 &quot;A String&quot;,
2357 ],
2358 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2359 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2360 &quot;A String&quot;,
2361 ],
2362 &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.
2363 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2364 &quot;A String&quot;,
2365 ],
2366 &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.
2367 },
2368 &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.
2369 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2370 &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.
2371 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2372 # The value must be between 200 and 599 inclusive.
2373 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2374 # The value must be between 0.0 and 100.0 inclusive.
2375 },
2376 &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.
2377 &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.
2378 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2379 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2380 },
2381 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2382 # The value must be between 0.0 and 100.0 inclusive.
2383 },
2384 },
2385 &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.
2386 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2387 },
2388 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2389 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2390 &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.
2391 # 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.
2392 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2393 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2394 },
2395 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2396 # - 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.
2397 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2398 # -
2399 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2400 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2401 # - 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.
2402 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2403 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2404 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2405 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2406 &quot;A String&quot;,
2407 ],
2408 },
2409 &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.
2410 # If not specified, will use the largest timeout among all backend services associated with the route.
2411 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2412 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2413 },
2414 &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.
2415 &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.
2416 # The value must be between 1 and 255 characters.
2417 &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.
2418 # The value must be between 1 and 1024 characters.
2419 },
2420 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
2421 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
2422 { # 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
2423 &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.
2424 &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.
2425 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2426 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2427 { # Specification determining how headers are added to requests or responses.
2428 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2429 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2430 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2431 # The default value is false.
2432 },
2433 ],
2434 &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.
2435 &quot;A String&quot;,
2436 ],
2437 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2438 { # Specification determining how headers are added to requests or responses.
2439 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2440 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2441 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2442 # The default value is false.
2443 },
2444 ],
2445 &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.
2446 &quot;A String&quot;,
2447 ],
2448 },
2449 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2450 # 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.
2451 # The value must be between 0 and 1000
2452 },
2453 ],
2454 },
2455 &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.
2456 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2457 &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.
2458 # If urlRedirect is specified, service or routeAction must not be set.
2459 &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.
2460 # The value must be between 1 and 255 characters.
2461 &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.
2462 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2463 # The default is set to false.
2464 &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.
2465 # 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.
2466 # The value must be between 1 and 1024 characters.
2467 &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.
2468 # 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.
2469 # The value must be between 1 and 1024 characters.
2470 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2471 # Supported values are:
2472 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2473 # - FOUND, which corresponds to 302.
2474 # - SEE_OTHER which corresponds to 303.
2475 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2476 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2477 &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.
2478 # The default is set to false.
2479 },
2480 },
2481 ],
2482 &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.
2483 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
2484 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
2485 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
2486 # The description can have a maximum length of 1024 characters.
2487 &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.
2488 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
2489 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2490 { # Specification determining how headers are added to requests or responses.
2491 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2492 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2493 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2494 # The default value is false.
2495 },
2496 ],
2497 &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.
2498 &quot;A String&quot;,
2499 ],
2500 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2501 { # Specification determining how headers are added to requests or responses.
2502 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2503 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2504 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2505 # The default value is false.
2506 },
2507 ],
2508 &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.
2509 &quot;A String&quot;,
2510 ],
2511 },
2512 &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.
2513 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
2514 &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
2515 &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
2516 &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
2517 },
2518 ],
2519 &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.
2520 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
2521 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
2522 &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
2523 &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
2524 &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
2525 },
2526 ],
2527 &quot;matchRules&quot;: [
2528 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
2529 &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.
2530 # fullPathMatch must be between 1 and 1024 characters.
2531 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2532 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
2533 { # matchRule criteria for request header matches.
2534 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
2535 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2536 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
2537 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
2538 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
2539 &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.
2540 # The default setting is false.
2541 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
2542 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2543 &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.
2544 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2545 &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.
2546 # For example for a range [-5, 0]
2547 # - -3 will match.
2548 # - 0 will not match.
2549 # - 0.25 will not match.
2550 # - -3someString will not match.
2551 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2552 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
2553 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
2554 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
2555 },
2556 &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
2557 # 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.
2558 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2559 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
2560 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
2561 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2562 },
2563 ],
2564 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
2565 # The default value is false.
2566 # ignoreCase must not be used with regexMatch.
2567 &quot;metadataFilters&quot;: [ # Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set of xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies.
2568 # 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.
2569 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
2570 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
2571 { # 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.
2572 # 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.
2573 # 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.
2574 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
2575 # This list must not be empty and can have at the most 64 entries.
2576 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
2577 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
2578 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
2579 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
2580 # value can have a maximum length of 1024 characters.
2581 },
2582 ],
2583 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
2584 # Supported values are:
2585 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
2586 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
2587 },
2588 ],
2589 &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 /.
2590 # The value must be between 1 and 1024 characters.
2591 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2592 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
2593 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
2594 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
2595 # Only one of presentMatch, exactMatch or regexMatch must be set.
2596 &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.
2597 &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.
2598 # Only one of presentMatch, exactMatch or regexMatch must be set.
2599 &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
2600 # Only one of presentMatch, exactMatch or regexMatch must be set.
2601 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
2602 },
2603 ],
2604 &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
2605 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2606 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
2607 },
2608 ],
2609 &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.
2610 # 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.
2611 # 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.
2612 &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.
2613 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2614 &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
2615 &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.
2616 # Default is false.
2617 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2618 &quot;A String&quot;,
2619 ],
2620 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2621 &quot;A String&quot;,
2622 ],
2623 &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
2624 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2625 &quot;A String&quot;,
2626 ],
2627 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2628 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2629 &quot;A String&quot;,
2630 ],
2631 &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.
2632 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2633 &quot;A String&quot;,
2634 ],
2635 &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.
2636 },
2637 &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.
2638 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2639 &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.
2640 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2641 # The value must be between 200 and 599 inclusive.
2642 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2643 # The value must be between 0.0 and 100.0 inclusive.
2644 },
2645 &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.
2646 &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.
2647 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2648 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2649 },
2650 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2651 # The value must be between 0.0 and 100.0 inclusive.
2652 },
2653 },
2654 &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.
2655 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2656 },
2657 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2658 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2659 &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.
2660 # 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.
2661 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2662 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2663 },
2664 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2665 # - 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.
2666 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2667 # -
2668 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2669 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2670 # - 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.
2671 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2672 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2673 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2674 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2675 &quot;A String&quot;,
2676 ],
2677 },
2678 &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.
2679 # If not specified, will use the largest timeout among all backend services associated with the route.
2680 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2681 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2682 },
2683 &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.
2684 &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.
2685 # The value must be between 1 and 255 characters.
2686 &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.
2687 # The value must be between 1 and 1024 characters.
2688 },
2689 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
2690 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
2691 { # 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
2692 &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.
2693 &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.
2694 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2695 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2696 { # Specification determining how headers are added to requests or responses.
2697 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2698 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2699 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2700 # The default value is false.
2701 },
2702 ],
2703 &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.
2704 &quot;A String&quot;,
2705 ],
2706 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2707 { # Specification determining how headers are added to requests or responses.
2708 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2709 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2710 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2711 # The default value is false.
2712 },
2713 ],
2714 &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.
2715 &quot;A String&quot;,
2716 ],
2717 },
2718 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2719 # 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.
2720 # The value must be between 0 and 1000
2721 },
2722 ],
2723 },
2724 &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.
2725 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2726 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
2727 # If urlRedirect is specified, service or routeAction must not be set.
2728 &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.
2729 # The value must be between 1 and 255 characters.
2730 &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.
2731 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2732 # The default is set to false.
2733 &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.
2734 # 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.
2735 # The value must be between 1 and 1024 characters.
2736 &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.
2737 # 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.
2738 # The value must be between 1 and 1024 characters.
2739 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2740 # Supported values are:
2741 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2742 # - FOUND, which corresponds to 302.
2743 # - SEE_OTHER which corresponds to 303.
2744 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2745 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2746 &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.
2747 # The default is set to false.
2748 },
2749 },
2750 ],
2751 },
2752 ],
2753 &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.
2754 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2755 &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.
2756 { # Message for the expected URL mappings.
2757 &quot;backendServiceWeight&quot;: 42, # The weight to use for the supplied host and path when using advanced routing rules that involve traffic splitting.
2758 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
2759 &quot;expectedUrlRedirect&quot;: &quot;A String&quot;, # The expected URL that should be redirected to for the host and path being tested.
2760 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL.
2761 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
2762 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService resource the given URL should be mapped to.
2763 },
2764 ],
2765 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002766 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002767 &quot;kind&quot;: &quot;compute#urlMapList&quot;, # Type of resource.
2768 &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.
2769 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2770 &quot;warning&quot;: { # [Output Only] Informational warning message.
2771 &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.
2772 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2773 # &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 -07002774 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002775 &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).
2776 &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 -07002777 },
2778 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002779 &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 -07002780 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002781 }</pre>
2782</div>
2783
2784<div class="method">
2785 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2786 <pre>Retrieves the next page of results.
2787
2788Args:
2789 previous_request: The request for the previous page. (required)
2790 previous_response: The response from the request for the previous page. (required)
2791
2792Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07002793 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002794 page. Returns None if there are no more items in the collection.
2795 </pre>
2796</div>
2797
2798<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002799 <code class="details" id="patch">patch(project, region, urlMap, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002800 <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.
2801
2802Args:
2803 project: string, Project ID for this request. (required)
2804 region: string, Name of the region scoping this request. (required)
2805 urlMap: string, Name of the UrlMap resource to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002806 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002807 The object takes the form of:
2808
Dan O'Mearadd494642020-05-01 07:42:23 -07002809{ # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002810 #
2811 # Google Compute Engine has two URL Map resources:
2812 #
2813 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
2814 #
2815 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
2816 #
2817 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
2818 #
2819 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
2820 #
2821 # 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.
2822 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2823 &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.
2824 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
2825 &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
2826 &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.
2827 # Default is false.
2828 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
2829 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002830 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002831 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
2832 &quot;A String&quot;,
2833 ],
2834 &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
2835 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2836 &quot;A String&quot;,
2837 ],
2838 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
2839 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
2840 &quot;A String&quot;,
2841 ],
2842 &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.
2843 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
2844 &quot;A String&quot;,
2845 ],
2846 &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.
2847 },
2848 &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.
2849 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2850 &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.
2851 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
2852 # The value must be between 200 and 599 inclusive.
2853 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2854 # The value must be between 0.0 and 100.0 inclusive.
2855 },
2856 &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.
2857 &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.
2858 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2859 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2860 },
2861 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2862 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002863 },
2864 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002865 &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.
2866 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
2867 },
2868 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2869 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2870 &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.
2871 # 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.
2872 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2873 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,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 -07002874 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002875 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2876 # - 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.
2877 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2878 # -
2879 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2880 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2881 # - 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.
2882 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2883 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2884 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2885 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2886 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002887 ],
2888 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002889 &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.
2890 # If not specified, will use the largest timeout among all backend services associated with the route.
2891 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2892 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2893 },
2894 &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.
2895 &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 -07002896 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07002897 &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.
2898 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002899 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002900 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
2901 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
2902 { # 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
2903 &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.
2904 &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.
2905 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2906 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2907 { # Specification determining how headers are added to requests or responses.
2908 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2909 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2910 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2911 # The default value is false.
2912 },
2913 ],
2914 &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.
2915 &quot;A String&quot;,
2916 ],
2917 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2918 { # Specification determining how headers are added to requests or responses.
2919 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2920 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2921 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2922 # The default value is false.
2923 },
2924 ],
2925 &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.
2926 &quot;A String&quot;,
2927 ],
2928 },
2929 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2930 # 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.
2931 # The value must be between 0 and 1000
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002932 },
2933 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002934 },
2935 &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.
2936 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
2937 &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.
2938 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
2939 &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.
2940 # The value must be between 1 and 255 characters.
2941 &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.
2942 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2943 # The default is set to false.
2944 &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.
2945 # 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.
2946 # The value must be between 1 and 1024 characters.
2947 &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.
2948 # 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.
2949 # The value must be between 1 and 1024 characters.
2950 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
2951 # Supported values are:
2952 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2953 # - FOUND, which corresponds to 302.
2954 # - SEE_OTHER which corresponds to 303.
2955 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2956 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2957 &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.
2958 # The default is set to false.
2959 },
2960 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2961 &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.
2962 #
2963 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
2964 &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.
2965 # The headerAction specified here take effect after headerAction specified under pathMatcher.
2966 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2967 { # Specification determining how headers are added to requests or responses.
2968 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2969 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2970 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2971 # The default value is false.
2972 },
2973 ],
2974 &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.
2975 &quot;A String&quot;,
2976 ],
2977 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
2978 { # Specification determining how headers are added to requests or responses.
2979 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
2980 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
2981 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2982 # The default value is false.
2983 },
2984 ],
2985 &quot;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.
2986 &quot;A String&quot;,
2987 ],
2988 },
2989 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
2990 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
2991 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2992 &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 ..
2993 &quot;A String&quot;,
2994 ],
2995 &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.
2996 },
2997 ],
2998 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2999 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
3000 &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.
3001 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
3002 { # 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.
3003 &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.
3004 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
3005 &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
3006 &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.
3007 # Default is false.
3008 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3009 &quot;A String&quot;,
3010 ],
3011 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3012 &quot;A String&quot;,
3013 ],
3014 &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
3015 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3016 &quot;A String&quot;,
3017 ],
3018 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3019 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3020 &quot;A String&quot;,
3021 ],
3022 &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.
3023 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3024 &quot;A String&quot;,
3025 ],
3026 &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.
3027 },
3028 &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.
3029 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3030 &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.
3031 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3032 # The value must be between 200 and 599 inclusive.
3033 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3034 # The value must be between 0.0 and 100.0 inclusive.
3035 },
3036 &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.
3037 &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.
3038 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3039 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3040 },
3041 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3042 # The value must be between 0.0 and 100.0 inclusive.
3043 },
3044 },
3045 &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.
3046 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3047 },
3048 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3049 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3050 &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.
3051 # 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.
3052 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3053 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3054 },
3055 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3056 # - 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.
3057 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3058 # -
3059 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3060 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3061 # - 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.
3062 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3063 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3064 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3065 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3066 &quot;A String&quot;,
3067 ],
3068 },
3069 &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.
3070 # If not specified, will use the largest timeout among all backend services associated with the route.
3071 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3072 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3073 },
3074 &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.
3075 &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.
3076 # The value must be between 1 and 255 characters.
3077 &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.
3078 # The value must be between 1 and 1024 characters.
3079 },
3080 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
3081 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
3082 { # 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
3083 &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.
3084 &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.
3085 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3086 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3087 { # Specification determining how headers are added to requests or responses.
3088 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3089 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3090 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3091 # The default value is false.
3092 },
3093 ],
3094 &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.
3095 &quot;A String&quot;,
3096 ],
3097 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3098 { # Specification determining how headers are added to requests or responses.
3099 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3100 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3101 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3102 # The default value is false.
3103 },
3104 ],
3105 &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.
3106 &quot;A String&quot;,
3107 ],
3108 },
3109 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3110 # 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.
3111 # The value must be between 0 and 1000
3112 },
3113 ],
3114 },
3115 &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:
3116 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
3117 # - compute/v1/projects/project/global/backendServices/backendService
3118 # - 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.
3119 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3120 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
3121 # - compute.backendBuckets.use
3122 # - compute.backendServices.use
3123 &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.
3124 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
3125 &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.
3126 # The value must be between 1 and 255 characters.
3127 &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.
3128 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3129 # The default is set to false.
3130 &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.
3131 # 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.
3132 # The value must be between 1 and 1024 characters.
3133 &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.
3134 # 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.
3135 # The value must be between 1 and 1024 characters.
3136 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3137 # Supported values are:
3138 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3139 # - FOUND, which corresponds to 302.
3140 # - SEE_OTHER which corresponds to 303.
3141 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3142 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3143 &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.
3144 # The default is set to false.
3145 },
3146 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3147 &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.
3148 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
3149 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3150 { # Specification determining how headers are added to requests or responses.
3151 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3152 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3153 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3154 # The default value is false.
3155 },
3156 ],
3157 &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.
3158 &quot;A String&quot;,
3159 ],
3160 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3161 { # Specification determining how headers are added to requests or responses.
3162 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3163 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3164 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3165 # The default value is false.
3166 },
3167 ],
3168 &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.
3169 &quot;A String&quot;,
3170 ],
3171 },
3172 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
3173 &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.
3174 # 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.
3175 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
3176 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
3177 &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.
3178 &quot;A String&quot;,
3179 ],
3180 &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.
3181 # Only one of routeAction or urlRedirect must be set.
3182 &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
3183 &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.
3184 # Default is false.
3185 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3186 &quot;A String&quot;,
3187 ],
3188 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3189 &quot;A String&quot;,
3190 ],
3191 &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
3192 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3193 &quot;A String&quot;,
3194 ],
3195 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3196 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3197 &quot;A String&quot;,
3198 ],
3199 &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.
3200 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3201 &quot;A String&quot;,
3202 ],
3203 &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.
3204 },
3205 &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.
3206 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3207 &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.
3208 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3209 # The value must be between 200 and 599 inclusive.
3210 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3211 # The value must be between 0.0 and 100.0 inclusive.
3212 },
3213 &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.
3214 &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.
3215 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3216 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3217 },
3218 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3219 # The value must be between 0.0 and 100.0 inclusive.
3220 },
3221 },
3222 &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.
3223 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3224 },
3225 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3226 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3227 &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.
3228 # 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.
3229 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3230 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3231 },
3232 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3233 # - 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.
3234 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3235 # -
3236 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3237 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3238 # - 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.
3239 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3240 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3241 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3242 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3243 &quot;A String&quot;,
3244 ],
3245 },
3246 &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.
3247 # If not specified, will use the largest timeout among all backend services associated with the route.
3248 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3249 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3250 },
3251 &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.
3252 &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.
3253 # The value must be between 1 and 255 characters.
3254 &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.
3255 # The value must be between 1 and 1024 characters.
3256 },
3257 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
3258 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
3259 { # 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
3260 &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.
3261 &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.
3262 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3263 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3264 { # Specification determining how headers are added to requests or responses.
3265 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3266 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3267 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3268 # The default value is false.
3269 },
3270 ],
3271 &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.
3272 &quot;A String&quot;,
3273 ],
3274 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3275 { # Specification determining how headers are added to requests or responses.
3276 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3277 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3278 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3279 # The default value is false.
3280 },
3281 ],
3282 &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.
3283 &quot;A String&quot;,
3284 ],
3285 },
3286 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3287 # 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.
3288 # The value must be between 0 and 1000
3289 },
3290 ],
3291 },
3292 &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.
3293 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3294 &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.
3295 # If urlRedirect is specified, service or routeAction must not be set.
3296 &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.
3297 # The value must be between 1 and 255 characters.
3298 &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.
3299 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3300 # The default is set to false.
3301 &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.
3302 # 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.
3303 # The value must be between 1 and 1024 characters.
3304 &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.
3305 # 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.
3306 # The value must be between 1 and 1024 characters.
3307 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3308 # Supported values are:
3309 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3310 # - FOUND, which corresponds to 302.
3311 # - SEE_OTHER which corresponds to 303.
3312 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3313 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3314 &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.
3315 # The default is set to false.
3316 },
3317 },
3318 ],
3319 &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.
3320 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
3321 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
3322 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
3323 # The description can have a maximum length of 1024 characters.
3324 &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.
3325 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
3326 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3327 { # Specification determining how headers are added to requests or responses.
3328 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3329 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3330 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3331 # The default value is false.
3332 },
3333 ],
3334 &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.
3335 &quot;A String&quot;,
3336 ],
3337 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3338 { # Specification determining how headers are added to requests or responses.
3339 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3340 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3341 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3342 # The default value is false.
3343 },
3344 ],
3345 &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.
3346 &quot;A String&quot;,
3347 ],
3348 },
3349 &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.
3350 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
3351 &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
3352 &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
3353 &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
3354 },
3355 ],
3356 &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.
3357 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
3358 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
3359 &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
3360 &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
3361 &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
3362 },
3363 ],
3364 &quot;matchRules&quot;: [
3365 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
3366 &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.
3367 # fullPathMatch must be between 1 and 1024 characters.
3368 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3369 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
3370 { # matchRule criteria for request header matches.
3371 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
3372 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3373 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
3374 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
3375 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
3376 &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.
3377 # The default setting is false.
3378 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
3379 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3380 &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.
3381 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3382 &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.
3383 # For example for a range [-5, 0]
3384 # - -3 will match.
3385 # - 0 will not match.
3386 # - 0.25 will not match.
3387 # - -3someString will not match.
3388 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3389 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
3390 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
3391 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
3392 },
3393 &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
3394 # 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.
3395 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3396 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
3397 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
3398 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3399 },
3400 ],
3401 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
3402 # The default value is false.
3403 # ignoreCase must not be used with regexMatch.
3404 &quot;metadataFilters&quot;: [ # Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set of xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies.
3405 # 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.
3406 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
3407 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
3408 { # 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.
3409 # 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.
3410 # 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.
3411 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
3412 # This list must not be empty and can have at the most 64 entries.
3413 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
3414 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
3415 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
3416 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
3417 # value can have a maximum length of 1024 characters.
3418 },
3419 ],
3420 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
3421 # Supported values are:
3422 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
3423 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
3424 },
3425 ],
3426 &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 /.
3427 # The value must be between 1 and 1024 characters.
3428 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3429 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
3430 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
3431 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
3432 # Only one of presentMatch, exactMatch or regexMatch must be set.
3433 &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.
3434 &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.
3435 # Only one of presentMatch, exactMatch or regexMatch must be set.
3436 &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
3437 # Only one of presentMatch, exactMatch or regexMatch must be set.
3438 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
3439 },
3440 ],
3441 &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
3442 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3443 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
3444 },
3445 ],
3446 &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.
3447 # 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.
3448 # 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.
3449 &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.
3450 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3451 &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
3452 &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.
3453 # Default is false.
3454 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3455 &quot;A String&quot;,
3456 ],
3457 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3458 &quot;A String&quot;,
3459 ],
3460 &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
3461 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3462 &quot;A String&quot;,
3463 ],
3464 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3465 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3466 &quot;A String&quot;,
3467 ],
3468 &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.
3469 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3470 &quot;A String&quot;,
3471 ],
3472 &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.
3473 },
3474 &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.
3475 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3476 &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.
3477 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3478 # The value must be between 200 and 599 inclusive.
3479 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3480 # The value must be between 0.0 and 100.0 inclusive.
3481 },
3482 &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.
3483 &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.
3484 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3485 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3486 },
3487 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3488 # The value must be between 0.0 and 100.0 inclusive.
3489 },
3490 },
3491 &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.
3492 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3493 },
3494 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3495 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3496 &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.
3497 # 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.
3498 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3499 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3500 },
3501 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3502 # - 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.
3503 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3504 # -
3505 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3506 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3507 # - 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.
3508 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3509 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3510 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3511 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3512 &quot;A String&quot;,
3513 ],
3514 },
3515 &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.
3516 # If not specified, will use the largest timeout among all backend services associated with the route.
3517 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3518 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3519 },
3520 &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.
3521 &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.
3522 # The value must be between 1 and 255 characters.
3523 &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.
3524 # The value must be between 1 and 1024 characters.
3525 },
3526 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
3527 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
3528 { # 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
3529 &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.
3530 &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.
3531 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3532 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3533 { # Specification determining how headers are added to requests or responses.
3534 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3535 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3536 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3537 # The default value is false.
3538 },
3539 ],
3540 &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.
3541 &quot;A String&quot;,
3542 ],
3543 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3544 { # Specification determining how headers are added to requests or responses.
3545 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3546 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3547 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3548 # The default value is false.
3549 },
3550 ],
3551 &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.
3552 &quot;A String&quot;,
3553 ],
3554 },
3555 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3556 # 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.
3557 # The value must be between 0 and 1000
3558 },
3559 ],
3560 },
3561 &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.
3562 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3563 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
3564 # If urlRedirect is specified, service or routeAction must not be set.
3565 &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.
3566 # The value must be between 1 and 255 characters.
3567 &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.
3568 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3569 # The default is set to false.
3570 &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.
3571 # 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.
3572 # The value must be between 1 and 1024 characters.
3573 &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.
3574 # 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.
3575 # The value must be between 1 and 1024 characters.
3576 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3577 # Supported values are:
3578 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3579 # - FOUND, which corresponds to 302.
3580 # - SEE_OTHER which corresponds to 303.
3581 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3582 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3583 &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.
3584 # The default is set to false.
3585 },
3586 },
3587 ],
3588 },
3589 ],
3590 &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.
3591 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3592 &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.
3593 { # Message for the expected URL mappings.
3594 &quot;backendServiceWeight&quot;: 42, # The weight to use for the supplied host and path when using advanced routing rules that involve traffic splitting.
3595 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
3596 &quot;expectedUrlRedirect&quot;: &quot;A String&quot;, # The expected URL that should be redirected to for the host and path being tested.
3597 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL.
3598 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
3599 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService resource the given URL should be mapped to.
3600 },
3601 ],
3602}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003603
3604 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
3605
3606Returns:
3607 An object of the form:
3608
3609 { # Represents an Operation resource.
3610 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003611 # Google Compute Engine has three Operation resources:
3612 #
3613 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3614 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003615 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3616 #
3617 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003618 # - For global operations, use the `globalOperations` resource.
3619 # - For regional operations, use the `regionOperations` resource.
3620 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003621 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003622 # 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 -07003623 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3624 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3625 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3626 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3627 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3628 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003629 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003630 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3631 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3632 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003633 },
3634 ],
3635 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003636 &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`.
3637 &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.
3638 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3639 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3640 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3641 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3642 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3643 &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.
3644 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3645 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3646 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3647 &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.
3648 &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`.
3649 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3650 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3651 &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.
3652 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3653 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3654 {
3655 &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.
3656 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3657 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3658 {
3659 &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).
3660 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3661 },
3662 ],
3663 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3664 },
3665 ],
3666 &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 -07003667 }</pre>
3668</div>
3669
3670<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003671 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003672 <pre>Returns permissions that a caller has on the specified resource.
3673
3674Args:
3675 project: string, Project ID for this request. (required)
3676 region: string, The name of the region for this request. (required)
3677 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003678 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003679 The object takes the form of:
3680
3681{
Bu Sun Kim65020912020-05-20 12:08:20 -07003682 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
3683 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003684 ],
3685 }
3686
3687
3688Returns:
3689 An object of the form:
3690
3691 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003692 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
3693 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003694 ],
3695 }</pre>
3696</div>
3697
3698<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003699 <code class="details" id="update">update(project, region, urlMap, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003700 <pre>Updates the specified UrlMap resource with the data included in the request.
3701
3702Args:
3703 project: string, Project ID for this request. (required)
3704 region: string, Name of the region scoping this request. (required)
3705 urlMap: string, Name of the UrlMap resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003706 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003707 The object takes the form of:
3708
Dan O'Mearadd494642020-05-01 07:42:23 -07003709{ # Represents a URL Map resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003710 #
3711 # Google Compute Engine has two URL Map resources:
3712 #
3713 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
3714 #
3715 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
3716 #
3717 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
3718 #
3719 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
3720 #
3721 # 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.
3722 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
3723 &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.
3724 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
3725 &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
3726 &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.
3727 # Default is false.
3728 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3729 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003730 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003731 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3732 &quot;A String&quot;,
3733 ],
3734 &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
3735 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3736 &quot;A String&quot;,
3737 ],
3738 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3739 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3740 &quot;A String&quot;,
3741 ],
3742 &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.
3743 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3744 &quot;A String&quot;,
3745 ],
3746 &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.
3747 },
3748 &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.
3749 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3750 &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.
3751 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3752 # The value must be between 200 and 599 inclusive.
3753 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3754 # The value must be between 0.0 and 100.0 inclusive.
3755 },
3756 &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.
3757 &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.
3758 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3759 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3760 },
3761 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3762 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003763 },
3764 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003765 &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.
3766 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3767 },
3768 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3769 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3770 &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.
3771 # 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.
3772 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3773 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,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 -07003774 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003775 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3776 # - 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.
3777 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3778 # -
3779 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3780 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3781 # - 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.
3782 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3783 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3784 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3785 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3786 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003787 ],
3788 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003789 &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.
3790 # If not specified, will use the largest timeout among all backend services associated with the route.
3791 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3792 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3793 },
3794 &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.
3795 &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 -07003796 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07003797 &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.
3798 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003799 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003800 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
3801 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
3802 { # 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
3803 &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.
3804 &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.
3805 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3806 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3807 { # Specification determining how headers are added to requests or responses.
3808 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3809 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3810 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3811 # The default value is false.
3812 },
3813 ],
3814 &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.
3815 &quot;A String&quot;,
3816 ],
3817 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3818 { # Specification determining how headers are added to requests or responses.
3819 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3820 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3821 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3822 # The default value is false.
3823 },
3824 ],
3825 &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.
3826 &quot;A String&quot;,
3827 ],
3828 },
3829 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3830 # 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.
3831 # The value must be between 0 and 1000
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003832 },
3833 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003834 },
3835 &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.
3836 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3837 &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.
3838 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
3839 &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.
3840 # The value must be between 1 and 255 characters.
3841 &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.
3842 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3843 # The default is set to false.
3844 &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.
3845 # 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.
3846 # The value must be between 1 and 1024 characters.
3847 &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.
3848 # 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.
3849 # The value must be between 1 and 1024 characters.
3850 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
3851 # Supported values are:
3852 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3853 # - FOUND, which corresponds to 302.
3854 # - SEE_OTHER which corresponds to 303.
3855 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3856 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3857 &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.
3858 # The default is set to false.
3859 },
3860 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3861 &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.
3862 #
3863 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
3864 &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.
3865 # The headerAction specified here take effect after headerAction specified under pathMatcher.
3866 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3867 { # Specification determining how headers are added to requests or responses.
3868 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3869 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3870 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3871 # The default value is false.
3872 },
3873 ],
3874 &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.
3875 &quot;A String&quot;,
3876 ],
3877 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3878 { # Specification determining how headers are added to requests or responses.
3879 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3880 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3881 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3882 # The default value is false.
3883 },
3884 ],
3885 &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.
3886 &quot;A String&quot;,
3887 ],
3888 },
3889 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
3890 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
3891 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3892 &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 ..
3893 &quot;A String&quot;,
3894 ],
3895 &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.
3896 },
3897 ],
3898 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3899 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
3900 &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.
3901 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
3902 { # 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.
3903 &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.
3904 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
3905 &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
3906 &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.
3907 # Default is false.
3908 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
3909 &quot;A String&quot;,
3910 ],
3911 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
3912 &quot;A String&quot;,
3913 ],
3914 &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
3915 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3916 &quot;A String&quot;,
3917 ],
3918 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
3919 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
3920 &quot;A String&quot;,
3921 ],
3922 &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.
3923 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
3924 &quot;A String&quot;,
3925 ],
3926 &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.
3927 },
3928 &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.
3929 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3930 &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.
3931 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
3932 # The value must be between 200 and 599 inclusive.
3933 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3934 # The value must be between 0.0 and 100.0 inclusive.
3935 },
3936 &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.
3937 &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.
3938 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3939 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3940 },
3941 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3942 # The value must be between 0.0 and 100.0 inclusive.
3943 },
3944 },
3945 &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.
3946 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
3947 },
3948 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3949 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3950 &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.
3951 # 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.
3952 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3953 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3954 },
3955 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3956 # - 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.
3957 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3958 # -
3959 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3960 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3961 # - 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.
3962 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3963 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3964 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3965 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3966 &quot;A String&quot;,
3967 ],
3968 },
3969 &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.
3970 # If not specified, will use the largest timeout among all backend services associated with the route.
3971 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3972 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3973 },
3974 &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.
3975 &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.
3976 # The value must be between 1 and 255 characters.
3977 &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.
3978 # The value must be between 1 and 1024 characters.
3979 },
3980 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
3981 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
3982 { # 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
3983 &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.
3984 &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.
3985 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3986 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3987 { # Specification determining how headers are added to requests or responses.
3988 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
3989 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
3990 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3991 # The default value is false.
3992 },
3993 ],
3994 &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.
3995 &quot;A String&quot;,
3996 ],
3997 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
3998 { # Specification determining how headers are added to requests or responses.
3999 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4000 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4001 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4002 # The default value is false.
4003 },
4004 ],
4005 &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.
4006 &quot;A String&quot;,
4007 ],
4008 },
4009 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4010 # 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.
4011 # The value must be between 0 and 1000
4012 },
4013 ],
4014 },
4015 &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:
4016 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
4017 # - compute/v1/projects/project/global/backendServices/backendService
4018 # - 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.
4019 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
4020 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
4021 # - compute.backendBuckets.use
4022 # - compute.backendServices.use
4023 &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.
4024 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
4025 &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.
4026 # The value must be between 1 and 255 characters.
4027 &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.
4028 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4029 # The default is set to false.
4030 &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.
4031 # 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.
4032 # The value must be between 1 and 1024 characters.
4033 &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.
4034 # 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.
4035 # The value must be between 1 and 1024 characters.
4036 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4037 # Supported values are:
4038 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4039 # - FOUND, which corresponds to 302.
4040 # - SEE_OTHER which corresponds to 303.
4041 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4042 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4043 &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.
4044 # The default is set to false.
4045 },
4046 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4047 &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.
4048 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
4049 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4050 { # Specification determining how headers are added to requests or responses.
4051 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4052 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4053 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4054 # The default value is false.
4055 },
4056 ],
4057 &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.
4058 &quot;A String&quot;,
4059 ],
4060 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4061 { # Specification determining how headers are added to requests or responses.
4062 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4063 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4064 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4065 # The default value is false.
4066 },
4067 ],
4068 &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.
4069 &quot;A String&quot;,
4070 ],
4071 },
4072 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
4073 &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.
4074 # 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.
4075 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
4076 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
4077 &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.
4078 &quot;A String&quot;,
4079 ],
4080 &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.
4081 # Only one of routeAction or urlRedirect must be set.
4082 &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
4083 &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.
4084 # Default is false.
4085 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4086 &quot;A String&quot;,
4087 ],
4088 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4089 &quot;A String&quot;,
4090 ],
4091 &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
4092 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4093 &quot;A String&quot;,
4094 ],
4095 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4096 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4097 &quot;A String&quot;,
4098 ],
4099 &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.
4100 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4101 &quot;A String&quot;,
4102 ],
4103 &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.
4104 },
4105 &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.
4106 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4107 &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.
4108 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4109 # The value must be between 200 and 599 inclusive.
4110 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4111 # The value must be between 0.0 and 100.0 inclusive.
4112 },
4113 &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.
4114 &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.
4115 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4116 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4117 },
4118 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4119 # The value must be between 0.0 and 100.0 inclusive.
4120 },
4121 },
4122 &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.
4123 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4124 },
4125 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4126 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4127 &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.
4128 # 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.
4129 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4130 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4131 },
4132 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4133 # - 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.
4134 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4135 # -
4136 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4137 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4138 # - 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.
4139 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4140 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4141 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4142 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4143 &quot;A String&quot;,
4144 ],
4145 },
4146 &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.
4147 # If not specified, will use the largest timeout among all backend services associated with the route.
4148 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4149 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4150 },
4151 &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.
4152 &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.
4153 # The value must be between 1 and 255 characters.
4154 &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.
4155 # The value must be between 1 and 1024 characters.
4156 },
4157 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
4158 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
4159 { # 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
4160 &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.
4161 &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.
4162 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4163 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4164 { # Specification determining how headers are added to requests or responses.
4165 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4166 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4167 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4168 # The default value is false.
4169 },
4170 ],
4171 &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.
4172 &quot;A String&quot;,
4173 ],
4174 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4175 { # Specification determining how headers are added to requests or responses.
4176 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4177 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4178 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4179 # The default value is false.
4180 },
4181 ],
4182 &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.
4183 &quot;A String&quot;,
4184 ],
4185 },
4186 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4187 # 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.
4188 # The value must be between 0 and 1000
4189 },
4190 ],
4191 },
4192 &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.
4193 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4194 &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.
4195 # If urlRedirect is specified, service or routeAction must not be set.
4196 &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.
4197 # The value must be between 1 and 255 characters.
4198 &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.
4199 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4200 # The default is set to false.
4201 &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.
4202 # 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.
4203 # The value must be between 1 and 1024 characters.
4204 &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.
4205 # 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.
4206 # The value must be between 1 and 1024 characters.
4207 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4208 # Supported values are:
4209 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4210 # - FOUND, which corresponds to 302.
4211 # - SEE_OTHER which corresponds to 303.
4212 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4213 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4214 &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.
4215 # The default is set to false.
4216 },
4217 },
4218 ],
4219 &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.
4220 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
4221 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
4222 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
4223 # The description can have a maximum length of 1024 characters.
4224 &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.
4225 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
4226 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4227 { # Specification determining how headers are added to requests or responses.
4228 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4229 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4230 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4231 # The default value is false.
4232 },
4233 ],
4234 &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.
4235 &quot;A String&quot;,
4236 ],
4237 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4238 { # Specification determining how headers are added to requests or responses.
4239 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4240 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4241 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4242 # The default value is false.
4243 },
4244 ],
4245 &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.
4246 &quot;A String&quot;,
4247 ],
4248 },
4249 &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.
4250 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
4251 &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
4252 &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
4253 &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
4254 },
4255 ],
4256 &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.
4257 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
4258 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
4259 &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
4260 &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
4261 &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
4262 },
4263 ],
4264 &quot;matchRules&quot;: [
4265 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
4266 &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.
4267 # fullPathMatch must be between 1 and 1024 characters.
4268 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4269 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
4270 { # matchRule criteria for request header matches.
4271 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
4272 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4273 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
4274 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
4275 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
4276 &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.
4277 # The default setting is false.
4278 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
4279 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4280 &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.
4281 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4282 &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.
4283 # For example for a range [-5, 0]
4284 # - -3 will match.
4285 # - 0 will not match.
4286 # - 0.25 will not match.
4287 # - -3someString will not match.
4288 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4289 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
4290 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
4291 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
4292 },
4293 &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
4294 # 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.
4295 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4296 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
4297 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
4298 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4299 },
4300 ],
4301 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
4302 # The default value is false.
4303 # ignoreCase must not be used with regexMatch.
4304 &quot;metadataFilters&quot;: [ # Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set of xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies.
4305 # 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.
4306 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
4307 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
4308 { # 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.
4309 # 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.
4310 # 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.
4311 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
4312 # This list must not be empty and can have at the most 64 entries.
4313 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
4314 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
4315 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
4316 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
4317 # value can have a maximum length of 1024 characters.
4318 },
4319 ],
4320 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
4321 # Supported values are:
4322 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
4323 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
4324 },
4325 ],
4326 &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 /.
4327 # The value must be between 1 and 1024 characters.
4328 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4329 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
4330 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
4331 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
4332 # Only one of presentMatch, exactMatch or regexMatch must be set.
4333 &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.
4334 &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.
4335 # Only one of presentMatch, exactMatch or regexMatch must be set.
4336 &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
4337 # Only one of presentMatch, exactMatch or regexMatch must be set.
4338 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
4339 },
4340 ],
4341 &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
4342 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4343 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
4344 },
4345 ],
4346 &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.
4347 # 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.
4348 # 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.
4349 &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.
4350 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4351 &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
4352 &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.
4353 # Default is false.
4354 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4355 &quot;A String&quot;,
4356 ],
4357 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4358 &quot;A String&quot;,
4359 ],
4360 &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
4361 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4362 &quot;A String&quot;,
4363 ],
4364 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4365 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4366 &quot;A String&quot;,
4367 ],
4368 &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.
4369 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4370 &quot;A String&quot;,
4371 ],
4372 &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.
4373 },
4374 &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.
4375 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4376 &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.
4377 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4378 # The value must be between 200 and 599 inclusive.
4379 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4380 # The value must be between 0.0 and 100.0 inclusive.
4381 },
4382 &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.
4383 &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.
4384 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4385 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4386 },
4387 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4388 # The value must be between 0.0 and 100.0 inclusive.
4389 },
4390 },
4391 &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.
4392 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4393 },
4394 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4395 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4396 &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.
4397 # 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.
4398 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4399 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4400 },
4401 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4402 # - 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.
4403 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4404 # -
4405 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4406 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4407 # - 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.
4408 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4409 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4410 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4411 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4412 &quot;A String&quot;,
4413 ],
4414 },
4415 &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.
4416 # If not specified, will use the largest timeout among all backend services associated with the route.
4417 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4418 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4419 },
4420 &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.
4421 &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.
4422 # The value must be between 1 and 255 characters.
4423 &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.
4424 # The value must be between 1 and 1024 characters.
4425 },
4426 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
4427 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
4428 { # 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
4429 &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.
4430 &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.
4431 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4432 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4433 { # Specification determining how headers are added to requests or responses.
4434 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4435 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4436 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4437 # The default value is false.
4438 },
4439 ],
4440 &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.
4441 &quot;A String&quot;,
4442 ],
4443 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4444 { # Specification determining how headers are added to requests or responses.
4445 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4446 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4447 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4448 # The default value is false.
4449 },
4450 ],
4451 &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.
4452 &quot;A String&quot;,
4453 ],
4454 },
4455 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4456 # 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.
4457 # The value must be between 0 and 1000
4458 },
4459 ],
4460 },
4461 &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.
4462 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4463 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
4464 # If urlRedirect is specified, service or routeAction must not be set.
4465 &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 },
4489 ],
4490 &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.
4491 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4492 &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.
4493 { # Message for the expected URL mappings.
4494 &quot;backendServiceWeight&quot;: 42, # The weight to use for the supplied host and path when using advanced routing rules that involve traffic splitting.
4495 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
4496 &quot;expectedUrlRedirect&quot;: &quot;A String&quot;, # The expected URL that should be redirected to for the host and path being tested.
4497 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL.
4498 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
4499 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService resource the given URL should be mapped to.
4500 },
4501 ],
4502}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004503
4504 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
4505
4506Returns:
4507 An object of the form:
4508
4509 { # Represents an Operation resource.
4510 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004511 # Google Compute Engine has three Operation resources:
4512 #
4513 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4514 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004515 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4516 #
4517 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004518 # - For global operations, use the `globalOperations` resource.
4519 # - For regional operations, use the `regionOperations` resource.
4520 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004521 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004522 # 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 -07004523 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4524 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4525 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4526 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4527 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4528 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004529 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004530 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4531 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4532 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004533 },
4534 ],
4535 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004536 &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`.
4537 &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.
4538 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4539 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4540 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4541 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4542 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4543 &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.
4544 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4545 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4546 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
4547 &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.
4548 &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`.
4549 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4550 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4551 &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.
4552 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4553 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4554 {
4555 &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.
4556 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4557 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4558 {
4559 &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).
4560 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4561 },
4562 ],
4563 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4564 },
4565 ],
4566 &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 -07004567 }</pre>
4568</div>
4569
4570<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004571 <code class="details" id="validate">validate(project, region, urlMap, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004572 <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.
4573
4574Args:
4575 project: string, Project ID for this request. (required)
4576 region: string, Name of the region scoping this request. (required)
4577 urlMap: string, Name of the UrlMap resource to be validated as. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004578 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004579 The object takes the form of:
4580
4581{
Bu Sun Kim65020912020-05-20 12:08:20 -07004582 &quot;resource&quot;: { # Represents a URL Map resource. # Content of the UrlMap to be validated.
4583 #
4584 # Google Compute Engine has two URL Map resources:
4585 #
4586 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
4587 #
4588 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
4589 #
4590 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
4591 #
4592 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
4593 #
4594 # 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.
4595 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
4596 &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.
4597 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
4598 &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
4599 &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.
4600 # Default is false.
4601 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4602 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004603 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004604 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4605 &quot;A String&quot;,
4606 ],
4607 &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
4608 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4609 &quot;A String&quot;,
4610 ],
4611 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4612 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4613 &quot;A String&quot;,
4614 ],
4615 &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.
4616 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4617 &quot;A String&quot;,
4618 ],
4619 &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.
4620 },
4621 &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.
4622 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4623 &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.
4624 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4625 # The value must be between 200 and 599 inclusive.
4626 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4627 # The value must be between 0.0 and 100.0 inclusive.
4628 },
4629 &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.
4630 &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.
4631 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4632 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4633 },
4634 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4635 # The value must be between 0.0 and 100.0 inclusive.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004636 },
4637 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004638 &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.
4639 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4640 },
4641 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4642 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4643 &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.
4644 # 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.
4645 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4646 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,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 -07004647 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004648 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4649 # - 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.
4650 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4651 # -
4652 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4653 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4654 # - 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.
4655 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4656 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4657 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4658 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4659 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004660 ],
4661 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004662 &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.
4663 # If not specified, will use the largest timeout among all backend services associated with the route.
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;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.
4668 &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 -07004669 # The value must be between 1 and 255 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07004670 &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.
4671 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004672 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004673 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
4674 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
4675 { # 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
4676 &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.
4677 &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.
4678 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4679 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4680 { # Specification determining how headers are added to requests or responses.
4681 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4682 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4683 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4684 # The default value is false.
4685 },
4686 ],
4687 &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.
4688 &quot;A String&quot;,
4689 ],
4690 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4691 { # Specification determining how headers are added to requests or responses.
4692 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4693 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4694 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4695 # The default value is false.
4696 },
4697 ],
4698 &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.
4699 &quot;A String&quot;,
4700 ],
4701 },
4702 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4703 # 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.
4704 # The value must be between 0 and 1000
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004705 },
4706 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004707 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004708 &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.
4709 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
4710 &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.
4711 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
4712 &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.
4713 # The value must be between 1 and 255 characters.
4714 &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.
4715 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4716 # The default is set to false.
4717 &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.
4718 # 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.
4719 # The value must be between 1 and 1024 characters.
4720 &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.
4721 # 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.
4722 # The value must be between 1 and 1024 characters.
4723 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4724 # Supported values are:
4725 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4726 # - FOUND, which corresponds to 302.
4727 # - SEE_OTHER which corresponds to 303.
4728 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4729 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4730 &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.
4731 # The default is set to false.
4732 },
4733 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4734 &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.
4735 #
4736 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
4737 &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.
4738 # The headerAction specified here take effect after headerAction specified under pathMatcher.
4739 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4740 { # Specification determining how headers are added to requests or responses.
4741 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4742 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4743 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4744 # The default value is false.
4745 },
4746 ],
4747 &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.
4748 &quot;A String&quot;,
4749 ],
4750 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4751 { # Specification determining how headers are added to requests or responses.
4752 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4753 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4754 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4755 # The default value is false.
4756 },
4757 ],
4758 &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.
4759 &quot;A String&quot;,
4760 ],
4761 },
4762 &quot;hostRules&quot;: [ # The list of HostRules to use against the URL.
4763 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
4764 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4765 &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 ..
4766 &quot;A String&quot;,
4767 ],
4768 &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.
4769 },
4770 ],
4771 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4772 &quot;kind&quot;: &quot;compute#urlMap&quot;, # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
4773 &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.
4774 &quot;pathMatchers&quot;: [ # The list of named PathMatchers to use against the URL.
4775 { # 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.
4776 &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.
4777 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
4778 &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
4779 &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.
4780 # Default is false.
4781 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4782 &quot;A String&quot;,
4783 ],
4784 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4785 &quot;A String&quot;,
4786 ],
4787 &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
4788 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4789 &quot;A String&quot;,
4790 ],
4791 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4792 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4793 &quot;A String&quot;,
4794 ],
4795 &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.
4796 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4797 &quot;A String&quot;,
4798 ],
4799 &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.
4800 },
4801 &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.
4802 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4803 &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.
4804 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4805 # The value must be between 200 and 599 inclusive.
4806 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4807 # The value must be between 0.0 and 100.0 inclusive.
4808 },
4809 &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.
4810 &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.
4811 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4812 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4813 },
4814 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4815 # The value must be between 0.0 and 100.0 inclusive.
4816 },
4817 },
4818 &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.
4819 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4820 },
4821 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4822 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4823 &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.
4824 # 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.
4825 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4826 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4827 },
4828 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4829 # - 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.
4830 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4831 # -
4832 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4833 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4834 # - 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.
4835 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4836 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4837 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4838 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4839 &quot;A String&quot;,
4840 ],
4841 },
4842 &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.
4843 # If not specified, will use the largest timeout among all backend services associated with the route.
4844 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4845 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4846 },
4847 &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.
4848 &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.
4849 # The value must be between 1 and 255 characters.
4850 &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.
4851 # The value must be between 1 and 1024 characters.
4852 },
4853 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
4854 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
4855 { # 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
4856 &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.
4857 &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.
4858 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4859 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4860 { # Specification determining how headers are added to requests or responses.
4861 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4862 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4863 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4864 # The default value is false.
4865 },
4866 ],
4867 &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.
4868 &quot;A String&quot;,
4869 ],
4870 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4871 { # Specification determining how headers are added to requests or responses.
4872 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4873 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4874 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4875 # The default value is false.
4876 },
4877 ],
4878 &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.
4879 &quot;A String&quot;,
4880 ],
4881 },
4882 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4883 # 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.
4884 # The value must be between 0 and 1000
4885 },
4886 ],
4887 },
4888 &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:
4889 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
4890 # - compute/v1/projects/project/global/backendServices/backendService
4891 # - 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.
4892 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
4893 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
4894 # - compute.backendBuckets.use
4895 # - compute.backendServices.use
4896 &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.
4897 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
4898 &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.
4899 # The value must be between 1 and 255 characters.
4900 &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.
4901 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4902 # The default is set to false.
4903 &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.
4904 # 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.
4905 # The value must be between 1 and 1024 characters.
4906 &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.
4907 # 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.
4908 # The value must be between 1 and 1024 characters.
4909 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
4910 # Supported values are:
4911 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4912 # - FOUND, which corresponds to 302.
4913 # - SEE_OTHER which corresponds to 303.
4914 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4915 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4916 &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.
4917 # The default is set to false.
4918 },
4919 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4920 &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.
4921 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
4922 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4923 { # Specification determining how headers are added to requests or responses.
4924 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4925 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4926 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4927 # The default value is false.
4928 },
4929 ],
4930 &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.
4931 &quot;A String&quot;,
4932 ],
4933 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
4934 { # Specification determining how headers are added to requests or responses.
4935 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
4936 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
4937 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4938 # The default value is false.
4939 },
4940 ],
4941 &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.
4942 &quot;A String&quot;,
4943 ],
4944 },
4945 &quot;name&quot;: &quot;A String&quot;, # The name to which this PathMatcher is referred by the HostRule.
4946 &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.
4947 # 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.
4948 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
4949 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
4950 &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.
4951 &quot;A String&quot;,
4952 ],
4953 &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.
4954 # Only one of routeAction or urlRedirect must be set.
4955 &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
4956 &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.
4957 # Default is false.
4958 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
4959 &quot;A String&quot;,
4960 ],
4961 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
4962 &quot;A String&quot;,
4963 ],
4964 &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
4965 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4966 &quot;A String&quot;,
4967 ],
4968 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
4969 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
4970 &quot;A String&quot;,
4971 ],
4972 &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.
4973 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
4974 &quot;A String&quot;,
4975 ],
4976 &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.
4977 },
4978 &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.
4979 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4980 &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.
4981 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
4982 # The value must be between 200 and 599 inclusive.
4983 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4984 # The value must be between 0.0 and 100.0 inclusive.
4985 },
4986 &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.
4987 &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.
4988 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4989 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4990 },
4991 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4992 # The value must be between 0.0 and 100.0 inclusive.
4993 },
4994 },
4995 &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.
4996 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
4997 },
4998 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4999 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5000 &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.
5001 # 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.
5002 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5003 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5004 },
5005 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5006 # - 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.
5007 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5008 # -
5009 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5010 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5011 # - 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.
5012 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5013 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5014 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5015 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5016 &quot;A String&quot;,
5017 ],
5018 },
5019 &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.
5020 # If not specified, will use the largest timeout among all backend services associated with the route.
5021 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5022 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5023 },
5024 &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.
5025 &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.
5026 # The value must be between 1 and 255 characters.
5027 &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.
5028 # The value must be between 1 and 1024 characters.
5029 },
5030 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
5031 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
5032 { # 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
5033 &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.
5034 &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.
5035 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
5036 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5037 { # Specification determining how headers are added to requests or responses.
5038 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5039 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5040 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5041 # The default value is false.
5042 },
5043 ],
5044 &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.
5045 &quot;A String&quot;,
5046 ],
5047 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5048 { # Specification determining how headers are added to requests or responses.
5049 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5050 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5051 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5052 # The default value is false.
5053 },
5054 ],
5055 &quot;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.
5056 &quot;A String&quot;,
5057 ],
5058 },
5059 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5060 # 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.
5061 # The value must be between 0 and 1000
5062 },
5063 ],
5064 },
5065 &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.
5066 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5067 &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.
5068 # If urlRedirect is specified, service or routeAction must not be set.
5069 &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.
5070 # The value must be between 1 and 255 characters.
5071 &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.
5072 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5073 # The default is set to false.
5074 &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.
5075 # 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.
5076 # The value must be between 1 and 1024 characters.
5077 &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.
5078 # 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.
5079 # The value must be between 1 and 1024 characters.
5080 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5081 # Supported values are:
5082 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5083 # - FOUND, which corresponds to 302.
5084 # - SEE_OTHER which corresponds to 303.
5085 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5086 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5087 &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.
5088 # The default is set to false.
5089 },
5090 },
5091 ],
5092 &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.
5093 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
5094 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
5095 &quot;description&quot;: &quot;A String&quot;, # The short description conveying the intent of this routeRule.
5096 # The description can have a maximum length of 1024 characters.
5097 &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.
5098 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
5099 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5100 { # Specification determining how headers are added to requests or responses.
5101 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5102 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5103 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5104 # The default value is false.
5105 },
5106 ],
5107 &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.
5108 &quot;A String&quot;,
5109 ],
5110 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5111 { # Specification determining how headers are added to requests or responses.
5112 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5113 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5114 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5115 # The default value is false.
5116 },
5117 ],
5118 &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.
5119 &quot;A String&quot;,
5120 ],
5121 },
5122 &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.
5123 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
5124 &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
5125 &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
5126 &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
5127 },
5128 ],
5129 &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.
5130 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
5131 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
5132 &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
5133 &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
5134 &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
5135 },
5136 ],
5137 &quot;matchRules&quot;: [
5138 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
5139 &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.
5140 # fullPathMatch must be between 1 and 1024 characters.
5141 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5142 &quot;headerMatches&quot;: [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
5143 { # matchRule criteria for request header matches.
5144 &quot;exactMatch&quot;: &quot;A String&quot;, # The value should exactly match contents of exactMatch.
5145 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5146 &quot;headerName&quot;: &quot;A String&quot;, # The name of the HTTP header to match.
5147 # For matching against the HTTP request&#x27;s authority, use a headerMatch with the header name &quot;:authority&quot;.
5148 # For matching a request&#x27;s method, use the headerName &quot;:method&quot;.
5149 &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.
5150 # The default setting is false.
5151 &quot;prefixMatch&quot;: &quot;A String&quot;, # The value of the header must start with the contents of prefixMatch.
5152 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5153 &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.
5154 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5155 &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.
5156 # For example for a range [-5, 0]
5157 # - -3 will match.
5158 # - 0 will not match.
5159 # - 0.25 will not match.
5160 # - -3someString will not match.
5161 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5162 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
5163 &quot;rangeEnd&quot;: &quot;A String&quot;, # The end of the range (exclusive) in signed long integer format.
5164 &quot;rangeStart&quot;: &quot;A String&quot;, # The start of the range (inclusive) in signed long integer format.
5165 },
5166 &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
5167 # 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.
5168 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5169 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
5170 &quot;suffixMatch&quot;: &quot;A String&quot;, # The value of the header must end with the contents of suffixMatch.
5171 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5172 },
5173 ],
5174 &quot;ignoreCase&quot;: True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
5175 # The default value is false.
5176 # ignoreCase must not be used with regexMatch.
5177 &quot;metadataFilters&quot;: [ # Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set of xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies.
5178 # 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.
5179 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
5180 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
5181 { # 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.
5182 # 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.
5183 # 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.
5184 &quot;filterLabels&quot;: [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
5185 # This list must not be empty and can have at the most 64 entries.
5186 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
5187 &quot;name&quot;: &quot;A String&quot;, # Name of metadata label.
5188 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
5189 &quot;value&quot;: &quot;A String&quot;, # The value of the label must match the specified value.
5190 # value can have a maximum length of 1024 characters.
5191 },
5192 ],
5193 &quot;filterMatchCriteria&quot;: &quot;A String&quot;, # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
5194 # Supported values are:
5195 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
5196 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
5197 },
5198 ],
5199 &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 /.
5200 # The value must be between 1 and 1024 characters.
5201 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5202 &quot;queryParameterMatches&quot;: [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
5203 { # HttpRouteRuleMatch criteria for a request&#x27;s query parameter.
5204 &quot;exactMatch&quot;: &quot;A String&quot;, # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
5205 # Only one of presentMatch, exactMatch or regexMatch must be set.
5206 &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.
5207 &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.
5208 # Only one of presentMatch, exactMatch or regexMatch must be set.
5209 &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
5210 # Only one of presentMatch, exactMatch or regexMatch must be set.
5211 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
5212 },
5213 ],
5214 &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
5215 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5216 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
5217 },
5218 ],
5219 &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.
5220 # 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.
5221 # 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.
5222 &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.
5223 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5224 &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
5225 &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.
5226 # Default is false.
5227 &quot;allowHeaders&quot;: [ # Specifies the content for the Access-Control-Allow-Headers header.
5228 &quot;A String&quot;,
5229 ],
5230 &quot;allowMethods&quot;: [ # Specifies the content for the Access-Control-Allow-Methods header.
5231 &quot;A String&quot;,
5232 ],
5233 &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
5234 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5235 &quot;A String&quot;,
5236 ],
5237 &quot;allowOrigins&quot;: [ # Specifies the list of origins that will be allowed to do CORS requests.
5238 # An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
5239 &quot;A String&quot;,
5240 ],
5241 &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.
5242 &quot;exposeHeaders&quot;: [ # Specifies the content for the Access-Control-Expose-Headers header.
5243 &quot;A String&quot;,
5244 ],
5245 &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.
5246 },
5247 &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.
5248 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
5249 &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.
5250 &quot;httpStatus&quot;: 42, # The HTTP status code used to abort the request.
5251 # The value must be between 200 and 599 inclusive.
5252 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5253 # The value must be between 0.0 and 100.0 inclusive.
5254 },
5255 &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.
5256 &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.
5257 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5258 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5259 },
5260 &quot;percentage&quot;: 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5261 # The value must be between 0.0 and 100.0 inclusive.
5262 },
5263 },
5264 &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.
5265 &quot;backendService&quot;: &quot;A String&quot;, # The full or partial URL to the BackendService resource being mirrored to.
5266 },
5267 &quot;retryPolicy&quot;: { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
5268 &quot;numRetries&quot;: 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5269 &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.
5270 # 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.
5271 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5272 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5273 },
5274 &quot;retryConditions&quot;: [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5275 # - 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.
5276 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5277 # -
5278 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5279 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5280 # - 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.
5281 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5282 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5283 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5284 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5285 &quot;A String&quot;,
5286 ],
5287 },
5288 &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.
5289 # If not specified, will use the largest timeout among all backend services associated with the route.
5290 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5291 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5292 },
5293 &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.
5294 &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.
5295 # The value must be between 1 and 255 characters.
5296 &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.
5297 # The value must be between 1 and 1024 characters.
5298 },
5299 &quot;weightedBackendServices&quot;: [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
5300 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
5301 { # 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
5302 &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.
5303 &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.
5304 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
5305 &quot;requestHeadersToAdd&quot;: [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5306 { # Specification determining how headers are added to requests or responses.
5307 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5308 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5309 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5310 # The default value is false.
5311 },
5312 ],
5313 &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.
5314 &quot;A String&quot;,
5315 ],
5316 &quot;responseHeadersToAdd&quot;: [ # Headers to add the response prior to sending the response back to the client.
5317 { # Specification determining how headers are added to requests or responses.
5318 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header.
5319 &quot;headerValue&quot;: &quot;A String&quot;, # The value of the header to add.
5320 &quot;replace&quot;: True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5321 # The default value is false.
5322 },
5323 ],
5324 &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.
5325 &quot;A String&quot;,
5326 ],
5327 },
5328 &quot;weight&quot;: 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5329 # 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.
5330 # The value must be between 0 and 1000
5331 },
5332 ],
5333 },
5334 &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.
5335 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5336 &quot;urlRedirect&quot;: { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
5337 # If urlRedirect is specified, service or routeAction must not be set.
5338 &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.
5339 # The value must be between 1 and 255 characters.
5340 &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.
5341 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5342 # The default is set to false.
5343 &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.
5344 # 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.
5345 # The value must be between 1 and 1024 characters.
5346 &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.
5347 # 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.
5348 # The value must be between 1 and 1024 characters.
5349 &quot;redirectResponseCode&quot;: &quot;A String&quot;, # The HTTP Status code to use for this RedirectAction.
5350 # Supported values are:
5351 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5352 # - FOUND, which corresponds to 302.
5353 # - SEE_OTHER which corresponds to 303.
5354 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5355 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5356 &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.
5357 # The default is set to false.
5358 },
5359 },
5360 ],
5361 },
5362 ],
5363 &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.
5364 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5365 &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.
5366 { # Message for the expected URL mappings.
5367 &quot;backendServiceWeight&quot;: 42, # The weight to use for the supplied host and path when using advanced routing rules that involve traffic splitting.
5368 &quot;description&quot;: &quot;A String&quot;, # Description of this test case.
5369 &quot;expectedUrlRedirect&quot;: &quot;A String&quot;, # The expected URL that should be redirected to for the host and path being tested.
5370 &quot;host&quot;: &quot;A String&quot;, # Host portion of the URL.
5371 &quot;path&quot;: &quot;A String&quot;, # Path portion of the URL.
5372 &quot;service&quot;: &quot;A String&quot;, # Expected BackendService resource the given URL should be mapped to.
5373 },
5374 ],
5375 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005376 }
5377
5378
5379Returns:
5380 An object of the form:
5381
5382 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005383 &quot;result&quot;: { # Message representing the validation result for a UrlMap.
5384 &quot;loadErrors&quot;: [
5385 &quot;A String&quot;,
5386 ],
5387 &quot;loadSucceeded&quot;: True or False, # Whether the given UrlMap can be successfully loaded. If false, &#x27;loadErrors&#x27; indicates the reasons.
5388 &quot;testFailures&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005389 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005390 &quot;actualService&quot;: &quot;A String&quot;,
5391 &quot;expectedService&quot;: &quot;A String&quot;,
5392 &quot;host&quot;: &quot;A String&quot;,
5393 &quot;path&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005394 },
5395 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005396 &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 -07005397 },
5398 }</pre>
5399</div>
5400
5401</body></html>