blob: b7bbfda93fe96429471bd4e5f1568a67be73fe33 [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_beta.html">Compute Engine API</a> . <a href="compute_beta.urlMaps.html">urlMaps</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None, includeAllScopes=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Retrieves the list of all UrlMap resources, regional and global, available to the specified project.</p>
80<p class="toc_element">
81 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<p class="toc_element">
84 <code><a href="#delete">delete(project, urlMap, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070085<p class="firstline">Deletes the specified UrlMap resource.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, urlMap)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070089<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#insert">insert(project, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070091<p class="firstline">Creates a UrlMap resource in the specified project using the data included in the request.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#invalidateCache">invalidateCache(project, urlMap, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070094<p class="firstline">Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.</p>
95<p class="toc_element">
96 <code><a href="#list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
97<p class="firstline">Retrieves the list of UrlMap resources available to the specified project.</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#patch">patch(project, urlMap, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700106<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#update">update(project, urlMap, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700109<p class="firstline">Updates the specified UrlMap resource with the data included in the request.</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#validate">validate(project, urlMap, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700112<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>
113<h3>Method Details</h3>
114<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700115 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None, includeAllScopes=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700116 <pre>Retrieves the list of all UrlMap resources, regional and global, available to the specified project.
117
118Args:
119 project: string, Name of the project scoping this request. (required)
120 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
121
Dan O'Mearadd494642020-05-01 07:42:23 -0700122You 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 -0700123
Dan O'Mearadd494642020-05-01 07:42:23 -0700124Currently, only sorting by `name` or `creationTimestamp desc` is supported.
125 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`)
126 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.
127 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 -0700128
Dan O'Mearadd494642020-05-01 07:42:23 -0700129For 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 -0700130
Dan O'Mearadd494642020-05-01 07:42:23 -0700131You 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 -0700132
Dan O'Mearadd494642020-05-01 07:42:23 -0700133To 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) ```
134 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700135
136Returns:
137 An object of the form:
138
139 {
140 "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.
141 "kind": "compute#urlMapsAggregatedList", # Type of resource.
142 "items": { # A list of UrlMapsScopedList resources.
143 "a_key": { # Name of the scope containing this set of UrlMaps.
144 "urlMaps": [ # A list of UrlMaps contained in this scope.
Dan O'Mearadd494642020-05-01 07:42:23 -0700145 { # Represents a URL Map resource.
146 #
147 # Google Compute Engine has two URL Map resources:
148 #
149 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
150 #
151 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
152 #
153 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
154 #
155 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
156 #
157 # 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 -0700158 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
159 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
160 "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.
161 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
162 "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.
163 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
164 },
165 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
166 "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 -0700167 # 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 -0700168 "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.
169 "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
170 },
171 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
172 # - 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.
173 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
174 # -
175 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
176 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
177 # - 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.
178 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
179 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
180 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
181 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
182 "A String",
183 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700184 "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 -0700185 },
186 "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.
187 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
188 "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.
189 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
190 # The value must be between 0.0 and 100.0 inclusive.
191 "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.
192 "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.
193 "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
194 },
195 },
196 "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.
197 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
198 # The value must be between 0.0 and 100.0 inclusive.
199 "httpStatus": 42, # The HTTP status code used to abort the request.
200 # The value must be between 200 and 599 inclusive.
201 },
202 },
203 "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
204 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
205 "A String",
206 ],
207 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
208 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
209 "A String",
210 ],
211 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
212 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
213 "A String",
214 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700215 "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 -0700216 "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.
217 # Default is false.
218 "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.
219 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
220 "A String",
221 ],
222 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
223 "A String",
224 ],
225 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700226 "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.
227 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700228 "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.
229 "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
230 },
231 "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.
232 # 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.
233 { # 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
234 "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.
235 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
236 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
237 "A String",
238 ],
239 "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.
240 "A String",
241 ],
242 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
243 { # Specification determining how headers are added to requests or responses.
244 "headerName": "A String", # The name of the header.
245 "headerValue": "A String", # The value of the header to add.
246 "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.
247 # The default value is false.
248 },
249 ],
250 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
251 { # Specification determining how headers are added to requests or responses.
252 "headerName": "A String", # The name of the header.
253 "headerValue": "A String", # The value of the header to add.
254 "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.
255 # The default value is false.
256 },
257 ],
258 },
259 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
260 # 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.
261 # The value must be between 0 and 1000
262 "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.
263 },
264 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700265 "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 -0700266 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
267 # The value must be between 1 and 255 characters.
268 "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.
269 # The value must be between 1 and 1024 characters.
270 },
271 },
272 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
273 "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.
274 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
275 "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.
276 { # Message for the expected URL mappings.
277 "path": "A String", # Path portion of the URL.
278 "host": "A String", # Host portion of the URL.
279 "description": "A String", # Description of this test case.
280 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
281 },
282 ],
283 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
284 "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.
285 #
286 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
287 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
288 { # 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.
289 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
290 "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.
291 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
292 "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.
293 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
294 },
295 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
296 "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 -0700297 # 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 -0700298 "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.
299 "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
300 },
301 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
302 # - 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.
303 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
304 # -
305 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
306 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
307 # - 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.
308 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
309 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
310 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
311 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
312 "A String",
313 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700314 "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 -0700315 },
316 "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.
317 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
318 "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.
319 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
320 # The value must be between 0.0 and 100.0 inclusive.
321 "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.
322 "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.
323 "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
324 },
325 },
326 "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.
327 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
328 # The value must be between 0.0 and 100.0 inclusive.
329 "httpStatus": 42, # The HTTP status code used to abort the request.
330 # The value must be between 200 and 599 inclusive.
331 },
332 },
333 "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
334 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
335 "A String",
336 ],
337 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
338 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
339 "A String",
340 ],
341 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
342 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
343 "A String",
344 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700345 "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 -0700346 "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.
347 # Default is false.
348 "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.
349 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
350 "A String",
351 ],
352 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
353 "A String",
354 ],
355 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700356 "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.
357 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700358 "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.
359 "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
360 },
361 "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.
362 # 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.
363 { # 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
364 "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.
365 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
366 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
367 "A String",
368 ],
369 "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.
370 "A String",
371 ],
372 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
373 { # Specification determining how headers are added to requests or responses.
374 "headerName": "A String", # The name of the header.
375 "headerValue": "A String", # The value of the header to add.
376 "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.
377 # The default value is false.
378 },
379 ],
380 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
381 { # Specification determining how headers are added to requests or responses.
382 "headerName": "A String", # The name of the header.
383 "headerValue": "A String", # The value of the header to add.
384 "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.
385 # The default value is false.
386 },
387 ],
388 },
389 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
390 # 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.
391 # The value must be between 0 and 1000
392 "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.
393 },
394 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700395 "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 -0700396 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
397 # The value must be between 1 and 255 characters.
398 "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.
399 # The value must be between 1 and 1024 characters.
400 },
401 },
402 "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:
403 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
404 # - compute/v1/projects/project/global/backendServices/backendService
405 # - 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.
406 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
407 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
408 # - compute.backendBuckets.use
409 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -0700410 "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.
411 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700412 { # 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 -0700413 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
414 # If urlRedirect is specified, service or routeAction must not be set.
415 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
416 # 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.
417 # The value must be between 1 and 1024 characters.
418 "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.
419 # The default is set to false.
420 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
421 # Supported values are:
422 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
423 # - FOUND, which corresponds to 302.
424 # - SEE_OTHER which corresponds to 303.
425 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
426 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
427 "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.
428 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
429 # The default is set to false.
430 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
431 # 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.
432 # The value must be between 1 and 1024 characters.
433 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
434 # The value must be between 1 and 255 characters.
435 },
436 "description": "A String", # The short description conveying the intent of this routeRule.
437 # The description can have a maximum length of 1024 characters.
438 "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.
439 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
440 "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.
441 # 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.
442 # 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.
443 "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.
444 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
445 "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.
446 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
447 },
448 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
449 "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.
450 # 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.
451 "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.
452 "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
453 },
454 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
455 # - 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.
456 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
457 # -
458 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
459 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
460 # - 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.
461 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
462 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
463 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
464 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
465 "A String",
466 ],
467 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
468 },
469 "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.
470 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
471 "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.
472 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
473 # The value must be between 0.0 and 100.0 inclusive.
474 "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.
475 "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.
476 "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
477 },
478 },
479 "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.
480 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
481 # The value must be between 0.0 and 100.0 inclusive.
482 "httpStatus": 42, # The HTTP status code used to abort the request.
483 # The value must be between 200 and 599 inclusive.
484 },
485 },
486 "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
487 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
488 "A String",
489 ],
490 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
491 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
492 "A String",
493 ],
494 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
495 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
496 "A String",
497 ],
498 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
499 "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.
500 # Default is false.
501 "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.
502 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
503 "A String",
504 ],
505 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
506 "A String",
507 ],
508 },
509 "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.
510 # If not specified, will use the largest timeout among all backend services associated with the route.
511 "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.
512 "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
513 },
514 "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.
515 # 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.
516 { # 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
517 "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.
518 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
519 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
520 "A String",
521 ],
522 "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.
523 "A String",
524 ],
525 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
526 { # Specification determining how headers are added to requests or responses.
527 "headerName": "A String", # The name of the header.
528 "headerValue": "A String", # The value of the header to add.
529 "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.
530 # The default value is false.
531 },
532 ],
533 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
534 { # Specification determining how headers are added to requests or responses.
535 "headerName": "A String", # The name of the header.
536 "headerValue": "A String", # The value of the header to add.
537 "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.
538 # The default value is false.
539 },
540 ],
541 },
542 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
543 # 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.
544 # The value must be between 0 and 1000
545 "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.
546 },
547 ],
548 "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.
549 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
550 # The value must be between 1 and 255 characters.
551 "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.
552 # The value must be between 1 and 1024 characters.
553 },
554 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700555 "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.
556 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
557 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
558 "A String",
559 ],
560 "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.
561 "A String",
562 ],
563 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
564 { # Specification determining how headers are added to requests or responses.
565 "headerName": "A String", # The name of the header.
566 "headerValue": "A String", # The value of the header to add.
567 "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.
568 # The default value is false.
569 },
570 ],
571 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
572 { # Specification determining how headers are added to requests or responses.
573 "headerName": "A String", # The name of the header.
574 "headerValue": "A String", # The value of the header to add.
575 "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.
576 # The default value is false.
577 },
578 ],
579 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700580 "matchRules": [
581 { # 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 -0700582 "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 -0700583 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -0700584 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700585 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
586 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -0700587 "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 -0700588 # 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.
589 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -0700590 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700591 "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.
592 # The default setting is false.
593 "headerName": "A String", # The name of the HTTP header to match.
594 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
595 # For matching a request's method, use the headerName ":method".
596 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
597 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
598 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
599 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
600 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
601 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -0700602 "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 -0700603 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
604 "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.
605 # For example for a range [-5, 0]
606 # - -3 will match.
607 # - 0 will not match.
608 # - 0.25 will not match.
609 # - -3someString will not match.
610 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -0700611 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700612 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
613 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
614 },
615 },
616 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700617 "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.
618 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700619 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -0700620 "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 -0700621 # The value must be between 1 and 1024 characters.
622 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
623 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
624 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -0700625 # ignoreCase must not be used with regexMatch.
626 "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.
627 # 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.
628 # 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 -0700629 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -0700630 { # 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.
631 # 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.
632 # 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 -0700633 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
634 # Supported values are:
635 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
636 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
637 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
638 # This list must not be empty and can have at the most 64 entries.
639 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
640 "name": "A String", # Name of metadata label.
641 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
642 "value": "A String", # The value of the label must match the specified value.
643 # value can have a maximum length of 1024 characters.
644 },
645 ],
646 },
647 ],
648 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
649 { # HttpRouteRuleMatch criteria for a request's query parameter.
650 "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 -0700651 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700652 "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 -0700653 # Only one of presentMatch, exactMatch or regexMatch must be set.
654 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700655 "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.
656 "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 -0700657 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700658 },
659 ],
660 },
661 ],
662 },
663 ],
664 "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.
665 # 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 -0700666 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700667 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
668 "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.
669 "A String",
670 ],
671 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
672 # If urlRedirect is specified, service or routeAction must not be set.
673 "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 -0700674 # 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 -0700675 # The value must be between 1 and 1024 characters.
676 "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.
677 # The default is set to false.
678 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
679 # Supported values are:
680 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
681 # - FOUND, which corresponds to 302.
682 # - SEE_OTHER which corresponds to 303.
683 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
684 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
685 "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.
686 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
687 # The default is set to false.
688 "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 -0700689 # 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.
690 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700691 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
692 # The value must be between 1 and 255 characters.
693 },
694 "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.
695 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
696 "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.
697 # Only one of routeAction or urlRedirect must be set.
698 "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.
699 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
700 },
701 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
702 "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 -0700703 # 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 -0700704 "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.
705 "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
706 },
707 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
708 # - 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.
709 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
710 # -
711 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
712 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
713 # - 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.
714 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
715 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
716 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
717 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
718 "A String",
719 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700720 "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 -0700721 },
722 "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.
723 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
724 "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.
725 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
726 # The value must be between 0.0 and 100.0 inclusive.
727 "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.
728 "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.
729 "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
730 },
731 },
732 "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.
733 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
734 # The value must be between 0.0 and 100.0 inclusive.
735 "httpStatus": 42, # The HTTP status code used to abort the request.
736 # The value must be between 200 and 599 inclusive.
737 },
738 },
739 "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
740 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
741 "A String",
742 ],
743 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
744 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
745 "A String",
746 ],
747 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
748 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
749 "A String",
750 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700751 "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 -0700752 "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.
753 # Default is false.
754 "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.
755 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
756 "A String",
757 ],
758 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
759 "A String",
760 ],
761 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700762 "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.
763 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700764 "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.
765 "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
766 },
767 "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.
768 # 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.
769 { # 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
770 "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.
771 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
772 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
773 "A String",
774 ],
775 "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.
776 "A String",
777 ],
778 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
779 { # Specification determining how headers are added to requests or responses.
780 "headerName": "A String", # The name of the header.
781 "headerValue": "A String", # The value of the header to add.
782 "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.
783 # The default value is false.
784 },
785 ],
786 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
787 { # Specification determining how headers are added to requests or responses.
788 "headerName": "A String", # The name of the header.
789 "headerValue": "A String", # The value of the header to add.
790 "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.
791 # The default value is false.
792 },
793 ],
794 },
795 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
796 # 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.
797 # The value must be between 0 and 1000
798 "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.
799 },
800 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700801 "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 -0700802 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
803 # The value must be between 1 and 255 characters.
804 "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.
805 # The value must be between 1 and 1024 characters.
806 },
807 },
808 },
809 ],
810 "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.
811 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
812 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
813 "A String",
814 ],
815 "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.
816 "A String",
817 ],
818 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
819 { # Specification determining how headers are added to requests or responses.
820 "headerName": "A String", # The name of the header.
821 "headerValue": "A String", # The value of the header to add.
822 "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.
823 # The default value is false.
824 },
825 ],
826 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
827 { # Specification determining how headers are added to requests or responses.
828 "headerName": "A String", # The name of the header.
829 "headerValue": "A String", # The value of the header to add.
830 "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.
831 # The default value is false.
832 },
833 ],
834 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700835 "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 -0700836 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
837 "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 -0700838 # 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 -0700839 # The value must be between 1 and 1024 characters.
840 "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.
841 # The default is set to false.
842 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
843 # Supported values are:
844 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
845 # - FOUND, which corresponds to 302.
846 # - SEE_OTHER which corresponds to 303.
847 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
848 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
849 "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.
850 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
851 # The default is set to false.
852 "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 -0700853 # 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.
854 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700855 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
856 # The value must be between 1 and 255 characters.
857 },
858 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
859 },
860 ],
861 "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.
862 # The headerAction specified here take effect after headerAction specified under pathMatcher.
863 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
864 "A String",
865 ],
866 "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.
867 "A String",
868 ],
869 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
870 { # Specification determining how headers are added to requests or responses.
871 "headerName": "A String", # The name of the header.
872 "headerValue": "A String", # The value of the header to add.
873 "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.
874 # The default value is false.
875 },
876 ],
877 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
878 { # Specification determining how headers are added to requests or responses.
879 "headerName": "A String", # The name of the header.
880 "headerValue": "A String", # The value of the header to add.
881 "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.
882 # The default value is false.
883 },
884 ],
885 },
886 "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.
887 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
888 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
889 "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 -0700890 # 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 -0700891 # The value must be between 1 and 1024 characters.
892 "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.
893 # The default is set to false.
894 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
895 # Supported values are:
896 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
897 # - FOUND, which corresponds to 302.
898 # - SEE_OTHER which corresponds to 303.
899 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
900 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
901 "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.
902 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
903 # The default is set to false.
904 "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 -0700905 # 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.
906 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700907 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
908 # The value must be between 1 and 255 characters.
909 },
910 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
911 "hostRules": [ # The list of HostRules to use against the URL.
912 { # 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 -0700913 "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 -0700914 "A String",
915 ],
916 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
917 "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.
918 },
919 ],
920 "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.
921 },
922 ],
923 "warning": { # Informational warning which replaces the list of backend services when the list is empty.
924 "message": "A String", # [Output Only] A human-readable description of the warning code.
925 "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.
926 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
927 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
928 {
929 "value": "A String", # [Output Only] A warning data value corresponding to the key.
930 "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).
931 },
932 ],
933 },
934 },
935 },
936 "warning": { # [Output Only] Informational warning message.
937 "message": "A String", # [Output Only] A human-readable description of the warning code.
938 "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.
939 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
940 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
941 {
942 "value": "A String", # [Output Only] A warning data value corresponding to the key.
943 "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).
944 },
945 ],
946 },
947 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
948 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
949 }</pre>
950</div>
951
952<div class="method">
953 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
954 <pre>Retrieves the next page of results.
955
956Args:
957 previous_request: The request for the previous page. (required)
958 previous_response: The response from the request for the previous page. (required)
959
960Returns:
961 A request object that you can call 'execute()' on to request the next
962 page. Returns None if there are no more items in the collection.
963 </pre>
964</div>
965
966<div class="method">
967 <code class="details" id="delete">delete(project, urlMap, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700968 <pre>Deletes the specified UrlMap resource.
969
970Args:
971 project: string, Project ID for this request. (required)
972 urlMap: string, Name of the UrlMap resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700973 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
974
975For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
976
977The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700978
979Returns:
980 An object of the form:
981
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700982 { # Represents an Operation resource.
983 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700984 # Google Compute Engine has three Operation resources:
985 #
986 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
987 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700988 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
989 #
990 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700991 # - For global operations, use the `globalOperations` resource.
992 # - For regional operations, use the `regionOperations` resource.
993 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700994 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700995 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700996 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700997 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400998 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700999 "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 -07001000 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001001 "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 -07001002 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1003 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001004 "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 -07001005 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001006 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001007 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001008 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1009 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1010 {
1011 "message": "A String", # [Output Only] A human-readable description of the warning code.
1012 "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.
1013 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1014 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1015 {
1016 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1017 "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).
1018 },
1019 ],
1020 },
1021 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001022 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001023 "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 -07001024 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1025 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001026 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001027 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1028 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1029 {
1030 "message": "A String", # [Output Only] An optional, human-readable error message.
1031 "code": "A String", # [Output Only] The error type identifier for this error.
1032 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1033 },
1034 ],
1035 },
1036 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1037 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001038 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001039 }</pre>
1040</div>
1041
1042<div class="method">
1043 <code class="details" id="get">get(project, urlMap)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001044 <pre>Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001045
1046Args:
1047 project: string, Project ID for this request. (required)
1048 urlMap: string, Name of the UrlMap resource to return. (required)
1049
1050Returns:
1051 An object of the form:
1052
Dan O'Mearadd494642020-05-01 07:42:23 -07001053 { # Represents a URL Map resource.
1054 #
1055 # Google Compute Engine has two URL Map resources:
1056 #
1057 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
1058 #
1059 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
1060 #
1061 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
1062 #
1063 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
1064 #
1065 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001066 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
1067 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001068 "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.
1069 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
1070 "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.
1071 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1072 },
1073 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1074 "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 -07001075 # 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 -07001076 "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.
1077 "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
1078 },
1079 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1080 # - 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.
1081 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1082 # -
1083 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1084 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1085 # - 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.
1086 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1087 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1088 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1089 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1090 "A String",
1091 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001092 "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 -07001093 },
1094 "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.
1095 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1096 "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.
1097 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1098 # The value must be between 0.0 and 100.0 inclusive.
1099 "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.
1100 "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.
1101 "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
1102 },
1103 },
1104 "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.
1105 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1106 # The value must be between 0.0 and 100.0 inclusive.
1107 "httpStatus": 42, # The HTTP status code used to abort the request.
1108 # The value must be between 200 and 599 inclusive.
1109 },
1110 },
1111 "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
1112 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1113 "A String",
1114 ],
1115 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1116 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1117 "A String",
1118 ],
1119 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1120 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1121 "A String",
1122 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001123 "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 -07001124 "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.
1125 # Default is false.
1126 "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.
1127 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
1128 "A String",
1129 ],
1130 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
1131 "A String",
1132 ],
1133 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001134 "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.
1135 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001136 "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.
1137 "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
1138 },
1139 "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.
1140 # 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.
1141 { # 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
1142 "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.
1143 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1144 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1145 "A String",
1146 ],
1147 "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.
1148 "A String",
1149 ],
1150 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1151 { # Specification determining how headers are added to requests or responses.
1152 "headerName": "A String", # The name of the header.
1153 "headerValue": "A String", # The value of the header to add.
1154 "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.
1155 # The default value is false.
1156 },
1157 ],
1158 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1159 { # Specification determining how headers are added to requests or responses.
1160 "headerName": "A String", # The name of the header.
1161 "headerValue": "A String", # The value of the header to add.
1162 "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.
1163 # The default value is false.
1164 },
1165 ],
1166 },
1167 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1168 # 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.
1169 # The value must be between 0 and 1000
1170 "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.
1171 },
1172 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001173 "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 -07001174 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
1175 # The value must be between 1 and 255 characters.
1176 "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.
1177 # The value must be between 1 and 1024 characters.
1178 },
1179 },
1180 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1181 "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.
1182 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
1183 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001184 { # Message for the expected URL mappings.
1185 "path": "A String", # Path portion of the URL.
1186 "host": "A String", # Host portion of the URL.
1187 "description": "A String", # Description of this test case.
1188 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
1189 },
1190 ],
1191 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001192 "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.
1193 #
1194 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001195 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
1196 { # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001197 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1198 "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.
1199 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
1200 "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.
1201 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1202 },
1203 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1204 "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 -07001205 # 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 -07001206 "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.
1207 "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
1208 },
1209 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1210 # - 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.
1211 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1212 # -
1213 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1214 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1215 # - 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.
1216 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1217 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1218 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1219 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1220 "A String",
1221 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001222 "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 -07001223 },
1224 "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.
1225 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1226 "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.
1227 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1228 # The value must be between 0.0 and 100.0 inclusive.
1229 "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.
1230 "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.
1231 "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
1232 },
1233 },
1234 "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.
1235 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1236 # The value must be between 0.0 and 100.0 inclusive.
1237 "httpStatus": 42, # The HTTP status code used to abort the request.
1238 # The value must be between 200 and 599 inclusive.
1239 },
1240 },
1241 "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
1242 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1243 "A String",
1244 ],
1245 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1246 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1247 "A String",
1248 ],
1249 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1250 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1251 "A String",
1252 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001253 "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 -07001254 "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.
1255 # Default is false.
1256 "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.
1257 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
1258 "A String",
1259 ],
1260 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
1261 "A String",
1262 ],
1263 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001264 "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.
1265 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001266 "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.
1267 "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
1268 },
1269 "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.
1270 # 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.
1271 { # 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
1272 "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.
1273 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1274 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1275 "A String",
1276 ],
1277 "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.
1278 "A String",
1279 ],
1280 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1281 { # Specification determining how headers are added to requests or responses.
1282 "headerName": "A String", # The name of the header.
1283 "headerValue": "A String", # The value of the header to add.
1284 "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.
1285 # The default value is false.
1286 },
1287 ],
1288 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1289 { # Specification determining how headers are added to requests or responses.
1290 "headerName": "A String", # The name of the header.
1291 "headerValue": "A String", # The value of the header to add.
1292 "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.
1293 # The default value is false.
1294 },
1295 ],
1296 },
1297 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1298 # 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.
1299 # The value must be between 0 and 1000
1300 "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.
1301 },
1302 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001303 "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 -07001304 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
1305 # The value must be between 1 and 255 characters.
1306 "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.
1307 # The value must be between 1 and 1024 characters.
1308 },
1309 },
1310 "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:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001311 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
1312 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001313 # - 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.
1314 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
1315 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
1316 # - compute.backendBuckets.use
1317 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07001318 "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.
1319 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001320 { # 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 -07001321 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
1322 # If urlRedirect is specified, service or routeAction must not be set.
1323 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
1324 # 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.
1325 # The value must be between 1 and 1024 characters.
1326 "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.
1327 # The default is set to false.
1328 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
1329 # Supported values are:
1330 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1331 # - FOUND, which corresponds to 302.
1332 # - SEE_OTHER which corresponds to 303.
1333 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1334 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1335 "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.
1336 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1337 # The default is set to false.
1338 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
1339 # 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.
1340 # The value must be between 1 and 1024 characters.
1341 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
1342 # The value must be between 1 and 255 characters.
1343 },
1344 "description": "A String", # The short description conveying the intent of this routeRule.
1345 # The description can have a maximum length of 1024 characters.
1346 "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.
1347 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1348 "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.
1349 # 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.
1350 # 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.
1351 "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.
1352 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1353 "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.
1354 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1355 },
1356 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1357 "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.
1358 # 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.
1359 "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.
1360 "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
1361 },
1362 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1363 # - 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.
1364 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1365 # -
1366 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1367 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1368 # - 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.
1369 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1370 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1371 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1372 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1373 "A String",
1374 ],
1375 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1376 },
1377 "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.
1378 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1379 "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.
1380 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1381 # The value must be between 0.0 and 100.0 inclusive.
1382 "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.
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 },
1387 "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.
1388 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1389 # The value must be between 0.0 and 100.0 inclusive.
1390 "httpStatus": 42, # The HTTP status code used to abort the request.
1391 # The value must be between 200 and 599 inclusive.
1392 },
1393 },
1394 "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
1395 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1396 "A String",
1397 ],
1398 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1399 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1400 "A String",
1401 ],
1402 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1403 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1404 "A String",
1405 ],
1406 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
1407 "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.
1408 # Default is false.
1409 "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.
1410 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
1411 "A String",
1412 ],
1413 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
1414 "A String",
1415 ],
1416 },
1417 "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.
1418 # If not specified, will use the largest timeout among all backend services associated with the route.
1419 "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.
1420 "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
1421 },
1422 "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.
1423 # 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.
1424 { # 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
1425 "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.
1426 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1427 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1428 "A String",
1429 ],
1430 "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.
1431 "A String",
1432 ],
1433 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1434 { # Specification determining how headers are added to requests or responses.
1435 "headerName": "A String", # The name of the header.
1436 "headerValue": "A String", # The value of the header to add.
1437 "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.
1438 # The default value is false.
1439 },
1440 ],
1441 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1442 { # Specification determining how headers are added to requests or responses.
1443 "headerName": "A String", # The name of the header.
1444 "headerValue": "A String", # The value of the header to add.
1445 "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.
1446 # The default value is false.
1447 },
1448 ],
1449 },
1450 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1451 # 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.
1452 # The value must be between 0 and 1000
1453 "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.
1454 },
1455 ],
1456 "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.
1457 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
1458 # The value must be between 1 and 255 characters.
1459 "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.
1460 # The value must be between 1 and 1024 characters.
1461 },
1462 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001463 "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.
1464 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
1465 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1466 "A String",
1467 ],
1468 "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.
1469 "A String",
1470 ],
1471 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1472 { # Specification determining how headers are added to requests or responses.
1473 "headerName": "A String", # The name of the header.
1474 "headerValue": "A String", # The value of the header to add.
1475 "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.
1476 # The default value is false.
1477 },
1478 ],
1479 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1480 { # Specification determining how headers are added to requests or responses.
1481 "headerName": "A String", # The name of the header.
1482 "headerValue": "A String", # The value of the header to add.
1483 "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.
1484 # The default value is false.
1485 },
1486 ],
1487 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001488 "matchRules": [
1489 { # 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 -07001490 "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 -07001491 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07001492 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001493 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
1494 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -07001495 "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 -07001496 # 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.
1497 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07001498 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001499 "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.
1500 # The default setting is false.
1501 "headerName": "A String", # The name of the HTTP header to match.
1502 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
1503 # For matching a request's method, use the headerName ":method".
1504 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
1505 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1506 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
1507 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1508 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
1509 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07001510 "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 -07001511 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1512 "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.
1513 # For example for a range [-5, 0]
1514 # - -3 will match.
1515 # - 0 will not match.
1516 # - 0.25 will not match.
1517 # - -3someString will not match.
1518 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07001519 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001520 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
1521 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
1522 },
1523 },
1524 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001525 "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.
1526 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001527 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07001528 "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 -07001529 # The value must be between 1 and 1024 characters.
1530 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
1531 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
1532 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -07001533 # ignoreCase must not be used with regexMatch.
1534 "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.
1535 # 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.
1536 # 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 -07001537 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -07001538 { # 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.
1539 # 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.
1540 # 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 -07001541 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
1542 # Supported values are:
1543 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
1544 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
1545 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
1546 # This list must not be empty and can have at the most 64 entries.
1547 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
1548 "name": "A String", # Name of metadata label.
1549 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
1550 "value": "A String", # The value of the label must match the specified value.
1551 # value can have a maximum length of 1024 characters.
1552 },
1553 ],
1554 },
1555 ],
1556 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
1557 { # HttpRouteRuleMatch criteria for a request's query parameter.
1558 "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 -07001559 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001560 "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 -07001561 # Only one of presentMatch, exactMatch or regexMatch must be set.
1562 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001563 "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.
1564 "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 -07001565 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001566 },
1567 ],
1568 },
1569 ],
1570 },
1571 ],
1572 "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.
1573 # 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 -07001574 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001575 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
1576 "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.
1577 "A String",
1578 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001579 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
1580 # If urlRedirect is specified, service or routeAction must not be set.
1581 "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 -07001582 # 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 -07001583 # The value must be between 1 and 1024 characters.
1584 "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.
1585 # The default is set to false.
1586 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
1587 # Supported values are:
1588 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1589 # - FOUND, which corresponds to 302.
1590 # - SEE_OTHER which corresponds to 303.
1591 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1592 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1593 "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.
1594 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1595 # The default is set to false.
1596 "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 -07001597 # 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.
1598 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001599 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
1600 # The value must be between 1 and 255 characters.
1601 },
1602 "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.
1603 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1604 "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.
1605 # Only one of routeAction or urlRedirect must be set.
1606 "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.
1607 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1608 },
1609 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1610 "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 -07001611 # 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 -07001612 "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.
1613 "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
1614 },
1615 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1616 # - 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.
1617 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1618 # -
1619 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1620 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1621 # - 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.
1622 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1623 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1624 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1625 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1626 "A String",
1627 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001628 "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 -07001629 },
1630 "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.
1631 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1632 "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.
1633 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1634 # The value must be between 0.0 and 100.0 inclusive.
1635 "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.
1636 "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 },
1640 "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.
1641 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1642 # The value must be between 0.0 and 100.0 inclusive.
1643 "httpStatus": 42, # The HTTP status code used to abort the request.
1644 # The value must be between 200 and 599 inclusive.
1645 },
1646 },
1647 "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
1648 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1649 "A String",
1650 ],
1651 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1652 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1653 "A String",
1654 ],
1655 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1656 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1657 "A String",
1658 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001659 "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 -07001660 "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.
1661 # Default is false.
1662 "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.
1663 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
1664 "A String",
1665 ],
1666 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
1667 "A String",
1668 ],
1669 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001670 "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.
1671 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001672 "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.
1673 "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
1674 },
1675 "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.
1676 # 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.
1677 { # 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
1678 "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.
1679 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1680 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1681 "A String",
1682 ],
1683 "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.
1684 "A String",
1685 ],
1686 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1687 { # Specification determining how headers are added to requests or responses.
1688 "headerName": "A String", # The name of the header.
1689 "headerValue": "A String", # The value of the header to add.
1690 "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.
1691 # The default value is false.
1692 },
1693 ],
1694 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1695 { # Specification determining how headers are added to requests or responses.
1696 "headerName": "A String", # The name of the header.
1697 "headerValue": "A String", # The value of the header to add.
1698 "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.
1699 # The default value is false.
1700 },
1701 ],
1702 },
1703 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1704 # 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.
1705 # The value must be between 0 and 1000
1706 "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.
1707 },
1708 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001709 "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 -07001710 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
1711 # The value must be between 1 and 255 characters.
1712 "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.
1713 # The value must be between 1 and 1024 characters.
1714 },
1715 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001716 },
1717 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001718 "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.
1719 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
1720 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1721 "A String",
1722 ],
1723 "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.
1724 "A String",
1725 ],
1726 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1727 { # Specification determining how headers are added to requests or responses.
1728 "headerName": "A String", # The name of the header.
1729 "headerValue": "A String", # The value of the header to add.
1730 "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.
1731 # The default value is false.
1732 },
1733 ],
1734 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1735 { # Specification determining how headers are added to requests or responses.
1736 "headerName": "A String", # The name of the header.
1737 "headerValue": "A String", # The value of the header to add.
1738 "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.
1739 # The default value is false.
1740 },
1741 ],
1742 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001743 "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 -07001744 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
1745 "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 -07001746 # 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 -07001747 # The value must be between 1 and 1024 characters.
1748 "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.
1749 # The default is set to false.
1750 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
1751 # Supported values are:
1752 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1753 # - FOUND, which corresponds to 302.
1754 # - SEE_OTHER which corresponds to 303.
1755 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1756 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1757 "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.
1758 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1759 # The default is set to false.
1760 "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 -07001761 # 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.
1762 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001763 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
1764 # The value must be between 1 and 255 characters.
1765 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001766 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
1767 },
1768 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001769 "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.
1770 # The headerAction specified here take effect after headerAction specified under pathMatcher.
1771 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1772 "A String",
1773 ],
1774 "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.
1775 "A String",
1776 ],
1777 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1778 { # Specification determining how headers are added to requests or responses.
1779 "headerName": "A String", # The name of the header.
1780 "headerValue": "A String", # The value of the header to add.
1781 "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.
1782 # The default value is false.
1783 },
1784 ],
1785 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1786 { # Specification determining how headers are added to requests or responses.
1787 "headerName": "A String", # The name of the header.
1788 "headerValue": "A String", # The value of the header to add.
1789 "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.
1790 # The default value is false.
1791 },
1792 ],
1793 },
1794 "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.
1795 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
1796 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
1797 "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 -07001798 # 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 -07001799 # The value must be between 1 and 1024 characters.
1800 "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.
1801 # The default is set to false.
1802 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
1803 # Supported values are:
1804 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1805 # - FOUND, which corresponds to 302.
1806 # - SEE_OTHER which corresponds to 303.
1807 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1808 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1809 "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.
1810 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1811 # The default is set to false.
1812 "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 -07001813 # 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.
1814 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001815 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
1816 # The value must be between 1 and 255 characters.
1817 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001818 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1819 "hostRules": [ # The list of HostRules to use against the URL.
1820 { # 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 -07001821 "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 ..
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001822 "A String",
1823 ],
1824 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1825 "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.
1826 },
1827 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001828 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001829 }</pre>
1830</div>
1831
1832<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001833 <code class="details" id="insert">insert(project, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001834 <pre>Creates a UrlMap resource in the specified project using the data included in the request.
1835
1836Args:
1837 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001838 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001839 The object takes the form of:
1840
Dan O'Mearadd494642020-05-01 07:42:23 -07001841{ # Represents a URL Map resource.
1842 #
1843 # Google Compute Engine has two URL Map resources:
1844 #
1845 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
1846 #
1847 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
1848 #
1849 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
1850 #
1851 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
1852 #
1853 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001854 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
1855 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001856 "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.
1857 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
1858 "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.
1859 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1860 },
1861 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1862 "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 -07001863 # 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 -07001864 "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.
1865 "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
1866 },
1867 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1868 # - 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.
1869 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1870 # -
1871 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1872 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1873 # - 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.
1874 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1875 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1876 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1877 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1878 "A String",
1879 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001880 "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 -07001881 },
1882 "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.
1883 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1884 "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.
1885 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1886 # The value must be between 0.0 and 100.0 inclusive.
1887 "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.
1888 "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.
1889 "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
1890 },
1891 },
1892 "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.
1893 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1894 # The value must be between 0.0 and 100.0 inclusive.
1895 "httpStatus": 42, # The HTTP status code used to abort the request.
1896 # The value must be between 200 and 599 inclusive.
1897 },
1898 },
1899 "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
1900 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1901 "A String",
1902 ],
1903 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1904 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1905 "A String",
1906 ],
1907 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1908 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1909 "A String",
1910 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001911 "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 -07001912 "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.
1913 # Default is false.
1914 "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.
1915 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
1916 "A String",
1917 ],
1918 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
1919 "A String",
1920 ],
1921 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001922 "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.
1923 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001924 "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.
1925 "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
1926 },
1927 "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.
1928 # 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.
1929 { # 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
1930 "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.
1931 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1932 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1933 "A String",
1934 ],
1935 "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.
1936 "A String",
1937 ],
1938 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1939 { # Specification determining how headers are added to requests or responses.
1940 "headerName": "A String", # The name of the header.
1941 "headerValue": "A String", # The value of the header to add.
1942 "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.
1943 # The default value is false.
1944 },
1945 ],
1946 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1947 { # Specification determining how headers are added to requests or responses.
1948 "headerName": "A String", # The name of the header.
1949 "headerValue": "A String", # The value of the header to add.
1950 "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.
1951 # The default value is false.
1952 },
1953 ],
1954 },
1955 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1956 # 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.
1957 # The value must be between 0 and 1000
1958 "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.
1959 },
1960 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001961 "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 -07001962 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
1963 # The value must be between 1 and 255 characters.
1964 "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.
1965 # The value must be between 1 and 1024 characters.
1966 },
1967 },
1968 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1969 "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.
1970 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
1971 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001972 { # Message for the expected URL mappings.
1973 "path": "A String", # Path portion of the URL.
1974 "host": "A String", # Host portion of the URL.
1975 "description": "A String", # Description of this test case.
1976 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
1977 },
1978 ],
1979 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001980 "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.
1981 #
1982 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001983 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
1984 { # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001985 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1986 "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.
1987 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
1988 "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.
1989 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1990 },
1991 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1992 "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 -07001993 # 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 -07001994 "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.
1995 "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
1996 },
1997 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1998 # - 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.
1999 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2000 # -
2001 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2002 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2003 # - 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.
2004 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2005 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2006 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2007 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2008 "A String",
2009 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002010 "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 -07002011 },
2012 "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.
2013 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2014 "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.
2015 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2016 # The value must be between 0.0 and 100.0 inclusive.
2017 "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.
2018 "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.
2019 "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
2020 },
2021 },
2022 "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.
2023 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2024 # The value must be between 0.0 and 100.0 inclusive.
2025 "httpStatus": 42, # The HTTP status code used to abort the request.
2026 # The value must be between 200 and 599 inclusive.
2027 },
2028 },
2029 "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
2030 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2031 "A String",
2032 ],
2033 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2034 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2035 "A String",
2036 ],
2037 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2038 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2039 "A String",
2040 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002041 "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 -07002042 "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.
2043 # Default is false.
2044 "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.
2045 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
2046 "A String",
2047 ],
2048 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
2049 "A String",
2050 ],
2051 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002052 "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.
2053 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002054 "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.
2055 "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
2056 },
2057 "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.
2058 # 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.
2059 { # 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
2060 "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.
2061 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2062 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2063 "A String",
2064 ],
2065 "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.
2066 "A String",
2067 ],
2068 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2069 { # Specification determining how headers are added to requests or responses.
2070 "headerName": "A String", # The name of the header.
2071 "headerValue": "A String", # The value of the header to add.
2072 "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.
2073 # The default value is false.
2074 },
2075 ],
2076 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2077 { # Specification determining how headers are added to requests or responses.
2078 "headerName": "A String", # The name of the header.
2079 "headerValue": "A String", # The value of the header to add.
2080 "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.
2081 # The default value is false.
2082 },
2083 ],
2084 },
2085 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2086 # 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.
2087 # The value must be between 0 and 1000
2088 "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.
2089 },
2090 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002091 "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 -07002092 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
2093 # The value must be between 1 and 255 characters.
2094 "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.
2095 # The value must be between 1 and 1024 characters.
2096 },
2097 },
2098 "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:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002099 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
2100 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002101 # - 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.
2102 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
2103 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
2104 # - compute.backendBuckets.use
2105 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07002106 "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.
2107 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002108 { # 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 -07002109 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
2110 # If urlRedirect is specified, service or routeAction must not be set.
2111 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
2112 # 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.
2113 # The value must be between 1 and 1024 characters.
2114 "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.
2115 # The default is set to false.
2116 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
2117 # Supported values are:
2118 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2119 # - FOUND, which corresponds to 302.
2120 # - SEE_OTHER which corresponds to 303.
2121 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2122 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2123 "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.
2124 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2125 # The default is set to false.
2126 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
2127 # 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.
2128 # The value must be between 1 and 1024 characters.
2129 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
2130 # The value must be between 1 and 255 characters.
2131 },
2132 "description": "A String", # The short description conveying the intent of this routeRule.
2133 # The description can have a maximum length of 1024 characters.
2134 "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.
2135 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2136 "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.
2137 # 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.
2138 # 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.
2139 "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.
2140 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2141 "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.
2142 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
2143 },
2144 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2145 "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.
2146 # 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.
2147 "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.
2148 "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
2149 },
2150 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2151 # - 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.
2152 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2153 # -
2154 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2155 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2156 # - 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.
2157 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2158 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2159 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2160 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2161 "A String",
2162 ],
2163 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2164 },
2165 "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.
2166 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2167 "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.
2168 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2169 # The value must be between 0.0 and 100.0 inclusive.
2170 "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.
2171 "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.
2172 "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
2173 },
2174 },
2175 "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.
2176 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2177 # The value must be between 0.0 and 100.0 inclusive.
2178 "httpStatus": 42, # The HTTP status code used to abort the request.
2179 # The value must be between 200 and 599 inclusive.
2180 },
2181 },
2182 "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
2183 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2184 "A String",
2185 ],
2186 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2187 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2188 "A String",
2189 ],
2190 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2191 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2192 "A String",
2193 ],
2194 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
2195 "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.
2196 # Default is false.
2197 "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.
2198 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
2199 "A String",
2200 ],
2201 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
2202 "A String",
2203 ],
2204 },
2205 "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.
2206 # If not specified, will use the largest timeout among all backend services associated with the route.
2207 "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.
2208 "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
2209 },
2210 "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.
2211 # 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.
2212 { # 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
2213 "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.
2214 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2215 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2216 "A String",
2217 ],
2218 "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.
2219 "A String",
2220 ],
2221 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2222 { # Specification determining how headers are added to requests or responses.
2223 "headerName": "A String", # The name of the header.
2224 "headerValue": "A String", # The value of the header to add.
2225 "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.
2226 # The default value is false.
2227 },
2228 ],
2229 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2230 { # Specification determining how headers are added to requests or responses.
2231 "headerName": "A String", # The name of the header.
2232 "headerValue": "A String", # The value of the header to add.
2233 "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.
2234 # The default value is false.
2235 },
2236 ],
2237 },
2238 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2239 # 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.
2240 # The value must be between 0 and 1000
2241 "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.
2242 },
2243 ],
2244 "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.
2245 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
2246 # The value must be between 1 and 255 characters.
2247 "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.
2248 # The value must be between 1 and 1024 characters.
2249 },
2250 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002251 "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.
2252 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
2253 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2254 "A String",
2255 ],
2256 "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.
2257 "A String",
2258 ],
2259 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2260 { # Specification determining how headers are added to requests or responses.
2261 "headerName": "A String", # The name of the header.
2262 "headerValue": "A String", # The value of the header to add.
2263 "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.
2264 # The default value is false.
2265 },
2266 ],
2267 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2268 { # Specification determining how headers are added to requests or responses.
2269 "headerName": "A String", # The name of the header.
2270 "headerValue": "A String", # The value of the header to add.
2271 "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.
2272 # The default value is false.
2273 },
2274 ],
2275 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002276 "matchRules": [
2277 { # 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 -07002278 "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 -07002279 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07002280 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002281 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
2282 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -07002283 "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 -07002284 # 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.
2285 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07002286 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002287 "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.
2288 # The default setting is false.
2289 "headerName": "A String", # The name of the HTTP header to match.
2290 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
2291 # For matching a request's method, use the headerName ":method".
2292 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
2293 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2294 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
2295 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2296 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
2297 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07002298 "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 -07002299 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2300 "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.
2301 # For example for a range [-5, 0]
2302 # - -3 will match.
2303 # - 0 will not match.
2304 # - 0.25 will not match.
2305 # - -3someString will not match.
2306 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07002307 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002308 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
2309 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
2310 },
2311 },
2312 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002313 "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.
2314 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002315 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07002316 "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 -07002317 # The value must be between 1 and 1024 characters.
2318 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2319 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
2320 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -07002321 # ignoreCase must not be used with regexMatch.
2322 "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.
2323 # 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.
2324 # 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 -07002325 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -07002326 { # 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.
2327 # 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.
2328 # 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 -07002329 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
2330 # Supported values are:
2331 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
2332 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
2333 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
2334 # This list must not be empty and can have at the most 64 entries.
2335 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
2336 "name": "A String", # Name of metadata label.
2337 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
2338 "value": "A String", # The value of the label must match the specified value.
2339 # value can have a maximum length of 1024 characters.
2340 },
2341 ],
2342 },
2343 ],
2344 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
2345 { # HttpRouteRuleMatch criteria for a request's query parameter.
2346 "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 -07002347 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002348 "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 -07002349 # Only one of presentMatch, exactMatch or regexMatch must be set.
2350 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002351 "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.
2352 "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 -07002353 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002354 },
2355 ],
2356 },
2357 ],
2358 },
2359 ],
2360 "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.
2361 # 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 -07002362 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002363 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
2364 "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.
2365 "A String",
2366 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002367 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
2368 # If urlRedirect is specified, service or routeAction must not be set.
2369 "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 -07002370 # 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 -07002371 # The value must be between 1 and 1024 characters.
2372 "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.
2373 # The default is set to false.
2374 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
2375 # Supported values are:
2376 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2377 # - FOUND, which corresponds to 302.
2378 # - SEE_OTHER which corresponds to 303.
2379 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2380 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2381 "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.
2382 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2383 # The default is set to false.
2384 "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 -07002385 # 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.
2386 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002387 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
2388 # The value must be between 1 and 255 characters.
2389 },
2390 "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.
2391 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2392 "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.
2393 # Only one of routeAction or urlRedirect must be set.
2394 "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.
2395 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
2396 },
2397 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2398 "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 -07002399 # 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 -07002400 "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.
2401 "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
2402 },
2403 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2404 # - 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.
2405 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2406 # -
2407 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2408 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2409 # - 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.
2410 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2411 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2412 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2413 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2414 "A String",
2415 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002416 "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 -07002417 },
2418 "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.
2419 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2420 "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.
2421 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2422 # The value must be between 0.0 and 100.0 inclusive.
2423 "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.
2424 "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.
2425 "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
2426 },
2427 },
2428 "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.
2429 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2430 # The value must be between 0.0 and 100.0 inclusive.
2431 "httpStatus": 42, # The HTTP status code used to abort the request.
2432 # The value must be between 200 and 599 inclusive.
2433 },
2434 },
2435 "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
2436 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2437 "A String",
2438 ],
2439 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2440 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2441 "A String",
2442 ],
2443 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2444 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2445 "A String",
2446 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002447 "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 -07002448 "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.
2449 # Default is false.
2450 "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.
2451 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
2452 "A String",
2453 ],
2454 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
2455 "A String",
2456 ],
2457 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002458 "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.
2459 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002460 "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.
2461 "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
2462 },
2463 "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.
2464 # 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.
2465 { # 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
2466 "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.
2467 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2468 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2469 "A String",
2470 ],
2471 "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.
2472 "A String",
2473 ],
2474 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2475 { # Specification determining how headers are added to requests or responses.
2476 "headerName": "A String", # The name of the header.
2477 "headerValue": "A String", # The value of the header to add.
2478 "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.
2479 # The default value is false.
2480 },
2481 ],
2482 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2483 { # Specification determining how headers are added to requests or responses.
2484 "headerName": "A String", # The name of the header.
2485 "headerValue": "A String", # The value of the header to add.
2486 "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.
2487 # The default value is false.
2488 },
2489 ],
2490 },
2491 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2492 # 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.
2493 # The value must be between 0 and 1000
2494 "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.
2495 },
2496 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002497 "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 -07002498 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
2499 # The value must be between 1 and 255 characters.
2500 "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.
2501 # The value must be between 1 and 1024 characters.
2502 },
2503 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002504 },
2505 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002506 "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.
2507 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
2508 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2509 "A String",
2510 ],
2511 "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.
2512 "A String",
2513 ],
2514 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2515 { # Specification determining how headers are added to requests or responses.
2516 "headerName": "A String", # The name of the header.
2517 "headerValue": "A String", # The value of the header to add.
2518 "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.
2519 # The default value is false.
2520 },
2521 ],
2522 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2523 { # Specification determining how headers are added to requests or responses.
2524 "headerName": "A String", # The name of the header.
2525 "headerValue": "A String", # The value of the header to add.
2526 "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.
2527 # The default value is false.
2528 },
2529 ],
2530 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002531 "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 -07002532 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
2533 "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 -07002534 # 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 -07002535 # The value must be between 1 and 1024 characters.
2536 "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.
2537 # The default is set to false.
2538 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
2539 # Supported values are:
2540 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2541 # - FOUND, which corresponds to 302.
2542 # - SEE_OTHER which corresponds to 303.
2543 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2544 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2545 "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.
2546 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2547 # The default is set to false.
2548 "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 -07002549 # 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.
2550 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002551 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
2552 # The value must be between 1 and 255 characters.
2553 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002554 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
2555 },
2556 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002557 "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.
2558 # The headerAction specified here take effect after headerAction specified under pathMatcher.
2559 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2560 "A String",
2561 ],
2562 "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.
2563 "A String",
2564 ],
2565 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2566 { # Specification determining how headers are added to requests or responses.
2567 "headerName": "A String", # The name of the header.
2568 "headerValue": "A String", # The value of the header to add.
2569 "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.
2570 # The default value is false.
2571 },
2572 ],
2573 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2574 { # Specification determining how headers are added to requests or responses.
2575 "headerName": "A String", # The name of the header.
2576 "headerValue": "A String", # The value of the header to add.
2577 "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.
2578 # The default value is false.
2579 },
2580 ],
2581 },
2582 "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.
2583 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
2584 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
2585 "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 -07002586 # 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 -07002587 # The value must be between 1 and 1024 characters.
2588 "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.
2589 # The default is set to false.
2590 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
2591 # Supported values are:
2592 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2593 # - FOUND, which corresponds to 302.
2594 # - SEE_OTHER which corresponds to 303.
2595 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2596 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2597 "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.
2598 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2599 # The default is set to false.
2600 "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 -07002601 # 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.
2602 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002603 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
2604 # The value must be between 1 and 255 characters.
2605 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002606 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2607 "hostRules": [ # The list of HostRules to use against the URL.
2608 { # 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 -07002609 "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 ..
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002610 "A String",
2611 ],
2612 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
2613 "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.
2614 },
2615 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002616 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002617 }
2618
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002619 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2620
2621For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2622
2623The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002624
2625Returns:
2626 An object of the form:
2627
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002628 { # Represents an Operation resource.
2629 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002630 # Google Compute Engine has three Operation resources:
2631 #
2632 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2633 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002634 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2635 #
2636 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002637 # - For global operations, use the `globalOperations` resource.
2638 # - For regional operations, use the `regionOperations` resource.
2639 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002640 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002641 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002642 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002643 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002644 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07002645 "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 -07002646 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002647 "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 -07002648 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2649 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002650 "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 -07002651 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002652 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002653 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002654 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2655 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2656 {
2657 "message": "A String", # [Output Only] A human-readable description of the warning code.
2658 "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.
2659 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2660 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2661 {
2662 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2663 "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).
2664 },
2665 ],
2666 },
2667 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002668 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002669 "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 -07002670 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2671 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002672 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002673 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2674 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2675 {
2676 "message": "A String", # [Output Only] An optional, human-readable error message.
2677 "code": "A String", # [Output Only] The error type identifier for this error.
2678 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2679 },
2680 ],
2681 },
2682 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2683 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002684 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002685 }</pre>
2686</div>
2687
2688<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002689 <code class="details" id="invalidateCache">invalidateCache(project, urlMap, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002690 <pre>Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.
2691
2692Args:
2693 project: string, Project ID for this request. (required)
2694 urlMap: string, Name of the UrlMap scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002695 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002696 The object takes the form of:
2697
2698{
2699 "path": "A String",
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002700 "host": "A String", # If set, this invalidation rule will only apply to requests with a Host header matching host.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002701 }
2702
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002703 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2704
2705For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2706
2707The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002708
2709Returns:
2710 An object of the form:
2711
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002712 { # Represents an Operation resource.
2713 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002714 # Google Compute Engine has three Operation resources:
2715 #
2716 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2717 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002718 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2719 #
2720 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002721 # - For global operations, use the `globalOperations` resource.
2722 # - For regional operations, use the `regionOperations` resource.
2723 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002724 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002725 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002726 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002727 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002728 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07002729 "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 -07002730 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002731 "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 -07002732 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2733 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002734 "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 -07002735 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002736 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002737 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002738 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2739 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2740 {
2741 "message": "A String", # [Output Only] A human-readable description of the warning code.
2742 "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.
2743 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2744 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2745 {
2746 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2747 "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).
2748 },
2749 ],
2750 },
2751 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002752 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002753 "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 -07002754 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2755 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002756 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002757 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2758 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2759 {
2760 "message": "A String", # [Output Only] An optional, human-readable error message.
2761 "code": "A String", # [Output Only] The error type identifier for this error.
2762 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2763 },
2764 ],
2765 },
2766 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2767 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002768 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002769 }</pre>
2770</div>
2771
2772<div class="method">
2773 <code class="details" id="list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
2774 <pre>Retrieves the list of UrlMap resources available to the specified project.
2775
2776Args:
2777 project: string, Project ID for this request. (required)
2778 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
2779
Dan O'Mearadd494642020-05-01 07:42:23 -07002780You 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002781
Dan O'Mearadd494642020-05-01 07:42:23 -07002782Currently, only sorting by `name` or `creationTimestamp desc` is supported.
2783 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`)
2784 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.
2785 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;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002786
Dan O'Mearadd494642020-05-01 07:42:23 -07002787For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002788
Dan O'Mearadd494642020-05-01 07:42:23 -07002789You 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002790
Dan O'Mearadd494642020-05-01 07:42:23 -07002791To 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) ```
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002792
2793Returns:
2794 An object of the form:
2795
2796 { # Contains a list of UrlMap resources.
2797 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002798 "kind": "compute#urlMapList", # Type of resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002799 "items": [ # A list of UrlMap resources.
Dan O'Mearadd494642020-05-01 07:42:23 -07002800 { # Represents a URL Map resource.
2801 #
2802 # Google Compute Engine has two URL Map resources:
2803 #
2804 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
2805 #
2806 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
2807 #
2808 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
2809 #
2810 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
2811 #
2812 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002813 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
2814 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002815 "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.
2816 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
2817 "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.
2818 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
2819 },
2820 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2821 "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 -07002822 # 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 -07002823 "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.
2824 "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
2825 },
2826 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2827 # - 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.
2828 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2829 # -
2830 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2831 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2832 # - 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.
2833 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2834 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2835 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2836 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2837 "A String",
2838 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002839 "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 -07002840 },
2841 "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.
2842 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2843 "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.
2844 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2845 # The value must be between 0.0 and 100.0 inclusive.
2846 "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.
2847 "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.
2848 "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
2849 },
2850 },
2851 "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.
2852 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2853 # The value must be between 0.0 and 100.0 inclusive.
2854 "httpStatus": 42, # The HTTP status code used to abort the request.
2855 # The value must be between 200 and 599 inclusive.
2856 },
2857 },
2858 "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
2859 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2860 "A String",
2861 ],
2862 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2863 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2864 "A String",
2865 ],
2866 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2867 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2868 "A String",
2869 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002870 "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 -07002871 "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.
2872 # Default is false.
2873 "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.
2874 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
2875 "A String",
2876 ],
2877 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
2878 "A String",
2879 ],
2880 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002881 "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.
2882 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002883 "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.
2884 "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
2885 },
2886 "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.
2887 # 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.
2888 { # 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
2889 "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.
2890 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2891 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2892 "A String",
2893 ],
2894 "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.
2895 "A String",
2896 ],
2897 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2898 { # Specification determining how headers are added to requests or responses.
2899 "headerName": "A String", # The name of the header.
2900 "headerValue": "A String", # The value of the header to add.
2901 "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.
2902 # The default value is false.
2903 },
2904 ],
2905 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2906 { # Specification determining how headers are added to requests or responses.
2907 "headerName": "A String", # The name of the header.
2908 "headerValue": "A String", # The value of the header to add.
2909 "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.
2910 # The default value is false.
2911 },
2912 ],
2913 },
2914 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2915 # 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.
2916 # The value must be between 0 and 1000
2917 "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.
2918 },
2919 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002920 "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 -07002921 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
2922 # The value must be between 1 and 255 characters.
2923 "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.
2924 # The value must be between 1 and 1024 characters.
2925 },
2926 },
2927 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
2928 "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.
2929 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
2930 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002931 { # Message for the expected URL mappings.
2932 "path": "A String", # Path portion of the URL.
2933 "host": "A String", # Host portion of the URL.
2934 "description": "A String", # Description of this test case.
2935 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
2936 },
2937 ],
2938 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002939 "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.
2940 #
2941 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002942 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
2943 { # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002944 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
2945 "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.
2946 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
2947 "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.
2948 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
2949 },
2950 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2951 "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 -07002952 # 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 -07002953 "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.
2954 "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
2955 },
2956 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2957 # - 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.
2958 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2959 # -
2960 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2961 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2962 # - 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.
2963 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2964 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2965 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2966 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2967 "A String",
2968 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002969 "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 -07002970 },
2971 "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.
2972 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2973 "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.
2974 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2975 # The value must be between 0.0 and 100.0 inclusive.
2976 "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.
2977 "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.
2978 "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
2979 },
2980 },
2981 "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.
2982 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2983 # The value must be between 0.0 and 100.0 inclusive.
2984 "httpStatus": 42, # The HTTP status code used to abort the request.
2985 # The value must be between 200 and 599 inclusive.
2986 },
2987 },
2988 "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
2989 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2990 "A String",
2991 ],
2992 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2993 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2994 "A String",
2995 ],
2996 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2997 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2998 "A String",
2999 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003000 "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 -07003001 "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.
3002 # Default is false.
3003 "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.
3004 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3005 "A String",
3006 ],
3007 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3008 "A String",
3009 ],
3010 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003011 "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.
3012 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003013 "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.
3014 "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
3015 },
3016 "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.
3017 # 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.
3018 { # 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
3019 "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.
3020 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3021 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3022 "A String",
3023 ],
3024 "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.
3025 "A String",
3026 ],
3027 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3028 { # Specification determining how headers are added to requests or responses.
3029 "headerName": "A String", # The name of the header.
3030 "headerValue": "A String", # The value of the header to add.
3031 "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.
3032 # The default value is false.
3033 },
3034 ],
3035 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3036 { # Specification determining how headers are added to requests or responses.
3037 "headerName": "A String", # The name of the header.
3038 "headerValue": "A String", # The value of the header to add.
3039 "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.
3040 # The default value is false.
3041 },
3042 ],
3043 },
3044 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3045 # 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.
3046 # The value must be between 0 and 1000
3047 "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.
3048 },
3049 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003050 "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 -07003051 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3052 # The value must be between 1 and 255 characters.
3053 "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.
3054 # The value must be between 1 and 1024 characters.
3055 },
3056 },
3057 "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:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003058 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
3059 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003060 # - 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.
3061 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3062 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
3063 # - compute.backendBuckets.use
3064 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07003065 "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.
3066 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003067 { # 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 -07003068 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
3069 # If urlRedirect is specified, service or routeAction must not be set.
3070 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
3071 # 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.
3072 # The value must be between 1 and 1024 characters.
3073 "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.
3074 # The default is set to false.
3075 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3076 # Supported values are:
3077 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3078 # - FOUND, which corresponds to 302.
3079 # - SEE_OTHER which corresponds to 303.
3080 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3081 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3082 "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.
3083 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3084 # The default is set to false.
3085 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
3086 # 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.
3087 # The value must be between 1 and 1024 characters.
3088 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3089 # The value must be between 1 and 255 characters.
3090 },
3091 "description": "A String", # The short description conveying the intent of this routeRule.
3092 # The description can have a maximum length of 1024 characters.
3093 "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.
3094 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3095 "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.
3096 # 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.
3097 # 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.
3098 "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.
3099 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3100 "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.
3101 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3102 },
3103 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3104 "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.
3105 # 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.
3106 "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.
3107 "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
3108 },
3109 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3110 # - 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.
3111 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3112 # -
3113 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3114 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3115 # - 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.
3116 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3117 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3118 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3119 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3120 "A String",
3121 ],
3122 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3123 },
3124 "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.
3125 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3126 "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.
3127 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3128 # The value must be between 0.0 and 100.0 inclusive.
3129 "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.
3130 "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.
3131 "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
3132 },
3133 },
3134 "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.
3135 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3136 # The value must be between 0.0 and 100.0 inclusive.
3137 "httpStatus": 42, # The HTTP status code used to abort the request.
3138 # The value must be between 200 and 599 inclusive.
3139 },
3140 },
3141 "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
3142 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3143 "A String",
3144 ],
3145 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3146 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3147 "A String",
3148 ],
3149 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3150 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3151 "A String",
3152 ],
3153 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
3154 "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.
3155 # Default is false.
3156 "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.
3157 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3158 "A String",
3159 ],
3160 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3161 "A String",
3162 ],
3163 },
3164 "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.
3165 # If not specified, will use the largest timeout among all backend services associated with the route.
3166 "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.
3167 "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
3168 },
3169 "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.
3170 # 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.
3171 { # 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
3172 "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.
3173 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3174 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3175 "A String",
3176 ],
3177 "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.
3178 "A String",
3179 ],
3180 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3181 { # Specification determining how headers are added to requests or responses.
3182 "headerName": "A String", # The name of the header.
3183 "headerValue": "A String", # The value of the header to add.
3184 "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.
3185 # The default value is false.
3186 },
3187 ],
3188 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3189 { # Specification determining how headers are added to requests or responses.
3190 "headerName": "A String", # The name of the header.
3191 "headerValue": "A String", # The value of the header to add.
3192 "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.
3193 # The default value is false.
3194 },
3195 ],
3196 },
3197 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3198 # 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.
3199 # The value must be between 0 and 1000
3200 "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.
3201 },
3202 ],
3203 "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.
3204 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3205 # The value must be between 1 and 255 characters.
3206 "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.
3207 # The value must be between 1 and 1024 characters.
3208 },
3209 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003210 "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.
3211 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
3212 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3213 "A String",
3214 ],
3215 "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.
3216 "A String",
3217 ],
3218 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3219 { # Specification determining how headers are added to requests or responses.
3220 "headerName": "A String", # The name of the header.
3221 "headerValue": "A String", # The value of the header to add.
3222 "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.
3223 # The default value is false.
3224 },
3225 ],
3226 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3227 { # Specification determining how headers are added to requests or responses.
3228 "headerName": "A String", # The name of the header.
3229 "headerValue": "A String", # The value of the header to add.
3230 "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.
3231 # The default value is false.
3232 },
3233 ],
3234 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003235 "matchRules": [
3236 { # 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 -07003237 "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 -07003238 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07003239 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003240 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
3241 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -07003242 "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 -07003243 # 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.
3244 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07003245 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003246 "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.
3247 # The default setting is false.
3248 "headerName": "A String", # The name of the HTTP header to match.
3249 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
3250 # For matching a request's method, use the headerName ":method".
3251 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
3252 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3253 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
3254 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3255 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
3256 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07003257 "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 -07003258 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3259 "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.
3260 # For example for a range [-5, 0]
3261 # - -3 will match.
3262 # - 0 will not match.
3263 # - 0.25 will not match.
3264 # - -3someString will not match.
3265 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07003266 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003267 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
3268 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
3269 },
3270 },
3271 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003272 "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.
3273 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003274 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07003275 "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 -07003276 # The value must be between 1 and 1024 characters.
3277 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3278 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
3279 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -07003280 # ignoreCase must not be used with regexMatch.
3281 "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.
3282 # 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.
3283 # 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 -07003284 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -07003285 { # 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.
3286 # 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.
3287 # 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 -07003288 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
3289 # Supported values are:
3290 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
3291 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
3292 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
3293 # This list must not be empty and can have at the most 64 entries.
3294 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
3295 "name": "A String", # Name of metadata label.
3296 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
3297 "value": "A String", # The value of the label must match the specified value.
3298 # value can have a maximum length of 1024 characters.
3299 },
3300 ],
3301 },
3302 ],
3303 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
3304 { # HttpRouteRuleMatch criteria for a request's query parameter.
3305 "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 -07003306 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003307 "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 -07003308 # Only one of presentMatch, exactMatch or regexMatch must be set.
3309 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003310 "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.
3311 "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 -07003312 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003313 },
3314 ],
3315 },
3316 ],
3317 },
3318 ],
3319 "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.
3320 # 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 -07003321 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003322 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
3323 "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.
3324 "A String",
3325 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003326 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
3327 # If urlRedirect is specified, service or routeAction must not be set.
3328 "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 -07003329 # 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 -07003330 # The value must be between 1 and 1024 characters.
3331 "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.
3332 # The default is set to false.
3333 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3334 # Supported values are:
3335 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3336 # - FOUND, which corresponds to 302.
3337 # - SEE_OTHER which corresponds to 303.
3338 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3339 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3340 "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.
3341 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3342 # The default is set to false.
3343 "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 -07003344 # 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.
3345 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003346 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3347 # The value must be between 1 and 255 characters.
3348 },
3349 "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.
3350 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3351 "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.
3352 # Only one of routeAction or urlRedirect must be set.
3353 "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.
3354 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3355 },
3356 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3357 "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 -07003358 # 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 -07003359 "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.
3360 "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
3361 },
3362 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3363 # - 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.
3364 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3365 # -
3366 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3367 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3368 # - 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.
3369 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3370 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3371 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3372 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3373 "A String",
3374 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003375 "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 -07003376 },
3377 "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.
3378 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3379 "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.
3380 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3381 # The value must be between 0.0 and 100.0 inclusive.
3382 "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.
3383 "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.
3384 "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
3385 },
3386 },
3387 "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.
3388 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3389 # The value must be between 0.0 and 100.0 inclusive.
3390 "httpStatus": 42, # The HTTP status code used to abort the request.
3391 # The value must be between 200 and 599 inclusive.
3392 },
3393 },
3394 "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
3395 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3396 "A String",
3397 ],
3398 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3399 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3400 "A String",
3401 ],
3402 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3403 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3404 "A String",
3405 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003406 "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 -07003407 "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.
3408 # Default is false.
3409 "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.
3410 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3411 "A String",
3412 ],
3413 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3414 "A String",
3415 ],
3416 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003417 "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.
3418 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003419 "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.
3420 "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
3421 },
3422 "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.
3423 # 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.
3424 { # 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
3425 "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.
3426 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3427 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3428 "A String",
3429 ],
3430 "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.
3431 "A String",
3432 ],
3433 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3434 { # Specification determining how headers are added to requests or responses.
3435 "headerName": "A String", # The name of the header.
3436 "headerValue": "A String", # The value of the header to add.
3437 "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.
3438 # The default value is false.
3439 },
3440 ],
3441 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3442 { # Specification determining how headers are added to requests or responses.
3443 "headerName": "A String", # The name of the header.
3444 "headerValue": "A String", # The value of the header to add.
3445 "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.
3446 # The default value is false.
3447 },
3448 ],
3449 },
3450 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3451 # 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.
3452 # The value must be between 0 and 1000
3453 "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.
3454 },
3455 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003456 "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 -07003457 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3458 # The value must be between 1 and 255 characters.
3459 "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.
3460 # The value must be between 1 and 1024 characters.
3461 },
3462 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003463 },
3464 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003465 "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.
3466 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
3467 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3468 "A String",
3469 ],
3470 "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.
3471 "A String",
3472 ],
3473 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3474 { # Specification determining how headers are added to requests or responses.
3475 "headerName": "A String", # The name of the header.
3476 "headerValue": "A String", # The value of the header to add.
3477 "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.
3478 # The default value is false.
3479 },
3480 ],
3481 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3482 { # Specification determining how headers are added to requests or responses.
3483 "headerName": "A String", # The name of the header.
3484 "headerValue": "A String", # The value of the header to add.
3485 "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.
3486 # The default value is false.
3487 },
3488 ],
3489 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003490 "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 -07003491 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
3492 "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 -07003493 # 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 -07003494 # The value must be between 1 and 1024 characters.
3495 "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.
3496 # The default is set to false.
3497 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3498 # Supported values are:
3499 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3500 # - FOUND, which corresponds to 302.
3501 # - SEE_OTHER which corresponds to 303.
3502 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3503 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3504 "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.
3505 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3506 # The default is set to false.
3507 "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 -07003508 # 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.
3509 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003510 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3511 # The value must be between 1 and 255 characters.
3512 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003513 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
3514 },
3515 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003516 "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.
3517 # The headerAction specified here take effect after headerAction specified under pathMatcher.
3518 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3519 "A String",
3520 ],
3521 "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.
3522 "A String",
3523 ],
3524 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3525 { # Specification determining how headers are added to requests or responses.
3526 "headerName": "A String", # The name of the header.
3527 "headerValue": "A String", # The value of the header to add.
3528 "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.
3529 # The default value is false.
3530 },
3531 ],
3532 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3533 { # Specification determining how headers are added to requests or responses.
3534 "headerName": "A String", # The name of the header.
3535 "headerValue": "A String", # The value of the header to add.
3536 "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.
3537 # The default value is false.
3538 },
3539 ],
3540 },
3541 "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.
3542 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
3543 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
3544 "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 -07003545 # 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 -07003546 # The value must be between 1 and 1024 characters.
3547 "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.
3548 # The default is set to false.
3549 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3550 # Supported values are:
3551 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3552 # - FOUND, which corresponds to 302.
3553 # - SEE_OTHER which corresponds to 303.
3554 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3555 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3556 "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.
3557 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3558 # The default is set to false.
3559 "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 -07003560 # 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.
3561 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003562 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3563 # The value must be between 1 and 255 characters.
3564 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003565 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3566 "hostRules": [ # The list of HostRules to use against the URL.
3567 { # 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 -07003568 "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 ..
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003569 "A String",
3570 ],
3571 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
3572 "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.
3573 },
3574 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003575 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003576 },
3577 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003578 "warning": { # [Output Only] Informational warning message.
3579 "message": "A String", # [Output Only] A human-readable description of the warning code.
3580 "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.
3581 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3582 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3583 {
3584 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3585 "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).
3586 },
3587 ],
3588 },
3589 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003590 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
3591 }</pre>
3592</div>
3593
3594<div class="method">
3595 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
3596 <pre>Retrieves the next page of results.
3597
3598Args:
3599 previous_request: The request for the previous page. (required)
3600 previous_response: The response from the request for the previous page. (required)
3601
3602Returns:
3603 A request object that you can call 'execute()' on to request the next
3604 page. Returns None if there are no more items in the collection.
3605 </pre>
3606</div>
3607
3608<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003609 <code class="details" id="patch">patch(project, urlMap, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003610 <pre>Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003611
3612Args:
3613 project: string, Project ID for this request. (required)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003614 urlMap: string, Name of the UrlMap resource to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003615 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003616 The object takes the form of:
3617
Dan O'Mearadd494642020-05-01 07:42:23 -07003618{ # Represents a URL Map resource.
3619 #
3620 # Google Compute Engine has two URL Map resources:
3621 #
3622 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
3623 #
3624 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
3625 #
3626 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
3627 #
3628 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
3629 #
3630 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003631 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
3632 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003633 "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.
3634 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
3635 "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.
3636 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3637 },
3638 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3639 "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 -07003640 # 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 -07003641 "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.
3642 "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
3643 },
3644 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3645 # - 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.
3646 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3647 # -
3648 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3649 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3650 # - 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.
3651 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3652 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3653 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3654 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3655 "A String",
3656 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003657 "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 -07003658 },
3659 "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.
3660 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3661 "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.
3662 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3663 # The value must be between 0.0 and 100.0 inclusive.
3664 "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.
3665 "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.
3666 "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
3667 },
3668 },
3669 "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.
3670 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3671 # The value must be between 0.0 and 100.0 inclusive.
3672 "httpStatus": 42, # The HTTP status code used to abort the request.
3673 # The value must be between 200 and 599 inclusive.
3674 },
3675 },
3676 "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
3677 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3678 "A String",
3679 ],
3680 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3681 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3682 "A String",
3683 ],
3684 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3685 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3686 "A String",
3687 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003688 "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 -07003689 "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.
3690 # Default is false.
3691 "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.
3692 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3693 "A String",
3694 ],
3695 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3696 "A String",
3697 ],
3698 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003699 "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.
3700 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003701 "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.
3702 "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
3703 },
3704 "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.
3705 # 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.
3706 { # 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
3707 "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.
3708 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3709 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3710 "A String",
3711 ],
3712 "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.
3713 "A String",
3714 ],
3715 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3716 { # Specification determining how headers are added to requests or responses.
3717 "headerName": "A String", # The name of the header.
3718 "headerValue": "A String", # The value of the header to add.
3719 "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.
3720 # The default value is false.
3721 },
3722 ],
3723 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3724 { # Specification determining how headers are added to requests or responses.
3725 "headerName": "A String", # The name of the header.
3726 "headerValue": "A String", # The value of the header to add.
3727 "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.
3728 # The default value is false.
3729 },
3730 ],
3731 },
3732 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3733 # 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.
3734 # The value must be between 0 and 1000
3735 "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.
3736 },
3737 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003738 "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 -07003739 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3740 # The value must be between 1 and 255 characters.
3741 "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.
3742 # The value must be between 1 and 1024 characters.
3743 },
3744 },
3745 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
3746 "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.
3747 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3748 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003749 { # Message for the expected URL mappings.
3750 "path": "A String", # Path portion of the URL.
3751 "host": "A String", # Host portion of the URL.
3752 "description": "A String", # Description of this test case.
3753 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
3754 },
3755 ],
3756 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003757 "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.
3758 #
3759 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003760 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
3761 { # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003762 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
3763 "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.
3764 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
3765 "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.
3766 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3767 },
3768 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3769 "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 -07003770 # 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 -07003771 "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.
3772 "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
3773 },
3774 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3775 # - 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.
3776 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3777 # -
3778 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3779 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3780 # - 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.
3781 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3782 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3783 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3784 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3785 "A String",
3786 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003787 "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 -07003788 },
3789 "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.
3790 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3791 "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.
3792 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3793 # The value must be between 0.0 and 100.0 inclusive.
3794 "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.
3795 "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.
3796 "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
3797 },
3798 },
3799 "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.
3800 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3801 # The value must be between 0.0 and 100.0 inclusive.
3802 "httpStatus": 42, # The HTTP status code used to abort the request.
3803 # The value must be between 200 and 599 inclusive.
3804 },
3805 },
3806 "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
3807 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3808 "A String",
3809 ],
3810 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3811 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3812 "A String",
3813 ],
3814 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3815 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3816 "A String",
3817 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003818 "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 -07003819 "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.
3820 # Default is false.
3821 "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.
3822 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3823 "A String",
3824 ],
3825 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3826 "A String",
3827 ],
3828 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003829 "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.
3830 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003831 "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.
3832 "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
3833 },
3834 "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.
3835 # 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.
3836 { # 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
3837 "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.
3838 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3839 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3840 "A String",
3841 ],
3842 "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.
3843 "A String",
3844 ],
3845 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3846 { # Specification determining how headers are added to requests or responses.
3847 "headerName": "A String", # The name of the header.
3848 "headerValue": "A String", # The value of the header to add.
3849 "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.
3850 # The default value is false.
3851 },
3852 ],
3853 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3854 { # Specification determining how headers are added to requests or responses.
3855 "headerName": "A String", # The name of the header.
3856 "headerValue": "A String", # The value of the header to add.
3857 "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.
3858 # The default value is false.
3859 },
3860 ],
3861 },
3862 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3863 # 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.
3864 # The value must be between 0 and 1000
3865 "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.
3866 },
3867 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003868 "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 -07003869 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3870 # The value must be between 1 and 255 characters.
3871 "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.
3872 # The value must be between 1 and 1024 characters.
3873 },
3874 },
3875 "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:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003876 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
3877 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003878 # - 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.
3879 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3880 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
3881 # - compute.backendBuckets.use
3882 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07003883 "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.
3884 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003885 { # 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 -07003886 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
3887 # If urlRedirect is specified, service or routeAction must not be set.
3888 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
3889 # 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.
3890 # The value must be between 1 and 1024 characters.
3891 "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.
3892 # The default is set to false.
3893 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3894 # Supported values are:
3895 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3896 # - FOUND, which corresponds to 302.
3897 # - SEE_OTHER which corresponds to 303.
3898 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3899 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3900 "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.
3901 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3902 # The default is set to false.
3903 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
3904 # 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.
3905 # The value must be between 1 and 1024 characters.
3906 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3907 # The value must be between 1 and 255 characters.
3908 },
3909 "description": "A String", # The short description conveying the intent of this routeRule.
3910 # The description can have a maximum length of 1024 characters.
3911 "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.
3912 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3913 "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.
3914 # 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.
3915 # 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.
3916 "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.
3917 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3918 "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.
3919 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3920 },
3921 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3922 "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.
3923 # 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.
3924 "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 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3928 # - 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.
3929 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3930 # -
3931 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3932 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3933 # - 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.
3934 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3935 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3936 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3937 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3938 "A String",
3939 ],
3940 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3941 },
3942 "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.
3943 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3944 "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.
3945 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3946 # The value must be between 0.0 and 100.0 inclusive.
3947 "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.
3948 "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.
3949 "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
3950 },
3951 },
3952 "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.
3953 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3954 # The value must be between 0.0 and 100.0 inclusive.
3955 "httpStatus": 42, # The HTTP status code used to abort the request.
3956 # The value must be between 200 and 599 inclusive.
3957 },
3958 },
3959 "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
3960 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3961 "A String",
3962 ],
3963 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3964 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3965 "A String",
3966 ],
3967 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3968 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3969 "A String",
3970 ],
3971 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
3972 "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.
3973 # Default is false.
3974 "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.
3975 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3976 "A String",
3977 ],
3978 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3979 "A String",
3980 ],
3981 },
3982 "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.
3983 # If not specified, will use the largest timeout among all backend services associated with the route.
3984 "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.
3985 "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
3986 },
3987 "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.
3988 # 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.
3989 { # 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
3990 "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.
3991 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3992 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3993 "A String",
3994 ],
3995 "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.
3996 "A String",
3997 ],
3998 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3999 { # Specification determining how headers are added to requests or responses.
4000 "headerName": "A String", # The name of the header.
4001 "headerValue": "A String", # The value of the header to add.
4002 "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.
4003 # The default value is false.
4004 },
4005 ],
4006 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4007 { # Specification determining how headers are added to requests or responses.
4008 "headerName": "A String", # The name of the header.
4009 "headerValue": "A String", # The value of the header to add.
4010 "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.
4011 # The default value is false.
4012 },
4013 ],
4014 },
4015 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4016 # 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.
4017 # The value must be between 0 and 1000
4018 "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.
4019 },
4020 ],
4021 "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.
4022 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
4023 # The value must be between 1 and 255 characters.
4024 "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.
4025 # The value must be between 1 and 1024 characters.
4026 },
4027 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004028 "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.
4029 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
4030 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4031 "A String",
4032 ],
4033 "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.
4034 "A String",
4035 ],
4036 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4037 { # Specification determining how headers are added to requests or responses.
4038 "headerName": "A String", # The name of the header.
4039 "headerValue": "A String", # The value of the header to add.
4040 "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.
4041 # The default value is false.
4042 },
4043 ],
4044 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4045 { # Specification determining how headers are added to requests or responses.
4046 "headerName": "A String", # The name of the header.
4047 "headerValue": "A String", # The value of the header to add.
4048 "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.
4049 # The default value is false.
4050 },
4051 ],
4052 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004053 "matchRules": [
4054 { # 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 -07004055 "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 -07004056 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07004057 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004058 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
4059 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -07004060 "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 -07004061 # 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.
4062 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07004063 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004064 "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.
4065 # The default setting is false.
4066 "headerName": "A String", # The name of the HTTP header to match.
4067 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
4068 # For matching a request's method, use the headerName ":method".
4069 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
4070 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4071 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
4072 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4073 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
4074 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07004075 "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 -07004076 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4077 "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.
4078 # For example for a range [-5, 0]
4079 # - -3 will match.
4080 # - 0 will not match.
4081 # - 0.25 will not match.
4082 # - -3someString will not match.
4083 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07004084 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004085 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
4086 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
4087 },
4088 },
4089 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004090 "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.
4091 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004092 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07004093 "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 -07004094 # The value must be between 1 and 1024 characters.
4095 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4096 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
4097 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -07004098 # ignoreCase must not be used with regexMatch.
4099 "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.
4100 # 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.
4101 # 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 -07004102 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -07004103 { # 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.
4104 # 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.
4105 # 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 -07004106 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
4107 # Supported values are:
4108 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
4109 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
4110 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
4111 # This list must not be empty and can have at the most 64 entries.
4112 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
4113 "name": "A String", # Name of metadata label.
4114 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
4115 "value": "A String", # The value of the label must match the specified value.
4116 # value can have a maximum length of 1024 characters.
4117 },
4118 ],
4119 },
4120 ],
4121 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
4122 { # HttpRouteRuleMatch criteria for a request's query parameter.
4123 "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 -07004124 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004125 "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 -07004126 # Only one of presentMatch, exactMatch or regexMatch must be set.
4127 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004128 "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.
4129 "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 -07004130 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004131 },
4132 ],
4133 },
4134 ],
4135 },
4136 ],
4137 "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.
4138 # 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 -07004139 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004140 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
4141 "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.
4142 "A String",
4143 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004144 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
4145 # If urlRedirect is specified, service or routeAction must not be set.
4146 "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 -07004147 # 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 -07004148 # The value must be between 1 and 1024 characters.
4149 "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.
4150 # The default is set to false.
4151 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
4152 # Supported values are:
4153 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4154 # - FOUND, which corresponds to 302.
4155 # - SEE_OTHER which corresponds to 303.
4156 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4157 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4158 "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.
4159 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4160 # The default is set to false.
4161 "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 -07004162 # 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.
4163 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004164 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
4165 # The value must be between 1 and 255 characters.
4166 },
4167 "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.
4168 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4169 "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.
4170 # Only one of routeAction or urlRedirect must be set.
4171 "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.
4172 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
4173 },
4174 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4175 "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 -07004176 # 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 -07004177 "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.
4178 "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
4179 },
4180 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4181 # - 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.
4182 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4183 # -
4184 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4185 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4186 # - 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.
4187 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4188 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4189 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4190 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4191 "A String",
4192 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004193 "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 -07004194 },
4195 "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.
4196 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4197 "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.
4198 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4199 # The value must be between 0.0 and 100.0 inclusive.
4200 "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.
4201 "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.
4202 "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
4203 },
4204 },
4205 "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.
4206 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4207 # The value must be between 0.0 and 100.0 inclusive.
4208 "httpStatus": 42, # The HTTP status code used to abort the request.
4209 # The value must be between 200 and 599 inclusive.
4210 },
4211 },
4212 "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
4213 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
4214 "A String",
4215 ],
4216 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
4217 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4218 "A String",
4219 ],
4220 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4221 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4222 "A String",
4223 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004224 "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 -07004225 "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.
4226 # Default is false.
4227 "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.
4228 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
4229 "A String",
4230 ],
4231 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
4232 "A String",
4233 ],
4234 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004235 "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.
4236 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004237 "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.
4238 "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
4239 },
4240 "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.
4241 # 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.
4242 { # 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
4243 "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.
4244 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4245 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4246 "A String",
4247 ],
4248 "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.
4249 "A String",
4250 ],
4251 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4252 { # Specification determining how headers are added to requests or responses.
4253 "headerName": "A String", # The name of the header.
4254 "headerValue": "A String", # The value of the header to add.
4255 "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.
4256 # The default value is false.
4257 },
4258 ],
4259 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4260 { # Specification determining how headers are added to requests or responses.
4261 "headerName": "A String", # The name of the header.
4262 "headerValue": "A String", # The value of the header to add.
4263 "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.
4264 # The default value is false.
4265 },
4266 ],
4267 },
4268 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4269 # 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.
4270 # The value must be between 0 and 1000
4271 "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.
4272 },
4273 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004274 "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 -07004275 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
4276 # The value must be between 1 and 255 characters.
4277 "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.
4278 # The value must be between 1 and 1024 characters.
4279 },
4280 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004281 },
4282 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004283 "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.
4284 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
4285 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4286 "A String",
4287 ],
4288 "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.
4289 "A String",
4290 ],
4291 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4292 { # Specification determining how headers are added to requests or responses.
4293 "headerName": "A String", # The name of the header.
4294 "headerValue": "A String", # The value of the header to add.
4295 "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.
4296 # The default value is false.
4297 },
4298 ],
4299 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4300 { # Specification determining how headers are added to requests or responses.
4301 "headerName": "A String", # The name of the header.
4302 "headerValue": "A String", # The value of the header to add.
4303 "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.
4304 # The default value is false.
4305 },
4306 ],
4307 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004308 "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 -07004309 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
4310 "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 -07004311 # 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 -07004312 # The value must be between 1 and 1024 characters.
4313 "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.
4314 # The default is set to false.
4315 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
4316 # Supported values are:
4317 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4318 # - FOUND, which corresponds to 302.
4319 # - SEE_OTHER which corresponds to 303.
4320 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4321 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4322 "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.
4323 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4324 # The default is set to false.
4325 "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 -07004326 # 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.
4327 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004328 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
4329 # The value must be between 1 and 255 characters.
4330 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004331 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
4332 },
4333 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004334 "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.
4335 # The headerAction specified here take effect after headerAction specified under pathMatcher.
4336 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4337 "A String",
4338 ],
4339 "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.
4340 "A String",
4341 ],
4342 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4343 { # Specification determining how headers are added to requests or responses.
4344 "headerName": "A String", # The name of the header.
4345 "headerValue": "A String", # The value of the header to add.
4346 "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.
4347 # The default value is false.
4348 },
4349 ],
4350 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4351 { # Specification determining how headers are added to requests or responses.
4352 "headerName": "A String", # The name of the header.
4353 "headerValue": "A String", # The value of the header to add.
4354 "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.
4355 # The default value is false.
4356 },
4357 ],
4358 },
4359 "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.
4360 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
4361 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
4362 "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 -07004363 # 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 -07004364 # The value must be between 1 and 1024 characters.
4365 "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.
4366 # The default is set to false.
4367 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
4368 # Supported values are:
4369 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4370 # - FOUND, which corresponds to 302.
4371 # - SEE_OTHER which corresponds to 303.
4372 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4373 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4374 "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.
4375 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4376 # The default is set to false.
4377 "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 -07004378 # 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.
4379 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004380 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
4381 # The value must be between 1 and 255 characters.
4382 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004383 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4384 "hostRules": [ # The list of HostRules to use against the URL.
4385 { # 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 -07004386 "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 ..
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004387 "A String",
4388 ],
4389 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
4390 "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.
4391 },
4392 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004393 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004394 }
4395
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004396 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
4397
4398For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
4399
4400The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004401
4402Returns:
4403 An object of the form:
4404
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004405 { # Represents an Operation resource.
4406 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004407 # Google Compute Engine has three Operation resources:
4408 #
4409 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4410 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004411 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4412 #
4413 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004414 # - For global operations, use the `globalOperations` resource.
4415 # - For regional operations, use the `regionOperations` resource.
4416 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004417 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004418 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004419 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004420 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004421 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004422 "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 -07004423 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004424 "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 -07004425 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4426 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004427 "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 -07004428 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004429 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004430 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004431 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4432 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4433 {
4434 "message": "A String", # [Output Only] A human-readable description of the warning code.
4435 "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.
4436 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4437 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4438 {
4439 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4440 "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).
4441 },
4442 ],
4443 },
4444 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004445 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004446 "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 -07004447 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4448 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004449 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004450 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4451 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4452 {
4453 "message": "A String", # [Output Only] An optional, human-readable error message.
4454 "code": "A String", # [Output Only] The error type identifier for this error.
4455 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4456 },
4457 ],
4458 },
4459 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4460 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004461 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004462 }</pre>
4463</div>
4464
4465<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004466 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004467 <pre>Returns permissions that a caller has on the specified resource.
4468
4469Args:
4470 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004471 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004472 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004473 The object takes the form of:
4474
4475{
4476 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
4477 "A String",
4478 ],
4479 }
4480
4481
4482Returns:
4483 An object of the form:
4484
4485 {
4486 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
4487 "A String",
4488 ],
4489 }</pre>
4490</div>
4491
4492<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004493 <code class="details" id="update">update(project, urlMap, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004494 <pre>Updates the specified UrlMap resource with the data included in the request.
4495
4496Args:
4497 project: string, Project ID for this request. (required)
4498 urlMap: string, Name of the UrlMap resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004499 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004500 The object takes the form of:
4501
Dan O'Mearadd494642020-05-01 07:42:23 -07004502{ # Represents a URL Map resource.
4503 #
4504 # Google Compute Engine has two URL Map resources:
4505 #
4506 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
4507 #
4508 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
4509 #
4510 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
4511 #
4512 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
4513 #
4514 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004515 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
4516 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004517 "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.
4518 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
4519 "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.
4520 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
4521 },
4522 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4523 "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 -07004524 # 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 -07004525 "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.
4526 "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
4527 },
4528 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4529 # - 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.
4530 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4531 # -
4532 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4533 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4534 # - 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.
4535 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4536 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4537 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4538 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4539 "A String",
4540 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004541 "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 -07004542 },
4543 "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.
4544 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4545 "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.
4546 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4547 # The value must be between 0.0 and 100.0 inclusive.
4548 "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.
4549 "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.
4550 "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
4551 },
4552 },
4553 "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.
4554 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4555 # The value must be between 0.0 and 100.0 inclusive.
4556 "httpStatus": 42, # The HTTP status code used to abort the request.
4557 # The value must be between 200 and 599 inclusive.
4558 },
4559 },
4560 "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
4561 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
4562 "A String",
4563 ],
4564 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
4565 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4566 "A String",
4567 ],
4568 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4569 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4570 "A String",
4571 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004572 "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 -07004573 "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.
4574 # Default is false.
4575 "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.
4576 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
4577 "A String",
4578 ],
4579 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
4580 "A String",
4581 ],
4582 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004583 "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.
4584 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004585 "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.
4586 "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
4587 },
4588 "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.
4589 # 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.
4590 { # 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
4591 "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.
4592 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4593 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4594 "A String",
4595 ],
4596 "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.
4597 "A String",
4598 ],
4599 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4600 { # Specification determining how headers are added to requests or responses.
4601 "headerName": "A String", # The name of the header.
4602 "headerValue": "A String", # The value of the header to add.
4603 "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.
4604 # The default value is false.
4605 },
4606 ],
4607 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4608 { # Specification determining how headers are added to requests or responses.
4609 "headerName": "A String", # The name of the header.
4610 "headerValue": "A String", # The value of the header to add.
4611 "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.
4612 # The default value is false.
4613 },
4614 ],
4615 },
4616 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4617 # 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.
4618 # The value must be between 0 and 1000
4619 "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.
4620 },
4621 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004622 "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 -07004623 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
4624 # The value must be between 1 and 255 characters.
4625 "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.
4626 # The value must be between 1 and 1024 characters.
4627 },
4628 },
4629 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
4630 "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.
4631 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
4632 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004633 { # Message for the expected URL mappings.
4634 "path": "A String", # Path portion of the URL.
4635 "host": "A String", # Host portion of the URL.
4636 "description": "A String", # Description of this test case.
4637 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
4638 },
4639 ],
4640 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004641 "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.
4642 #
4643 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004644 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
4645 { # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004646 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
4647 "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.
4648 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
4649 "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.
4650 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
4651 },
4652 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4653 "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 -07004654 # 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 -07004655 "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.
4656 "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
4657 },
4658 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4659 # - 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.
4660 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4661 # -
4662 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4663 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4664 # - 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.
4665 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4666 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4667 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4668 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4669 "A String",
4670 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004671 "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 -07004672 },
4673 "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.
4674 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4675 "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.
4676 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4677 # The value must be between 0.0 and 100.0 inclusive.
4678 "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.
4679 "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.
4680 "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
4681 },
4682 },
4683 "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.
4684 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4685 # The value must be between 0.0 and 100.0 inclusive.
4686 "httpStatus": 42, # The HTTP status code used to abort the request.
4687 # The value must be between 200 and 599 inclusive.
4688 },
4689 },
4690 "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
4691 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
4692 "A String",
4693 ],
4694 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
4695 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4696 "A String",
4697 ],
4698 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4699 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4700 "A String",
4701 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004702 "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 -07004703 "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.
4704 # Default is false.
4705 "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.
4706 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
4707 "A String",
4708 ],
4709 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
4710 "A String",
4711 ],
4712 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004713 "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.
4714 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004715 "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.
4716 "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
4717 },
4718 "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.
4719 # 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.
4720 { # 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
4721 "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.
4722 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4723 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4724 "A String",
4725 ],
4726 "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.
4727 "A String",
4728 ],
4729 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4730 { # Specification determining how headers are added to requests or responses.
4731 "headerName": "A String", # The name of the header.
4732 "headerValue": "A String", # The value of the header to add.
4733 "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.
4734 # The default value is false.
4735 },
4736 ],
4737 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4738 { # Specification determining how headers are added to requests or responses.
4739 "headerName": "A String", # The name of the header.
4740 "headerValue": "A String", # The value of the header to add.
4741 "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.
4742 # The default value is false.
4743 },
4744 ],
4745 },
4746 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4747 # 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.
4748 # The value must be between 0 and 1000
4749 "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.
4750 },
4751 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004752 "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 -07004753 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
4754 # The value must be between 1 and 255 characters.
4755 "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.
4756 # The value must be between 1 and 1024 characters.
4757 },
4758 },
4759 "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:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004760 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
4761 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004762 # - 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.
4763 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
4764 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
4765 # - compute.backendBuckets.use
4766 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07004767 "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.
4768 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004769 { # 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 -07004770 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
4771 # If urlRedirect is specified, service or routeAction must not be set.
4772 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
4773 # 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.
4774 # The value must be between 1 and 1024 characters.
4775 "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.
4776 # The default is set to false.
4777 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
4778 # Supported values are:
4779 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4780 # - FOUND, which corresponds to 302.
4781 # - SEE_OTHER which corresponds to 303.
4782 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4783 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4784 "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.
4785 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4786 # The default is set to false.
4787 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
4788 # 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.
4789 # The value must be between 1 and 1024 characters.
4790 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
4791 # The value must be between 1 and 255 characters.
4792 },
4793 "description": "A String", # The short description conveying the intent of this routeRule.
4794 # The description can have a maximum length of 1024 characters.
4795 "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.
4796 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4797 "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.
4798 # 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.
4799 # 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.
4800 "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.
4801 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4802 "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.
4803 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
4804 },
4805 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4806 "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.
4807 # 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.
4808 "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.
4809 "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
4810 },
4811 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4812 # - 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.
4813 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4814 # -
4815 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4816 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4817 # - 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.
4818 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4819 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4820 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4821 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4822 "A String",
4823 ],
4824 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4825 },
4826 "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.
4827 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4828 "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.
4829 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4830 # The value must be between 0.0 and 100.0 inclusive.
4831 "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.
4832 "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.
4833 "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
4834 },
4835 },
4836 "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.
4837 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4838 # The value must be between 0.0 and 100.0 inclusive.
4839 "httpStatus": 42, # The HTTP status code used to abort the request.
4840 # The value must be between 200 and 599 inclusive.
4841 },
4842 },
4843 "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
4844 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
4845 "A String",
4846 ],
4847 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
4848 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4849 "A String",
4850 ],
4851 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4852 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4853 "A String",
4854 ],
4855 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
4856 "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.
4857 # Default is false.
4858 "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.
4859 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
4860 "A String",
4861 ],
4862 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
4863 "A String",
4864 ],
4865 },
4866 "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.
4867 # If not specified, will use the largest timeout among all backend services associated with the route.
4868 "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.
4869 "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
4870 },
4871 "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.
4872 # 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.
4873 { # 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
4874 "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.
4875 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4876 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4877 "A String",
4878 ],
4879 "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.
4880 "A String",
4881 ],
4882 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4883 { # Specification determining how headers are added to requests or responses.
4884 "headerName": "A String", # The name of the header.
4885 "headerValue": "A String", # The value of the header to add.
4886 "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.
4887 # The default value is false.
4888 },
4889 ],
4890 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4891 { # Specification determining how headers are added to requests or responses.
4892 "headerName": "A String", # The name of the header.
4893 "headerValue": "A String", # The value of the header to add.
4894 "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.
4895 # The default value is false.
4896 },
4897 ],
4898 },
4899 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4900 # 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.
4901 # The value must be between 0 and 1000
4902 "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.
4903 },
4904 ],
4905 "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.
4906 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
4907 # The value must be between 1 and 255 characters.
4908 "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.
4909 # The value must be between 1 and 1024 characters.
4910 },
4911 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004912 "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.
4913 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
4914 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4915 "A String",
4916 ],
4917 "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.
4918 "A String",
4919 ],
4920 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4921 { # Specification determining how headers are added to requests or responses.
4922 "headerName": "A String", # The name of the header.
4923 "headerValue": "A String", # The value of the header to add.
4924 "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.
4925 # The default value is false.
4926 },
4927 ],
4928 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4929 { # Specification determining how headers are added to requests or responses.
4930 "headerName": "A String", # The name of the header.
4931 "headerValue": "A String", # The value of the header to add.
4932 "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.
4933 # The default value is false.
4934 },
4935 ],
4936 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004937 "matchRules": [
4938 { # 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 -07004939 "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 -07004940 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07004941 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004942 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
4943 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -07004944 "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 -07004945 # 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.
4946 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07004947 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004948 "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.
4949 # The default setting is false.
4950 "headerName": "A String", # The name of the HTTP header to match.
4951 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
4952 # For matching a request's method, use the headerName ":method".
4953 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
4954 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4955 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
4956 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4957 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
4958 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07004959 "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 -07004960 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4961 "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.
4962 # For example for a range [-5, 0]
4963 # - -3 will match.
4964 # - 0 will not match.
4965 # - 0.25 will not match.
4966 # - -3someString will not match.
4967 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07004968 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004969 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
4970 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
4971 },
4972 },
4973 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004974 "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.
4975 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004976 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07004977 "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 -07004978 # The value must be between 1 and 1024 characters.
4979 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4980 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
4981 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -07004982 # ignoreCase must not be used with regexMatch.
4983 "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.
4984 # 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.
4985 # 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 -07004986 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -07004987 { # 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.
4988 # 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.
4989 # 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 -07004990 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
4991 # Supported values are:
4992 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
4993 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
4994 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
4995 # This list must not be empty and can have at the most 64 entries.
4996 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
4997 "name": "A String", # Name of metadata label.
4998 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
4999 "value": "A String", # The value of the label must match the specified value.
5000 # value can have a maximum length of 1024 characters.
5001 },
5002 ],
5003 },
5004 ],
5005 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
5006 { # HttpRouteRuleMatch criteria for a request's query parameter.
5007 "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 -07005008 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005009 "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 -07005010 # Only one of presentMatch, exactMatch or regexMatch must be set.
5011 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005012 "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.
5013 "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 -07005014 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005015 },
5016 ],
5017 },
5018 ],
5019 },
5020 ],
5021 "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.
5022 # 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 -07005023 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005024 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
5025 "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.
5026 "A String",
5027 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005028 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
5029 # If urlRedirect is specified, service or routeAction must not be set.
5030 "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 -07005031 # 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 -07005032 # The value must be between 1 and 1024 characters.
5033 "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.
5034 # The default is set to false.
5035 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
5036 # Supported values are:
5037 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5038 # - FOUND, which corresponds to 302.
5039 # - SEE_OTHER which corresponds to 303.
5040 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5041 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5042 "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.
5043 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5044 # The default is set to false.
5045 "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 -07005046 # 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.
5047 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005048 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
5049 # The value must be between 1 and 255 characters.
5050 },
5051 "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.
5052 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5053 "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.
5054 # Only one of routeAction or urlRedirect must be set.
5055 "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.
5056 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
5057 },
5058 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
5059 "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 -07005060 # 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 -07005061 "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.
5062 "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
5063 },
5064 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5065 # - 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.
5066 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5067 # -
5068 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5069 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5070 # - 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.
5071 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5072 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5073 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5074 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5075 "A String",
5076 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005077 "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 -07005078 },
5079 "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.
5080 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
5081 "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.
5082 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5083 # The value must be between 0.0 and 100.0 inclusive.
5084 "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.
5085 "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.
5086 "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
5087 },
5088 },
5089 "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.
5090 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5091 # The value must be between 0.0 and 100.0 inclusive.
5092 "httpStatus": 42, # The HTTP status code used to abort the request.
5093 # The value must be between 200 and 599 inclusive.
5094 },
5095 },
5096 "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
5097 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
5098 "A String",
5099 ],
5100 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
5101 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5102 "A String",
5103 ],
5104 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
5105 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5106 "A String",
5107 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005108 "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 -07005109 "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.
5110 # Default is false.
5111 "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.
5112 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
5113 "A String",
5114 ],
5115 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
5116 "A String",
5117 ],
5118 },
Dan O'Mearadd494642020-05-01 07:42:23 -07005119 "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.
5120 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005121 "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.
5122 "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
5123 },
5124 "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.
5125 # 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.
5126 { # 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
5127 "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.
5128 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
5129 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5130 "A String",
5131 ],
5132 "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.
5133 "A String",
5134 ],
5135 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5136 { # Specification determining how headers are added to requests or responses.
5137 "headerName": "A String", # The name of the header.
5138 "headerValue": "A String", # The value of the header to add.
5139 "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.
5140 # The default value is false.
5141 },
5142 ],
5143 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5144 { # Specification determining how headers are added to requests or responses.
5145 "headerName": "A String", # The name of the header.
5146 "headerValue": "A String", # The value of the header to add.
5147 "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.
5148 # The default value is false.
5149 },
5150 ],
5151 },
5152 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5153 # 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.
5154 # The value must be between 0 and 1000
5155 "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.
5156 },
5157 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005158 "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 -07005159 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
5160 # The value must be between 1 and 255 characters.
5161 "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.
5162 # The value must be between 1 and 1024 characters.
5163 },
5164 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005165 },
5166 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005167 "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.
5168 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
5169 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5170 "A String",
5171 ],
5172 "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.
5173 "A String",
5174 ],
5175 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5176 { # Specification determining how headers are added to requests or responses.
5177 "headerName": "A String", # The name of the header.
5178 "headerValue": "A String", # The value of the header to add.
5179 "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.
5180 # The default value is false.
5181 },
5182 ],
5183 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5184 { # Specification determining how headers are added to requests or responses.
5185 "headerName": "A String", # The name of the header.
5186 "headerValue": "A String", # The value of the header to add.
5187 "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.
5188 # The default value is false.
5189 },
5190 ],
5191 },
Dan O'Mearadd494642020-05-01 07:42:23 -07005192 "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 -07005193 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
5194 "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 -07005195 # 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 -07005196 # The value must be between 1 and 1024 characters.
5197 "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.
5198 # The default is set to false.
5199 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
5200 # Supported values are:
5201 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5202 # - FOUND, which corresponds to 302.
5203 # - SEE_OTHER which corresponds to 303.
5204 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5205 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5206 "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.
5207 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5208 # The default is set to false.
5209 "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 -07005210 # 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.
5211 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005212 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
5213 # The value must be between 1 and 255 characters.
5214 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005215 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
5216 },
5217 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005218 "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.
5219 # The headerAction specified here take effect after headerAction specified under pathMatcher.
5220 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5221 "A String",
5222 ],
5223 "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.
5224 "A String",
5225 ],
5226 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5227 { # Specification determining how headers are added to requests or responses.
5228 "headerName": "A String", # The name of the header.
5229 "headerValue": "A String", # The value of the header to add.
5230 "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.
5231 # The default value is false.
5232 },
5233 ],
5234 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5235 { # Specification determining how headers are added to requests or responses.
5236 "headerName": "A String", # The name of the header.
5237 "headerValue": "A String", # The value of the header to add.
5238 "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.
5239 # The default value is false.
5240 },
5241 ],
5242 },
5243 "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.
5244 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
5245 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
5246 "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 -07005247 # 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 -07005248 # The value must be between 1 and 1024 characters.
5249 "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.
5250 # The default is set to false.
5251 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
5252 # Supported values are:
5253 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5254 # - FOUND, which corresponds to 302.
5255 # - SEE_OTHER which corresponds to 303.
5256 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5257 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5258 "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.
5259 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5260 # The default is set to false.
5261 "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 -07005262 # 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.
5263 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005264 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
5265 # The value must be between 1 and 255 characters.
5266 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005267 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
5268 "hostRules": [ # The list of HostRules to use against the URL.
5269 { # 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 -07005270 "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 ..
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005271 "A String",
5272 ],
5273 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
5274 "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.
5275 },
5276 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005277 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005278 }
5279
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005280 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
5281
5282For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
5283
5284The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005285
5286Returns:
5287 An object of the form:
5288
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005289 { # Represents an Operation resource.
5290 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005291 # Google Compute Engine has three Operation resources:
5292 #
5293 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5294 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005295 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5296 #
5297 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005298 # - For global operations, use the `globalOperations` resource.
5299 # - For regional operations, use the `regionOperations` resource.
5300 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005301 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005302 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005303 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005304 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005305 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07005306 "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 -07005307 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005308 "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 -07005309 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5310 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005311 "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 -07005312 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005313 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005314 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005315 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5316 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5317 {
5318 "message": "A String", # [Output Only] A human-readable description of the warning code.
5319 "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.
5320 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5321 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5322 {
5323 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5324 "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).
5325 },
5326 ],
5327 },
5328 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005329 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005330 "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 -07005331 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5332 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005333 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005334 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5335 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5336 {
5337 "message": "A String", # [Output Only] An optional, human-readable error message.
5338 "code": "A String", # [Output Only] The error type identifier for this error.
5339 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5340 },
5341 ],
5342 },
5343 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5344 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08005345 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005346 }</pre>
5347</div>
5348
5349<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005350 <code class="details" id="validate">validate(project, urlMap, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005351 <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.
5352
5353Args:
5354 project: string, Project ID for this request. (required)
5355 urlMap: string, Name of the UrlMap resource to be validated as. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005356 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005357 The object takes the form of:
5358
5359{
Dan O'Mearadd494642020-05-01 07:42:23 -07005360 "resource": { # Represents a URL Map resource. # Content of the UrlMap to be validated.
5361 #
5362 # Google Compute Engine has two URL Map resources:
5363 #
5364 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
5365 #
5366 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
5367 #
5368 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
5369 #
5370 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
5371 #
5372 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005373 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
5374 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005375 "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.
5376 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
5377 "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.
5378 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
5379 },
5380 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
5381 "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 -07005382 # 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 -07005383 "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.
5384 "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
5385 },
5386 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5387 # - 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.
5388 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5389 # -
5390 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5391 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5392 # - 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.
5393 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5394 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5395 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5396 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5397 "A String",
5398 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005399 "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 -07005400 },
5401 "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.
5402 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
5403 "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.
5404 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5405 # The value must be between 0.0 and 100.0 inclusive.
5406 "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.
5407 "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.
5408 "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
5409 },
5410 },
5411 "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.
5412 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5413 # The value must be between 0.0 and 100.0 inclusive.
5414 "httpStatus": 42, # The HTTP status code used to abort the request.
5415 # The value must be between 200 and 599 inclusive.
5416 },
5417 },
5418 "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
5419 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
5420 "A String",
5421 ],
5422 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
5423 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5424 "A String",
5425 ],
5426 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
5427 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5428 "A String",
5429 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005430 "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 -07005431 "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.
5432 # Default is false.
5433 "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.
5434 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
5435 "A String",
5436 ],
5437 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
5438 "A String",
5439 ],
5440 },
Dan O'Mearadd494642020-05-01 07:42:23 -07005441 "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.
5442 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005443 "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.
5444 "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
5445 },
5446 "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.
5447 # 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.
5448 { # 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
5449 "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.
5450 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
5451 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5452 "A String",
5453 ],
5454 "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.
5455 "A String",
5456 ],
5457 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5458 { # Specification determining how headers are added to requests or responses.
5459 "headerName": "A String", # The name of the header.
5460 "headerValue": "A String", # The value of the header to add.
5461 "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.
5462 # The default value is false.
5463 },
5464 ],
5465 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5466 { # Specification determining how headers are added to requests or responses.
5467 "headerName": "A String", # The name of the header.
5468 "headerValue": "A String", # The value of the header to add.
5469 "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.
5470 # The default value is false.
5471 },
5472 ],
5473 },
5474 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5475 # 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.
5476 # The value must be between 0 and 1000
5477 "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.
5478 },
5479 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005480 "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 -07005481 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
5482 # The value must be between 1 and 255 characters.
5483 "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.
5484 # The value must be between 1 and 1024 characters.
5485 },
5486 },
5487 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
5488 "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.
5489 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
5490 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005491 { # Message for the expected URL mappings.
5492 "path": "A String", # Path portion of the URL.
5493 "host": "A String", # Host portion of the URL.
5494 "description": "A String", # Description of this test case.
5495 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
5496 },
5497 ],
5498 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005499 "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.
5500 #
5501 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005502 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
5503 { # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005504 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
5505 "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.
5506 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
5507 "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.
5508 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
5509 },
5510 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
5511 "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 -07005512 # 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 -07005513 "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.
5514 "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
5515 },
5516 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5517 # - 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.
5518 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5519 # -
5520 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5521 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5522 # - 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.
5523 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5524 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5525 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5526 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5527 "A String",
5528 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005529 "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 -07005530 },
5531 "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.
5532 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
5533 "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.
5534 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5535 # The value must be between 0.0 and 100.0 inclusive.
5536 "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.
5537 "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.
5538 "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
5539 },
5540 },
5541 "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.
5542 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5543 # The value must be between 0.0 and 100.0 inclusive.
5544 "httpStatus": 42, # The HTTP status code used to abort the request.
5545 # The value must be between 200 and 599 inclusive.
5546 },
5547 },
5548 "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
5549 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
5550 "A String",
5551 ],
5552 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
5553 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5554 "A String",
5555 ],
5556 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
5557 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5558 "A String",
5559 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005560 "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 -07005561 "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.
5562 # Default is false.
5563 "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.
5564 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
5565 "A String",
5566 ],
5567 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
5568 "A String",
5569 ],
5570 },
Dan O'Mearadd494642020-05-01 07:42:23 -07005571 "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.
5572 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005573 "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.
5574 "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
5575 },
5576 "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.
5577 # 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.
5578 { # 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
5579 "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.
5580 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
5581 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5582 "A String",
5583 ],
5584 "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.
5585 "A String",
5586 ],
5587 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5588 { # Specification determining how headers are added to requests or responses.
5589 "headerName": "A String", # The name of the header.
5590 "headerValue": "A String", # The value of the header to add.
5591 "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.
5592 # The default value is false.
5593 },
5594 ],
5595 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5596 { # Specification determining how headers are added to requests or responses.
5597 "headerName": "A String", # The name of the header.
5598 "headerValue": "A String", # The value of the header to add.
5599 "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.
5600 # The default value is false.
5601 },
5602 ],
5603 },
5604 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5605 # 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.
5606 # The value must be between 0 and 1000
5607 "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.
5608 },
5609 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005610 "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 -07005611 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
5612 # The value must be between 1 and 255 characters.
5613 "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.
5614 # The value must be between 1 and 1024 characters.
5615 },
5616 },
5617 "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:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005618 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
5619 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005620 # - 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.
5621 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
5622 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
5623 # - compute.backendBuckets.use
5624 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07005625 "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.
5626 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005627 { # 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 -07005628 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
5629 # If urlRedirect is specified, service or routeAction must not be set.
5630 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
5631 # 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.
5632 # The value must be between 1 and 1024 characters.
5633 "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.
5634 # The default is set to false.
5635 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
5636 # Supported values are:
5637 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5638 # - FOUND, which corresponds to 302.
5639 # - SEE_OTHER which corresponds to 303.
5640 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5641 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5642 "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.
5643 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5644 # The default is set to false.
5645 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
5646 # 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.
5647 # The value must be between 1 and 1024 characters.
5648 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
5649 # The value must be between 1 and 255 characters.
5650 },
5651 "description": "A String", # The short description conveying the intent of this routeRule.
5652 # The description can have a maximum length of 1024 characters.
5653 "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.
5654 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5655 "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.
5656 # 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.
5657 # 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.
5658 "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.
5659 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5660 "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.
5661 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
5662 },
5663 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
5664 "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.
5665 # 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.
5666 "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.
5667 "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
5668 },
5669 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5670 # - 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.
5671 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5672 # -
5673 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5674 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5675 # - 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.
5676 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5677 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5678 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5679 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5680 "A String",
5681 ],
5682 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5683 },
5684 "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.
5685 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
5686 "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.
5687 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5688 # The value must be between 0.0 and 100.0 inclusive.
5689 "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.
5690 "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.
5691 "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
5692 },
5693 },
5694 "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.
5695 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5696 # The value must be between 0.0 and 100.0 inclusive.
5697 "httpStatus": 42, # The HTTP status code used to abort the request.
5698 # The value must be between 200 and 599 inclusive.
5699 },
5700 },
5701 "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
5702 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
5703 "A String",
5704 ],
5705 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
5706 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5707 "A String",
5708 ],
5709 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
5710 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5711 "A String",
5712 ],
5713 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
5714 "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.
5715 # Default is false.
5716 "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.
5717 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
5718 "A String",
5719 ],
5720 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
5721 "A String",
5722 ],
5723 },
5724 "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.
5725 # If not specified, will use the largest timeout among all backend services associated with the route.
5726 "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.
5727 "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
5728 },
5729 "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.
5730 # 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.
5731 { # 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
5732 "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.
5733 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
5734 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5735 "A String",
5736 ],
5737 "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.
5738 "A String",
5739 ],
5740 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5741 { # Specification determining how headers are added to requests or responses.
5742 "headerName": "A String", # The name of the header.
5743 "headerValue": "A String", # The value of the header to add.
5744 "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.
5745 # The default value is false.
5746 },
5747 ],
5748 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5749 { # Specification determining how headers are added to requests or responses.
5750 "headerName": "A String", # The name of the header.
5751 "headerValue": "A String", # The value of the header to add.
5752 "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.
5753 # The default value is false.
5754 },
5755 ],
5756 },
5757 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5758 # 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.
5759 # The value must be between 0 and 1000
5760 "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.
5761 },
5762 ],
5763 "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.
5764 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
5765 # The value must be between 1 and 255 characters.
5766 "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.
5767 # The value must be between 1 and 1024 characters.
5768 },
5769 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005770 "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.
5771 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
5772 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5773 "A String",
5774 ],
5775 "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.
5776 "A String",
5777 ],
5778 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5779 { # Specification determining how headers are added to requests or responses.
5780 "headerName": "A String", # The name of the header.
5781 "headerValue": "A String", # The value of the header to add.
5782 "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.
5783 # The default value is false.
5784 },
5785 ],
5786 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5787 { # Specification determining how headers are added to requests or responses.
5788 "headerName": "A String", # The name of the header.
5789 "headerValue": "A String", # The value of the header to add.
5790 "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.
5791 # The default value is false.
5792 },
5793 ],
5794 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005795 "matchRules": [
5796 { # 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 -07005797 "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 -07005798 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07005799 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005800 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
5801 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -07005802 "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 -07005803 # 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.
5804 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07005805 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005806 "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.
5807 # The default setting is false.
5808 "headerName": "A String", # The name of the HTTP header to match.
5809 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
5810 # For matching a request's method, use the headerName ":method".
5811 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
5812 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5813 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
5814 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5815 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
5816 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07005817 "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 -07005818 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5819 "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.
5820 # For example for a range [-5, 0]
5821 # - -3 will match.
5822 # - 0 will not match.
5823 # - 0.25 will not match.
5824 # - -3someString will not match.
5825 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07005826 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005827 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
5828 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
5829 },
5830 },
5831 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005832 "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.
5833 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005834 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07005835 "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 -07005836 # The value must be between 1 and 1024 characters.
5837 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5838 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
5839 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -07005840 # ignoreCase must not be used with regexMatch.
5841 "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.
5842 # 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.
5843 # 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 -07005844 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -07005845 { # 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.
5846 # 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.
5847 # 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 -07005848 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
5849 # Supported values are:
5850 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
5851 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
5852 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
5853 # This list must not be empty and can have at the most 64 entries.
5854 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
5855 "name": "A String", # Name of metadata label.
5856 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
5857 "value": "A String", # The value of the label must match the specified value.
5858 # value can have a maximum length of 1024 characters.
5859 },
5860 ],
5861 },
5862 ],
5863 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
5864 { # HttpRouteRuleMatch criteria for a request's query parameter.
5865 "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 -07005866 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005867 "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 -07005868 # Only one of presentMatch, exactMatch or regexMatch must be set.
5869 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005870 "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.
5871 "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 -07005872 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005873 },
5874 ],
5875 },
5876 ],
5877 },
5878 ],
5879 "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.
5880 # 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 -07005881 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005882 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
5883 "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.
5884 "A String",
5885 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005886 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
5887 # If urlRedirect is specified, service or routeAction must not be set.
5888 "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 -07005889 # 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 -07005890 # The value must be between 1 and 1024 characters.
5891 "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.
5892 # The default is set to false.
5893 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
5894 # Supported values are:
5895 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5896 # - FOUND, which corresponds to 302.
5897 # - SEE_OTHER which corresponds to 303.
5898 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5899 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5900 "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.
5901 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5902 # The default is set to false.
5903 "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 -07005904 # 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.
5905 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005906 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
5907 # The value must be between 1 and 255 characters.
5908 },
5909 "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.
5910 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5911 "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.
5912 # Only one of routeAction or urlRedirect must be set.
5913 "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.
5914 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
5915 },
5916 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
5917 "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 -07005918 # 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 -07005919 "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.
5920 "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
5921 },
5922 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5923 # - 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.
5924 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5925 # -
5926 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5927 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5928 # - 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.
5929 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5930 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5931 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5932 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5933 "A String",
5934 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005935 "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 -07005936 },
5937 "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.
5938 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
5939 "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.
5940 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5941 # The value must be between 0.0 and 100.0 inclusive.
5942 "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.
5943 "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.
5944 "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
5945 },
5946 },
5947 "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.
5948 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5949 # The value must be between 0.0 and 100.0 inclusive.
5950 "httpStatus": 42, # The HTTP status code used to abort the request.
5951 # The value must be between 200 and 599 inclusive.
5952 },
5953 },
5954 "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
5955 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
5956 "A String",
5957 ],
5958 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
5959 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5960 "A String",
5961 ],
5962 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
5963 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5964 "A String",
5965 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005966 "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 -07005967 "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.
5968 # Default is false.
5969 "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.
5970 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
5971 "A String",
5972 ],
5973 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
5974 "A String",
5975 ],
5976 },
Dan O'Mearadd494642020-05-01 07:42:23 -07005977 "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.
5978 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005979 "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.
5980 "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
5981 },
5982 "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.
5983 # 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.
5984 { # 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
5985 "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.
5986 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
5987 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5988 "A String",
5989 ],
5990 "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.
5991 "A String",
5992 ],
5993 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5994 { # Specification determining how headers are added to requests or responses.
5995 "headerName": "A String", # The name of the header.
5996 "headerValue": "A String", # The value of the header to add.
5997 "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.
5998 # The default value is false.
5999 },
6000 ],
6001 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
6002 { # Specification determining how headers are added to requests or responses.
6003 "headerName": "A String", # The name of the header.
6004 "headerValue": "A String", # The value of the header to add.
6005 "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.
6006 # The default value is false.
6007 },
6008 ],
6009 },
6010 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
6011 # 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.
6012 # The value must be between 0 and 1000
6013 "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.
6014 },
6015 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07006016 "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 -07006017 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
6018 # The value must be between 1 and 255 characters.
6019 "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.
6020 # The value must be between 1 and 1024 characters.
6021 },
6022 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006023 },
6024 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006025 "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.
6026 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
6027 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
6028 "A String",
6029 ],
6030 "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.
6031 "A String",
6032 ],
6033 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
6034 { # Specification determining how headers are added to requests or responses.
6035 "headerName": "A String", # The name of the header.
6036 "headerValue": "A String", # The value of the header to add.
6037 "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.
6038 # The default value is false.
6039 },
6040 ],
6041 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
6042 { # Specification determining how headers are added to requests or responses.
6043 "headerName": "A String", # The name of the header.
6044 "headerValue": "A String", # The value of the header to add.
6045 "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.
6046 # The default value is false.
6047 },
6048 ],
6049 },
Dan O'Mearadd494642020-05-01 07:42:23 -07006050 "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 -07006051 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
6052 "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 -07006053 # 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 -07006054 # The value must be between 1 and 1024 characters.
6055 "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.
6056 # The default is set to false.
6057 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
6058 # Supported values are:
6059 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
6060 # - FOUND, which corresponds to 302.
6061 # - SEE_OTHER which corresponds to 303.
6062 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
6063 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
6064 "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.
6065 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
6066 # The default is set to false.
6067 "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 -07006068 # 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.
6069 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006070 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
6071 # The value must be between 1 and 255 characters.
6072 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006073 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
6074 },
6075 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006076 "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.
6077 # The headerAction specified here take effect after headerAction specified under pathMatcher.
6078 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
6079 "A String",
6080 ],
6081 "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.
6082 "A String",
6083 ],
6084 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
6085 { # Specification determining how headers are added to requests or responses.
6086 "headerName": "A String", # The name of the header.
6087 "headerValue": "A String", # The value of the header to add.
6088 "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.
6089 # The default value is false.
6090 },
6091 ],
6092 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
6093 { # Specification determining how headers are added to requests or responses.
6094 "headerName": "A String", # The name of the header.
6095 "headerValue": "A String", # The value of the header to add.
6096 "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.
6097 # The default value is false.
6098 },
6099 ],
6100 },
6101 "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.
6102 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
6103 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
6104 "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 -07006105 # 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 -07006106 # The value must be between 1 and 1024 characters.
6107 "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.
6108 # The default is set to false.
6109 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
6110 # Supported values are:
6111 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
6112 # - FOUND, which corresponds to 302.
6113 # - SEE_OTHER which corresponds to 303.
6114 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
6115 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
6116 "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.
6117 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
6118 # The default is set to false.
6119 "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 -07006120 # 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.
6121 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006122 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
6123 # The value must be between 1 and 255 characters.
6124 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006125 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
6126 "hostRules": [ # The list of HostRules to use against the URL.
6127 { # 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 -07006128 "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 ..
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006129 "A String",
6130 ],
6131 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
6132 "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.
6133 },
6134 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006135 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006136 },
6137 }
6138
6139
6140Returns:
6141 An object of the form:
6142
6143 {
6144 "result": { # Message representing the validation result for a UrlMap.
6145 "testFailures": [
6146 {
6147 "path": "A String",
6148 "actualService": "A String",
6149 "host": "A String",
6150 "expectedService": "A String",
6151 },
6152 ],
6153 "loadErrors": [
6154 "A String",
6155 ],
6156 "testPassed": True or False, # If successfully loaded, this field indicates whether the test passed. If false, 'testFailures's indicate the reason of failure.
6157 "loadSucceeded": True or False, # Whether the given UrlMap can be successfully loaded. If false, 'loadErrors' indicates the reasons.
6158 },
6159 }</pre>
6160</div>
6161
6162</body></html>