blob: 6dbf304fa3c3aa3251b2992c0fd1c4a10e6d0fcb [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">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#list">list(project, region, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, filter=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 Kim715bd7f2019-06-14 16:50:42 -0700135 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
136 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
137 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700138 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700139 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
140 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700141 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
142 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700143 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700144 "httpErrorStatusCode": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700145 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700146 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700147 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
148 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
149 {
150 "message": "A String", # [Output Only] A human-readable description of the warning code.
151 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
152 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
153 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
154 {
155 "value": "A String", # [Output Only] A warning data value corresponding to the key.
156 "key": "A String", # [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).
157 },
158 ],
159 },
160 ],
161 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700162 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700163 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700164 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
165 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700166 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
167 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
168 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
169 {
170 "message": "A String", # [Output Only] An optional, human-readable error message.
171 "code": "A String", # [Output Only] The error type identifier for this error.
172 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
173 },
174 ],
175 },
176 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
177 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
178 "targetLink": "A String", # [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.
179 }</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.
195 #
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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700207 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
208 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
209 "defaultRouteAction": { # 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.
210 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
211 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
212 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
213 },
214 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
215 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
Dan O'Mearadd494642020-05-01 07:42:23 -0700216 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700217 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
218 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
219 },
220 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
221 # - 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.
222 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
223 # -
224 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
225 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
226 # - 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.
227 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
228 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
229 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
230 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
231 "A String",
232 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700233 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700234 },
235 "faultInjectionPolicy": { # 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.
236 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
237 "delay": { # 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.
238 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
239 # The value must be between 0.0 and 100.0 inclusive.
240 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
241 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
242 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
243 },
244 },
245 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
246 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
247 # The value must be between 0.0 and 100.0 inclusive.
248 "httpStatus": 42, # The HTTP status code used to abort the request.
249 # The value must be between 200 and 599 inclusive.
250 },
251 },
252 "corsPolicy": { # 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
253 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
254 "A String",
255 ],
256 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
257 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
258 "A String",
259 ],
260 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
261 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
262 "A String",
263 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700264 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700265 "allowCredentials": 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.
266 # Default is false.
267 "disabled": 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.
268 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
269 "A String",
270 ],
271 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
272 "A String",
273 ],
274 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700275 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
276 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700277 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
278 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
279 },
280 "weightedBackendServices": [ # 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.
281 # 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.
282 { # 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
283 "headerAction": { # 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.
284 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
285 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
286 "A String",
287 ],
288 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
289 "A String",
290 ],
291 "requestHeadersToAdd": [ # 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 "headerName": "A String", # The name of the header.
294 "headerValue": "A String", # The value of the header to add.
295 "replace": True or False, # If false, headerValue is appended to any 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 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
300 { # Specification determining how headers are added to requests or responses.
301 "headerName": "A String", # The name of the header.
302 "headerValue": "A String", # The value of the header to add.
303 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
304 # The default value is false.
305 },
306 ],
307 },
308 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
309 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
310 # The value must be between 0 and 1000
311 "backendService": "A String", # 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.
312 },
313 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700314 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700315 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
316 # The value must be between 1 and 255 characters.
317 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
318 # The value must be between 1 and 1024 characters.
319 },
320 },
321 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
322 "defaultService": "A String", # 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.
323 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
324 "tests": [ # 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.
325 { # Message for the expected URL mappings.
326 "description": "A String", # Description of this test case.
327 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
328 "expectedUrlRedirect": "A String", # The expected URL that should be redirected to for the host and path being tested.
329 "host": "A String", # Host portion of the URL.
330 "path": "A String", # Path portion of the URL.
331 "backendServiceWeight": 42, # The weight to use for the supplied host and path when using advanced routing rules that involve traffic splitting.
332 },
333 ],
334 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
335 "fingerprint": "A String", # 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.
336 #
337 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
338 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
339 { # 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.
340 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
341 "defaultRouteAction": { # 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.
342 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
343 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
344 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
345 },
346 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
347 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
Dan O'Mearadd494642020-05-01 07:42:23 -0700348 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700349 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
350 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
351 },
352 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
353 # - 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.
354 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
355 # -
356 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
357 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
358 # - 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.
359 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
360 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
361 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
362 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
363 "A String",
364 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700365 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700366 },
367 "faultInjectionPolicy": { # 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.
368 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
369 "delay": { # 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.
370 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
371 # The value must be between 0.0 and 100.0 inclusive.
372 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
373 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
374 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
375 },
376 },
377 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
378 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
379 # The value must be between 0.0 and 100.0 inclusive.
380 "httpStatus": 42, # The HTTP status code used to abort the request.
381 # The value must be between 200 and 599 inclusive.
382 },
383 },
384 "corsPolicy": { # 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
385 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
386 "A String",
387 ],
388 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
389 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
390 "A String",
391 ],
392 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
393 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
394 "A String",
395 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700396 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700397 "allowCredentials": 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.
398 # Default is false.
399 "disabled": 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.
400 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
401 "A String",
402 ],
403 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
404 "A String",
405 ],
406 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700407 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
408 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700409 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
410 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
411 },
412 "weightedBackendServices": [ # A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.
413 # Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
414 { # In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
415 "headerAction": { # 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.
416 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
417 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
418 "A String",
419 ],
420 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
421 "A String",
422 ],
423 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
424 { # Specification determining how headers are added to requests or responses.
425 "headerName": "A String", # The name of the header.
426 "headerValue": "A String", # The value of the header to add.
427 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
428 # The default value is false.
429 },
430 ],
431 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
432 { # Specification determining how headers are added to requests or responses.
433 "headerName": "A String", # The name of the header.
434 "headerValue": "A String", # The value of the header to add.
435 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
436 # The default value is false.
437 },
438 ],
439 },
440 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
441 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
442 # The value must be between 0 and 1000
443 "backendService": "A String", # 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.
444 },
445 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700446 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700447 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
448 # The value must be between 1 and 255 characters.
449 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
450 # The value must be between 1 and 1024 characters.
451 },
452 },
453 "defaultService": "A String", # 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:
454 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
455 # - compute/v1/projects/project/global/backendServices/backendService
456 # - 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.
457 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
458 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
459 # - compute.backendBuckets.use
460 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -0700461 "routeRules": [ # 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.
462 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700463 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
Dan O'Mearadd494642020-05-01 07:42:23 -0700464 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
465 # If urlRedirect is specified, service or routeAction must not be set.
466 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
467 # 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.
468 # The value must be between 1 and 1024 characters.
469 "stripQuery": 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.
470 # The default is set to false.
471 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
472 # Supported values are:
473 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
474 # - FOUND, which corresponds to 302.
475 # - SEE_OTHER which corresponds to 303.
476 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
477 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
478 "httpsRedirect": 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.
479 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
480 # The default is set to false.
481 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
482 # 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.
483 # The value must be between 1 and 1024 characters.
484 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
485 # The value must be between 1 and 255 characters.
486 },
487 "description": "A String", # The short description conveying the intent of this routeRule.
488 # The description can have a maximum length of 1024 characters.
489 "service": "A String", # 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.
490 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
491 "httpFilterConfigs": [ # 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.
492 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
493 "configTypeUrl": "A String", # 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
494 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
495 "config": "A String", # 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
496 },
497 ],
498 "httpFilterMetadata": [ # 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.
499 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
500 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
501 "configTypeUrl": "A String", # 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
502 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
503 "config": "A String", # 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
504 },
505 ],
506 "priority": 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.
507 # 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.
508 # 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.
509 "routeAction": { # 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.
510 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
511 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
512 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
513 },
514 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
515 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
516 # 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.
517 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
518 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
519 },
520 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
521 # - 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.
522 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
523 # -
524 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
525 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
526 # - 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.
527 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
528 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
529 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
530 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
531 "A String",
532 ],
533 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
534 },
535 "faultInjectionPolicy": { # 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.
536 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
537 "delay": { # 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.
538 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
539 # The value must be between 0.0 and 100.0 inclusive.
540 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
541 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
542 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
543 },
544 },
545 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
546 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
547 # The value must be between 0.0 and 100.0 inclusive.
548 "httpStatus": 42, # The HTTP status code used to abort the request.
549 # The value must be between 200 and 599 inclusive.
550 },
551 },
552 "corsPolicy": { # 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
553 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
554 "A String",
555 ],
556 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
557 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
558 "A String",
559 ],
560 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
561 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
562 "A String",
563 ],
564 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
565 "allowCredentials": 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.
566 # Default is false.
567 "disabled": 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.
568 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
569 "A String",
570 ],
571 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
572 "A String",
573 ],
574 },
575 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
576 # If not specified, will use the largest timeout among all backend services associated with the route.
577 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
578 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
579 },
580 "weightedBackendServices": [ # 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.
581 # 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.
582 { # 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
583 "headerAction": { # 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.
584 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
585 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
586 "A String",
587 ],
588 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
589 "A String",
590 ],
591 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
592 { # Specification determining how headers are added to requests or responses.
593 "headerName": "A String", # The name of the header.
594 "headerValue": "A String", # The value of the header to add.
595 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
596 # The default value is false.
597 },
598 ],
599 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
600 { # Specification determining how headers are added to requests or responses.
601 "headerName": "A String", # The name of the header.
602 "headerValue": "A String", # The value of the header to add.
603 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
604 # The default value is false.
605 },
606 ],
607 },
608 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
609 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
610 # The value must be between 0 and 1000
611 "backendService": "A String", # 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.
612 },
613 ],
614 "urlRewrite": { # 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.
615 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
616 # The value must be between 1 and 255 characters.
617 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
618 # The value must be between 1 and 1024 characters.
619 },
620 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700621 "headerAction": { # 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.
622 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
623 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
624 "A String",
625 ],
626 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
627 "A String",
628 ],
629 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
630 { # Specification determining how headers are added to requests or responses.
631 "headerName": "A String", # The name of the header.
632 "headerValue": "A String", # The value of the header to add.
633 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
634 # The default value is false.
635 },
636 ],
637 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
638 { # Specification determining how headers are added to requests or responses.
639 "headerName": "A String", # The name of the header.
640 "headerValue": "A String", # The value of the header to add.
641 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
642 # The default value is false.
643 },
644 ],
645 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700646 "matchRules": [
647 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
Dan O'Mearadd494642020-05-01 07:42:23 -0700648 "regexMatch": "A String", # 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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700649 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -0700650 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700651 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
652 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -0700653 "regexMatch": "A String", # 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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700654 # 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's port specifier.
655 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -0700656 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700657 "invertMatch": 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.
658 # The default setting is false.
659 "headerName": "A String", # The name of the HTTP header to match.
660 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
661 # For matching a request's method, use the headerName ":method".
662 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
663 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
664 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
665 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
666 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
667 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -0700668 "presentMatch": True or False, # A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700669 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
670 "rangeMatch": { # 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.
671 # For example for a range [-5, 0]
672 # - -3 will match.
673 # - 0 will not match.
674 # - 0.25 will not match.
675 # - -3someString will not match.
676 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -0700677 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700678 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
679 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
680 },
681 },
682 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700683 "fullPathMatch": "A String", # For satisfying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL.
684 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700685 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -0700686 "prefixMatch": "A String", # For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700687 # The value must be between 1 and 1024 characters.
688 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
689 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
690 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -0700691 # ignoreCase must not be used with regexMatch.
692 "metadataFilters": [ # 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.
693 # 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.
694 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700695 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -0700696 { # 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.
697 # 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.
698 # 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="https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/base.proto#envoy-api-msg-core-node" Node metadata of their XDS requests to loadbalancers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700699 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
700 # Supported values are:
701 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
702 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
703 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
704 # This list must not be empty and can have at the most 64 entries.
705 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
706 "name": "A String", # Name of metadata label.
707 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
708 "value": "A String", # The value of the label must match the specified value.
709 # value can have a maximum length of 1024 characters.
710 },
711 ],
712 },
713 ],
714 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
715 { # HttpRouteRuleMatch criteria for a request's query parameter.
716 "presentMatch": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700717 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700718 "regexMatch": "A String", # 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
Dan O'Mearadd494642020-05-01 07:42:23 -0700719 # Only one of presentMatch, exactMatch or regexMatch must be set.
720 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700721 "name": "A String", # 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.
722 "exactMatch": "A String", # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
Dan O'Mearadd494642020-05-01 07:42:23 -0700723 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700724 },
725 ],
726 },
727 ],
728 },
729 ],
730 "pathRules": [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.
731 # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700732 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700733 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
734 "paths": [ # 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.
735 "A String",
736 ],
737 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
738 # If urlRedirect is specified, service or routeAction must not be set.
739 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
Dan O'Mearadd494642020-05-01 07:42:23 -0700740 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700741 # The value must be between 1 and 1024 characters.
742 "stripQuery": 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.
743 # The default is set to false.
744 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
745 # Supported values are:
746 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
747 # - FOUND, which corresponds to 302.
748 # - SEE_OTHER which corresponds to 303.
749 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
750 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
751 "httpsRedirect": 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.
752 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
753 # The default is set to false.
754 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
Dan O'Mearadd494642020-05-01 07:42:23 -0700755 # 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.
756 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700757 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
758 # The value must be between 1 and 255 characters.
759 },
760 "service": "A String", # 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.
761 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
762 "routeAction": { # 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.
763 # Only one of routeAction or urlRedirect must be set.
764 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
765 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
766 },
767 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
768 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
Dan O'Mearadd494642020-05-01 07:42:23 -0700769 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700770 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
771 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
772 },
773 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
774 # - 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.
775 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
776 # -
777 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
778 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
779 # - 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.
780 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
781 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
782 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
783 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
784 "A String",
785 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700786 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700787 },
788 "faultInjectionPolicy": { # 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.
789 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
790 "delay": { # 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.
791 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
792 # The value must be between 0.0 and 100.0 inclusive.
793 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
794 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
795 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
796 },
797 },
798 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
799 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
800 # The value must be between 0.0 and 100.0 inclusive.
801 "httpStatus": 42, # The HTTP status code used to abort the request.
802 # The value must be between 200 and 599 inclusive.
803 },
804 },
805 "corsPolicy": { # 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
806 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
807 "A String",
808 ],
809 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
810 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
811 "A String",
812 ],
813 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
814 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
815 "A String",
816 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700817 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700818 "allowCredentials": 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.
819 # Default is false.
820 "disabled": 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.
821 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
822 "A String",
823 ],
824 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
825 "A String",
826 ],
827 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700828 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
829 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700830 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
831 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
832 },
833 "weightedBackendServices": [ # 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.
834 # 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.
835 { # 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
836 "headerAction": { # 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.
837 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
838 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
839 "A String",
840 ],
841 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
842 "A String",
843 ],
844 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
845 { # Specification determining how headers are added to requests or responses.
846 "headerName": "A String", # The name of the header.
847 "headerValue": "A String", # The value of the header to add.
848 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
849 # The default value is false.
850 },
851 ],
852 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
853 { # Specification determining how headers are added to requests or responses.
854 "headerName": "A String", # The name of the header.
855 "headerValue": "A String", # The value of the header to add.
856 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
857 # The default value is false.
858 },
859 ],
860 },
861 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
862 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
863 # The value must be between 0 and 1000
864 "backendService": "A String", # 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.
865 },
866 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700867 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700868 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
869 # The value must be between 1 and 255 characters.
870 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
871 # The value must be between 1 and 1024 characters.
872 },
873 },
874 },
875 ],
876 "headerAction": { # 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.
877 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
878 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
879 "A String",
880 ],
881 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
882 "A String",
883 ],
884 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
885 { # Specification determining how headers are added to requests or responses.
886 "headerName": "A String", # The name of the header.
887 "headerValue": "A String", # The value of the header to add.
888 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
889 # The default value is false.
890 },
891 ],
892 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
893 { # Specification determining how headers are added to requests or responses.
894 "headerName": "A String", # The name of the header.
895 "headerValue": "A String", # The value of the header to add.
896 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
897 # The default value is false.
898 },
899 ],
900 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700901 "defaultUrlRedirect": { # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700902 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
903 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
Dan O'Mearadd494642020-05-01 07:42:23 -0700904 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700905 # The value must be between 1 and 1024 characters.
906 "stripQuery": 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.
907 # The default is set to false.
908 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
909 # Supported values are:
910 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
911 # - FOUND, which corresponds to 302.
912 # - SEE_OTHER which corresponds to 303.
913 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
914 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
915 "httpsRedirect": 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.
916 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
917 # The default is set to false.
918 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
Dan O'Mearadd494642020-05-01 07:42:23 -0700919 # 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.
920 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700921 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
922 # The value must be between 1 and 255 characters.
923 },
924 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
925 },
926 ],
927 "headerAction": { # 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.
928 # The headerAction specified here take effect after headerAction specified under pathMatcher.
929 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
930 "A String",
931 ],
932 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
933 "A String",
934 ],
935 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
936 { # Specification determining how headers are added to requests or responses.
937 "headerName": "A String", # The name of the header.
938 "headerValue": "A String", # The value of the header to add.
939 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
940 # The default value is false.
941 },
942 ],
943 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
944 { # Specification determining how headers are added to requests or responses.
945 "headerName": "A String", # The name of the header.
946 "headerValue": "A String", # The value of the header to add.
947 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
948 # The default value is false.
949 },
950 ],
951 },
952 "region": "A String", # [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.
953 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
954 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
955 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
Dan O'Mearadd494642020-05-01 07:42:23 -0700956 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700957 # The value must be between 1 and 1024 characters.
958 "stripQuery": 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.
959 # The default is set to false.
960 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
961 # Supported values are:
962 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
963 # - FOUND, which corresponds to 302.
964 # - SEE_OTHER which corresponds to 303.
965 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
966 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
967 "httpsRedirect": 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.
968 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
969 # The default is set to false.
970 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
Dan O'Mearadd494642020-05-01 07:42:23 -0700971 # 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.
972 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700973 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
974 # The value must be between 1 and 255 characters.
975 },
976 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
977 "hostRules": [ # The list of HostRules to use against the URL.
978 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
Dan O'Mearadd494642020-05-01 07:42:23 -0700979 "hosts": [ # 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 ..
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700980 "A String",
981 ],
982 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
983 "pathMatcher": "A String", # The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion.
984 },
985 ],
986 "name": "A String", # 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.
987 }</pre>
988</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.
1001 #
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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001013 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
1014 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1015 "defaultRouteAction": { # 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.
1016 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
1017 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
1018 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1019 },
1020 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1021 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
Dan O'Mearadd494642020-05-01 07:42:23 -07001022 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001023 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1024 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1025 },
1026 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1027 # - 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.
1028 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1029 # -
1030 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1031 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1032 # - 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.
1033 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1034 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1035 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1036 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1037 "A String",
1038 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001039 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001040 },
1041 "faultInjectionPolicy": { # 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.
1042 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1043 "delay": { # 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.
1044 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1045 # The value must be between 0.0 and 100.0 inclusive.
1046 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
1047 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1048 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1049 },
1050 },
1051 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
1052 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1053 # The value must be between 0.0 and 100.0 inclusive.
1054 "httpStatus": 42, # The HTTP status code used to abort the request.
1055 # The value must be between 200 and 599 inclusive.
1056 },
1057 },
1058 "corsPolicy": { # 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
1059 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1060 "A String",
1061 ],
1062 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1063 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1064 "A String",
1065 ],
1066 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1067 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1068 "A String",
1069 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001070 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001071 "allowCredentials": True or False, # In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
1072 # Default is false.
1073 "disabled": 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.
1074 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
1075 "A String",
1076 ],
1077 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
1078 "A String",
1079 ],
1080 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001081 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
1082 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001083 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1084 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1085 },
1086 "weightedBackendServices": [ # 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.
1087 # 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.
1088 { # 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
1089 "headerAction": { # 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.
1090 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1091 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1092 "A String",
1093 ],
1094 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
1095 "A String",
1096 ],
1097 "requestHeadersToAdd": [ # 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 "headerName": "A String", # The name of the header.
1100 "headerValue": "A String", # The value of the header to add.
1101 "replace": True or False, # If false, headerValue is appended to any 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 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1106 { # Specification determining how headers are added to requests or responses.
1107 "headerName": "A String", # The name of the header.
1108 "headerValue": "A String", # The value of the header to add.
1109 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1110 # The default value is false.
1111 },
1112 ],
1113 },
1114 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1115 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
1116 # The value must be between 0 and 1000
1117 "backendService": "A String", # 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.
1118 },
1119 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001120 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001121 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
1122 # The value must be between 1 and 255 characters.
1123 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
1124 # The value must be between 1 and 1024 characters.
1125 },
1126 },
1127 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1128 "defaultService": "A String", # 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.
1129 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
1130 "tests": [ # 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.
1131 { # Message for the expected URL mappings.
1132 "description": "A String", # Description of this test case.
1133 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
1134 "expectedUrlRedirect": "A String", # The expected URL that should be redirected to for the host and path being tested.
1135 "host": "A String", # Host portion of the URL.
1136 "path": "A String", # Path portion of the URL.
1137 "backendServiceWeight": 42, # The weight to use for the supplied host and path when using advanced routing rules that involve traffic splitting.
1138 },
1139 ],
1140 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1141 "fingerprint": "A String", # 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.
1142 #
1143 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
1144 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
1145 { # 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.
1146 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1147 "defaultRouteAction": { # 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.
1148 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
1149 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
1150 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1151 },
1152 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1153 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
Dan O'Mearadd494642020-05-01 07:42:23 -07001154 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001155 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1156 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1157 },
1158 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1159 # - 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.
1160 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1161 # -
1162 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1163 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1164 # - 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.
1165 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1166 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1167 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1168 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1169 "A String",
1170 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001171 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001172 },
1173 "faultInjectionPolicy": { # 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.
1174 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1175 "delay": { # 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.
1176 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1177 # The value must be between 0.0 and 100.0 inclusive.
1178 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
1179 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1180 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1181 },
1182 },
1183 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
1184 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1185 # The value must be between 0.0 and 100.0 inclusive.
1186 "httpStatus": 42, # The HTTP status code used to abort the request.
1187 # The value must be between 200 and 599 inclusive.
1188 },
1189 },
1190 "corsPolicy": { # 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
1191 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1192 "A String",
1193 ],
1194 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1195 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1196 "A String",
1197 ],
1198 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1199 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1200 "A String",
1201 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001202 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001203 "allowCredentials": 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.
1204 # Default is false.
1205 "disabled": 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.
1206 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
1207 "A String",
1208 ],
1209 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
1210 "A String",
1211 ],
1212 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001213 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
1214 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001215 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1216 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1217 },
1218 "weightedBackendServices": [ # 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.
1219 # 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.
1220 { # 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
1221 "headerAction": { # 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.
1222 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1223 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1224 "A String",
1225 ],
1226 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
1227 "A String",
1228 ],
1229 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1230 { # Specification determining how headers are added to requests or responses.
1231 "headerName": "A String", # The name of the header.
1232 "headerValue": "A String", # The value of the header to add.
1233 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1234 # The default value is false.
1235 },
1236 ],
1237 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1238 { # Specification determining how headers are added to requests or responses.
1239 "headerName": "A String", # The name of the header.
1240 "headerValue": "A String", # The value of the header to add.
1241 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1242 # The default value is false.
1243 },
1244 ],
1245 },
1246 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1247 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
1248 # The value must be between 0 and 1000
1249 "backendService": "A String", # 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.
1250 },
1251 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001252 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001253 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
1254 # The value must be between 1 and 255 characters.
1255 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
1256 # The value must be between 1 and 1024 characters.
1257 },
1258 },
1259 "defaultService": "A String", # 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:
1260 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
1261 # - compute/v1/projects/project/global/backendServices/backendService
1262 # - 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.
1263 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
1264 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
1265 # - compute.backendBuckets.use
1266 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07001267 "routeRules": [ # 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.
1268 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001269 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
Dan O'Mearadd494642020-05-01 07:42:23 -07001270 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
1271 # If urlRedirect is specified, service or routeAction must not be set.
1272 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
1273 # 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.
1274 # The value must be between 1 and 1024 characters.
1275 "stripQuery": 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.
1276 # The default is set to false.
1277 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
1278 # Supported values are:
1279 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1280 # - FOUND, which corresponds to 302.
1281 # - SEE_OTHER which corresponds to 303.
1282 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1283 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1284 "httpsRedirect": 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.
1285 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1286 # The default is set to false.
1287 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
1288 # 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.
1289 # The value must be between 1 and 1024 characters.
1290 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
1291 # The value must be between 1 and 255 characters.
1292 },
1293 "description": "A String", # The short description conveying the intent of this routeRule.
1294 # The description can have a maximum length of 1024 characters.
1295 "service": "A String", # 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.
1296 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1297 "httpFilterConfigs": [ # 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.
1298 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
1299 "configTypeUrl": "A String", # 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
1300 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
1301 "config": "A String", # 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
1302 },
1303 ],
1304 "httpFilterMetadata": [ # 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.
1305 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
1306 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
1307 "configTypeUrl": "A String", # 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
1308 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
1309 "config": "A String", # 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
1310 },
1311 ],
1312 "priority": 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.
1313 # 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.
1314 # 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.
1315 "routeAction": { # 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.
1316 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1317 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
1318 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1319 },
1320 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1321 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
1322 # 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.
1323 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1324 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1325 },
1326 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1327 # - 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.
1328 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1329 # -
1330 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1331 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1332 # - 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.
1333 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1334 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1335 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1336 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1337 "A String",
1338 ],
1339 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1340 },
1341 "faultInjectionPolicy": { # 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.
1342 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1343 "delay": { # 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.
1344 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1345 # The value must be between 0.0 and 100.0 inclusive.
1346 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
1347 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1348 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1349 },
1350 },
1351 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
1352 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1353 # The value must be between 0.0 and 100.0 inclusive.
1354 "httpStatus": 42, # The HTTP status code used to abort the request.
1355 # The value must be between 200 and 599 inclusive.
1356 },
1357 },
1358 "corsPolicy": { # 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
1359 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1360 "A String",
1361 ],
1362 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1363 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1364 "A String",
1365 ],
1366 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1367 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1368 "A String",
1369 ],
1370 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
1371 "allowCredentials": 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.
1372 # Default is false.
1373 "disabled": 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.
1374 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
1375 "A String",
1376 ],
1377 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
1378 "A String",
1379 ],
1380 },
1381 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
1382 # If not specified, will use the largest timeout among all backend services associated with the route.
1383 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1384 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1385 },
1386 "weightedBackendServices": [ # 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.
1387 # 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.
1388 { # 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
1389 "headerAction": { # 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.
1390 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1391 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1392 "A String",
1393 ],
1394 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
1395 "A String",
1396 ],
1397 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1398 { # Specification determining how headers are added to requests or responses.
1399 "headerName": "A String", # The name of the header.
1400 "headerValue": "A String", # The value of the header to add.
1401 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1402 # The default value is false.
1403 },
1404 ],
1405 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1406 { # Specification determining how headers are added to requests or responses.
1407 "headerName": "A String", # The name of the header.
1408 "headerValue": "A String", # The value of the header to add.
1409 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1410 # The default value is false.
1411 },
1412 ],
1413 },
1414 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1415 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
1416 # The value must be between 0 and 1000
1417 "backendService": "A String", # 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.
1418 },
1419 ],
1420 "urlRewrite": { # 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.
1421 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
1422 # The value must be between 1 and 255 characters.
1423 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
1424 # The value must be between 1 and 1024 characters.
1425 },
1426 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001427 "headerAction": { # 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.
1428 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
1429 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1430 "A String",
1431 ],
1432 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
1433 "A String",
1434 ],
1435 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1436 { # Specification determining how headers are added to requests or responses.
1437 "headerName": "A String", # The name of the header.
1438 "headerValue": "A String", # The value of the header to add.
1439 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1440 # The default value is false.
1441 },
1442 ],
1443 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1444 { # Specification determining how headers are added to requests or responses.
1445 "headerName": "A String", # The name of the header.
1446 "headerValue": "A String", # The value of the header to add.
1447 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1448 # The default value is false.
1449 },
1450 ],
1451 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001452 "matchRules": [
1453 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
Dan O'Mearadd494642020-05-01 07:42:23 -07001454 "regexMatch": "A String", # 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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001455 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07001456 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001457 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
1458 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -07001459 "regexMatch": "A String", # 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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001460 # 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's port specifier.
1461 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07001462 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001463 "invertMatch": 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.
1464 # The default setting is false.
1465 "headerName": "A String", # The name of the HTTP header to match.
1466 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
1467 # For matching a request's method, use the headerName ":method".
1468 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
1469 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1470 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
1471 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1472 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
1473 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07001474 "presentMatch": True or False, # A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001475 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1476 "rangeMatch": { # 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.
1477 # For example for a range [-5, 0]
1478 # - -3 will match.
1479 # - 0 will not match.
1480 # - 0.25 will not match.
1481 # - -3someString will not match.
1482 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07001483 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001484 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
1485 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
1486 },
1487 },
1488 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001489 "fullPathMatch": "A String", # 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.
1490 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001491 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07001492 "prefixMatch": "A String", # For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001493 # The value must be between 1 and 1024 characters.
1494 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
1495 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
1496 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -07001497 # ignoreCase must not be used with regexMatch.
1498 "metadataFilters": [ # 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.
1499 # 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.
1500 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001501 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -07001502 { # 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.
1503 # 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.
1504 # 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="https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/base.proto#envoy-api-msg-core-node" Node metadata of their XDS requests to loadbalancers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001505 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
1506 # Supported values are:
1507 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
1508 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
1509 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
1510 # This list must not be empty and can have at the most 64 entries.
1511 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
1512 "name": "A String", # Name of metadata label.
1513 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
1514 "value": "A String", # The value of the label must match the specified value.
1515 # value can have a maximum length of 1024 characters.
1516 },
1517 ],
1518 },
1519 ],
1520 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
1521 { # HttpRouteRuleMatch criteria for a request's query parameter.
1522 "presentMatch": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001523 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001524 "regexMatch": "A String", # 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
Dan O'Mearadd494642020-05-01 07:42:23 -07001525 # Only one of presentMatch, exactMatch or regexMatch must be set.
1526 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001527 "name": "A String", # 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.
1528 "exactMatch": "A String", # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
Dan O'Mearadd494642020-05-01 07:42:23 -07001529 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001530 },
1531 ],
1532 },
1533 ],
1534 },
1535 ],
1536 "pathRules": [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.
1537 # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001538 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001539 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
1540 "paths": [ # 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.
1541 "A String",
1542 ],
1543 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
1544 # If urlRedirect is specified, service or routeAction must not be set.
1545 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07001546 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001547 # The value must be between 1 and 1024 characters.
1548 "stripQuery": 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.
1549 # The default is set to false.
1550 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
1551 # Supported values are:
1552 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1553 # - FOUND, which corresponds to 302.
1554 # - SEE_OTHER which corresponds to 303.
1555 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1556 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1557 "httpsRedirect": 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.
1558 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1559 # The default is set to false.
1560 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07001561 # 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.
1562 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001563 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
1564 # The value must be between 1 and 255 characters.
1565 },
1566 "service": "A String", # 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.
1567 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1568 "routeAction": { # 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.
1569 # Only one of routeAction or urlRedirect must be set.
1570 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
1571 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1572 },
1573 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1574 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
Dan O'Mearadd494642020-05-01 07:42:23 -07001575 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001576 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1577 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1578 },
1579 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1580 # - 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.
1581 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1582 # -
1583 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1584 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1585 # - 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.
1586 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1587 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1588 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1589 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1590 "A String",
1591 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001592 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001593 },
1594 "faultInjectionPolicy": { # 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.
1595 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1596 "delay": { # 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.
1597 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1598 # The value must be between 0.0 and 100.0 inclusive.
1599 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
1600 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1601 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1602 },
1603 },
1604 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
1605 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1606 # The value must be between 0.0 and 100.0 inclusive.
1607 "httpStatus": 42, # The HTTP status code used to abort the request.
1608 # The value must be between 200 and 599 inclusive.
1609 },
1610 },
1611 "corsPolicy": { # 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
1612 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1613 "A String",
1614 ],
1615 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1616 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1617 "A String",
1618 ],
1619 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1620 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1621 "A String",
1622 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001623 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001624 "allowCredentials": 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.
1625 # Default is false.
1626 "disabled": 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.
1627 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
1628 "A String",
1629 ],
1630 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
1631 "A String",
1632 ],
1633 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001634 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
1635 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001636 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1637 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1638 },
1639 "weightedBackendServices": [ # 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.
1640 # 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.
1641 { # 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
1642 "headerAction": { # 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.
1643 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1644 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1645 "A String",
1646 ],
1647 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
1648 "A String",
1649 ],
1650 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1651 { # Specification determining how headers are added to requests or responses.
1652 "headerName": "A String", # The name of the header.
1653 "headerValue": "A String", # The value of the header to add.
1654 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1655 # The default value is false.
1656 },
1657 ],
1658 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1659 { # Specification determining how headers are added to requests or responses.
1660 "headerName": "A String", # The name of the header.
1661 "headerValue": "A String", # The value of the header to add.
1662 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1663 # The default value is false.
1664 },
1665 ],
1666 },
1667 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1668 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
1669 # The value must be between 0 and 1000
1670 "backendService": "A String", # 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.
1671 },
1672 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001673 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001674 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
1675 # The value must be between 1 and 255 characters.
1676 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
1677 # The value must be between 1 and 1024 characters.
1678 },
1679 },
1680 },
1681 ],
1682 "headerAction": { # 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.
1683 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
1684 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1685 "A String",
1686 ],
1687 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
1688 "A String",
1689 ],
1690 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1691 { # Specification determining how headers are added to requests or responses.
1692 "headerName": "A String", # The name of the header.
1693 "headerValue": "A String", # The value of the header to add.
1694 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1695 # The default value is false.
1696 },
1697 ],
1698 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1699 { # Specification determining how headers are added to requests or responses.
1700 "headerName": "A String", # The name of the header.
1701 "headerValue": "A String", # The value of the header to add.
1702 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1703 # The default value is false.
1704 },
1705 ],
1706 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001707 "defaultUrlRedirect": { # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001708 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
1709 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07001710 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001711 # The value must be between 1 and 1024 characters.
1712 "stripQuery": 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.
1713 # The default is set to false.
1714 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
1715 # Supported values are:
1716 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1717 # - FOUND, which corresponds to 302.
1718 # - SEE_OTHER which corresponds to 303.
1719 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1720 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1721 "httpsRedirect": 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.
1722 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1723 # The default is set to false.
1724 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07001725 # 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.
1726 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001727 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
1728 # The value must be between 1 and 255 characters.
1729 },
1730 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
1731 },
1732 ],
1733 "headerAction": { # 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.
1734 # The headerAction specified here take effect after headerAction specified under pathMatcher.
1735 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1736 "A String",
1737 ],
1738 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
1739 "A String",
1740 ],
1741 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1742 { # Specification determining how headers are added to requests or responses.
1743 "headerName": "A String", # The name of the header.
1744 "headerValue": "A String", # The value of the header to add.
1745 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1746 # The default value is false.
1747 },
1748 ],
1749 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1750 { # Specification determining how headers are added to requests or responses.
1751 "headerName": "A String", # The name of the header.
1752 "headerValue": "A String", # The value of the header to add.
1753 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1754 # The default value is false.
1755 },
1756 ],
1757 },
1758 "region": "A String", # [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.
1759 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
1760 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
1761 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07001762 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001763 # The value must be between 1 and 1024 characters.
1764 "stripQuery": 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.
1765 # The default is set to false.
1766 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
1767 # Supported values are:
1768 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1769 # - FOUND, which corresponds to 302.
1770 # - SEE_OTHER which corresponds to 303.
1771 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1772 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1773 "httpsRedirect": 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.
1774 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1775 # The default is set to false.
1776 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07001777 # 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.
1778 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001779 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
1780 # The value must be between 1 and 255 characters.
1781 },
1782 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1783 "hostRules": [ # The list of HostRules to use against the URL.
1784 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
Dan O'Mearadd494642020-05-01 07:42:23 -07001785 "hosts": [ # 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 ..
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001786 "A String",
1787 ],
1788 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1789 "pathMatcher": "A String", # The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion.
1790 },
1791 ],
1792 "name": "A String", # 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.
1793 }
1794
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 Kim715bd7f2019-06-14 16:50:42 -07001814 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1815 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1816 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001817 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001818 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1819 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001820 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1821 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001822 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001823 "httpErrorStatusCode": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001824 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001825 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001826 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1827 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1828 {
1829 "message": "A String", # [Output Only] A human-readable description of the warning code.
1830 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1831 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1832 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1833 {
1834 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1835 "key": "A String", # [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).
1836 },
1837 ],
1838 },
1839 ],
1840 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07001841 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001842 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001843 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1844 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001845 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1846 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1847 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1848 {
1849 "message": "A String", # [Output Only] An optional, human-readable error message.
1850 "code": "A String", # [Output Only] The error type identifier for this error.
1851 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1852 },
1853 ],
1854 },
1855 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1856 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1857 "targetLink": "A String", # [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.
1858 }</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{
1873 "path": "A String",
1874 "host": "A String", # If set, this invalidation rule will only apply to requests with a Host header matching host.
1875 }
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 Kim715bd7f2019-06-14 16:50:42 -07001896 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1897 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1898 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001899 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001900 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1901 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001902 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1903 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001904 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001905 "httpErrorStatusCode": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001906 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001907 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001908 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1909 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1910 {
1911 "message": "A String", # [Output Only] A human-readable description of the warning code.
1912 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1913 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1914 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1915 {
1916 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1917 "key": "A String", # [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).
1918 },
1919 ],
1920 },
1921 ],
1922 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07001923 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001924 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001925 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1926 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001927 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1928 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1929 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1930 {
1931 "message": "A String", # [Output Only] An optional, human-readable error message.
1932 "code": "A String", # [Output Only] The error type identifier for this error.
1933 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1934 },
1935 ],
1936 },
1937 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1938 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1939 "targetLink": "A String", # [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.
1940 }</pre>
1941</div>
1942
1943<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001944 <code class="details" id="list">list(project, region, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, filter=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)
1950 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1951
Dan O'Mearadd494642020-05-01 07:42:23 -07001952You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001953
Dan O'Mearadd494642020-05-01 07:42:23 -07001954Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1955 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`)
1956 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.
1957 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.
1958 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 -07001959
Dan O'Mearadd494642020-05-01 07:42:23 -07001960For 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 -07001961
Dan O'Mearadd494642020-05-01 07:42:23 -07001962You 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 -07001963
Dan O'Mearadd494642020-05-01 07:42:23 -07001964To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001965
1966Returns:
1967 An object of the form:
1968
1969 { # Contains a list of UrlMap resources.
1970 "nextPageToken": "A String", # [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.
1971 "kind": "compute#urlMapList", # Type of resource.
1972 "items": [ # A list of UrlMap resources.
Dan O'Mearadd494642020-05-01 07:42:23 -07001973 { # Represents a URL Map resource.
1974 #
1975 # Google Compute Engine has two URL Map resources:
1976 #
1977 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
1978 #
1979 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
1980 #
1981 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
1982 #
1983 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
1984 #
1985 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001986 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
1987 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1988 "defaultRouteAction": { # 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.
1989 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
1990 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
1991 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1992 },
1993 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1994 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
Dan O'Mearadd494642020-05-01 07:42:23 -07001995 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001996 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1997 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1998 },
1999 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2000 # - 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.
2001 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2002 # -
2003 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2004 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2005 # - 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.
2006 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2007 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2008 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2009 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2010 "A String",
2011 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002012 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002013 },
2014 "faultInjectionPolicy": { # 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.
2015 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2016 "delay": { # 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.
2017 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2018 # The value must be between 0.0 and 100.0 inclusive.
2019 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
2020 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2021 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2022 },
2023 },
2024 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
2025 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2026 # The value must be between 0.0 and 100.0 inclusive.
2027 "httpStatus": 42, # The HTTP status code used to abort the request.
2028 # The value must be between 200 and 599 inclusive.
2029 },
2030 },
2031 "corsPolicy": { # 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
2032 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2033 "A String",
2034 ],
2035 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2036 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2037 "A String",
2038 ],
2039 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2040 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2041 "A String",
2042 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002043 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002044 "allowCredentials": 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.
2045 # Default is false.
2046 "disabled": 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.
2047 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
2048 "A String",
2049 ],
2050 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
2051 "A String",
2052 ],
2053 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002054 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
2055 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002056 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2057 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2058 },
2059 "weightedBackendServices": [ # 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.
2060 # 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.
2061 { # 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
2062 "headerAction": { # 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.
2063 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2064 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2065 "A String",
2066 ],
2067 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
2068 "A String",
2069 ],
2070 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2071 { # Specification determining how headers are added to requests or responses.
2072 "headerName": "A String", # The name of the header.
2073 "headerValue": "A String", # The value of the header to add.
2074 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2075 # The default value is false.
2076 },
2077 ],
2078 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2079 { # Specification determining how headers are added to requests or responses.
2080 "headerName": "A String", # The name of the header.
2081 "headerValue": "A String", # The value of the header to add.
2082 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2083 # The default value is false.
2084 },
2085 ],
2086 },
2087 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2088 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
2089 # The value must be between 0 and 1000
2090 "backendService": "A String", # 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.
2091 },
2092 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002093 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002094 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
2095 # The value must be between 1 and 255 characters.
2096 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
2097 # The value must be between 1 and 1024 characters.
2098 },
2099 },
2100 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
2101 "defaultService": "A String", # 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.
2102 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
2103 "tests": [ # 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.
2104 { # Message for the expected URL mappings.
2105 "description": "A String", # Description of this test case.
2106 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
2107 "expectedUrlRedirect": "A String", # The expected URL that should be redirected to for the host and path being tested.
2108 "host": "A String", # Host portion of the URL.
2109 "path": "A String", # Path portion of the URL.
2110 "backendServiceWeight": 42, # The weight to use for the supplied host and path when using advanced routing rules that involve traffic splitting.
2111 },
2112 ],
2113 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2114 "fingerprint": "A String", # 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.
2115 #
2116 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
2117 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
2118 { # 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.
2119 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
2120 "defaultRouteAction": { # 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.
2121 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
2122 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
2123 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
2124 },
2125 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2126 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
Dan O'Mearadd494642020-05-01 07:42:23 -07002127 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002128 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2129 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2130 },
2131 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2132 # - 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.
2133 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2134 # -
2135 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2136 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2137 # - 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.
2138 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2139 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2140 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2141 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2142 "A String",
2143 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002144 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002145 },
2146 "faultInjectionPolicy": { # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. # The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.
2147 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2148 "delay": { # 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.
2149 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2150 # The value must be between 0.0 and 100.0 inclusive.
2151 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
2152 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2153 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2154 },
2155 },
2156 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
2157 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2158 # The value must be between 0.0 and 100.0 inclusive.
2159 "httpStatus": 42, # The HTTP status code used to abort the request.
2160 # The value must be between 200 and 599 inclusive.
2161 },
2162 },
2163 "corsPolicy": { # 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
2164 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2165 "A String",
2166 ],
2167 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2168 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2169 "A String",
2170 ],
2171 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2172 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2173 "A String",
2174 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002175 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002176 "allowCredentials": 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.
2177 # Default is false.
2178 "disabled": 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.
2179 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
2180 "A String",
2181 ],
2182 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
2183 "A String",
2184 ],
2185 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002186 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
2187 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002188 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2189 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2190 },
2191 "weightedBackendServices": [ # 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.
2192 # 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.
2193 { # 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
2194 "headerAction": { # 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.
2195 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2196 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2197 "A String",
2198 ],
2199 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
2200 "A String",
2201 ],
2202 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2203 { # Specification determining how headers are added to requests or responses.
2204 "headerName": "A String", # The name of the header.
2205 "headerValue": "A String", # The value of the header to add.
2206 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2207 # The default value is false.
2208 },
2209 ],
2210 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2211 { # Specification determining how headers are added to requests or responses.
2212 "headerName": "A String", # The name of the header.
2213 "headerValue": "A String", # The value of the header to add.
2214 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2215 # The default value is false.
2216 },
2217 ],
2218 },
2219 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2220 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
2221 # The value must be between 0 and 1000
2222 "backendService": "A String", # 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.
2223 },
2224 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002225 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002226 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
2227 # The value must be between 1 and 255 characters.
2228 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
2229 # The value must be between 1 and 1024 characters.
2230 },
2231 },
2232 "defaultService": "A String", # 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:
2233 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
2234 # - compute/v1/projects/project/global/backendServices/backendService
2235 # - 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.
2236 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
2237 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
2238 # - compute.backendBuckets.use
2239 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07002240 "routeRules": [ # 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.
2241 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002242 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
Dan O'Mearadd494642020-05-01 07:42:23 -07002243 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
2244 # If urlRedirect is specified, service or routeAction must not be set.
2245 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
2246 # 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.
2247 # The value must be between 1 and 1024 characters.
2248 "stripQuery": 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.
2249 # The default is set to false.
2250 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
2251 # Supported values are:
2252 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2253 # - FOUND, which corresponds to 302.
2254 # - SEE_OTHER which corresponds to 303.
2255 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2256 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2257 "httpsRedirect": 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.
2258 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2259 # The default is set to false.
2260 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
2261 # 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.
2262 # The value must be between 1 and 1024 characters.
2263 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
2264 # The value must be between 1 and 255 characters.
2265 },
2266 "description": "A String", # The short description conveying the intent of this routeRule.
2267 # The description can have a maximum length of 1024 characters.
2268 "service": "A String", # 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.
2269 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2270 "httpFilterConfigs": [ # 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.
2271 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
2272 "configTypeUrl": "A String", # 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
2273 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
2274 "config": "A String", # 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
2275 },
2276 ],
2277 "httpFilterMetadata": [ # 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.
2278 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
2279 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
2280 "configTypeUrl": "A String", # 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
2281 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
2282 "config": "A String", # 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
2283 },
2284 ],
2285 "priority": 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.
2286 # 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.
2287 # 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.
2288 "routeAction": { # 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.
2289 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2290 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
2291 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
2292 },
2293 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2294 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
2295 # 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.
2296 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2297 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2298 },
2299 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2300 # - 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.
2301 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2302 # -
2303 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2304 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2305 # - 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.
2306 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2307 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2308 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2309 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2310 "A String",
2311 ],
2312 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2313 },
2314 "faultInjectionPolicy": { # 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.
2315 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2316 "delay": { # 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.
2317 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2318 # The value must be between 0.0 and 100.0 inclusive.
2319 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
2320 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2321 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2322 },
2323 },
2324 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
2325 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2326 # The value must be between 0.0 and 100.0 inclusive.
2327 "httpStatus": 42, # The HTTP status code used to abort the request.
2328 # The value must be between 200 and 599 inclusive.
2329 },
2330 },
2331 "corsPolicy": { # 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
2332 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2333 "A String",
2334 ],
2335 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2336 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2337 "A String",
2338 ],
2339 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2340 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2341 "A String",
2342 ],
2343 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
2344 "allowCredentials": 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.
2345 # Default is false.
2346 "disabled": 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.
2347 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
2348 "A String",
2349 ],
2350 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
2351 "A String",
2352 ],
2353 },
2354 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
2355 # If not specified, will use the largest timeout among all backend services associated with the route.
2356 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2357 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2358 },
2359 "weightedBackendServices": [ # 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.
2360 # 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.
2361 { # 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
2362 "headerAction": { # 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.
2363 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2364 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2365 "A String",
2366 ],
2367 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
2368 "A String",
2369 ],
2370 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2371 { # Specification determining how headers are added to requests or responses.
2372 "headerName": "A String", # The name of the header.
2373 "headerValue": "A String", # The value of the header to add.
2374 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2375 # The default value is false.
2376 },
2377 ],
2378 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2379 { # Specification determining how headers are added to requests or responses.
2380 "headerName": "A String", # The name of the header.
2381 "headerValue": "A String", # The value of the header to add.
2382 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2383 # The default value is false.
2384 },
2385 ],
2386 },
2387 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2388 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
2389 # The value must be between 0 and 1000
2390 "backendService": "A String", # 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.
2391 },
2392 ],
2393 "urlRewrite": { # 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.
2394 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
2395 # The value must be between 1 and 255 characters.
2396 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
2397 # The value must be between 1 and 1024 characters.
2398 },
2399 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002400 "headerAction": { # 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.
2401 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
2402 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2403 "A String",
2404 ],
2405 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
2406 "A String",
2407 ],
2408 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2409 { # Specification determining how headers are added to requests or responses.
2410 "headerName": "A String", # The name of the header.
2411 "headerValue": "A String", # The value of the header to add.
2412 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2413 # The default value is false.
2414 },
2415 ],
2416 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2417 { # Specification determining how headers are added to requests or responses.
2418 "headerName": "A String", # The name of the header.
2419 "headerValue": "A String", # The value of the header to add.
2420 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2421 # The default value is false.
2422 },
2423 ],
2424 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002425 "matchRules": [
2426 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
Dan O'Mearadd494642020-05-01 07:42:23 -07002427 "regexMatch": "A String", # 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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002428 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07002429 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002430 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
2431 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -07002432 "regexMatch": "A String", # 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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002433 # 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's port specifier.
2434 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07002435 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002436 "invertMatch": 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.
2437 # The default setting is false.
2438 "headerName": "A String", # The name of the HTTP header to match.
2439 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
2440 # For matching a request's method, use the headerName ":method".
2441 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
2442 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2443 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
2444 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2445 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
2446 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07002447 "presentMatch": True or False, # A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002448 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2449 "rangeMatch": { # 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.
2450 # For example for a range [-5, 0]
2451 # - -3 will match.
2452 # - 0 will not match.
2453 # - 0.25 will not match.
2454 # - -3someString will not match.
2455 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07002456 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002457 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
2458 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
2459 },
2460 },
2461 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002462 "fullPathMatch": "A String", # 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.
2463 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002464 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07002465 "prefixMatch": "A String", # For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002466 # The value must be between 1 and 1024 characters.
2467 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2468 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
2469 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -07002470 # ignoreCase must not be used with regexMatch.
2471 "metadataFilters": [ # 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.
2472 # 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.
2473 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002474 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -07002475 { # 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.
2476 # 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.
2477 # 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="https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/base.proto#envoy-api-msg-core-node" Node metadata of their XDS requests to loadbalancers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002478 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
2479 # Supported values are:
2480 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
2481 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
2482 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
2483 # This list must not be empty and can have at the most 64 entries.
2484 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
2485 "name": "A String", # Name of metadata label.
2486 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
2487 "value": "A String", # The value of the label must match the specified value.
2488 # value can have a maximum length of 1024 characters.
2489 },
2490 ],
2491 },
2492 ],
2493 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
2494 { # HttpRouteRuleMatch criteria for a request's query parameter.
2495 "presentMatch": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002496 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002497 "regexMatch": "A String", # 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
Dan O'Mearadd494642020-05-01 07:42:23 -07002498 # Only one of presentMatch, exactMatch or regexMatch must be set.
2499 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002500 "name": "A String", # 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.
2501 "exactMatch": "A String", # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
Dan O'Mearadd494642020-05-01 07:42:23 -07002502 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002503 },
2504 ],
2505 },
2506 ],
2507 },
2508 ],
2509 "pathRules": [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.
2510 # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002511 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002512 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
2513 "paths": [ # 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.
2514 "A String",
2515 ],
2516 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
2517 # If urlRedirect is specified, service or routeAction must not be set.
2518 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07002519 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002520 # The value must be between 1 and 1024 characters.
2521 "stripQuery": 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.
2522 # The default is set to false.
2523 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
2524 # Supported values are:
2525 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2526 # - FOUND, which corresponds to 302.
2527 # - SEE_OTHER which corresponds to 303.
2528 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2529 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2530 "httpsRedirect": 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.
2531 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2532 # The default is set to false.
2533 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07002534 # 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.
2535 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002536 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
2537 # The value must be between 1 and 255 characters.
2538 },
2539 "service": "A String", # 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.
2540 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2541 "routeAction": { # 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.
2542 # Only one of routeAction or urlRedirect must be set.
2543 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
2544 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
2545 },
2546 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2547 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
Dan O'Mearadd494642020-05-01 07:42:23 -07002548 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002549 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2550 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2551 },
2552 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2553 # - 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.
2554 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2555 # -
2556 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2557 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2558 # - 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.
2559 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2560 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2561 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2562 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2563 "A String",
2564 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002565 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002566 },
2567 "faultInjectionPolicy": { # 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.
2568 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2569 "delay": { # 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.
2570 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2571 # The value must be between 0.0 and 100.0 inclusive.
2572 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
2573 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2574 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2575 },
2576 },
2577 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
2578 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2579 # The value must be between 0.0 and 100.0 inclusive.
2580 "httpStatus": 42, # The HTTP status code used to abort the request.
2581 # The value must be between 200 and 599 inclusive.
2582 },
2583 },
2584 "corsPolicy": { # 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
2585 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2586 "A String",
2587 ],
2588 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2589 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2590 "A String",
2591 ],
2592 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2593 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2594 "A String",
2595 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002596 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002597 "allowCredentials": 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.
2598 # Default is false.
2599 "disabled": 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.
2600 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
2601 "A String",
2602 ],
2603 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
2604 "A String",
2605 ],
2606 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002607 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
2608 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002609 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2610 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2611 },
2612 "weightedBackendServices": [ # 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.
2613 # 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.
2614 { # 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
2615 "headerAction": { # 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.
2616 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2617 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2618 "A String",
2619 ],
2620 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
2621 "A String",
2622 ],
2623 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2624 { # Specification determining how headers are added to requests or responses.
2625 "headerName": "A String", # The name of the header.
2626 "headerValue": "A String", # The value of the header to add.
2627 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2628 # The default value is false.
2629 },
2630 ],
2631 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2632 { # Specification determining how headers are added to requests or responses.
2633 "headerName": "A String", # The name of the header.
2634 "headerValue": "A String", # The value of the header to add.
2635 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2636 # The default value is false.
2637 },
2638 ],
2639 },
2640 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2641 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
2642 # The value must be between 0 and 1000
2643 "backendService": "A String", # 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.
2644 },
2645 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002646 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002647 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
2648 # The value must be between 1 and 255 characters.
2649 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
2650 # The value must be between 1 and 1024 characters.
2651 },
2652 },
2653 },
2654 ],
2655 "headerAction": { # 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.
2656 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
2657 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2658 "A String",
2659 ],
2660 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
2661 "A String",
2662 ],
2663 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2664 { # Specification determining how headers are added to requests or responses.
2665 "headerName": "A String", # The name of the header.
2666 "headerValue": "A String", # The value of the header to add.
2667 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2668 # The default value is false.
2669 },
2670 ],
2671 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2672 { # Specification determining how headers are added to requests or responses.
2673 "headerName": "A String", # The name of the header.
2674 "headerValue": "A String", # The value of the header to add.
2675 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2676 # The default value is false.
2677 },
2678 ],
2679 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002680 "defaultUrlRedirect": { # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002681 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
2682 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07002683 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002684 # The value must be between 1 and 1024 characters.
2685 "stripQuery": 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.
2686 # The default is set to false.
2687 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
2688 # Supported values are:
2689 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2690 # - FOUND, which corresponds to 302.
2691 # - SEE_OTHER which corresponds to 303.
2692 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2693 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2694 "httpsRedirect": 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.
2695 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2696 # The default is set to false.
2697 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07002698 # 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.
2699 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002700 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
2701 # The value must be between 1 and 255 characters.
2702 },
2703 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
2704 },
2705 ],
2706 "headerAction": { # 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.
2707 # The headerAction specified here take effect after headerAction specified under pathMatcher.
2708 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2709 "A String",
2710 ],
2711 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
2712 "A String",
2713 ],
2714 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2715 { # Specification determining how headers are added to requests or responses.
2716 "headerName": "A String", # The name of the header.
2717 "headerValue": "A String", # The value of the header to add.
2718 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2719 # The default value is false.
2720 },
2721 ],
2722 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2723 { # Specification determining how headers are added to requests or responses.
2724 "headerName": "A String", # The name of the header.
2725 "headerValue": "A String", # The value of the header to add.
2726 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2727 # The default value is false.
2728 },
2729 ],
2730 },
2731 "region": "A String", # [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.
2732 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
2733 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
2734 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07002735 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002736 # The value must be between 1 and 1024 characters.
2737 "stripQuery": 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.
2738 # The default is set to false.
2739 "redirectResponseCode": "A String", # 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 "httpsRedirect": 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.
2747 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2748 # The default is set to false.
2749 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07002750 # 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.
2751 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002752 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
2753 # The value must be between 1 and 255 characters.
2754 },
2755 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2756 "hostRules": [ # The list of HostRules to use against the URL.
2757 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
Dan O'Mearadd494642020-05-01 07:42:23 -07002758 "hosts": [ # 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 ..
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002759 "A String",
2760 ],
2761 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
2762 "pathMatcher": "A String", # The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion.
2763 },
2764 ],
2765 "name": "A String", # 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.
2766 },
2767 ],
2768 "warning": { # [Output Only] Informational warning message.
2769 "message": "A String", # [Output Only] A human-readable description of the warning code.
2770 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2771 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2772 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2773 {
2774 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2775 "key": "A String", # [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 },
2777 ],
2778 },
2779 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
2780 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
2781 }</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:
2793 A request object that you can call 'execute()' on to request the next
2794 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.
2810 #
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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002822 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
2823 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
2824 "defaultRouteAction": { # 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.
2825 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
2826 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
2827 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
2828 },
2829 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2830 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
Dan O'Mearadd494642020-05-01 07:42:23 -07002831 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002832 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2833 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2834 },
2835 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2836 # - 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.
2837 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2838 # -
2839 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2840 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2841 # - 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.
2842 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2843 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2844 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2845 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2846 "A String",
2847 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002848 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002849 },
2850 "faultInjectionPolicy": { # 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.
2851 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2852 "delay": { # 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.
2853 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2854 # The value must be between 0.0 and 100.0 inclusive.
2855 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
2856 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2857 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2858 },
2859 },
2860 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
2861 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2862 # The value must be between 0.0 and 100.0 inclusive.
2863 "httpStatus": 42, # The HTTP status code used to abort the request.
2864 # The value must be between 200 and 599 inclusive.
2865 },
2866 },
2867 "corsPolicy": { # 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
2868 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2869 "A String",
2870 ],
2871 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2872 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2873 "A String",
2874 ],
2875 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2876 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2877 "A String",
2878 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002879 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002880 "allowCredentials": 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.
2881 # Default is false.
2882 "disabled": 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.
2883 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
2884 "A String",
2885 ],
2886 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
2887 "A String",
2888 ],
2889 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002890 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
2891 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002892 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2893 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2894 },
2895 "weightedBackendServices": [ # 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.
2896 # 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.
2897 { # 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
2898 "headerAction": { # 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.
2899 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2900 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2901 "A String",
2902 ],
2903 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
2904 "A String",
2905 ],
2906 "requestHeadersToAdd": [ # 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 "headerName": "A String", # The name of the header.
2909 "headerValue": "A String", # The value of the header to add.
2910 "replace": True or False, # If false, headerValue is appended to any 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 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2915 { # Specification determining how headers are added to requests or responses.
2916 "headerName": "A String", # The name of the header.
2917 "headerValue": "A String", # The value of the header to add.
2918 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2919 # The default value is false.
2920 },
2921 ],
2922 },
2923 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2924 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
2925 # The value must be between 0 and 1000
2926 "backendService": "A String", # 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.
2927 },
2928 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002929 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002930 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
2931 # The value must be between 1 and 255 characters.
2932 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
2933 # The value must be between 1 and 1024 characters.
2934 },
2935 },
2936 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
2937 "defaultService": "A String", # 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.
2938 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
2939 "tests": [ # 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.
2940 { # Message for the expected URL mappings.
2941 "description": "A String", # Description of this test case.
2942 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
2943 "expectedUrlRedirect": "A String", # The expected URL that should be redirected to for the host and path being tested.
2944 "host": "A String", # Host portion of the URL.
2945 "path": "A String", # Path portion of the URL.
2946 "backendServiceWeight": 42, # The weight to use for the supplied host and path when using advanced routing rules that involve traffic splitting.
2947 },
2948 ],
2949 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2950 "fingerprint": "A String", # 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.
2951 #
2952 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
2953 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
2954 { # 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.
2955 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
2956 "defaultRouteAction": { # 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.
2957 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
2958 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
2959 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
2960 },
2961 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2962 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
Dan O'Mearadd494642020-05-01 07:42:23 -07002963 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002964 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2965 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2966 },
2967 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2968 # - 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.
2969 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2970 # -
2971 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2972 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2973 # - 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.
2974 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2975 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2976 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2977 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2978 "A String",
2979 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002980 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002981 },
2982 "faultInjectionPolicy": { # 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.
2983 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2984 "delay": { # 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.
2985 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2986 # The value must be between 0.0 and 100.0 inclusive.
2987 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
2988 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2989 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2990 },
2991 },
2992 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
2993 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2994 # The value must be between 0.0 and 100.0 inclusive.
2995 "httpStatus": 42, # The HTTP status code used to abort the request.
2996 # The value must be between 200 and 599 inclusive.
2997 },
2998 },
2999 "corsPolicy": { # 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
3000 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3001 "A String",
3002 ],
3003 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3004 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3005 "A String",
3006 ],
3007 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3008 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3009 "A String",
3010 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003011 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003012 "allowCredentials": 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.
3013 # Default is false.
3014 "disabled": 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.
3015 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3016 "A String",
3017 ],
3018 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3019 "A String",
3020 ],
3021 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003022 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
3023 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003024 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3025 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3026 },
3027 "weightedBackendServices": [ # 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.
3028 # 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.
3029 { # 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
3030 "headerAction": { # 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.
3031 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3032 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3033 "A String",
3034 ],
3035 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3036 "A String",
3037 ],
3038 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3039 { # Specification determining how headers are added to requests or responses.
3040 "headerName": "A String", # The name of the header.
3041 "headerValue": "A String", # The value of the header to add.
3042 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3043 # The default value is false.
3044 },
3045 ],
3046 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3047 { # Specification determining how headers are added to requests or responses.
3048 "headerName": "A String", # The name of the header.
3049 "headerValue": "A String", # The value of the header to add.
3050 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3051 # The default value is false.
3052 },
3053 ],
3054 },
3055 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3056 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
3057 # The value must be between 0 and 1000
3058 "backendService": "A String", # 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.
3059 },
3060 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003061 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003062 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3063 # The value must be between 1 and 255 characters.
3064 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
3065 # The value must be between 1 and 1024 characters.
3066 },
3067 },
3068 "defaultService": "A String", # 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:
3069 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
3070 # - compute/v1/projects/project/global/backendServices/backendService
3071 # - 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.
3072 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3073 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
3074 # - compute.backendBuckets.use
3075 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07003076 "routeRules": [ # 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.
3077 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003078 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
Dan O'Mearadd494642020-05-01 07:42:23 -07003079 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
3080 # If urlRedirect is specified, service or routeAction must not be set.
3081 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
3082 # 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.
3083 # The value must be between 1 and 1024 characters.
3084 "stripQuery": 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.
3085 # The default is set to false.
3086 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3087 # Supported values are:
3088 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3089 # - FOUND, which corresponds to 302.
3090 # - SEE_OTHER which corresponds to 303.
3091 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3092 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3093 "httpsRedirect": 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.
3094 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3095 # The default is set to false.
3096 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
3097 # 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.
3098 # The value must be between 1 and 1024 characters.
3099 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3100 # The value must be between 1 and 255 characters.
3101 },
3102 "description": "A String", # The short description conveying the intent of this routeRule.
3103 # The description can have a maximum length of 1024 characters.
3104 "service": "A String", # 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.
3105 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3106 "httpFilterConfigs": [ # 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.
3107 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
3108 "configTypeUrl": "A String", # 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
3109 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
3110 "config": "A String", # 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
3111 },
3112 ],
3113 "httpFilterMetadata": [ # 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.
3114 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
3115 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
3116 "configTypeUrl": "A String", # 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
3117 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
3118 "config": "A String", # 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
3119 },
3120 ],
3121 "priority": 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.
3122 # 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.
3123 # 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.
3124 "routeAction": { # 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.
3125 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3126 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
3127 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3128 },
3129 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3130 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
3131 # 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.
3132 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3133 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3134 },
3135 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3136 # - 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.
3137 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3138 # -
3139 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3140 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3141 # - 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.
3142 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3143 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3144 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3145 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3146 "A String",
3147 ],
3148 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3149 },
3150 "faultInjectionPolicy": { # 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.
3151 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3152 "delay": { # 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.
3153 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3154 # The value must be between 0.0 and 100.0 inclusive.
3155 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
3156 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3157 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3158 },
3159 },
3160 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
3161 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3162 # The value must be between 0.0 and 100.0 inclusive.
3163 "httpStatus": 42, # The HTTP status code used to abort the request.
3164 # The value must be between 200 and 599 inclusive.
3165 },
3166 },
3167 "corsPolicy": { # 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
3168 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3169 "A String",
3170 ],
3171 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3172 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3173 "A String",
3174 ],
3175 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3176 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3177 "A String",
3178 ],
3179 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
3180 "allowCredentials": 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.
3181 # Default is false.
3182 "disabled": 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.
3183 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3184 "A String",
3185 ],
3186 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3187 "A String",
3188 ],
3189 },
3190 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
3191 # If not specified, will use the largest timeout among all backend services associated with the route.
3192 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3193 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3194 },
3195 "weightedBackendServices": [ # 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.
3196 # 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.
3197 { # 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
3198 "headerAction": { # 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.
3199 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3200 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3201 "A String",
3202 ],
3203 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3204 "A String",
3205 ],
3206 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3207 { # Specification determining how headers are added to requests or responses.
3208 "headerName": "A String", # The name of the header.
3209 "headerValue": "A String", # The value of the header to add.
3210 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3211 # The default value is false.
3212 },
3213 ],
3214 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3215 { # Specification determining how headers are added to requests or responses.
3216 "headerName": "A String", # The name of the header.
3217 "headerValue": "A String", # The value of the header to add.
3218 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3219 # The default value is false.
3220 },
3221 ],
3222 },
3223 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3224 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
3225 # The value must be between 0 and 1000
3226 "backendService": "A String", # 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.
3227 },
3228 ],
3229 "urlRewrite": { # 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.
3230 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3231 # The value must be between 1 and 255 characters.
3232 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
3233 # The value must be between 1 and 1024 characters.
3234 },
3235 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003236 "headerAction": { # 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.
3237 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
3238 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3239 "A String",
3240 ],
3241 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3242 "A String",
3243 ],
3244 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3245 { # Specification determining how headers are added to requests or responses.
3246 "headerName": "A String", # The name of the header.
3247 "headerValue": "A String", # The value of the header to add.
3248 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3249 # The default value is false.
3250 },
3251 ],
3252 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3253 { # Specification determining how headers are added to requests or responses.
3254 "headerName": "A String", # The name of the header.
3255 "headerValue": "A String", # The value of the header to add.
3256 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3257 # The default value is false.
3258 },
3259 ],
3260 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003261 "matchRules": [
3262 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
Dan O'Mearadd494642020-05-01 07:42:23 -07003263 "regexMatch": "A String", # 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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003264 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07003265 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003266 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
3267 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -07003268 "regexMatch": "A String", # 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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003269 # 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's port specifier.
3270 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07003271 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003272 "invertMatch": 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.
3273 # The default setting is false.
3274 "headerName": "A String", # The name of the HTTP header to match.
3275 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
3276 # For matching a request's method, use the headerName ":method".
3277 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
3278 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3279 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
3280 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3281 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
3282 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07003283 "presentMatch": True or False, # A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003284 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3285 "rangeMatch": { # 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.
3286 # For example for a range [-5, 0]
3287 # - -3 will match.
3288 # - 0 will not match.
3289 # - 0.25 will not match.
3290 # - -3someString will not match.
3291 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07003292 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003293 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
3294 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
3295 },
3296 },
3297 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003298 "fullPathMatch": "A String", # 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.
3299 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003300 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07003301 "prefixMatch": "A String", # For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003302 # The value must be between 1 and 1024 characters.
3303 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3304 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
3305 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -07003306 # ignoreCase must not be used with regexMatch.
3307 "metadataFilters": [ # 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.
3308 # 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.
3309 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003310 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -07003311 { # 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.
3312 # 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.
3313 # 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="https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/base.proto#envoy-api-msg-core-node" Node metadata of their XDS requests to loadbalancers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003314 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
3315 # Supported values are:
3316 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
3317 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
3318 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
3319 # This list must not be empty and can have at the most 64 entries.
3320 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
3321 "name": "A String", # Name of metadata label.
3322 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
3323 "value": "A String", # The value of the label must match the specified value.
3324 # value can have a maximum length of 1024 characters.
3325 },
3326 ],
3327 },
3328 ],
3329 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
3330 { # HttpRouteRuleMatch criteria for a request's query parameter.
3331 "presentMatch": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07003332 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003333 "regexMatch": "A String", # 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
Dan O'Mearadd494642020-05-01 07:42:23 -07003334 # Only one of presentMatch, exactMatch or regexMatch must be set.
3335 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003336 "name": "A String", # 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.
3337 "exactMatch": "A String", # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
Dan O'Mearadd494642020-05-01 07:42:23 -07003338 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003339 },
3340 ],
3341 },
3342 ],
3343 },
3344 ],
3345 "pathRules": [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.
3346 # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07003347 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003348 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
3349 "paths": [ # 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.
3350 "A String",
3351 ],
3352 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
3353 # If urlRedirect is specified, service or routeAction must not be set.
3354 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07003355 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003356 # The value must be between 1 and 1024 characters.
3357 "stripQuery": 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.
3358 # The default is set to false.
3359 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3360 # Supported values are:
3361 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3362 # - FOUND, which corresponds to 302.
3363 # - SEE_OTHER which corresponds to 303.
3364 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3365 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3366 "httpsRedirect": 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.
3367 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3368 # The default is set to false.
3369 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07003370 # 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.
3371 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003372 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3373 # The value must be between 1 and 255 characters.
3374 },
3375 "service": "A String", # 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.
3376 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3377 "routeAction": { # 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.
3378 # Only one of routeAction or urlRedirect must be set.
3379 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
3380 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3381 },
3382 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3383 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
Dan O'Mearadd494642020-05-01 07:42:23 -07003384 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003385 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3386 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3387 },
3388 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3389 # - 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.
3390 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3391 # -
3392 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3393 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3394 # - 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.
3395 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3396 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3397 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3398 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3399 "A String",
3400 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003401 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003402 },
3403 "faultInjectionPolicy": { # 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.
3404 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3405 "delay": { # 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.
3406 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3407 # The value must be between 0.0 and 100.0 inclusive.
3408 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
3409 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3410 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3411 },
3412 },
3413 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
3414 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3415 # The value must be between 0.0 and 100.0 inclusive.
3416 "httpStatus": 42, # The HTTP status code used to abort the request.
3417 # The value must be between 200 and 599 inclusive.
3418 },
3419 },
3420 "corsPolicy": { # 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
3421 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3422 "A String",
3423 ],
3424 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3425 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3426 "A String",
3427 ],
3428 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3429 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3430 "A String",
3431 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003432 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003433 "allowCredentials": 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.
3434 # Default is false.
3435 "disabled": 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.
3436 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3437 "A String",
3438 ],
3439 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3440 "A String",
3441 ],
3442 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003443 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
3444 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003445 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3446 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3447 },
3448 "weightedBackendServices": [ # 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.
3449 # 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.
3450 { # 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
3451 "headerAction": { # 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.
3452 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3453 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3454 "A String",
3455 ],
3456 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3457 "A String",
3458 ],
3459 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3460 { # Specification determining how headers are added to requests or responses.
3461 "headerName": "A String", # The name of the header.
3462 "headerValue": "A String", # The value of the header to add.
3463 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3464 # The default value is false.
3465 },
3466 ],
3467 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3468 { # Specification determining how headers are added to requests or responses.
3469 "headerName": "A String", # The name of the header.
3470 "headerValue": "A String", # The value of the header to add.
3471 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3472 # The default value is false.
3473 },
3474 ],
3475 },
3476 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3477 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
3478 # The value must be between 0 and 1000
3479 "backendService": "A String", # 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.
3480 },
3481 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003482 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003483 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3484 # The value must be between 1 and 255 characters.
3485 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
3486 # The value must be between 1 and 1024 characters.
3487 },
3488 },
3489 },
3490 ],
3491 "headerAction": { # 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.
3492 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
3493 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3494 "A String",
3495 ],
3496 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3497 "A String",
3498 ],
3499 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3500 { # Specification determining how headers are added to requests or responses.
3501 "headerName": "A String", # The name of the header.
3502 "headerValue": "A String", # The value of the header to add.
3503 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3504 # The default value is false.
3505 },
3506 ],
3507 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3508 { # Specification determining how headers are added to requests or responses.
3509 "headerName": "A String", # The name of the header.
3510 "headerValue": "A String", # The value of the header to add.
3511 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3512 # The default value is false.
3513 },
3514 ],
3515 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003516 "defaultUrlRedirect": { # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003517 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
3518 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07003519 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003520 # The value must be between 1 and 1024 characters.
3521 "stripQuery": 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.
3522 # The default is set to false.
3523 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3524 # Supported values are:
3525 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3526 # - FOUND, which corresponds to 302.
3527 # - SEE_OTHER which corresponds to 303.
3528 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3529 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3530 "httpsRedirect": 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.
3531 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3532 # The default is set to false.
3533 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07003534 # 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.
3535 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003536 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3537 # The value must be between 1 and 255 characters.
3538 },
3539 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
3540 },
3541 ],
3542 "headerAction": { # 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.
3543 # The headerAction specified here take effect after headerAction specified under pathMatcher.
3544 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3545 "A String",
3546 ],
3547 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3548 "A String",
3549 ],
3550 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3551 { # Specification determining how headers are added to requests or responses.
3552 "headerName": "A String", # The name of the header.
3553 "headerValue": "A String", # The value of the header to add.
3554 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3555 # The default value is false.
3556 },
3557 ],
3558 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3559 { # Specification determining how headers are added to requests or responses.
3560 "headerName": "A String", # The name of the header.
3561 "headerValue": "A String", # The value of the header to add.
3562 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3563 # The default value is false.
3564 },
3565 ],
3566 },
3567 "region": "A String", # [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.
3568 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
3569 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
3570 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07003571 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003572 # The value must be between 1 and 1024 characters.
3573 "stripQuery": 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.
3574 # The default is set to false.
3575 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3576 # Supported values are:
3577 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3578 # - FOUND, which corresponds to 302.
3579 # - SEE_OTHER which corresponds to 303.
3580 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3581 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3582 "httpsRedirect": 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.
3583 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3584 # The default is set to false.
3585 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07003586 # 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.
3587 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003588 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3589 # The value must be between 1 and 255 characters.
3590 },
3591 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3592 "hostRules": [ # The list of HostRules to use against the URL.
3593 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
Dan O'Mearadd494642020-05-01 07:42:23 -07003594 "hosts": [ # 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 ..
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003595 "A String",
3596 ],
3597 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
3598 "pathMatcher": "A String", # The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion.
3599 },
3600 ],
3601 "name": "A String", # 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.
3602 }
3603
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 Kim715bd7f2019-06-14 16:50:42 -07003623 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3624 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3625 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07003626 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003627 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
3628 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07003629 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3630 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003631 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07003632 "httpErrorStatusCode": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003633 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003634 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003635 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3636 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3637 {
3638 "message": "A String", # [Output Only] A human-readable description of the warning code.
3639 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
3640 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3641 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3642 {
3643 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3644 "key": "A String", # [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).
3645 },
3646 ],
3647 },
3648 ],
3649 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07003650 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003651 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07003652 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3653 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003654 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3655 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3656 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3657 {
3658 "message": "A String", # [Output Only] An optional, human-readable error message.
3659 "code": "A String", # [Output Only] The error type identifier for this error.
3660 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3661 },
3662 ],
3663 },
3664 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3665 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3666 "targetLink": "A String", # [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.
3667 }</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{
3682 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
3683 "A String",
3684 ],
3685 }
3686
3687
3688Returns:
3689 An object of the form:
3690
3691 {
3692 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
3693 "A String",
3694 ],
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.
3710 #
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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003722 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
3723 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
3724 "defaultRouteAction": { # 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.
3725 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
3726 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
3727 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3728 },
3729 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3730 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
Dan O'Mearadd494642020-05-01 07:42:23 -07003731 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003732 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3733 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3734 },
3735 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3736 # - 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.
3737 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3738 # -
3739 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3740 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3741 # - 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.
3742 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3743 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3744 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3745 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3746 "A String",
3747 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003748 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003749 },
3750 "faultInjectionPolicy": { # 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.
3751 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3752 "delay": { # 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.
3753 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3754 # The value must be between 0.0 and 100.0 inclusive.
3755 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
3756 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3757 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3758 },
3759 },
3760 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
3761 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3762 # The value must be between 0.0 and 100.0 inclusive.
3763 "httpStatus": 42, # The HTTP status code used to abort the request.
3764 # The value must be between 200 and 599 inclusive.
3765 },
3766 },
3767 "corsPolicy": { # 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
3768 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3769 "A String",
3770 ],
3771 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3772 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3773 "A String",
3774 ],
3775 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3776 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3777 "A String",
3778 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003779 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003780 "allowCredentials": 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.
3781 # Default is false.
3782 "disabled": 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.
3783 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3784 "A String",
3785 ],
3786 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3787 "A String",
3788 ],
3789 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003790 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
3791 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003792 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3793 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3794 },
3795 "weightedBackendServices": [ # 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.
3796 # 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.
3797 { # 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
3798 "headerAction": { # 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.
3799 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3800 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3801 "A String",
3802 ],
3803 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3804 "A String",
3805 ],
3806 "requestHeadersToAdd": [ # 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 "headerName": "A String", # The name of the header.
3809 "headerValue": "A String", # The value of the header to add.
3810 "replace": True or False, # If false, headerValue is appended to any 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 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3815 { # Specification determining how headers are added to requests or responses.
3816 "headerName": "A String", # The name of the header.
3817 "headerValue": "A String", # The value of the header to add.
3818 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3819 # The default value is false.
3820 },
3821 ],
3822 },
3823 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3824 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
3825 # The value must be between 0 and 1000
3826 "backendService": "A String", # 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.
3827 },
3828 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003829 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003830 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3831 # The value must be between 1 and 255 characters.
3832 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
3833 # The value must be between 1 and 1024 characters.
3834 },
3835 },
3836 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
3837 "defaultService": "A String", # 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.
3838 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3839 "tests": [ # 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.
3840 { # Message for the expected URL mappings.
3841 "description": "A String", # Description of this test case.
3842 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
3843 "expectedUrlRedirect": "A String", # The expected URL that should be redirected to for the host and path being tested.
3844 "host": "A String", # Host portion of the URL.
3845 "path": "A String", # Path portion of the URL.
3846 "backendServiceWeight": 42, # The weight to use for the supplied host and path when using advanced routing rules that involve traffic splitting.
3847 },
3848 ],
3849 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3850 "fingerprint": "A String", # 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.
3851 #
3852 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
3853 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
3854 { # 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.
3855 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
3856 "defaultRouteAction": { # 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.
3857 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
3858 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
3859 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3860 },
3861 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3862 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
Dan O'Mearadd494642020-05-01 07:42:23 -07003863 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003864 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3865 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3866 },
3867 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3868 # - 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.
3869 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3870 # -
3871 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3872 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3873 # - 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.
3874 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3875 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3876 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3877 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3878 "A String",
3879 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003880 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003881 },
3882 "faultInjectionPolicy": { # 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.
3883 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3884 "delay": { # 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.
3885 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3886 # The value must be between 0.0 and 100.0 inclusive.
3887 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
3888 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3889 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3890 },
3891 },
3892 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
3893 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3894 # The value must be between 0.0 and 100.0 inclusive.
3895 "httpStatus": 42, # The HTTP status code used to abort the request.
3896 # The value must be between 200 and 599 inclusive.
3897 },
3898 },
3899 "corsPolicy": { # 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
3900 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3901 "A String",
3902 ],
3903 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3904 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3905 "A String",
3906 ],
3907 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3908 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3909 "A String",
3910 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003911 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003912 "allowCredentials": 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.
3913 # Default is false.
3914 "disabled": 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.
3915 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3916 "A String",
3917 ],
3918 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3919 "A String",
3920 ],
3921 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003922 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
3923 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003924 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
3925 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
3926 },
3927 "weightedBackendServices": [ # 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.
3928 # 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.
3929 { # 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
3930 "headerAction": { # 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.
3931 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3932 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3933 "A String",
3934 ],
3935 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
3936 "A String",
3937 ],
3938 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3939 { # Specification determining how headers are added to requests or responses.
3940 "headerName": "A String", # The name of the header.
3941 "headerValue": "A String", # The value of the header to add.
3942 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3943 # The default value is false.
3944 },
3945 ],
3946 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3947 { # Specification determining how headers are added to requests or responses.
3948 "headerName": "A String", # The name of the header.
3949 "headerValue": "A String", # The value of the header to add.
3950 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3951 # The default value is false.
3952 },
3953 ],
3954 },
3955 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3956 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
3957 # The value must be between 0 and 1000
3958 "backendService": "A String", # 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.
3959 },
3960 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003961 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003962 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3963 # The value must be between 1 and 255 characters.
3964 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
3965 # The value must be between 1 and 1024 characters.
3966 },
3967 },
3968 "defaultService": "A String", # 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:
3969 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
3970 # - compute/v1/projects/project/global/backendServices/backendService
3971 # - 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.
3972 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3973 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
3974 # - compute.backendBuckets.use
3975 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07003976 "routeRules": [ # 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.
3977 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003978 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
Dan O'Mearadd494642020-05-01 07:42:23 -07003979 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
3980 # If urlRedirect is specified, service or routeAction must not be set.
3981 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
3982 # 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.
3983 # The value must be between 1 and 1024 characters.
3984 "stripQuery": 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.
3985 # The default is set to false.
3986 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3987 # Supported values are:
3988 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3989 # - FOUND, which corresponds to 302.
3990 # - SEE_OTHER which corresponds to 303.
3991 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3992 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3993 "httpsRedirect": 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.
3994 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3995 # The default is set to false.
3996 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
3997 # 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.
3998 # The value must be between 1 and 1024 characters.
3999 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
4000 # The value must be between 1 and 255 characters.
4001 },
4002 "description": "A String", # The short description conveying the intent of this routeRule.
4003 # The description can have a maximum length of 1024 characters.
4004 "service": "A String", # 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.
4005 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4006 "httpFilterConfigs": [ # 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.
4007 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
4008 "configTypeUrl": "A String", # 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
4009 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
4010 "config": "A String", # 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
4011 },
4012 ],
4013 "httpFilterMetadata": [ # 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.
4014 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
4015 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
4016 "configTypeUrl": "A String", # 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
4017 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
4018 "config": "A String", # 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
4019 },
4020 ],
4021 "priority": 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.
4022 # 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.
4023 # 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.
4024 "routeAction": { # 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.
4025 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4026 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
4027 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
4028 },
4029 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4030 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
4031 # 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.
4032 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4033 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4034 },
4035 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4036 # - 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.
4037 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4038 # -
4039 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4040 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4041 # - 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.
4042 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4043 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4044 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4045 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4046 "A String",
4047 ],
4048 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4049 },
4050 "faultInjectionPolicy": { # 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.
4051 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4052 "delay": { # 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.
4053 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4054 # The value must be between 0.0 and 100.0 inclusive.
4055 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
4056 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4057 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4058 },
4059 },
4060 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
4061 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4062 # The value must be between 0.0 and 100.0 inclusive.
4063 "httpStatus": 42, # The HTTP status code used to abort the request.
4064 # The value must be between 200 and 599 inclusive.
4065 },
4066 },
4067 "corsPolicy": { # 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
4068 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
4069 "A String",
4070 ],
4071 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
4072 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4073 "A String",
4074 ],
4075 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4076 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4077 "A String",
4078 ],
4079 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
4080 "allowCredentials": 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.
4081 # Default is false.
4082 "disabled": 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.
4083 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
4084 "A String",
4085 ],
4086 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
4087 "A String",
4088 ],
4089 },
4090 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
4091 # If not specified, will use the largest timeout among all backend services associated with the route.
4092 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4093 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4094 },
4095 "weightedBackendServices": [ # 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.
4096 # 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.
4097 { # 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
4098 "headerAction": { # 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.
4099 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4100 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4101 "A String",
4102 ],
4103 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
4104 "A String",
4105 ],
4106 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4107 { # Specification determining how headers are added to requests or responses.
4108 "headerName": "A String", # The name of the header.
4109 "headerValue": "A String", # The value of the header to add.
4110 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4111 # The default value is false.
4112 },
4113 ],
4114 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4115 { # Specification determining how headers are added to requests or responses.
4116 "headerName": "A String", # The name of the header.
4117 "headerValue": "A String", # The value of the header to add.
4118 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4119 # The default value is false.
4120 },
4121 ],
4122 },
4123 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4124 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
4125 # The value must be between 0 and 1000
4126 "backendService": "A String", # 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.
4127 },
4128 ],
4129 "urlRewrite": { # 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.
4130 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
4131 # The value must be between 1 and 255 characters.
4132 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
4133 # The value must be between 1 and 1024 characters.
4134 },
4135 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004136 "headerAction": { # 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.
4137 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
4138 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4139 "A String",
4140 ],
4141 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
4142 "A String",
4143 ],
4144 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4145 { # Specification determining how headers are added to requests or responses.
4146 "headerName": "A String", # The name of the header.
4147 "headerValue": "A String", # The value of the header to add.
4148 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4149 # The default value is false.
4150 },
4151 ],
4152 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4153 { # Specification determining how headers are added to requests or responses.
4154 "headerName": "A String", # The name of the header.
4155 "headerValue": "A String", # The value of the header to add.
4156 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4157 # The default value is false.
4158 },
4159 ],
4160 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004161 "matchRules": [
4162 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
Dan O'Mearadd494642020-05-01 07:42:23 -07004163 "regexMatch": "A String", # 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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004164 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07004165 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004166 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
4167 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -07004168 "regexMatch": "A String", # 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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004169 # 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's port specifier.
4170 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07004171 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004172 "invertMatch": 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.
4173 # The default setting is false.
4174 "headerName": "A String", # The name of the HTTP header to match.
4175 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
4176 # For matching a request's method, use the headerName ":method".
4177 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
4178 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4179 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
4180 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4181 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
4182 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07004183 "presentMatch": True or False, # A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004184 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4185 "rangeMatch": { # 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.
4186 # For example for a range [-5, 0]
4187 # - -3 will match.
4188 # - 0 will not match.
4189 # - 0.25 will not match.
4190 # - -3someString will not match.
4191 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07004192 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004193 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
4194 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
4195 },
4196 },
4197 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004198 "fullPathMatch": "A String", # 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.
4199 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004200 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07004201 "prefixMatch": "A String", # For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004202 # The value must be between 1 and 1024 characters.
4203 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4204 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
4205 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -07004206 # ignoreCase must not be used with regexMatch.
4207 "metadataFilters": [ # 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.
4208 # 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.
4209 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004210 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -07004211 { # 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.
4212 # 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.
4213 # 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="https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/base.proto#envoy-api-msg-core-node" Node metadata of their XDS requests to loadbalancers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004214 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
4215 # Supported values are:
4216 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
4217 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
4218 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
4219 # This list must not be empty and can have at the most 64 entries.
4220 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
4221 "name": "A String", # Name of metadata label.
4222 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
4223 "value": "A String", # The value of the label must match the specified value.
4224 # value can have a maximum length of 1024 characters.
4225 },
4226 ],
4227 },
4228 ],
4229 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
4230 { # HttpRouteRuleMatch criteria for a request's query parameter.
4231 "presentMatch": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07004232 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004233 "regexMatch": "A String", # 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
Dan O'Mearadd494642020-05-01 07:42:23 -07004234 # Only one of presentMatch, exactMatch or regexMatch must be set.
4235 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004236 "name": "A String", # 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.
4237 "exactMatch": "A String", # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
Dan O'Mearadd494642020-05-01 07:42:23 -07004238 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004239 },
4240 ],
4241 },
4242 ],
4243 },
4244 ],
4245 "pathRules": [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.
4246 # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07004247 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004248 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
4249 "paths": [ # 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.
4250 "A String",
4251 ],
4252 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
4253 # If urlRedirect is specified, service or routeAction must not be set.
4254 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07004255 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004256 # The value must be between 1 and 1024 characters.
4257 "stripQuery": 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.
4258 # The default is set to false.
4259 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
4260 # Supported values are:
4261 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4262 # - FOUND, which corresponds to 302.
4263 # - SEE_OTHER which corresponds to 303.
4264 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4265 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4266 "httpsRedirect": 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.
4267 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4268 # The default is set to false.
4269 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07004270 # 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.
4271 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004272 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
4273 # The value must be between 1 and 255 characters.
4274 },
4275 "service": "A String", # 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.
4276 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4277 "routeAction": { # 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.
4278 # Only one of routeAction or urlRedirect must be set.
4279 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
4280 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
4281 },
4282 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4283 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
Dan O'Mearadd494642020-05-01 07:42:23 -07004284 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004285 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4286 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4287 },
4288 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4289 # - 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.
4290 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4291 # -
4292 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4293 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4294 # - 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.
4295 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4296 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4297 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4298 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4299 "A String",
4300 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004301 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004302 },
4303 "faultInjectionPolicy": { # 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.
4304 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4305 "delay": { # 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.
4306 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4307 # The value must be between 0.0 and 100.0 inclusive.
4308 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
4309 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4310 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4311 },
4312 },
4313 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
4314 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4315 # The value must be between 0.0 and 100.0 inclusive.
4316 "httpStatus": 42, # The HTTP status code used to abort the request.
4317 # The value must be between 200 and 599 inclusive.
4318 },
4319 },
4320 "corsPolicy": { # 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
4321 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
4322 "A String",
4323 ],
4324 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
4325 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4326 "A String",
4327 ],
4328 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4329 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4330 "A String",
4331 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004332 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004333 "allowCredentials": 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.
4334 # Default is false.
4335 "disabled": 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.
4336 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
4337 "A String",
4338 ],
4339 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
4340 "A String",
4341 ],
4342 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004343 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
4344 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004345 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4346 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4347 },
4348 "weightedBackendServices": [ # 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.
4349 # 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.
4350 { # 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
4351 "headerAction": { # 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.
4352 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4353 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4354 "A String",
4355 ],
4356 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
4357 "A String",
4358 ],
4359 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4360 { # Specification determining how headers are added to requests or responses.
4361 "headerName": "A String", # The name of the header.
4362 "headerValue": "A String", # The value of the header to add.
4363 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4364 # The default value is false.
4365 },
4366 ],
4367 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4368 { # Specification determining how headers are added to requests or responses.
4369 "headerName": "A String", # The name of the header.
4370 "headerValue": "A String", # The value of the header to add.
4371 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4372 # The default value is false.
4373 },
4374 ],
4375 },
4376 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4377 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
4378 # The value must be between 0 and 1000
4379 "backendService": "A String", # 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.
4380 },
4381 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004382 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004383 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
4384 # The value must be between 1 and 255 characters.
4385 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
4386 # The value must be between 1 and 1024 characters.
4387 },
4388 },
4389 },
4390 ],
4391 "headerAction": { # 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.
4392 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
4393 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4394 "A String",
4395 ],
4396 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
4397 "A String",
4398 ],
4399 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4400 { # Specification determining how headers are added to requests or responses.
4401 "headerName": "A String", # The name of the header.
4402 "headerValue": "A String", # The value of the header to add.
4403 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4404 # The default value is false.
4405 },
4406 ],
4407 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4408 { # Specification determining how headers are added to requests or responses.
4409 "headerName": "A String", # The name of the header.
4410 "headerValue": "A String", # The value of the header to add.
4411 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4412 # The default value is false.
4413 },
4414 ],
4415 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004416 "defaultUrlRedirect": { # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004417 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
4418 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07004419 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004420 # The value must be between 1 and 1024 characters.
4421 "stripQuery": 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.
4422 # The default is set to false.
4423 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
4424 # Supported values are:
4425 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4426 # - FOUND, which corresponds to 302.
4427 # - SEE_OTHER which corresponds to 303.
4428 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4429 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4430 "httpsRedirect": 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.
4431 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4432 # The default is set to false.
4433 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07004434 # 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.
4435 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004436 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
4437 # The value must be between 1 and 255 characters.
4438 },
4439 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
4440 },
4441 ],
4442 "headerAction": { # 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.
4443 # The headerAction specified here take effect after headerAction specified under pathMatcher.
4444 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4445 "A String",
4446 ],
4447 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
4448 "A String",
4449 ],
4450 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4451 { # Specification determining how headers are added to requests or responses.
4452 "headerName": "A String", # The name of the header.
4453 "headerValue": "A String", # The value of the header to add.
4454 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4455 # The default value is false.
4456 },
4457 ],
4458 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4459 { # Specification determining how headers are added to requests or responses.
4460 "headerName": "A String", # The name of the header.
4461 "headerValue": "A String", # The value of the header to add.
4462 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4463 # The default value is false.
4464 },
4465 ],
4466 },
4467 "region": "A String", # [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.
4468 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
4469 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
4470 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07004471 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004472 # The value must be between 1 and 1024 characters.
4473 "stripQuery": 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.
4474 # The default is set to false.
4475 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
4476 # Supported values are:
4477 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4478 # - FOUND, which corresponds to 302.
4479 # - SEE_OTHER which corresponds to 303.
4480 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4481 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4482 "httpsRedirect": 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.
4483 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4484 # The default is set to false.
4485 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07004486 # 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.
4487 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004488 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
4489 # The value must be between 1 and 255 characters.
4490 },
4491 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4492 "hostRules": [ # The list of HostRules to use against the URL.
4493 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
Dan O'Mearadd494642020-05-01 07:42:23 -07004494 "hosts": [ # 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 ..
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004495 "A String",
4496 ],
4497 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
4498 "pathMatcher": "A String", # The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion.
4499 },
4500 ],
4501 "name": "A String", # 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.
4502 }
4503
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 Kim715bd7f2019-06-14 16:50:42 -07004523 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4524 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4525 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004526 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004527 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
4528 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004529 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4530 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004531 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07004532 "httpErrorStatusCode": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004533 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004534 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004535 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4536 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4537 {
4538 "message": "A String", # [Output Only] A human-readable description of the warning code.
4539 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4540 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4541 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4542 {
4543 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4544 "key": "A String", # [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).
4545 },
4546 ],
4547 },
4548 ],
4549 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07004550 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004551 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004552 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4553 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004554 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4555 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4556 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4557 {
4558 "message": "A String", # [Output Only] An optional, human-readable error message.
4559 "code": "A String", # [Output Only] The error type identifier for this error.
4560 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4561 },
4562 ],
4563 },
4564 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4565 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4566 "targetLink": "A String", # [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.
4567 }</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{
Dan O'Mearadd494642020-05-01 07:42:23 -07004582 "resource": { # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004595 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
4596 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
4597 "defaultRouteAction": { # 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.
4598 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
4599 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
4600 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
4601 },
4602 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4603 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
Dan O'Mearadd494642020-05-01 07:42:23 -07004604 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004605 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4606 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4607 },
4608 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4609 # - 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.
4610 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4611 # -
4612 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4613 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4614 # - 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.
4615 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4616 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4617 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4618 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4619 "A String",
4620 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004621 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004622 },
4623 "faultInjectionPolicy": { # 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.
4624 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4625 "delay": { # 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.
4626 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4627 # The value must be between 0.0 and 100.0 inclusive.
4628 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
4629 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4630 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4631 },
4632 },
4633 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
4634 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4635 # The value must be between 0.0 and 100.0 inclusive.
4636 "httpStatus": 42, # The HTTP status code used to abort the request.
4637 # The value must be between 200 and 599 inclusive.
4638 },
4639 },
4640 "corsPolicy": { # 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
4641 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
4642 "A String",
4643 ],
4644 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
4645 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4646 "A String",
4647 ],
4648 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4649 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4650 "A String",
4651 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004652 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004653 "allowCredentials": 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.
4654 # Default is false.
4655 "disabled": 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.
4656 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
4657 "A String",
4658 ],
4659 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
4660 "A String",
4661 ],
4662 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004663 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
4664 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004665 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4666 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4667 },
4668 "weightedBackendServices": [ # 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.
4669 # 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.
4670 { # 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
4671 "headerAction": { # 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.
4672 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4673 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4674 "A String",
4675 ],
4676 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
4677 "A String",
4678 ],
4679 "requestHeadersToAdd": [ # 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 "headerName": "A String", # The name of the header.
4682 "headerValue": "A String", # The value of the header to add.
4683 "replace": True or False, # If false, headerValue is appended to any 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 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4688 { # Specification determining how headers are added to requests or responses.
4689 "headerName": "A String", # The name of the header.
4690 "headerValue": "A String", # The value of the header to add.
4691 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4692 # The default value is false.
4693 },
4694 ],
4695 },
4696 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4697 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
4698 # The value must be between 0 and 1000
4699 "backendService": "A String", # 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.
4700 },
4701 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004702 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004703 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
4704 # The value must be between 1 and 255 characters.
4705 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
4706 # The value must be between 1 and 1024 characters.
4707 },
4708 },
4709 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
4710 "defaultService": "A String", # 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.
4711 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
4712 "tests": [ # 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.
4713 { # Message for the expected URL mappings.
4714 "description": "A String", # Description of this test case.
4715 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
4716 "expectedUrlRedirect": "A String", # The expected URL that should be redirected to for the host and path being tested.
4717 "host": "A String", # Host portion of the URL.
4718 "path": "A String", # Path portion of the URL.
4719 "backendServiceWeight": 42, # The weight to use for the supplied host and path when using advanced routing rules that involve traffic splitting.
4720 },
4721 ],
4722 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4723 "fingerprint": "A String", # 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.
4724 #
4725 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
4726 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
4727 { # 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.
4728 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
4729 "defaultRouteAction": { # 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.
4730 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
4731 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
4732 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
4733 },
4734 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4735 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
Dan O'Mearadd494642020-05-01 07:42:23 -07004736 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004737 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4738 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4739 },
4740 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4741 # - 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.
4742 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4743 # -
4744 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4745 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4746 # - 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.
4747 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4748 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4749 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4750 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4751 "A String",
4752 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004753 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004754 },
4755 "faultInjectionPolicy": { # 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.
4756 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4757 "delay": { # 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.
4758 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4759 # The value must be between 0.0 and 100.0 inclusive.
4760 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
4761 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4762 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4763 },
4764 },
4765 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
4766 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4767 # The value must be between 0.0 and 100.0 inclusive.
4768 "httpStatus": 42, # The HTTP status code used to abort the request.
4769 # The value must be between 200 and 599 inclusive.
4770 },
4771 },
4772 "corsPolicy": { # 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
4773 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
4774 "A String",
4775 ],
4776 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
4777 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4778 "A String",
4779 ],
4780 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4781 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4782 "A String",
4783 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004784 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004785 "allowCredentials": 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.
4786 # Default is false.
4787 "disabled": 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.
4788 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
4789 "A String",
4790 ],
4791 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
4792 "A String",
4793 ],
4794 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004795 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
4796 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004797 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4798 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4799 },
4800 "weightedBackendServices": [ # 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.
4801 # 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.
4802 { # 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
4803 "headerAction": { # 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.
4804 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4805 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4806 "A String",
4807 ],
4808 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
4809 "A String",
4810 ],
4811 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4812 { # Specification determining how headers are added to requests or responses.
4813 "headerName": "A String", # The name of the header.
4814 "headerValue": "A String", # The value of the header to add.
4815 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4816 # The default value is false.
4817 },
4818 ],
4819 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4820 { # Specification determining how headers are added to requests or responses.
4821 "headerName": "A String", # The name of the header.
4822 "headerValue": "A String", # The value of the header to add.
4823 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4824 # The default value is false.
4825 },
4826 ],
4827 },
4828 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4829 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
4830 # The value must be between 0 and 1000
4831 "backendService": "A String", # 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.
4832 },
4833 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004834 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004835 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
4836 # The value must be between 1 and 255 characters.
4837 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
4838 # The value must be between 1 and 1024 characters.
4839 },
4840 },
4841 "defaultService": "A String", # 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:
4842 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
4843 # - compute/v1/projects/project/global/backendServices/backendService
4844 # - 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.
4845 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
4846 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
4847 # - compute.backendBuckets.use
4848 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07004849 "routeRules": [ # 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.
4850 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004851 { # An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.
Dan O'Mearadd494642020-05-01 07:42:23 -07004852 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
4853 # If urlRedirect is specified, service or routeAction must not be set.
4854 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
4855 # 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.
4856 # The value must be between 1 and 1024 characters.
4857 "stripQuery": 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.
4858 # The default is set to false.
4859 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
4860 # Supported values are:
4861 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4862 # - FOUND, which corresponds to 302.
4863 # - SEE_OTHER which corresponds to 303.
4864 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4865 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4866 "httpsRedirect": 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.
4867 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4868 # The default is set to false.
4869 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
4870 # 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.
4871 # The value must be between 1 and 1024 characters.
4872 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
4873 # The value must be between 1 and 255 characters.
4874 },
4875 "description": "A String", # The short description conveying the intent of this routeRule.
4876 # The description can have a maximum length of 1024 characters.
4877 "service": "A String", # 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.
4878 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4879 "httpFilterConfigs": [ # 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.
4880 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
4881 "configTypeUrl": "A String", # 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
4882 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
4883 "config": "A String", # 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
4884 },
4885 ],
4886 "httpFilterMetadata": [ # 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.
4887 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
4888 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
4889 "configTypeUrl": "A String", # 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
4890 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
4891 "config": "A String", # 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
4892 },
4893 ],
4894 "priority": 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.
4895 # 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.
4896 # 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.
4897 "routeAction": { # 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.
4898 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4899 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
4900 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
4901 },
4902 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4903 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
4904 # 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.
4905 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4906 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4907 },
4908 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4909 # - 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.
4910 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4911 # -
4912 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4913 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4914 # - 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.
4915 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4916 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4917 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4918 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4919 "A String",
4920 ],
4921 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4922 },
4923 "faultInjectionPolicy": { # 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.
4924 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4925 "delay": { # 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.
4926 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4927 # The value must be between 0.0 and 100.0 inclusive.
4928 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
4929 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4930 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4931 },
4932 },
4933 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
4934 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4935 # The value must be between 0.0 and 100.0 inclusive.
4936 "httpStatus": 42, # The HTTP status code used to abort the request.
4937 # The value must be between 200 and 599 inclusive.
4938 },
4939 },
4940 "corsPolicy": { # 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
4941 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
4942 "A String",
4943 ],
4944 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
4945 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4946 "A String",
4947 ],
4948 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4949 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4950 "A String",
4951 ],
4952 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
4953 "allowCredentials": 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.
4954 # Default is false.
4955 "disabled": 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.
4956 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
4957 "A String",
4958 ],
4959 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
4960 "A String",
4961 ],
4962 },
4963 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
4964 # If not specified, will use the largest timeout among all backend services associated with the route.
4965 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
4966 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
4967 },
4968 "weightedBackendServices": [ # 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.
4969 # 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.
4970 { # 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
4971 "headerAction": { # 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.
4972 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4973 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4974 "A String",
4975 ],
4976 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
4977 "A String",
4978 ],
4979 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4980 { # Specification determining how headers are added to requests or responses.
4981 "headerName": "A String", # The name of the header.
4982 "headerValue": "A String", # The value of the header to add.
4983 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4984 # The default value is false.
4985 },
4986 ],
4987 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4988 { # Specification determining how headers are added to requests or responses.
4989 "headerName": "A String", # The name of the header.
4990 "headerValue": "A String", # The value of the header to add.
4991 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4992 # The default value is false.
4993 },
4994 ],
4995 },
4996 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4997 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
4998 # The value must be between 0 and 1000
4999 "backendService": "A String", # 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.
5000 },
5001 ],
5002 "urlRewrite": { # 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.
5003 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
5004 # The value must be between 1 and 255 characters.
5005 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
5006 # The value must be between 1 and 1024 characters.
5007 },
5008 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005009 "headerAction": { # 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.
5010 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
5011 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5012 "A String",
5013 ],
5014 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
5015 "A String",
5016 ],
5017 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5018 { # Specification determining how headers are added to requests or responses.
5019 "headerName": "A String", # The name of the header.
5020 "headerValue": "A String", # The value of the header to add.
5021 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5022 # The default value is false.
5023 },
5024 ],
5025 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5026 { # Specification determining how headers are added to requests or responses.
5027 "headerName": "A String", # The name of the header.
5028 "headerValue": "A String", # The value of the header to add.
5029 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5030 # The default value is false.
5031 },
5032 ],
5033 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005034 "matchRules": [
5035 { # HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.
Dan O'Mearadd494642020-05-01 07:42:23 -07005036 "regexMatch": "A String", # 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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005037 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07005038 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005039 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
5040 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -07005041 "regexMatch": "A String", # 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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005042 # 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's port specifier.
5043 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07005044 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005045 "invertMatch": 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.
5046 # The default setting is false.
5047 "headerName": "A String", # The name of the HTTP header to match.
5048 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
5049 # For matching a request's method, use the headerName ":method".
5050 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
5051 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5052 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
5053 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5054 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
5055 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07005056 "presentMatch": True or False, # A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005057 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5058 "rangeMatch": { # 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.
5059 # For example for a range [-5, 0]
5060 # - -3 will match.
5061 # - 0 will not match.
5062 # - 0.25 will not match.
5063 # - -3someString will not match.
5064 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07005065 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005066 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
5067 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
5068 },
5069 },
5070 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005071 "fullPathMatch": "A String", # 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.
5072 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005073 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07005074 "prefixMatch": "A String", # For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005075 # The value must be between 1 and 1024 characters.
5076 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5077 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
5078 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -07005079 # ignoreCase must not be used with regexMatch.
5080 "metadataFilters": [ # 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.
5081 # 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.
5082 # metadataFilters specified here will be applied after those specified in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch belongs to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005083 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -07005084 { # 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.
5085 # 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.
5086 # 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="https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/base.proto#envoy-api-msg-core-node" Node metadata of their XDS requests to loadbalancers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005087 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
5088 # Supported values are:
5089 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
5090 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
5091 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
5092 # This list must not be empty and can have at the most 64 entries.
5093 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
5094 "name": "A String", # Name of metadata label.
5095 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
5096 "value": "A String", # The value of the label must match the specified value.
5097 # value can have a maximum length of 1024 characters.
5098 },
5099 ],
5100 },
5101 ],
5102 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
5103 { # HttpRouteRuleMatch criteria for a request's query parameter.
5104 "presentMatch": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07005105 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005106 "regexMatch": "A String", # 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
Dan O'Mearadd494642020-05-01 07:42:23 -07005107 # Only one of presentMatch, exactMatch or regexMatch must be set.
5108 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005109 "name": "A String", # 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.
5110 "exactMatch": "A String", # The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
Dan O'Mearadd494642020-05-01 07:42:23 -07005111 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005112 },
5113 ],
5114 },
5115 ],
5116 },
5117 ],
5118 "pathRules": [ # The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.
5119 # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07005120 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005121 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
5122 "paths": [ # 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.
5123 "A String",
5124 ],
5125 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
5126 # If urlRedirect is specified, service or routeAction must not be set.
5127 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07005128 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005129 # The value must be between 1 and 1024 characters.
5130 "stripQuery": 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.
5131 # The default is set to false.
5132 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
5133 # Supported values are:
5134 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5135 # - FOUND, which corresponds to 302.
5136 # - SEE_OTHER which corresponds to 303.
5137 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5138 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5139 "httpsRedirect": 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.
5140 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5141 # The default is set to false.
5142 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07005143 # 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.
5144 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005145 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
5146 # The value must be between 1 and 255 characters.
5147 },
5148 "service": "A String", # 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.
5149 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5150 "routeAction": { # 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.
5151 # Only one of routeAction or urlRedirect must be set.
5152 "requestMirrorPolicy": { # A policy that specifies how requests intended for the route'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'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.
5153 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
5154 },
5155 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
5156 "perTryTimeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies a non-zero timeout per retry attempt.
Dan O'Mearadd494642020-05-01 07:42:23 -07005157 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005158 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5159 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5160 },
5161 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5162 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
5163 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5164 # -
5165 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5166 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5167 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
5168 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5169 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5170 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5171 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5172 "A String",
5173 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005174 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005175 },
5176 "faultInjectionPolicy": { # 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.
5177 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
5178 "delay": { # 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.
5179 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5180 # The value must be between 0.0 and 100.0 inclusive.
5181 "fixedDelay": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years. # Specifies the value of the fixed delay interval.
5182 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5183 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5184 },
5185 },
5186 "abort": { # Specification for how requests are aborted as part of fault injection. # The specification for how client requests are aborted as part of fault injection.
5187 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5188 # The value must be between 0.0 and 100.0 inclusive.
5189 "httpStatus": 42, # The HTTP status code used to abort the request.
5190 # The value must be between 200 and 599 inclusive.
5191 },
5192 },
5193 "corsPolicy": { # 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
5194 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
5195 "A String",
5196 ],
5197 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
5198 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5199 "A String",
5200 ],
5201 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
5202 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5203 "A String",
5204 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005205 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005206 "allowCredentials": 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.
5207 # Default is false.
5208 "disabled": 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.
5209 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
5210 "A String",
5211 ],
5212 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
5213 "A String",
5214 ],
5215 },
Dan O'Mearadd494642020-05-01 07:42:23 -07005216 "timeout": { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". 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.
5217 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005218 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
5219 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
5220 },
5221 "weightedBackendServices": [ # 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.
5222 # 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.
5223 { # 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
5224 "headerAction": { # 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.
5225 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
5226 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5227 "A String",
5228 ],
5229 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
5230 "A String",
5231 ],
5232 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5233 { # Specification determining how headers are added to requests or responses.
5234 "headerName": "A String", # The name of the header.
5235 "headerValue": "A String", # The value of the header to add.
5236 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5237 # The default value is false.
5238 },
5239 ],
5240 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5241 { # Specification determining how headers are added to requests or responses.
5242 "headerName": "A String", # The name of the header.
5243 "headerValue": "A String", # The value of the header to add.
5244 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5245 # The default value is false.
5246 },
5247 ],
5248 },
5249 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5250 # The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.
5251 # The value must be between 0 and 1000
5252 "backendService": "A String", # 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.
5253 },
5254 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005255 "urlRewrite": { # The spec for modifying the path before sending the request to the matched backend service. # The spec to modify the URL of the request, prior to forwarding the request to the matched service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005256 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
5257 # The value must be between 1 and 255 characters.
5258 "pathPrefixRewrite": "A String", # Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.
5259 # The value must be between 1 and 1024 characters.
5260 },
5261 },
5262 },
5263 ],
5264 "headerAction": { # 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.
5265 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
5266 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5267 "A String",
5268 ],
5269 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
5270 "A String",
5271 ],
5272 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5273 { # Specification determining how headers are added to requests or responses.
5274 "headerName": "A String", # The name of the header.
5275 "headerValue": "A String", # The value of the header to add.
5276 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5277 # The default value is false.
5278 },
5279 ],
5280 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5281 { # Specification determining how headers are added to requests or responses.
5282 "headerName": "A String", # The name of the header.
5283 "headerValue": "A String", # The value of the header to add.
5284 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5285 # The default value is false.
5286 },
5287 ],
5288 },
Dan O'Mearadd494642020-05-01 07:42:23 -07005289 "defaultUrlRedirect": { # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005290 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
5291 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07005292 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005293 # The value must be between 1 and 1024 characters.
5294 "stripQuery": 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.
5295 # The default is set to false.
5296 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
5297 # Supported values are:
5298 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5299 # - FOUND, which corresponds to 302.
5300 # - SEE_OTHER which corresponds to 303.
5301 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5302 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5303 "httpsRedirect": 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.
5304 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5305 # The default is set to false.
5306 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07005307 # 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.
5308 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005309 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
5310 # The value must be between 1 and 255 characters.
5311 },
5312 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
5313 },
5314 ],
5315 "headerAction": { # 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.
5316 # The headerAction specified here take effect after headerAction specified under pathMatcher.
5317 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5318 "A String",
5319 ],
5320 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
5321 "A String",
5322 ],
5323 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5324 { # Specification determining how headers are added to requests or responses.
5325 "headerName": "A String", # The name of the header.
5326 "headerValue": "A String", # The value of the header to add.
5327 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5328 # The default value is false.
5329 },
5330 ],
5331 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5332 { # Specification determining how headers are added to requests or responses.
5333 "headerName": "A String", # The name of the header.
5334 "headerValue": "A String", # The value of the header to add.
5335 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5336 # The default value is false.
5337 },
5338 ],
5339 },
5340 "region": "A String", # [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.
5341 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
5342 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
5343 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07005344 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005345 # The value must be between 1 and 1024 characters.
5346 "stripQuery": 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.
5347 # The default is set to false.
5348 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
5349 # Supported values are:
5350 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5351 # - FOUND, which corresponds to 302.
5352 # - SEE_OTHER which corresponds to 303.
5353 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5354 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5355 "httpsRedirect": 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.
5356 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5357 # The default is set to false.
5358 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
Dan O'Mearadd494642020-05-01 07:42:23 -07005359 # 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.
5360 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005361 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
5362 # The value must be between 1 and 255 characters.
5363 },
5364 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
5365 "hostRules": [ # The list of HostRules to use against the URL.
5366 { # UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
Dan O'Mearadd494642020-05-01 07:42:23 -07005367 "hosts": [ # 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 ..
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005368 "A String",
5369 ],
5370 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
5371 "pathMatcher": "A String", # The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion.
5372 },
5373 ],
5374 "name": "A String", # 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.
5375 },
5376 }
5377
5378
5379Returns:
5380 An object of the form:
5381
5382 {
5383 "result": { # Message representing the validation result for a UrlMap.
5384 "testFailures": [
5385 {
5386 "path": "A String",
5387 "actualService": "A String",
5388 "host": "A String",
5389 "expectedService": "A String",
5390 },
5391 ],
5392 "loadErrors": [
5393 "A String",
5394 ],
5395 "testPassed": True or False, # If successfully loaded, this field indicates whether the test passed. If false, 'testFailures's indicate the reason of failure.
5396 "loadSucceeded": True or False, # Whether the given UrlMap can be successfully loaded. If false, 'loadErrors' indicates the reasons.
5397 },
5398 }</pre>
5399</div>
5400
5401</body></html>