blob: 642c6e95103c01e1fb08e5a50063e26fbad9cd76 [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_alpha.html">Compute Engine API</a> . <a href="compute_alpha.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, returnPartialSuccess=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">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040084 <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">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#list">list(project, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, filter=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070097<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, returnPartialSuccess=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 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
128 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 -0700129
Dan O'Mearadd494642020-05-01 07:42:23 -0700130For 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 -0700131
Dan O'Mearadd494642020-05-01 07:42:23 -0700132You 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 -0700133
Dan O'Mearadd494642020-05-01 07:42:23 -0700134To 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) ```
135 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 -0700136
137Returns:
138 An object of the form:
139
140 {
141 "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.
142 "kind": "compute#urlMapsAggregatedList", # Type of resource.
143 "items": { # A list of UrlMapsScopedList resources.
144 "a_key": { # Name of the scope containing this set of UrlMaps.
145 "urlMaps": [ # A list of UrlMaps contained in this scope.
Dan O'Mearadd494642020-05-01 07:42:23 -0700146 { # Represents a URL Map resource.
147 #
148 # Google Compute Engine has two URL Map resources:
149 #
150 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
151 #
152 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
153 #
154 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
155 #
156 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
157 #
158 # 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 -0700159 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
160 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
161 "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.
162 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
163 "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.
164 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
165 },
166 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
167 "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 -0700168 # 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 -0700169 "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.
170 "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
171 },
172 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
173 # - 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.
174 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
175 # -
176 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
177 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
178 # - 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.
179 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
180 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
181 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
182 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
183 "A String",
184 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700185 "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 -0700186 },
187 "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.
188 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
189 "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.
190 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
191 # The value must be between 0.0 and 100.0 inclusive.
192 "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.
193 "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.
194 "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
195 },
196 },
197 "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.
198 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
199 # The value must be between 0.0 and 100.0 inclusive.
200 "httpStatus": 42, # The HTTP status code used to abort the request.
201 # The value must be between 200 and 599 inclusive.
202 },
203 },
204 "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
205 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
206 "A String",
207 ],
208 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
209 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
210 "A String",
211 ],
212 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
213 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
214 "A String",
215 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700216 "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 -0700217 "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.
218 # Default is false.
219 "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.
220 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
221 "A String",
222 ],
223 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
224 "A String",
225 ],
226 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700227 "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.
228 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700229 "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.
230 "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
231 },
232 "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.
233 # 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.
234 { # 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
235 "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.
236 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
237 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
238 "A String",
239 ],
240 "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.
241 "A String",
242 ],
243 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
244 { # Specification determining how headers are added to requests or responses.
245 "headerName": "A String", # The name of the header.
246 "headerValue": "A String", # The value of the header to add.
247 "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.
248 # The default value is false.
249 },
250 ],
251 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
252 { # Specification determining how headers are added to requests or responses.
253 "headerName": "A String", # The name of the header.
254 "headerValue": "A String", # The value of the header to add.
255 "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.
256 # The default value is false.
257 },
258 ],
259 },
260 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
261 # 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.
262 # The value must be between 0 and 1000
263 "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.
264 },
265 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700266 "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 -0700267 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
268 # The value must be between 1 and 255 characters.
269 "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.
270 # The value must be between 1 and 1024 characters.
271 },
272 },
273 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
274 "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.
275 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
276 "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.
277 { # Message for the expected URL mappings.
278 "description": "A String", # Description of this test case.
279 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
280 "expectedUrlRedirect": "A String", # The expected URL that should be redirected to for the host and path being tested.
281 "host": "A String", # Host portion of the URL.
282 "path": "A String", # Path portion of the URL.
283 "backendServiceWeight": 42, # The weight to use for the supplied host and path when using advanced routing rules that involve traffic splitting.
284 },
285 ],
286 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
287 "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.
288 #
289 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
290 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
291 { # 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.
292 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
293 "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.
294 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
295 "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.
296 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
297 },
298 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
299 "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 -0700300 # 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 -0700301 "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.
302 "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
303 },
304 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
305 # - 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.
306 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
307 # -
308 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
309 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
310 # - 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.
311 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
312 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
313 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
314 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
315 "A String",
316 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700317 "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 -0700318 },
319 "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.
320 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
321 "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.
322 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
323 # The value must be between 0.0 and 100.0 inclusive.
324 "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.
325 "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.
326 "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
327 },
328 },
329 "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.
330 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
331 # The value must be between 0.0 and 100.0 inclusive.
332 "httpStatus": 42, # The HTTP status code used to abort the request.
333 # The value must be between 200 and 599 inclusive.
334 },
335 },
336 "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
337 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
338 "A String",
339 ],
340 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
341 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
342 "A String",
343 ],
344 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
345 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
346 "A String",
347 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700348 "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 -0700349 "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.
350 # Default is false.
351 "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.
352 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
353 "A String",
354 ],
355 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
356 "A String",
357 ],
358 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700359 "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.
360 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700361 "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.
362 "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
363 },
364 "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.
365 # 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.
366 { # 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
367 "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.
368 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
369 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
370 "A String",
371 ],
372 "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.
373 "A String",
374 ],
375 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
376 { # Specification determining how headers are added to requests or responses.
377 "headerName": "A String", # The name of the header.
378 "headerValue": "A String", # The value of the header to add.
379 "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.
380 # The default value is false.
381 },
382 ],
383 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
384 { # Specification determining how headers are added to requests or responses.
385 "headerName": "A String", # The name of the header.
386 "headerValue": "A String", # The value of the header to add.
387 "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.
388 # The default value is false.
389 },
390 ],
391 },
392 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
393 # 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.
394 # The value must be between 0 and 1000
395 "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.
396 },
397 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700398 "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 -0700399 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
400 # The value must be between 1 and 255 characters.
401 "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.
402 # The value must be between 1 and 1024 characters.
403 },
404 },
405 "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:
406 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
407 # - compute/v1/projects/project/global/backendServices/backendService
408 # - 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.
409 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
410 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
411 # - compute.backendBuckets.use
412 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -0700413 "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.
414 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700415 { # 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 -0700416 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
417 # If urlRedirect is specified, service or routeAction must not be set.
418 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
419 # 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.
420 # The value must be between 1 and 1024 characters.
421 "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.
422 # The default is set to false.
423 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
424 # Supported values are:
425 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
426 # - FOUND, which corresponds to 302.
427 # - SEE_OTHER which corresponds to 303.
428 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
429 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
430 "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.
431 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
432 # The default is set to false.
433 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
434 # 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.
435 # The value must be between 1 and 1024 characters.
436 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
437 # The value must be between 1 and 255 characters.
438 },
439 "description": "A String", # The short description conveying the intent of this routeRule.
440 # The description can have a maximum length of 1024 characters.
441 "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.
442 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
443 "httpFilterConfigs": [ # Outbound route specific configuration for networkservices.HttpFilter resources enabled by Traffic Director. httpFilterConfigs only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
444 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
445 "configTypeUrl": "A String", # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
446 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
447 "config": "A String", # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
448 },
449 ],
450 "httpFilterMetadata": [ # Outbound route specific metadata supplied to networkservices.HttpFilter resources enabled by Traffic Director. httpFilterMetadata only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
451 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
452 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
453 "configTypeUrl": "A String", # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
454 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
455 "config": "A String", # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
456 },
457 ],
458 "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.
459 # 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.
460 # 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.
461 "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.
462 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
463 "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.
464 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
465 },
466 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
467 "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.
468 # 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.
469 "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.
470 "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
471 },
472 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
473 # - 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.
474 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
475 # -
476 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
477 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
478 # - 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.
479 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
480 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
481 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
482 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
483 "A String",
484 ],
485 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
486 },
487 "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.
488 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
489 "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.
490 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
491 # The value must be between 0.0 and 100.0 inclusive.
492 "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.
493 "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.
494 "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
495 },
496 },
497 "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.
498 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
499 # The value must be between 0.0 and 100.0 inclusive.
500 "httpStatus": 42, # The HTTP status code used to abort the request.
501 # The value must be between 200 and 599 inclusive.
502 },
503 },
504 "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
505 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
506 "A String",
507 ],
508 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
509 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
510 "A String",
511 ],
512 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
513 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
514 "A String",
515 ],
516 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
517 "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.
518 # Default is false.
519 "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.
520 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
521 "A String",
522 ],
523 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
524 "A String",
525 ],
526 },
527 "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.
528 # If not specified, will use the largest timeout among all backend services associated with the route.
529 "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.
530 "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
531 },
532 "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.
533 # 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.
534 { # 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
535 "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.
536 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
537 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
538 "A String",
539 ],
540 "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.
541 "A String",
542 ],
543 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
544 { # Specification determining how headers are added to requests or responses.
545 "headerName": "A String", # The name of the header.
546 "headerValue": "A String", # The value of the header to add.
547 "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.
548 # The default value is false.
549 },
550 ],
551 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
552 { # Specification determining how headers are added to requests or responses.
553 "headerName": "A String", # The name of the header.
554 "headerValue": "A String", # The value of the header to add.
555 "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.
556 # The default value is false.
557 },
558 ],
559 },
560 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
561 # 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.
562 # The value must be between 0 and 1000
563 "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.
564 },
565 ],
566 "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.
567 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
568 # The value must be between 1 and 255 characters.
569 "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.
570 # The value must be between 1 and 1024 characters.
571 },
572 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700573 "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.
574 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
575 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
576 "A String",
577 ],
578 "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.
579 "A String",
580 ],
581 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
582 { # Specification determining how headers are added to requests or responses.
583 "headerName": "A String", # The name of the header.
584 "headerValue": "A String", # The value of the header to add.
585 "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.
586 # The default value is false.
587 },
588 ],
589 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
590 { # Specification determining how headers are added to requests or responses.
591 "headerName": "A String", # The name of the header.
592 "headerValue": "A String", # The value of the header to add.
593 "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.
594 # The default value is false.
595 },
596 ],
597 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700598 "matchRules": [
599 { # 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 -0700600 "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 -0700601 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -0700602 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700603 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
604 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -0700605 "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 -0700606 # 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.
607 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -0700608 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700609 "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.
610 # The default setting is false.
611 "headerName": "A String", # The name of the HTTP header to match.
612 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
613 # For matching a request's method, use the headerName ":method".
614 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
615 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
616 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
617 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
618 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
619 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -0700620 "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 -0700621 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
622 "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.
623 # For example for a range [-5, 0]
624 # - -3 will match.
625 # - 0 will not match.
626 # - 0.25 will not match.
627 # - -3someString will not match.
628 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -0700629 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700630 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
631 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
632 },
633 },
634 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700635 "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.
636 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700637 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -0700638 "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 -0700639 # The value must be between 1 and 1024 characters.
640 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
641 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
642 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -0700643 # ignoreCase must not be used with regexMatch.
644 "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.
645 # 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.
646 # 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 -0700647 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -0700648 { # 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.
649 # 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.
650 # 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 -0700651 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
652 # Supported values are:
653 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
654 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
655 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
656 # This list must not be empty and can have at the most 64 entries.
657 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
658 "name": "A String", # Name of metadata label.
659 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
660 "value": "A String", # The value of the label must match the specified value.
661 # value can have a maximum length of 1024 characters.
662 },
663 ],
664 },
665 ],
666 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
667 { # HttpRouteRuleMatch criteria for a request's query parameter.
668 "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 -0700669 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700670 "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 -0700671 # Only one of presentMatch, exactMatch or regexMatch must be set.
672 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700673 "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.
674 "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 -0700675 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700676 },
677 ],
678 },
679 ],
680 },
681 ],
682 "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.
683 # 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 -0700684 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700685 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
686 "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.
687 "A String",
688 ],
689 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
690 # If urlRedirect is specified, service or routeAction must not be set.
691 "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 -0700692 # 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 -0700693 # The value must be between 1 and 1024 characters.
694 "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.
695 # The default is set to false.
696 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
697 # Supported values are:
698 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
699 # - FOUND, which corresponds to 302.
700 # - SEE_OTHER which corresponds to 303.
701 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
702 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
703 "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.
704 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
705 # The default is set to false.
706 "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 -0700707 # 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.
708 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700709 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
710 # The value must be between 1 and 255 characters.
711 },
712 "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.
713 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
714 "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.
715 # Only one of routeAction or urlRedirect must be set.
716 "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.
717 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
718 },
719 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
720 "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 -0700721 # 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 -0700722 "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.
723 "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
724 },
725 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
726 # - 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.
727 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
728 # -
729 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
730 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
731 # - 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.
732 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
733 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
734 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
735 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
736 "A String",
737 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700738 "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 -0700739 },
740 "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.
741 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
742 "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.
743 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
744 # The value must be between 0.0 and 100.0 inclusive.
745 "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.
746 "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.
747 "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
748 },
749 },
750 "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.
751 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
752 # The value must be between 0.0 and 100.0 inclusive.
753 "httpStatus": 42, # The HTTP status code used to abort the request.
754 # The value must be between 200 and 599 inclusive.
755 },
756 },
757 "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
758 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
759 "A String",
760 ],
761 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
762 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
763 "A String",
764 ],
765 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
766 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
767 "A String",
768 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700769 "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 -0700770 "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.
771 # Default is false.
772 "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.
773 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
774 "A String",
775 ],
776 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
777 "A String",
778 ],
779 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700780 "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.
781 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700782 "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.
783 "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
784 },
785 "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.
786 # 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.
787 { # 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
788 "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.
789 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
790 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
791 "A String",
792 ],
793 "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.
794 "A String",
795 ],
796 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
797 { # Specification determining how headers are added to requests or responses.
798 "headerName": "A String", # The name of the header.
799 "headerValue": "A String", # The value of the header to add.
800 "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.
801 # The default value is false.
802 },
803 ],
804 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
805 { # Specification determining how headers are added to requests or responses.
806 "headerName": "A String", # The name of the header.
807 "headerValue": "A String", # The value of the header to add.
808 "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.
809 # The default value is false.
810 },
811 ],
812 },
813 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
814 # 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.
815 # The value must be between 0 and 1000
816 "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.
817 },
818 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700819 "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 -0700820 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
821 # The value must be between 1 and 255 characters.
822 "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.
823 # The value must be between 1 and 1024 characters.
824 },
825 },
826 },
827 ],
828 "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.
829 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
830 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
831 "A String",
832 ],
833 "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.
834 "A String",
835 ],
836 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
837 { # Specification determining how headers are added to requests or responses.
838 "headerName": "A String", # The name of the header.
839 "headerValue": "A String", # The value of the header to add.
840 "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.
841 # The default value is false.
842 },
843 ],
844 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
845 { # Specification determining how headers are added to requests or responses.
846 "headerName": "A String", # The name of the header.
847 "headerValue": "A String", # The value of the header to add.
848 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
849 # The default value is false.
850 },
851 ],
852 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700853 "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 -0700854 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
855 "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 -0700856 # 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 -0700857 # The value must be between 1 and 1024 characters.
858 "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.
859 # The default is set to false.
860 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
861 # Supported values are:
862 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
863 # - FOUND, which corresponds to 302.
864 # - SEE_OTHER which corresponds to 303.
865 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
866 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
867 "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.
868 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
869 # The default is set to false.
870 "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 -0700871 # 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.
872 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700873 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
874 # The value must be between 1 and 255 characters.
875 },
876 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
877 },
878 ],
879 "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.
880 # The headerAction specified here take effect after headerAction specified under pathMatcher.
881 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
882 "A String",
883 ],
884 "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.
885 "A String",
886 ],
887 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
888 { # Specification determining how headers are added to requests or responses.
889 "headerName": "A String", # The name of the header.
890 "headerValue": "A String", # The value of the header to add.
891 "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.
892 # The default value is false.
893 },
894 ],
895 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
896 { # Specification determining how headers are added to requests or responses.
897 "headerName": "A String", # The name of the header.
898 "headerValue": "A String", # The value of the header to add.
899 "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.
900 # The default value is false.
901 },
902 ],
903 },
904 "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.
905 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
906 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
907 "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 -0700908 # 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 -0700909 # The value must be between 1 and 1024 characters.
910 "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.
911 # The default is set to false.
912 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
913 # Supported values are:
914 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
915 # - FOUND, which corresponds to 302.
916 # - SEE_OTHER which corresponds to 303.
917 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
918 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
919 "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.
920 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
921 # The default is set to false.
922 "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 -0700923 # 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.
924 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700925 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
926 # The value must be between 1 and 255 characters.
927 },
928 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
929 "hostRules": [ # The list of HostRules to use against the URL.
930 { # 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 -0700931 "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 -0700932 "A String",
933 ],
934 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
935 "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.
936 },
937 ],
938 "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.
939 },
940 ],
941 "warning": { # Informational warning which replaces the list of backend services when the list is empty.
942 "message": "A String", # [Output Only] A human-readable description of the warning code.
943 "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.
944 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
945 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
946 {
947 "value": "A String", # [Output Only] A warning data value corresponding to the key.
948 "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).
949 },
950 ],
951 },
952 },
953 },
954 "warning": { # [Output Only] Informational warning message.
955 "message": "A String", # [Output Only] A human-readable description of the warning code.
956 "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.
957 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
958 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
959 {
960 "value": "A String", # [Output Only] A warning data value corresponding to the key.
961 "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).
962 },
963 ],
964 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700965 "unreachables": [ # [Output Only] Unreachable resources.
966 "A String",
967 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700968 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
969 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
970 }</pre>
971</div>
972
973<div class="method">
974 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
975 <pre>Retrieves the next page of results.
976
977Args:
978 previous_request: The request for the previous page. (required)
979 previous_response: The response from the request for the previous page. (required)
980
981Returns:
982 A request object that you can call 'execute()' on to request the next
983 page. Returns None if there are no more items in the collection.
984 </pre>
985</div>
986
987<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400988 <code class="details" id="delete">delete(project, urlMap, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700989 <pre>Deletes the specified UrlMap resource.
990
991Args:
992 project: string, Project ID for this request. (required)
993 urlMap: string, Name of the UrlMap resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700994 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.
995
996For 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.
997
998The 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 -0700999
1000Returns:
1001 An object of the form:
1002
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001003 { # Represents an Operation resource.
1004 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001005 # Google Compute Engine has three Operation resources:
1006 #
1007 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1008 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001009 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1010 #
1011 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001012 # - For global operations, use the `globalOperations` resource.
1013 # - For regional operations, use the `regionOperations` resource.
1014 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001015 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001016 # 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 -07001017 "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 -07001018 "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 -04001019 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001020 "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 -07001021 "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 -07001022 "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 -07001023 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1024 "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 -07001025 "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 -07001026 "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 -07001027 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001028 "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 -07001029 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1030 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1031 {
1032 "message": "A String", # [Output Only] A human-readable description of the warning code.
1033 "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.
1034 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1035 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1036 {
1037 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1038 "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).
1039 },
1040 ],
1041 },
1042 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001043 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07001044 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001045 "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 -07001046 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1047 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001048 "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 -07001049 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1050 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1051 {
1052 "message": "A String", # [Output Only] An optional, human-readable error message.
1053 "code": "A String", # [Output Only] The error type identifier for this error.
1054 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1055 },
1056 ],
1057 },
1058 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1059 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001060 "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 -07001061 }</pre>
1062</div>
1063
1064<div class="method">
1065 <code class="details" id="get">get(project, urlMap)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001066 <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 -07001067
1068Args:
1069 project: string, Project ID for this request. (required)
1070 urlMap: string, Name of the UrlMap resource to return. (required)
1071
1072Returns:
1073 An object of the form:
1074
Dan O'Mearadd494642020-05-01 07:42:23 -07001075 { # Represents a URL Map resource.
1076 #
1077 # Google Compute Engine has two URL Map resources:
1078 #
1079 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
1080 #
1081 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
1082 #
1083 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
1084 #
1085 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
1086 #
1087 # 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 -07001088 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
1089 "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 -07001090 "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.
1091 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
1092 "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.
1093 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1094 },
1095 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1096 "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 -07001097 # 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 -07001098 "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.
1099 "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
1100 },
1101 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1102 # - 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.
1103 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1104 # -
1105 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1106 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1107 # - 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.
1108 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1109 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1110 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1111 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1112 "A String",
1113 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001114 "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 -07001115 },
1116 "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.
1117 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1118 "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.
1119 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1120 # The value must be between 0.0 and 100.0 inclusive.
1121 "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.
1122 "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.
1123 "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
1124 },
1125 },
1126 "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.
1127 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1128 # The value must be between 0.0 and 100.0 inclusive.
1129 "httpStatus": 42, # The HTTP status code used to abort the request.
1130 # The value must be between 200 and 599 inclusive.
1131 },
1132 },
1133 "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
1134 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1135 "A String",
1136 ],
1137 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1138 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1139 "A String",
1140 ],
1141 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1142 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1143 "A String",
1144 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001145 "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 -07001146 "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.
1147 # Default is false.
1148 "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.
1149 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
1150 "A String",
1151 ],
1152 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
1153 "A String",
1154 ],
1155 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001156 "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.
1157 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001158 "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.
1159 "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
1160 },
1161 "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.
1162 # 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.
1163 { # 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
1164 "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.
1165 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1166 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1167 "A String",
1168 ],
1169 "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.
1170 "A String",
1171 ],
1172 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1173 { # Specification determining how headers are added to requests or responses.
1174 "headerName": "A String", # The name of the header.
1175 "headerValue": "A String", # The value of the header to add.
1176 "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.
1177 # The default value is false.
1178 },
1179 ],
1180 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1181 { # Specification determining how headers are added to requests or responses.
1182 "headerName": "A String", # The name of the header.
1183 "headerValue": "A String", # The value of the header to add.
1184 "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.
1185 # The default value is false.
1186 },
1187 ],
1188 },
1189 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1190 # 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.
1191 # The value must be between 0 and 1000
1192 "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.
1193 },
1194 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001195 "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 -07001196 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
1197 # The value must be between 1 and 255 characters.
1198 "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.
1199 # The value must be between 1 and 1024 characters.
1200 },
1201 },
1202 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1203 "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.
1204 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
1205 "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 -07001206 { # Message for the expected URL mappings.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001207 "description": "A String", # Description of this test case.
1208 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001209 "expectedUrlRedirect": "A String", # The expected URL that should be redirected to for the host and path being tested.
1210 "host": "A String", # Host portion of the URL.
1211 "path": "A String", # Path portion of the URL.
1212 "backendServiceWeight": 42, # The weight to use for the supplied host and path when using advanced routing rules that involve traffic splitting.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001213 },
1214 ],
1215 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001216 "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.
1217 #
1218 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001219 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
1220 { # 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 -07001221 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1222 "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.
1223 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
1224 "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.
1225 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1226 },
1227 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1228 "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 -07001229 # 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 -07001230 "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 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1234 # - 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.
1235 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1236 # -
1237 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1238 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1239 # - 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.
1240 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1241 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1242 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1243 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1244 "A String",
1245 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001246 "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 -07001247 },
1248 "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.
1249 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1250 "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.
1251 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1252 # The value must be between 0.0 and 100.0 inclusive.
1253 "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.
1254 "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.
1255 "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
1256 },
1257 },
1258 "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.
1259 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1260 # The value must be between 0.0 and 100.0 inclusive.
1261 "httpStatus": 42, # The HTTP status code used to abort the request.
1262 # The value must be between 200 and 599 inclusive.
1263 },
1264 },
1265 "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
1266 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1267 "A String",
1268 ],
1269 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1270 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1271 "A String",
1272 ],
1273 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1274 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1275 "A String",
1276 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001277 "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 -07001278 "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.
1279 # Default is false.
1280 "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.
1281 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
1282 "A String",
1283 ],
1284 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
1285 "A String",
1286 ],
1287 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001288 "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.
1289 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001290 "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.
1291 "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
1292 },
1293 "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.
1294 # 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.
1295 { # 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
1296 "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.
1297 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1298 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1299 "A String",
1300 ],
1301 "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.
1302 "A String",
1303 ],
1304 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1305 { # Specification determining how headers are added to requests or responses.
1306 "headerName": "A String", # The name of the header.
1307 "headerValue": "A String", # The value of the header to add.
1308 "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.
1309 # The default value is false.
1310 },
1311 ],
1312 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1313 { # Specification determining how headers are added to requests or responses.
1314 "headerName": "A String", # The name of the header.
1315 "headerValue": "A String", # The value of the header to add.
1316 "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.
1317 # The default value is false.
1318 },
1319 ],
1320 },
1321 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1322 # 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.
1323 # The value must be between 0 and 1000
1324 "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.
1325 },
1326 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001327 "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 -07001328 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
1329 # The value must be between 1 and 255 characters.
1330 "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.
1331 # The value must be between 1 and 1024 characters.
1332 },
1333 },
1334 "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 -07001335 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
1336 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001337 # - 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.
1338 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
1339 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
1340 # - compute.backendBuckets.use
1341 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07001342 "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.
1343 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001344 { # 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 -07001345 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
1346 # If urlRedirect is specified, service or routeAction must not be set.
1347 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
1348 # 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.
1349 # The value must be between 1 and 1024 characters.
1350 "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.
1351 # The default is set to false.
1352 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
1353 # Supported values are:
1354 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1355 # - FOUND, which corresponds to 302.
1356 # - SEE_OTHER which corresponds to 303.
1357 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1358 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1359 "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.
1360 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1361 # The default is set to false.
1362 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
1363 # 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.
1364 # The value must be between 1 and 1024 characters.
1365 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
1366 # The value must be between 1 and 255 characters.
1367 },
1368 "description": "A String", # The short description conveying the intent of this routeRule.
1369 # The description can have a maximum length of 1024 characters.
1370 "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.
1371 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1372 "httpFilterConfigs": [ # Outbound route specific configuration for networkservices.HttpFilter resources enabled by Traffic Director. httpFilterConfigs only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
1373 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
1374 "configTypeUrl": "A String", # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
1375 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
1376 "config": "A String", # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
1377 },
1378 ],
1379 "httpFilterMetadata": [ # Outbound route specific metadata supplied to networkservices.HttpFilter resources enabled by Traffic Director. httpFilterMetadata only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
1380 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
1381 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
1382 "configTypeUrl": "A String", # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
1383 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
1384 "config": "A String", # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
1385 },
1386 ],
1387 "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.
1388 # 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.
1389 # 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.
1390 "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.
1391 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1392 "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.
1393 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1394 },
1395 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1396 "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.
1397 # 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.
1398 "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.
1399 "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
1400 },
1401 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1402 # - 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.
1403 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1404 # -
1405 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1406 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1407 # - 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.
1408 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1409 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1410 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1411 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1412 "A String",
1413 ],
1414 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1415 },
1416 "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.
1417 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1418 "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.
1419 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1420 # The value must be between 0.0 and 100.0 inclusive.
1421 "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.
1422 "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.
1423 "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
1424 },
1425 },
1426 "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.
1427 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1428 # The value must be between 0.0 and 100.0 inclusive.
1429 "httpStatus": 42, # The HTTP status code used to abort the request.
1430 # The value must be between 200 and 599 inclusive.
1431 },
1432 },
1433 "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
1434 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1435 "A String",
1436 ],
1437 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1438 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1439 "A String",
1440 ],
1441 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1442 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1443 "A String",
1444 ],
1445 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
1446 "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.
1447 # Default is false.
1448 "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.
1449 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
1450 "A String",
1451 ],
1452 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
1453 "A String",
1454 ],
1455 },
1456 "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.
1457 # If not specified, will use the largest timeout among all backend services associated with the route.
1458 "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.
1459 "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
1460 },
1461 "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.
1462 # 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.
1463 { # 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
1464 "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.
1465 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1466 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1467 "A String",
1468 ],
1469 "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.
1470 "A String",
1471 ],
1472 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1473 { # Specification determining how headers are added to requests or responses.
1474 "headerName": "A String", # The name of the header.
1475 "headerValue": "A String", # The value of the header to add.
1476 "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.
1477 # The default value is false.
1478 },
1479 ],
1480 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1481 { # Specification determining how headers are added to requests or responses.
1482 "headerName": "A String", # The name of the header.
1483 "headerValue": "A String", # The value of the header to add.
1484 "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.
1485 # The default value is false.
1486 },
1487 ],
1488 },
1489 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1490 # 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.
1491 # The value must be between 0 and 1000
1492 "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.
1493 },
1494 ],
1495 "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.
1496 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
1497 # The value must be between 1 and 255 characters.
1498 "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.
1499 # The value must be between 1 and 1024 characters.
1500 },
1501 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001502 "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.
1503 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
1504 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1505 "A String",
1506 ],
1507 "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.
1508 "A String",
1509 ],
1510 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1511 { # Specification determining how headers are added to requests or responses.
1512 "headerName": "A String", # The name of the header.
1513 "headerValue": "A String", # The value of the header to add.
1514 "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.
1515 # The default value is false.
1516 },
1517 ],
1518 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1519 { # Specification determining how headers are added to requests or responses.
1520 "headerName": "A String", # The name of the header.
1521 "headerValue": "A String", # The value of the header to add.
1522 "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.
1523 # The default value is false.
1524 },
1525 ],
1526 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001527 "matchRules": [
1528 { # 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 -07001529 "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 -07001530 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07001531 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001532 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
1533 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -07001534 "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 -07001535 # 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.
1536 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07001537 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001538 "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.
1539 # The default setting is false.
1540 "headerName": "A String", # The name of the HTTP header to match.
1541 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
1542 # For matching a request's method, use the headerName ":method".
1543 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
1544 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1545 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
1546 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1547 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
1548 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07001549 "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 -07001550 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1551 "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.
1552 # For example for a range [-5, 0]
1553 # - -3 will match.
1554 # - 0 will not match.
1555 # - 0.25 will not match.
1556 # - -3someString will not match.
1557 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07001558 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001559 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
1560 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
1561 },
1562 },
1563 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001564 "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.
1565 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001566 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07001567 "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 -07001568 # The value must be between 1 and 1024 characters.
1569 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
1570 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
1571 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -07001572 # ignoreCase must not be used with regexMatch.
1573 "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.
1574 # 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.
1575 # 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 -07001576 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -07001577 { # 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.
1578 # 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.
1579 # 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 -07001580 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
1581 # Supported values are:
1582 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
1583 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
1584 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
1585 # This list must not be empty and can have at the most 64 entries.
1586 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
1587 "name": "A String", # Name of metadata label.
1588 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
1589 "value": "A String", # The value of the label must match the specified value.
1590 # value can have a maximum length of 1024 characters.
1591 },
1592 ],
1593 },
1594 ],
1595 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
1596 { # HttpRouteRuleMatch criteria for a request's query parameter.
1597 "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 -07001598 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001599 "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 -07001600 # Only one of presentMatch, exactMatch or regexMatch must be set.
1601 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001602 "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.
1603 "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 -07001604 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001605 },
1606 ],
1607 },
1608 ],
1609 },
1610 ],
1611 "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.
1612 # 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 -07001613 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001614 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
1615 "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.
1616 "A String",
1617 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001618 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
1619 # If urlRedirect is specified, service or routeAction must not be set.
1620 "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 -07001621 # 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 -07001622 # The value must be between 1 and 1024 characters.
1623 "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.
1624 # The default is set to false.
1625 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
1626 # Supported values are:
1627 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1628 # - FOUND, which corresponds to 302.
1629 # - SEE_OTHER which corresponds to 303.
1630 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1631 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1632 "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.
1633 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1634 # The default is set to false.
1635 "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 -07001636 # 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.
1637 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001638 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
1639 # The value must be between 1 and 255 characters.
1640 },
1641 "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.
1642 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1643 "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.
1644 # Only one of routeAction or urlRedirect must be set.
1645 "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.
1646 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1647 },
1648 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1649 "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 -07001650 # 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 -07001651 "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.
1652 "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
1653 },
1654 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1655 # - 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.
1656 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1657 # -
1658 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1659 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1660 # - 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.
1661 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1662 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1663 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1664 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1665 "A String",
1666 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001667 "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 -07001668 },
1669 "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.
1670 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1671 "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.
1672 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1673 # The value must be between 0.0 and 100.0 inclusive.
1674 "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.
1675 "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.
1676 "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
1677 },
1678 },
1679 "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.
1680 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1681 # The value must be between 0.0 and 100.0 inclusive.
1682 "httpStatus": 42, # The HTTP status code used to abort the request.
1683 # The value must be between 200 and 599 inclusive.
1684 },
1685 },
1686 "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
1687 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1688 "A String",
1689 ],
1690 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1691 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1692 "A String",
1693 ],
1694 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1695 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1696 "A String",
1697 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001698 "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 -07001699 "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.
1700 # Default is false.
1701 "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.
1702 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
1703 "A String",
1704 ],
1705 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
1706 "A String",
1707 ],
1708 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001709 "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.
1710 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001711 "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.
1712 "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
1713 },
1714 "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.
1715 # 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.
1716 { # 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
1717 "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.
1718 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1719 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1720 "A String",
1721 ],
1722 "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.
1723 "A String",
1724 ],
1725 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1726 { # Specification determining how headers are added to requests or responses.
1727 "headerName": "A String", # The name of the header.
1728 "headerValue": "A String", # The value of the header to add.
1729 "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.
1730 # The default value is false.
1731 },
1732 ],
1733 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1734 { # Specification determining how headers are added to requests or responses.
1735 "headerName": "A String", # The name of the header.
1736 "headerValue": "A String", # The value of the header to add.
1737 "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.
1738 # The default value is false.
1739 },
1740 ],
1741 },
1742 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1743 # 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.
1744 # The value must be between 0 and 1000
1745 "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.
1746 },
1747 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001748 "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 -07001749 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
1750 # The value must be between 1 and 255 characters.
1751 "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.
1752 # The value must be between 1 and 1024 characters.
1753 },
1754 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001755 },
1756 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001757 "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.
1758 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
1759 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1760 "A String",
1761 ],
1762 "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.
1763 "A String",
1764 ],
1765 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1766 { # Specification determining how headers are added to requests or responses.
1767 "headerName": "A String", # The name of the header.
1768 "headerValue": "A String", # The value of the header to add.
1769 "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.
1770 # The default value is false.
1771 },
1772 ],
1773 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1774 { # Specification determining how headers are added to requests or responses.
1775 "headerName": "A String", # The name of the header.
1776 "headerValue": "A String", # The value of the header to add.
1777 "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.
1778 # The default value is false.
1779 },
1780 ],
1781 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001782 "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 -07001783 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
1784 "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 -07001785 # 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 -07001786 # The value must be between 1 and 1024 characters.
1787 "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.
1788 # The default is set to false.
1789 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
1790 # Supported values are:
1791 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1792 # - FOUND, which corresponds to 302.
1793 # - SEE_OTHER which corresponds to 303.
1794 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1795 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1796 "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.
1797 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1798 # The default is set to false.
1799 "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 -07001800 # 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.
1801 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001802 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
1803 # The value must be between 1 and 255 characters.
1804 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001805 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
1806 },
1807 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001808 "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.
1809 # The headerAction specified here take effect after headerAction specified under pathMatcher.
1810 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1811 "A String",
1812 ],
1813 "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.
1814 "A String",
1815 ],
1816 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1817 { # Specification determining how headers are added to requests or responses.
1818 "headerName": "A String", # The name of the header.
1819 "headerValue": "A String", # The value of the header to add.
1820 "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.
1821 # The default value is false.
1822 },
1823 ],
1824 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1825 { # Specification determining how headers are added to requests or responses.
1826 "headerName": "A String", # The name of the header.
1827 "headerValue": "A String", # The value of the header to add.
1828 "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.
1829 # The default value is false.
1830 },
1831 ],
1832 },
1833 "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.
1834 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
1835 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
1836 "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 -07001837 # 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 -07001838 # The value must be between 1 and 1024 characters.
1839 "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.
1840 # The default is set to false.
1841 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
1842 # Supported values are:
1843 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1844 # - FOUND, which corresponds to 302.
1845 # - SEE_OTHER which corresponds to 303.
1846 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1847 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1848 "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.
1849 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1850 # The default is set to false.
1851 "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 -07001852 # 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.
1853 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001854 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
1855 # The value must be between 1 and 255 characters.
1856 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001857 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1858 "hostRules": [ # The list of HostRules to use against the URL.
1859 { # 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 -07001860 "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 -07001861 "A String",
1862 ],
1863 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1864 "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.
1865 },
1866 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001867 "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 -07001868 }</pre>
1869</div>
1870
1871<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001872 <code class="details" id="insert">insert(project, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001873 <pre>Creates a UrlMap resource in the specified project using the data included in the request.
1874
1875Args:
1876 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001877 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001878 The object takes the form of:
1879
Dan O'Mearadd494642020-05-01 07:42:23 -07001880{ # Represents a URL Map resource.
1881 #
1882 # Google Compute Engine has two URL Map resources:
1883 #
1884 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
1885 #
1886 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
1887 #
1888 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
1889 #
1890 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
1891 #
1892 # 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 -07001893 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
1894 "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 -07001895 "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.
1896 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
1897 "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.
1898 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1899 },
1900 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1901 "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 -07001902 # 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 -07001903 "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.
1904 "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
1905 },
1906 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1907 # - 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.
1908 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1909 # -
1910 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1911 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1912 # - 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.
1913 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1914 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1915 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1916 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1917 "A String",
1918 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001919 "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 -07001920 },
1921 "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.
1922 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1923 "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.
1924 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1925 # The value must be between 0.0 and 100.0 inclusive.
1926 "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.
1927 "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.
1928 "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
1929 },
1930 },
1931 "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.
1932 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1933 # The value must be between 0.0 and 100.0 inclusive.
1934 "httpStatus": 42, # The HTTP status code used to abort the request.
1935 # The value must be between 200 and 599 inclusive.
1936 },
1937 },
1938 "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
1939 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1940 "A String",
1941 ],
1942 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1943 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1944 "A String",
1945 ],
1946 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1947 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1948 "A String",
1949 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001950 "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 -07001951 "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.
1952 # Default is false.
1953 "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.
1954 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
1955 "A String",
1956 ],
1957 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
1958 "A String",
1959 ],
1960 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001961 "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.
1962 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001963 "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.
1964 "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
1965 },
1966 "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.
1967 # 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.
1968 { # 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
1969 "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.
1970 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1971 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1972 "A String",
1973 ],
1974 "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.
1975 "A String",
1976 ],
1977 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1978 { # Specification determining how headers are added to requests or responses.
1979 "headerName": "A String", # The name of the header.
1980 "headerValue": "A String", # The value of the header to add.
1981 "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.
1982 # The default value is false.
1983 },
1984 ],
1985 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1986 { # Specification determining how headers are added to requests or responses.
1987 "headerName": "A String", # The name of the header.
1988 "headerValue": "A String", # The value of the header to add.
1989 "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.
1990 # The default value is false.
1991 },
1992 ],
1993 },
1994 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1995 # 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.
1996 # The value must be between 0 and 1000
1997 "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.
1998 },
1999 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002000 "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 -07002001 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
2002 # The value must be between 1 and 255 characters.
2003 "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.
2004 # The value must be between 1 and 1024 characters.
2005 },
2006 },
2007 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
2008 "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.
2009 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
2010 "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 -07002011 { # Message for the expected URL mappings.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002012 "description": "A String", # Description of this test case.
2013 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002014 "expectedUrlRedirect": "A String", # The expected URL that should be redirected to for the host and path being tested.
2015 "host": "A String", # Host portion of the URL.
2016 "path": "A String", # Path portion of the URL.
2017 "backendServiceWeight": 42, # The weight to use for the supplied host and path when using advanced routing rules that involve traffic splitting.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002018 },
2019 ],
2020 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002021 "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.
2022 #
2023 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002024 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
2025 { # 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 -07002026 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
2027 "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.
2028 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
2029 "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.
2030 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
2031 },
2032 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2033 "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 -07002034 # 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 -07002035 "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.
2036 "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
2037 },
2038 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2039 # - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
2040 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2041 # -
2042 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2043 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2044 # - refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
2045 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2046 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2047 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2048 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2049 "A String",
2050 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002051 "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 -07002052 },
2053 "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.
2054 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2055 "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.
2056 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2057 # The value must be between 0.0 and 100.0 inclusive.
2058 "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.
2059 "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.
2060 "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
2061 },
2062 },
2063 "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.
2064 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2065 # The value must be between 0.0 and 100.0 inclusive.
2066 "httpStatus": 42, # The HTTP status code used to abort the request.
2067 # The value must be between 200 and 599 inclusive.
2068 },
2069 },
2070 "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
2071 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2072 "A String",
2073 ],
2074 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2075 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2076 "A String",
2077 ],
2078 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2079 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2080 "A String",
2081 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002082 "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 -07002083 "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.
2084 # Default is false.
2085 "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.
2086 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
2087 "A String",
2088 ],
2089 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
2090 "A String",
2091 ],
2092 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002093 "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.
2094 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002095 "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.
2096 "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
2097 },
2098 "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.
2099 # 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.
2100 { # 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
2101 "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.
2102 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2103 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2104 "A String",
2105 ],
2106 "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.
2107 "A String",
2108 ],
2109 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2110 { # Specification determining how headers are added to requests or responses.
2111 "headerName": "A String", # The name of the header.
2112 "headerValue": "A String", # The value of the header to add.
2113 "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.
2114 # The default value is false.
2115 },
2116 ],
2117 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2118 { # Specification determining how headers are added to requests or responses.
2119 "headerName": "A String", # The name of the header.
2120 "headerValue": "A String", # The value of the header to add.
2121 "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.
2122 # The default value is false.
2123 },
2124 ],
2125 },
2126 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2127 # 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.
2128 # The value must be between 0 and 1000
2129 "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.
2130 },
2131 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002132 "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 -07002133 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
2134 # The value must be between 1 and 255 characters.
2135 "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.
2136 # The value must be between 1 and 1024 characters.
2137 },
2138 },
2139 "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 -07002140 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
2141 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002142 # - 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.
2143 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
2144 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
2145 # - compute.backendBuckets.use
2146 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07002147 "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.
2148 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002149 { # 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 -07002150 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
2151 # If urlRedirect is specified, service or routeAction must not be set.
2152 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
2153 # 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.
2154 # The value must be between 1 and 1024 characters.
2155 "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.
2156 # The default is set to false.
2157 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
2158 # Supported values are:
2159 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2160 # - FOUND, which corresponds to 302.
2161 # - SEE_OTHER which corresponds to 303.
2162 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2163 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2164 "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.
2165 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2166 # The default is set to false.
2167 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
2168 # 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.
2169 # The value must be between 1 and 1024 characters.
2170 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
2171 # The value must be between 1 and 255 characters.
2172 },
2173 "description": "A String", # The short description conveying the intent of this routeRule.
2174 # The description can have a maximum length of 1024 characters.
2175 "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.
2176 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2177 "httpFilterConfigs": [ # Outbound route specific configuration for networkservices.HttpFilter resources enabled by Traffic Director. httpFilterConfigs only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
2178 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
2179 "configTypeUrl": "A String", # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
2180 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
2181 "config": "A String", # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
2182 },
2183 ],
2184 "httpFilterMetadata": [ # Outbound route specific metadata supplied to networkservices.HttpFilter resources enabled by Traffic Director. httpFilterMetadata only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
2185 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
2186 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
2187 "configTypeUrl": "A String", # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
2188 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
2189 "config": "A String", # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
2190 },
2191 ],
2192 "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.
2193 # 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.
2194 # 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.
2195 "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.
2196 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2197 "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.
2198 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
2199 },
2200 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2201 "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.
2202 # 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.
2203 "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.
2204 "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
2205 },
2206 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2207 # - 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.
2208 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2209 # -
2210 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2211 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2212 # - 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.
2213 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2214 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2215 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2216 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2217 "A String",
2218 ],
2219 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2220 },
2221 "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.
2222 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2223 "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.
2224 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2225 # The value must be between 0.0 and 100.0 inclusive.
2226 "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.
2227 "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.
2228 "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
2229 },
2230 },
2231 "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.
2232 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2233 # The value must be between 0.0 and 100.0 inclusive.
2234 "httpStatus": 42, # The HTTP status code used to abort the request.
2235 # The value must be between 200 and 599 inclusive.
2236 },
2237 },
2238 "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
2239 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2240 "A String",
2241 ],
2242 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2243 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2244 "A String",
2245 ],
2246 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2247 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2248 "A String",
2249 ],
2250 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
2251 "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.
2252 # Default is false.
2253 "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.
2254 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
2255 "A String",
2256 ],
2257 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
2258 "A String",
2259 ],
2260 },
2261 "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.
2262 # If not specified, will use the largest timeout among all backend services associated with the route.
2263 "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.
2264 "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
2265 },
2266 "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.
2267 # 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.
2268 { # 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
2269 "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.
2270 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2271 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2272 "A String",
2273 ],
2274 "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.
2275 "A String",
2276 ],
2277 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2278 { # Specification determining how headers are added to requests or responses.
2279 "headerName": "A String", # The name of the header.
2280 "headerValue": "A String", # The value of the header to add.
2281 "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.
2282 # The default value is false.
2283 },
2284 ],
2285 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2286 { # Specification determining how headers are added to requests or responses.
2287 "headerName": "A String", # The name of the header.
2288 "headerValue": "A String", # The value of the header to add.
2289 "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.
2290 # The default value is false.
2291 },
2292 ],
2293 },
2294 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2295 # 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.
2296 # The value must be between 0 and 1000
2297 "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.
2298 },
2299 ],
2300 "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.
2301 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
2302 # The value must be between 1 and 255 characters.
2303 "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.
2304 # The value must be between 1 and 1024 characters.
2305 },
2306 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002307 "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.
2308 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
2309 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2310 "A String",
2311 ],
2312 "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.
2313 "A String",
2314 ],
2315 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2316 { # Specification determining how headers are added to requests or responses.
2317 "headerName": "A String", # The name of the header.
2318 "headerValue": "A String", # The value of the header to add.
2319 "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.
2320 # The default value is false.
2321 },
2322 ],
2323 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2324 { # Specification determining how headers are added to requests or responses.
2325 "headerName": "A String", # The name of the header.
2326 "headerValue": "A String", # The value of the header to add.
2327 "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.
2328 # The default value is false.
2329 },
2330 ],
2331 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002332 "matchRules": [
2333 { # 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 -07002334 "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 -07002335 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07002336 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002337 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
2338 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -07002339 "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 -07002340 # 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.
2341 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07002342 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002343 "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.
2344 # The default setting is false.
2345 "headerName": "A String", # The name of the HTTP header to match.
2346 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
2347 # For matching a request's method, use the headerName ":method".
2348 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
2349 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2350 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
2351 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2352 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
2353 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07002354 "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 -07002355 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2356 "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.
2357 # For example for a range [-5, 0]
2358 # - -3 will match.
2359 # - 0 will not match.
2360 # - 0.25 will not match.
2361 # - -3someString will not match.
2362 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07002363 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002364 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
2365 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
2366 },
2367 },
2368 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002369 "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.
2370 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002371 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07002372 "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 -07002373 # The value must be between 1 and 1024 characters.
2374 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2375 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
2376 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -07002377 # ignoreCase must not be used with regexMatch.
2378 "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.
2379 # 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.
2380 # 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 -07002381 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -07002382 { # 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.
2383 # 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.
2384 # 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 -07002385 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
2386 # Supported values are:
2387 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
2388 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
2389 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
2390 # This list must not be empty and can have at the most 64 entries.
2391 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
2392 "name": "A String", # Name of metadata label.
2393 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
2394 "value": "A String", # The value of the label must match the specified value.
2395 # value can have a maximum length of 1024 characters.
2396 },
2397 ],
2398 },
2399 ],
2400 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
2401 { # HttpRouteRuleMatch criteria for a request's query parameter.
2402 "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 -07002403 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002404 "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 -07002405 # Only one of presentMatch, exactMatch or regexMatch must be set.
2406 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002407 "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.
2408 "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 -07002409 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002410 },
2411 ],
2412 },
2413 ],
2414 },
2415 ],
2416 "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.
2417 # 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 -07002418 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002419 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
2420 "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.
2421 "A String",
2422 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002423 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
2424 # If urlRedirect is specified, service or routeAction must not be set.
2425 "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 -07002426 # 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 -07002427 # The value must be between 1 and 1024 characters.
2428 "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.
2429 # The default is set to false.
2430 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
2431 # Supported values are:
2432 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2433 # - FOUND, which corresponds to 302.
2434 # - SEE_OTHER which corresponds to 303.
2435 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2436 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2437 "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.
2438 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2439 # The default is set to false.
2440 "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 -07002441 # 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.
2442 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002443 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
2444 # The value must be between 1 and 255 characters.
2445 },
2446 "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.
2447 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2448 "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.
2449 # Only one of routeAction or urlRedirect must be set.
2450 "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.
2451 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
2452 },
2453 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2454 "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 -07002455 # 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 -07002456 "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.
2457 "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
2458 },
2459 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2460 # - 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.
2461 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2462 # -
2463 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2464 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2465 # - 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.
2466 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2467 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2468 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2469 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2470 "A String",
2471 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002472 "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 -07002473 },
2474 "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.
2475 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2476 "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.
2477 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2478 # The value must be between 0.0 and 100.0 inclusive.
2479 "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.
2480 "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.
2481 "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
2482 },
2483 },
2484 "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.
2485 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2486 # The value must be between 0.0 and 100.0 inclusive.
2487 "httpStatus": 42, # The HTTP status code used to abort the request.
2488 # The value must be between 200 and 599 inclusive.
2489 },
2490 },
2491 "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
2492 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2493 "A String",
2494 ],
2495 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2496 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2497 "A String",
2498 ],
2499 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2500 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2501 "A String",
2502 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002503 "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 -07002504 "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.
2505 # Default is false.
2506 "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.
2507 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
2508 "A String",
2509 ],
2510 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
2511 "A String",
2512 ],
2513 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002514 "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.
2515 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002516 "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.
2517 "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
2518 },
2519 "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.
2520 # 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.
2521 { # 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
2522 "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.
2523 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2524 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2525 "A String",
2526 ],
2527 "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.
2528 "A String",
2529 ],
2530 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2531 { # Specification determining how headers are added to requests or responses.
2532 "headerName": "A String", # The name of the header.
2533 "headerValue": "A String", # The value of the header to add.
2534 "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.
2535 # The default value is false.
2536 },
2537 ],
2538 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2539 { # Specification determining how headers are added to requests or responses.
2540 "headerName": "A String", # The name of the header.
2541 "headerValue": "A String", # The value of the header to add.
2542 "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.
2543 # The default value is false.
2544 },
2545 ],
2546 },
2547 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2548 # 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.
2549 # The value must be between 0 and 1000
2550 "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.
2551 },
2552 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002553 "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 -07002554 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
2555 # The value must be between 1 and 255 characters.
2556 "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.
2557 # The value must be between 1 and 1024 characters.
2558 },
2559 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002560 },
2561 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002562 "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.
2563 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
2564 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2565 "A String",
2566 ],
2567 "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.
2568 "A String",
2569 ],
2570 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2571 { # Specification determining how headers are added to requests or responses.
2572 "headerName": "A String", # The name of the header.
2573 "headerValue": "A String", # The value of the header to add.
2574 "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.
2575 # The default value is false.
2576 },
2577 ],
2578 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2579 { # Specification determining how headers are added to requests or responses.
2580 "headerName": "A String", # The name of the header.
2581 "headerValue": "A String", # The value of the header to add.
2582 "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.
2583 # The default value is false.
2584 },
2585 ],
2586 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002587 "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 -07002588 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
2589 "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 -07002590 # 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 -07002591 # The value must be between 1 and 1024 characters.
2592 "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.
2593 # The default is set to false.
2594 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
2595 # Supported values are:
2596 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2597 # - FOUND, which corresponds to 302.
2598 # - SEE_OTHER which corresponds to 303.
2599 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2600 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2601 "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.
2602 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2603 # The default is set to false.
2604 "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 -07002605 # 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.
2606 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002607 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
2608 # The value must be between 1 and 255 characters.
2609 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002610 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
2611 },
2612 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002613 "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.
2614 # The headerAction specified here take effect after headerAction specified under pathMatcher.
2615 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2616 "A String",
2617 ],
2618 "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.
2619 "A String",
2620 ],
2621 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2622 { # Specification determining how headers are added to requests or responses.
2623 "headerName": "A String", # The name of the header.
2624 "headerValue": "A String", # The value of the header to add.
2625 "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.
2626 # The default value is false.
2627 },
2628 ],
2629 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2630 { # Specification determining how headers are added to requests or responses.
2631 "headerName": "A String", # The name of the header.
2632 "headerValue": "A String", # The value of the header to add.
2633 "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.
2634 # The default value is false.
2635 },
2636 ],
2637 },
2638 "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.
2639 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
2640 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
2641 "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 -07002642 # 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 -07002643 # The value must be between 1 and 1024 characters.
2644 "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.
2645 # The default is set to false.
2646 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
2647 # Supported values are:
2648 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2649 # - FOUND, which corresponds to 302.
2650 # - SEE_OTHER which corresponds to 303.
2651 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2652 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2653 "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.
2654 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2655 # The default is set to false.
2656 "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 -07002657 # 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.
2658 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002659 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
2660 # The value must be between 1 and 255 characters.
2661 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002662 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2663 "hostRules": [ # The list of HostRules to use against the URL.
2664 { # 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 -07002665 "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 -07002666 "A String",
2667 ],
2668 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
2669 "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.
2670 },
2671 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002672 "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 -07002673 }
2674
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002675 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.
2676
2677For 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.
2678
2679The 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 -07002680
2681Returns:
2682 An object of the form:
2683
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002684 { # Represents an Operation resource.
2685 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002686 # Google Compute Engine has three Operation resources:
2687 #
2688 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2689 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002690 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2691 #
2692 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002693 # - For global operations, use the `globalOperations` resource.
2694 # - For regional operations, use the `regionOperations` resource.
2695 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002696 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002697 # 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 -07002698 "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 -07002699 "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 -04002700 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07002701 "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 -07002702 "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 -07002703 "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 -07002704 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2705 "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 -07002706 "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 -07002707 "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 -07002708 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002709 "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 -07002710 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2711 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2712 {
2713 "message": "A String", # [Output Only] A human-readable description of the warning code.
2714 "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.
2715 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2716 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2717 {
2718 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2719 "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).
2720 },
2721 ],
2722 },
2723 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002724 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07002725 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002726 "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 -07002727 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2728 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002729 "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 -07002730 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2731 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2732 {
2733 "message": "A String", # [Output Only] An optional, human-readable error message.
2734 "code": "A String", # [Output Only] The error type identifier for this error.
2735 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2736 },
2737 ],
2738 },
2739 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2740 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002741 "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 -07002742 }</pre>
2743</div>
2744
2745<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002746 <code class="details" id="invalidateCache">invalidateCache(project, urlMap, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002747 <pre>Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.
2748
2749Args:
2750 project: string, Project ID for this request. (required)
2751 urlMap: string, Name of the UrlMap scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002752 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002753 The object takes the form of:
2754
2755{
2756 "path": "A String",
2757 "host": "A String", # If set, this invalidation rule will only apply to requests with a Host header matching host.
2758 }
2759
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002760 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.
2761
2762For 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.
2763
2764The 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 -07002765
2766Returns:
2767 An object of the form:
2768
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002769 { # Represents an Operation resource.
2770 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002771 # Google Compute Engine has three Operation resources:
2772 #
2773 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2774 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002775 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2776 #
2777 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002778 # - For global operations, use the `globalOperations` resource.
2779 # - For regional operations, use the `regionOperations` resource.
2780 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002781 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002782 # 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 -07002783 "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 -07002784 "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 -04002785 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07002786 "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 -07002787 "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 -07002788 "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 -07002789 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2790 "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 -07002791 "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 -07002792 "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 -07002793 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002794 "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 -07002795 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2796 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2797 {
2798 "message": "A String", # [Output Only] A human-readable description of the warning code.
2799 "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.
2800 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2801 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2802 {
2803 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2804 "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).
2805 },
2806 ],
2807 },
2808 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002809 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07002810 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002811 "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 -07002812 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2813 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002814 "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 -07002815 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2816 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2817 {
2818 "message": "A String", # [Output Only] An optional, human-readable error message.
2819 "code": "A String", # [Output Only] The error type identifier for this error.
2820 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2821 },
2822 ],
2823 },
2824 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2825 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002826 "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 -07002827 }</pre>
2828</div>
2829
2830<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002831 <code class="details" id="list">list(project, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, filter=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002832 <pre>Retrieves the list of UrlMap resources available to the specified project.
2833
2834Args:
2835 project: string, Project ID for this request. (required)
2836 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
2837
Dan O'Mearadd494642020-05-01 07:42:23 -07002838You 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 -07002839
Dan O'Mearadd494642020-05-01 07:42:23 -07002840Currently, only sorting by `name` or `creationTimestamp desc` is supported.
2841 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`)
2842 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.
2843 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
2844 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 -07002845
Dan O'Mearadd494642020-05-01 07:42:23 -07002846For 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 -07002847
Dan O'Mearadd494642020-05-01 07:42:23 -07002848You 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 -07002849
Dan O'Mearadd494642020-05-01 07:42:23 -07002850To 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 -07002851
2852Returns:
2853 An object of the form:
2854
2855 { # Contains a list of UrlMap resources.
2856 "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 -07002857 "kind": "compute#urlMapList", # Type of resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002858 "items": [ # A list of UrlMap resources.
Dan O'Mearadd494642020-05-01 07:42:23 -07002859 { # Represents a URL Map resource.
2860 #
2861 # Google Compute Engine has two URL Map resources:
2862 #
2863 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
2864 #
2865 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
2866 #
2867 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
2868 #
2869 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
2870 #
2871 # 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 -07002872 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
2873 "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 -07002874 "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.
2875 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
2876 "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.
2877 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
2878 },
2879 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2880 "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 -07002881 # 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 -07002882 "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.
2883 "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
2884 },
2885 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2886 # - 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.
2887 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2888 # -
2889 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2890 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2891 # - 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.
2892 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2893 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2894 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2895 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2896 "A String",
2897 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002898 "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 -07002899 },
2900 "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.
2901 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2902 "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.
2903 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2904 # The value must be between 0.0 and 100.0 inclusive.
2905 "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.
2906 "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.
2907 "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
2908 },
2909 },
2910 "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.
2911 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2912 # The value must be between 0.0 and 100.0 inclusive.
2913 "httpStatus": 42, # The HTTP status code used to abort the request.
2914 # The value must be between 200 and 599 inclusive.
2915 },
2916 },
2917 "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
2918 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2919 "A String",
2920 ],
2921 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2922 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2923 "A String",
2924 ],
2925 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2926 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2927 "A String",
2928 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002929 "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 -07002930 "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.
2931 # Default is false.
2932 "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.
2933 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
2934 "A String",
2935 ],
2936 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
2937 "A String",
2938 ],
2939 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002940 "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.
2941 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002942 "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.
2943 "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
2944 },
2945 "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.
2946 # 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.
2947 { # 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
2948 "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.
2949 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2950 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2951 "A String",
2952 ],
2953 "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.
2954 "A String",
2955 ],
2956 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2957 { # Specification determining how headers are added to requests or responses.
2958 "headerName": "A String", # The name of the header.
2959 "headerValue": "A String", # The value of the header to add.
2960 "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.
2961 # The default value is false.
2962 },
2963 ],
2964 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2965 { # Specification determining how headers are added to requests or responses.
2966 "headerName": "A String", # The name of the header.
2967 "headerValue": "A String", # The value of the header to add.
2968 "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.
2969 # The default value is false.
2970 },
2971 ],
2972 },
2973 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2974 # 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.
2975 # The value must be between 0 and 1000
2976 "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.
2977 },
2978 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002979 "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 -07002980 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
2981 # The value must be between 1 and 255 characters.
2982 "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.
2983 # The value must be between 1 and 1024 characters.
2984 },
2985 },
2986 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
2987 "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.
2988 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
2989 "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 -07002990 { # Message for the expected URL mappings.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002991 "description": "A String", # Description of this test case.
2992 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002993 "expectedUrlRedirect": "A String", # The expected URL that should be redirected to for the host and path being tested.
2994 "host": "A String", # Host portion of the URL.
2995 "path": "A String", # Path portion of the URL.
2996 "backendServiceWeight": 42, # The weight to use for the supplied host and path when using advanced routing rules that involve traffic splitting.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002997 },
2998 ],
2999 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003000 "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.
3001 #
3002 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003003 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
3004 { # 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 -07003005 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
3006 "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.
3007 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
3008 "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.
3009 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3010 },
3011 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3012 "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 -07003013 # 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 -07003014 "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.
3015 "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
3016 },
3017 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3018 # - 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.
3019 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3020 # -
3021 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3022 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3023 # - 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.
3024 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3025 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3026 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3027 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3028 "A String",
3029 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003030 "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 -07003031 },
3032 "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.
3033 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3034 "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.
3035 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3036 # The value must be between 0.0 and 100.0 inclusive.
3037 "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.
3038 "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.
3039 "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
3040 },
3041 },
3042 "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.
3043 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3044 # The value must be between 0.0 and 100.0 inclusive.
3045 "httpStatus": 42, # The HTTP status code used to abort the request.
3046 # The value must be between 200 and 599 inclusive.
3047 },
3048 },
3049 "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
3050 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3051 "A String",
3052 ],
3053 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3054 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3055 "A String",
3056 ],
3057 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3058 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3059 "A String",
3060 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003061 "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 -07003062 "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.
3063 # Default is false.
3064 "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.
3065 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3066 "A String",
3067 ],
3068 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3069 "A String",
3070 ],
3071 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003072 "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.
3073 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003074 "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.
3075 "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
3076 },
3077 "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.
3078 # 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.
3079 { # 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
3080 "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.
3081 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3082 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3083 "A String",
3084 ],
3085 "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.
3086 "A String",
3087 ],
3088 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3089 { # Specification determining how headers are added to requests or responses.
3090 "headerName": "A String", # The name of the header.
3091 "headerValue": "A String", # The value of the header to add.
3092 "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.
3093 # The default value is false.
3094 },
3095 ],
3096 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3097 { # Specification determining how headers are added to requests or responses.
3098 "headerName": "A String", # The name of the header.
3099 "headerValue": "A String", # The value of the header to add.
3100 "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.
3101 # The default value is false.
3102 },
3103 ],
3104 },
3105 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3106 # 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.
3107 # The value must be between 0 and 1000
3108 "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.
3109 },
3110 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003111 "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 -07003112 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3113 # The value must be between 1 and 255 characters.
3114 "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.
3115 # The value must be between 1 and 1024 characters.
3116 },
3117 },
3118 "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 -07003119 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
3120 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003121 # - 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.
3122 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3123 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
3124 # - compute.backendBuckets.use
3125 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07003126 "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.
3127 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003128 { # 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 -07003129 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
3130 # If urlRedirect is specified, service or routeAction must not be set.
3131 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
3132 # 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.
3133 # The value must be between 1 and 1024 characters.
3134 "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.
3135 # The default is set to false.
3136 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3137 # Supported values are:
3138 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3139 # - FOUND, which corresponds to 302.
3140 # - SEE_OTHER which corresponds to 303.
3141 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3142 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3143 "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.
3144 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3145 # The default is set to false.
3146 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
3147 # 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.
3148 # The value must be between 1 and 1024 characters.
3149 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3150 # The value must be between 1 and 255 characters.
3151 },
3152 "description": "A String", # The short description conveying the intent of this routeRule.
3153 # The description can have a maximum length of 1024 characters.
3154 "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.
3155 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3156 "httpFilterConfigs": [ # Outbound route specific configuration for networkservices.HttpFilter resources enabled by Traffic Director. httpFilterConfigs only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
3157 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
3158 "configTypeUrl": "A String", # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
3159 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
3160 "config": "A String", # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
3161 },
3162 ],
3163 "httpFilterMetadata": [ # Outbound route specific metadata supplied to networkservices.HttpFilter resources enabled by Traffic Director. httpFilterMetadata only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
3164 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
3165 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
3166 "configTypeUrl": "A String", # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
3167 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
3168 "config": "A String", # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
3169 },
3170 ],
3171 "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.
3172 # 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.
3173 # 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.
3174 "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.
3175 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3176 "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.
3177 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3178 },
3179 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3180 "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.
3181 # 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.
3182 "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.
3183 "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
3184 },
3185 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3186 # - 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.
3187 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3188 # -
3189 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3190 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3191 # - 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.
3192 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3193 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3194 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3195 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3196 "A String",
3197 ],
3198 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3199 },
3200 "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.
3201 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3202 "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.
3203 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3204 # The value must be between 0.0 and 100.0 inclusive.
3205 "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.
3206 "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.
3207 "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
3208 },
3209 },
3210 "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.
3211 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3212 # The value must be between 0.0 and 100.0 inclusive.
3213 "httpStatus": 42, # The HTTP status code used to abort the request.
3214 # The value must be between 200 and 599 inclusive.
3215 },
3216 },
3217 "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
3218 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3219 "A String",
3220 ],
3221 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3222 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3223 "A String",
3224 ],
3225 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3226 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3227 "A String",
3228 ],
3229 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
3230 "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.
3231 # Default is false.
3232 "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.
3233 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3234 "A String",
3235 ],
3236 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3237 "A String",
3238 ],
3239 },
3240 "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.
3241 # If not specified, will use the largest timeout among all backend services associated with the route.
3242 "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.
3243 "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
3244 },
3245 "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.
3246 # 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.
3247 { # 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
3248 "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.
3249 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3250 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3251 "A String",
3252 ],
3253 "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.
3254 "A String",
3255 ],
3256 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3257 { # Specification determining how headers are added to requests or responses.
3258 "headerName": "A String", # The name of the header.
3259 "headerValue": "A String", # The value of the header to add.
3260 "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.
3261 # The default value is false.
3262 },
3263 ],
3264 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3265 { # Specification determining how headers are added to requests or responses.
3266 "headerName": "A String", # The name of the header.
3267 "headerValue": "A String", # The value of the header to add.
3268 "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.
3269 # The default value is false.
3270 },
3271 ],
3272 },
3273 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3274 # 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.
3275 # The value must be between 0 and 1000
3276 "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.
3277 },
3278 ],
3279 "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.
3280 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3281 # The value must be between 1 and 255 characters.
3282 "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.
3283 # The value must be between 1 and 1024 characters.
3284 },
3285 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003286 "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.
3287 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
3288 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3289 "A String",
3290 ],
3291 "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.
3292 "A String",
3293 ],
3294 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3295 { # Specification determining how headers are added to requests or responses.
3296 "headerName": "A String", # The name of the header.
3297 "headerValue": "A String", # The value of the header to add.
3298 "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.
3299 # The default value is false.
3300 },
3301 ],
3302 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3303 { # Specification determining how headers are added to requests or responses.
3304 "headerName": "A String", # The name of the header.
3305 "headerValue": "A String", # The value of the header to add.
3306 "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.
3307 # The default value is false.
3308 },
3309 ],
3310 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003311 "matchRules": [
3312 { # 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 -07003313 "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 -07003314 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07003315 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003316 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
3317 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -07003318 "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 -07003319 # 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.
3320 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07003321 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003322 "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.
3323 # The default setting is false.
3324 "headerName": "A String", # The name of the HTTP header to match.
3325 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
3326 # For matching a request's method, use the headerName ":method".
3327 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
3328 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3329 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
3330 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3331 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
3332 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07003333 "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 -07003334 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3335 "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.
3336 # For example for a range [-5, 0]
3337 # - -3 will match.
3338 # - 0 will not match.
3339 # - 0.25 will not match.
3340 # - -3someString will not match.
3341 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07003342 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003343 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
3344 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
3345 },
3346 },
3347 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003348 "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.
3349 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003350 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07003351 "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 -07003352 # The value must be between 1 and 1024 characters.
3353 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3354 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
3355 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -07003356 # ignoreCase must not be used with regexMatch.
3357 "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.
3358 # 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.
3359 # 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 -07003360 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -07003361 { # 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.
3362 # 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.
3363 # 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 -07003364 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
3365 # Supported values are:
3366 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
3367 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
3368 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
3369 # This list must not be empty and can have at the most 64 entries.
3370 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
3371 "name": "A String", # Name of metadata label.
3372 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
3373 "value": "A String", # The value of the label must match the specified value.
3374 # value can have a maximum length of 1024 characters.
3375 },
3376 ],
3377 },
3378 ],
3379 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
3380 { # HttpRouteRuleMatch criteria for a request's query parameter.
3381 "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 -07003382 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003383 "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 -07003384 # Only one of presentMatch, exactMatch or regexMatch must be set.
3385 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003386 "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.
3387 "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 -07003388 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003389 },
3390 ],
3391 },
3392 ],
3393 },
3394 ],
3395 "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.
3396 # 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 -07003397 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003398 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
3399 "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.
3400 "A String",
3401 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003402 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
3403 # If urlRedirect is specified, service or routeAction must not be set.
3404 "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 -07003405 # 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 -07003406 # The value must be between 1 and 1024 characters.
3407 "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.
3408 # The default is set to false.
3409 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3410 # Supported values are:
3411 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3412 # - FOUND, which corresponds to 302.
3413 # - SEE_OTHER which corresponds to 303.
3414 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3415 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3416 "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.
3417 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3418 # The default is set to false.
3419 "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 -07003420 # 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.
3421 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003422 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3423 # The value must be between 1 and 255 characters.
3424 },
3425 "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.
3426 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3427 "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.
3428 # Only one of routeAction or urlRedirect must be set.
3429 "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.
3430 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3431 },
3432 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3433 "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 -07003434 # 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 -07003435 "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.
3436 "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
3437 },
3438 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3439 # - 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.
3440 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3441 # -
3442 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3443 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3444 # - 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.
3445 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3446 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3447 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3448 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3449 "A String",
3450 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003451 "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 -07003452 },
3453 "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.
3454 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3455 "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.
3456 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3457 # The value must be between 0.0 and 100.0 inclusive.
3458 "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.
3459 "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.
3460 "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
3461 },
3462 },
3463 "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.
3464 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3465 # The value must be between 0.0 and 100.0 inclusive.
3466 "httpStatus": 42, # The HTTP status code used to abort the request.
3467 # The value must be between 200 and 599 inclusive.
3468 },
3469 },
3470 "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
3471 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3472 "A String",
3473 ],
3474 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3475 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3476 "A String",
3477 ],
3478 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3479 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3480 "A String",
3481 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003482 "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 -07003483 "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.
3484 # Default is false.
3485 "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.
3486 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3487 "A String",
3488 ],
3489 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3490 "A String",
3491 ],
3492 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003493 "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.
3494 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003495 "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.
3496 "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
3497 },
3498 "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.
3499 # 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.
3500 { # 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
3501 "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.
3502 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3503 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3504 "A String",
3505 ],
3506 "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.
3507 "A String",
3508 ],
3509 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3510 { # Specification determining how headers are added to requests or responses.
3511 "headerName": "A String", # The name of the header.
3512 "headerValue": "A String", # The value of the header to add.
3513 "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.
3514 # The default value is false.
3515 },
3516 ],
3517 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3518 { # Specification determining how headers are added to requests or responses.
3519 "headerName": "A String", # The name of the header.
3520 "headerValue": "A String", # The value of the header to add.
3521 "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.
3522 # The default value is false.
3523 },
3524 ],
3525 },
3526 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3527 # 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.
3528 # The value must be between 0 and 1000
3529 "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.
3530 },
3531 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003532 "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 -07003533 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3534 # The value must be between 1 and 255 characters.
3535 "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.
3536 # The value must be between 1 and 1024 characters.
3537 },
3538 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003539 },
3540 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003541 "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.
3542 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
3543 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3544 "A String",
3545 ],
3546 "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.
3547 "A String",
3548 ],
3549 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3550 { # Specification determining how headers are added to requests or responses.
3551 "headerName": "A String", # The name of the header.
3552 "headerValue": "A String", # The value of the header to add.
3553 "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.
3554 # The default value is false.
3555 },
3556 ],
3557 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3558 { # Specification determining how headers are added to requests or responses.
3559 "headerName": "A String", # The name of the header.
3560 "headerValue": "A String", # The value of the header to add.
3561 "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.
3562 # The default value is false.
3563 },
3564 ],
3565 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003566 "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 -07003567 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
3568 "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 -07003569 # 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 -07003570 # The value must be between 1 and 1024 characters.
3571 "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.
3572 # The default is set to false.
3573 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3574 # Supported values are:
3575 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3576 # - FOUND, which corresponds to 302.
3577 # - SEE_OTHER which corresponds to 303.
3578 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3579 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3580 "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.
3581 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3582 # The default is set to false.
3583 "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 -07003584 # 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.
3585 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003586 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3587 # The value must be between 1 and 255 characters.
3588 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003589 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
3590 },
3591 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003592 "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.
3593 # The headerAction specified here take effect after headerAction specified under pathMatcher.
3594 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3595 "A String",
3596 ],
3597 "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.
3598 "A String",
3599 ],
3600 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3601 { # Specification determining how headers are added to requests or responses.
3602 "headerName": "A String", # The name of the header.
3603 "headerValue": "A String", # The value of the header to add.
3604 "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.
3605 # The default value is false.
3606 },
3607 ],
3608 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3609 { # Specification determining how headers are added to requests or responses.
3610 "headerName": "A String", # The name of the header.
3611 "headerValue": "A String", # The value of the header to add.
3612 "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.
3613 # The default value is false.
3614 },
3615 ],
3616 },
3617 "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.
3618 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
3619 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
3620 "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 -07003621 # 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 -07003622 # The value must be between 1 and 1024 characters.
3623 "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.
3624 # The default is set to false.
3625 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3626 # Supported values are:
3627 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3628 # - FOUND, which corresponds to 302.
3629 # - SEE_OTHER which corresponds to 303.
3630 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3631 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3632 "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.
3633 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3634 # The default is set to false.
3635 "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 -07003636 # 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.
3637 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003638 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3639 # The value must be between 1 and 255 characters.
3640 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003641 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3642 "hostRules": [ # The list of HostRules to use against the URL.
3643 { # 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 -07003644 "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 -07003645 "A String",
3646 ],
3647 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
3648 "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.
3649 },
3650 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003651 "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 -07003652 },
3653 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003654 "warning": { # [Output Only] Informational warning message.
3655 "message": "A String", # [Output Only] A human-readable description of the warning code.
3656 "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.
3657 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3658 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3659 {
3660 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3661 "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).
3662 },
3663 ],
3664 },
3665 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003666 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
3667 }</pre>
3668</div>
3669
3670<div class="method">
3671 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
3672 <pre>Retrieves the next page of results.
3673
3674Args:
3675 previous_request: The request for the previous page. (required)
3676 previous_response: The response from the request for the previous page. (required)
3677
3678Returns:
3679 A request object that you can call 'execute()' on to request the next
3680 page. Returns None if there are no more items in the collection.
3681 </pre>
3682</div>
3683
3684<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003685 <code class="details" id="patch">patch(project, urlMap, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003686 <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 -07003687
3688Args:
3689 project: string, Project ID for this request. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003690 urlMap: string, Name of the UrlMap resource to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003691 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003692 The object takes the form of:
3693
Dan O'Mearadd494642020-05-01 07:42:23 -07003694{ # Represents a URL Map resource.
3695 #
3696 # Google Compute Engine has two URL Map resources:
3697 #
3698 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
3699 #
3700 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
3701 #
3702 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
3703 #
3704 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
3705 #
3706 # 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 -07003707 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
3708 "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 -07003709 "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.
3710 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
3711 "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.
3712 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3713 },
3714 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3715 "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 -07003716 # 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 -07003717 "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.
3718 "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
3719 },
3720 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3721 # - 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.
3722 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3723 # -
3724 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3725 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3726 # - 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.
3727 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3728 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3729 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3730 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3731 "A String",
3732 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003733 "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 -07003734 },
3735 "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.
3736 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3737 "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.
3738 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3739 # The value must be between 0.0 and 100.0 inclusive.
3740 "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.
3741 "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.
3742 "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
3743 },
3744 },
3745 "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.
3746 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3747 # The value must be between 0.0 and 100.0 inclusive.
3748 "httpStatus": 42, # The HTTP status code used to abort the request.
3749 # The value must be between 200 and 599 inclusive.
3750 },
3751 },
3752 "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
3753 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3754 "A String",
3755 ],
3756 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3757 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3758 "A String",
3759 ],
3760 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3761 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3762 "A String",
3763 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003764 "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 -07003765 "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.
3766 # Default is false.
3767 "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.
3768 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3769 "A String",
3770 ],
3771 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3772 "A String",
3773 ],
3774 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003775 "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.
3776 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003777 "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.
3778 "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
3779 },
3780 "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.
3781 # 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.
3782 { # 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
3783 "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.
3784 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3785 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3786 "A String",
3787 ],
3788 "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.
3789 "A String",
3790 ],
3791 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3792 { # Specification determining how headers are added to requests or responses.
3793 "headerName": "A String", # The name of the header.
3794 "headerValue": "A String", # The value of the header to add.
3795 "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.
3796 # The default value is false.
3797 },
3798 ],
3799 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3800 { # Specification determining how headers are added to requests or responses.
3801 "headerName": "A String", # The name of the header.
3802 "headerValue": "A String", # The value of the header to add.
3803 "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.
3804 # The default value is false.
3805 },
3806 ],
3807 },
3808 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3809 # The selection of a backend service is determined only for new traffic. Once a user'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.
3810 # The value must be between 0 and 1000
3811 "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.
3812 },
3813 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003814 "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 -07003815 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3816 # The value must be between 1 and 255 characters.
3817 "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.
3818 # The value must be between 1 and 1024 characters.
3819 },
3820 },
3821 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
3822 "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.
3823 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3824 "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 -07003825 { # Message for the expected URL mappings.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003826 "description": "A String", # Description of this test case.
3827 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003828 "expectedUrlRedirect": "A String", # The expected URL that should be redirected to for the host and path being tested.
3829 "host": "A String", # Host portion of the URL.
3830 "path": "A String", # Path portion of the URL.
3831 "backendServiceWeight": 42, # The weight to use for the supplied host and path when using advanced routing rules that involve traffic splitting.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003832 },
3833 ],
3834 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003835 "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.
3836 #
3837 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003838 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
3839 { # 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 -07003840 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
3841 "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.
3842 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
3843 "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.
3844 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3845 },
3846 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3847 "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 -07003848 # 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 -07003849 "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.
3850 "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
3851 },
3852 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3853 # - 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.
3854 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3855 # -
3856 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3857 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3858 # - 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.
3859 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3860 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3861 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3862 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3863 "A String",
3864 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003865 "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 -07003866 },
3867 "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.
3868 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3869 "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.
3870 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3871 # The value must be between 0.0 and 100.0 inclusive.
3872 "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.
3873 "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.
3874 "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
3875 },
3876 },
3877 "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.
3878 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3879 # The value must be between 0.0 and 100.0 inclusive.
3880 "httpStatus": 42, # The HTTP status code used to abort the request.
3881 # The value must be between 200 and 599 inclusive.
3882 },
3883 },
3884 "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
3885 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3886 "A String",
3887 ],
3888 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3889 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3890 "A String",
3891 ],
3892 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3893 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3894 "A String",
3895 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003896 "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 -07003897 "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.
3898 # Default is false.
3899 "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.
3900 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3901 "A String",
3902 ],
3903 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3904 "A String",
3905 ],
3906 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003907 "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.
3908 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003909 "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.
3910 "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
3911 },
3912 "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.
3913 # 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.
3914 { # 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
3915 "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.
3916 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3917 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3918 "A String",
3919 ],
3920 "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.
3921 "A String",
3922 ],
3923 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3924 { # Specification determining how headers are added to requests or responses.
3925 "headerName": "A String", # The name of the header.
3926 "headerValue": "A String", # The value of the header to add.
3927 "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.
3928 # The default value is false.
3929 },
3930 ],
3931 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3932 { # Specification determining how headers are added to requests or responses.
3933 "headerName": "A String", # The name of the header.
3934 "headerValue": "A String", # The value of the header to add.
3935 "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.
3936 # The default value is false.
3937 },
3938 ],
3939 },
3940 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3941 # 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.
3942 # The value must be between 0 and 1000
3943 "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.
3944 },
3945 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003946 "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 -07003947 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3948 # The value must be between 1 and 255 characters.
3949 "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.
3950 # The value must be between 1 and 1024 characters.
3951 },
3952 },
3953 "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 -07003954 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
3955 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003956 # - 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.
3957 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3958 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
3959 # - compute.backendBuckets.use
3960 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07003961 "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.
3962 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003963 { # 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 -07003964 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
3965 # If urlRedirect is specified, service or routeAction must not be set.
3966 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
3967 # 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.
3968 # The value must be between 1 and 1024 characters.
3969 "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.
3970 # The default is set to false.
3971 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3972 # Supported values are:
3973 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3974 # - FOUND, which corresponds to 302.
3975 # - SEE_OTHER which corresponds to 303.
3976 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3977 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3978 "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.
3979 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3980 # The default is set to false.
3981 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
3982 # 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.
3983 # The value must be between 1 and 1024 characters.
3984 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3985 # The value must be between 1 and 255 characters.
3986 },
3987 "description": "A String", # The short description conveying the intent of this routeRule.
3988 # The description can have a maximum length of 1024 characters.
3989 "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.
3990 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3991 "httpFilterConfigs": [ # Outbound route specific configuration for networkservices.HttpFilter resources enabled by Traffic Director. httpFilterConfigs only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
3992 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
3993 "configTypeUrl": "A String", # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
3994 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
3995 "config": "A String", # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
3996 },
3997 ],
3998 "httpFilterMetadata": [ # Outbound route specific metadata supplied to networkservices.HttpFilter resources enabled by Traffic Director. httpFilterMetadata only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
3999 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
4000 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
4001 "configTypeUrl": "A String", # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
4002 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
4003 "config": "A String", # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
4004 },
4005 ],
4006 "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.
4007 # 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.
4008 # 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.
4009 "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.
4010 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4011 "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.
4012 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
4013 },
4014 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4015 "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.
4016 # 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.
4017 "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.
4018 "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
4019 },
4020 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4021 # - 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.
4022 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4023 # -
4024 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4025 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4026 # - 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.
4027 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4028 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4029 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4030 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4031 "A String",
4032 ],
4033 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4034 },
4035 "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.
4036 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4037 "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.
4038 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4039 # The value must be between 0.0 and 100.0 inclusive.
4040 "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.
4041 "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.
4042 "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
4043 },
4044 },
4045 "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.
4046 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4047 # The value must be between 0.0 and 100.0 inclusive.
4048 "httpStatus": 42, # The HTTP status code used to abort the request.
4049 # The value must be between 200 and 599 inclusive.
4050 },
4051 },
4052 "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
4053 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
4054 "A String",
4055 ],
4056 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
4057 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4058 "A String",
4059 ],
4060 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4061 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4062 "A String",
4063 ],
4064 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
4065 "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.
4066 # Default is false.
4067 "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.
4068 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
4069 "A String",
4070 ],
4071 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
4072 "A String",
4073 ],
4074 },
4075 "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.
4076 # If not specified, will use the largest timeout among all backend services associated with the route.
4077 "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.
4078 "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
4079 },
4080 "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.
4081 # 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.
4082 { # 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
4083 "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.
4084 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4085 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4086 "A String",
4087 ],
4088 "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.
4089 "A String",
4090 ],
4091 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4092 { # Specification determining how headers are added to requests or responses.
4093 "headerName": "A String", # The name of the header.
4094 "headerValue": "A String", # The value of the header to add.
4095 "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.
4096 # The default value is false.
4097 },
4098 ],
4099 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4100 { # Specification determining how headers are added to requests or responses.
4101 "headerName": "A String", # The name of the header.
4102 "headerValue": "A String", # The value of the header to add.
4103 "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.
4104 # The default value is false.
4105 },
4106 ],
4107 },
4108 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4109 # 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.
4110 # The value must be between 0 and 1000
4111 "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.
4112 },
4113 ],
4114 "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.
4115 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
4116 # The value must be between 1 and 255 characters.
4117 "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.
4118 # The value must be between 1 and 1024 characters.
4119 },
4120 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004121 "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.
4122 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
4123 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4124 "A String",
4125 ],
4126 "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.
4127 "A String",
4128 ],
4129 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4130 { # Specification determining how headers are added to requests or responses.
4131 "headerName": "A String", # The name of the header.
4132 "headerValue": "A String", # The value of the header to add.
4133 "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.
4134 # The default value is false.
4135 },
4136 ],
4137 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4138 { # Specification determining how headers are added to requests or responses.
4139 "headerName": "A String", # The name of the header.
4140 "headerValue": "A String", # The value of the header to add.
4141 "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.
4142 # The default value is false.
4143 },
4144 ],
4145 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004146 "matchRules": [
4147 { # 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 -07004148 "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 -07004149 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07004150 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004151 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
4152 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -07004153 "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 -07004154 # 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.
4155 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07004156 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004157 "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.
4158 # The default setting is false.
4159 "headerName": "A String", # The name of the HTTP header to match.
4160 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
4161 # For matching a request's method, use the headerName ":method".
4162 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
4163 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4164 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
4165 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4166 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
4167 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07004168 "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 -07004169 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4170 "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.
4171 # For example for a range [-5, 0]
4172 # - -3 will match.
4173 # - 0 will not match.
4174 # - 0.25 will not match.
4175 # - -3someString will not match.
4176 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07004177 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004178 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
4179 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
4180 },
4181 },
4182 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004183 "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.
4184 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004185 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07004186 "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 -07004187 # The value must be between 1 and 1024 characters.
4188 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4189 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
4190 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -07004191 # ignoreCase must not be used with regexMatch.
4192 "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.
4193 # 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.
4194 # 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 -07004195 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -07004196 { # 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.
4197 # 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.
4198 # 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 -07004199 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
4200 # Supported values are:
4201 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
4202 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
4203 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
4204 # This list must not be empty and can have at the most 64 entries.
4205 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
4206 "name": "A String", # Name of metadata label.
4207 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
4208 "value": "A String", # The value of the label must match the specified value.
4209 # value can have a maximum length of 1024 characters.
4210 },
4211 ],
4212 },
4213 ],
4214 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
4215 { # HttpRouteRuleMatch criteria for a request's query parameter.
4216 "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 -07004217 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004218 "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 -07004219 # Only one of presentMatch, exactMatch or regexMatch must be set.
4220 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004221 "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.
4222 "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 -07004223 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004224 },
4225 ],
4226 },
4227 ],
4228 },
4229 ],
4230 "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.
4231 # 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 -07004232 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004233 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
4234 "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.
4235 "A String",
4236 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004237 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
4238 # If urlRedirect is specified, service or routeAction must not be set.
4239 "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 -07004240 # 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 -07004241 # The value must be between 1 and 1024 characters.
4242 "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.
4243 # The default is set to false.
4244 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
4245 # Supported values are:
4246 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4247 # - FOUND, which corresponds to 302.
4248 # - SEE_OTHER which corresponds to 303.
4249 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4250 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4251 "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.
4252 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4253 # The default is set to false.
4254 "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 -07004255 # 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.
4256 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004257 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
4258 # The value must be between 1 and 255 characters.
4259 },
4260 "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.
4261 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4262 "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.
4263 # Only one of routeAction or urlRedirect must be set.
4264 "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.
4265 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
4266 },
4267 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4268 "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 -07004269 # 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 -07004270 "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.
4271 "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
4272 },
4273 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4274 # - 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.
4275 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4276 # -
4277 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4278 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4279 # - 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.
4280 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4281 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4282 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4283 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4284 "A String",
4285 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004286 "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 -07004287 },
4288 "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.
4289 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4290 "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.
4291 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4292 # The value must be between 0.0 and 100.0 inclusive.
4293 "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.
4294 "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.
4295 "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
4296 },
4297 },
4298 "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.
4299 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4300 # The value must be between 0.0 and 100.0 inclusive.
4301 "httpStatus": 42, # The HTTP status code used to abort the request.
4302 # The value must be between 200 and 599 inclusive.
4303 },
4304 },
4305 "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
4306 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
4307 "A String",
4308 ],
4309 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
4310 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4311 "A String",
4312 ],
4313 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4314 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4315 "A String",
4316 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004317 "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 -07004318 "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.
4319 # Default is false.
4320 "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.
4321 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
4322 "A String",
4323 ],
4324 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
4325 "A String",
4326 ],
4327 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004328 "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.
4329 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004330 "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.
4331 "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
4332 },
4333 "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.
4334 # 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.
4335 { # 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
4336 "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.
4337 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4338 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4339 "A String",
4340 ],
4341 "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.
4342 "A String",
4343 ],
4344 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4345 { # Specification determining how headers are added to requests or responses.
4346 "headerName": "A String", # The name of the header.
4347 "headerValue": "A String", # The value of the header to add.
4348 "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.
4349 # The default value is false.
4350 },
4351 ],
4352 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4353 { # Specification determining how headers are added to requests or responses.
4354 "headerName": "A String", # The name of the header.
4355 "headerValue": "A String", # The value of the header to add.
4356 "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.
4357 # The default value is false.
4358 },
4359 ],
4360 },
4361 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4362 # 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.
4363 # The value must be between 0 and 1000
4364 "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.
4365 },
4366 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004367 "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 -07004368 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
4369 # The value must be between 1 and 255 characters.
4370 "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.
4371 # The value must be between 1 and 1024 characters.
4372 },
4373 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004374 },
4375 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004376 "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.
4377 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
4378 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4379 "A String",
4380 ],
4381 "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.
4382 "A String",
4383 ],
4384 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4385 { # Specification determining how headers are added to requests or responses.
4386 "headerName": "A String", # The name of the header.
4387 "headerValue": "A String", # The value of the header to add.
4388 "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.
4389 # The default value is false.
4390 },
4391 ],
4392 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4393 { # Specification determining how headers are added to requests or responses.
4394 "headerName": "A String", # The name of the header.
4395 "headerValue": "A String", # The value of the header to add.
4396 "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.
4397 # The default value is false.
4398 },
4399 ],
4400 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004401 "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 -07004402 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
4403 "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 -07004404 # 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 -07004405 # The value must be between 1 and 1024 characters.
4406 "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.
4407 # The default is set to false.
4408 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
4409 # Supported values are:
4410 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4411 # - FOUND, which corresponds to 302.
4412 # - SEE_OTHER which corresponds to 303.
4413 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4414 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4415 "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.
4416 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4417 # The default is set to false.
4418 "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 -07004419 # 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.
4420 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004421 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
4422 # The value must be between 1 and 255 characters.
4423 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004424 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
4425 },
4426 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004427 "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.
4428 # The headerAction specified here take effect after headerAction specified under pathMatcher.
4429 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4430 "A String",
4431 ],
4432 "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.
4433 "A String",
4434 ],
4435 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4436 { # Specification determining how headers are added to requests or responses.
4437 "headerName": "A String", # The name of the header.
4438 "headerValue": "A String", # The value of the header to add.
4439 "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.
4440 # The default value is false.
4441 },
4442 ],
4443 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4444 { # Specification determining how headers are added to requests or responses.
4445 "headerName": "A String", # The name of the header.
4446 "headerValue": "A String", # The value of the header to add.
4447 "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.
4448 # The default value is false.
4449 },
4450 ],
4451 },
4452 "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.
4453 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
4454 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
4455 "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 -07004456 # 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 -07004457 # The value must be between 1 and 1024 characters.
4458 "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.
4459 # The default is set to false.
4460 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
4461 # Supported values are:
4462 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4463 # - FOUND, which corresponds to 302.
4464 # - SEE_OTHER which corresponds to 303.
4465 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4466 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4467 "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.
4468 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4469 # The default is set to false.
4470 "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 -07004471 # 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.
4472 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004473 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
4474 # The value must be between 1 and 255 characters.
4475 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004476 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4477 "hostRules": [ # The list of HostRules to use against the URL.
4478 { # 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 -07004479 "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 -07004480 "A String",
4481 ],
4482 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
4483 "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.
4484 },
4485 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004486 "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 -07004487 }
4488
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004489 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.
4490
4491For 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.
4492
4493The 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 -07004494
4495Returns:
4496 An object of the form:
4497
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004498 { # Represents an Operation resource.
4499 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004500 # Google Compute Engine has three Operation resources:
4501 #
4502 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4503 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004504 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4505 #
4506 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004507 # - For global operations, use the `globalOperations` resource.
4508 # - For regional operations, use the `regionOperations` resource.
4509 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004510 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004511 # 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 -07004512 "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 -07004513 "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 -04004514 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004515 "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 -07004516 "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 -07004517 "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 -07004518 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4519 "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 -07004520 "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 -07004521 "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 -07004522 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004523 "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 -07004524 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4525 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4526 {
4527 "message": "A String", # [Output Only] A human-readable description of the warning code.
4528 "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.
4529 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4530 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4531 {
4532 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4533 "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).
4534 },
4535 ],
4536 },
4537 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004538 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07004539 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004540 "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 -07004541 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4542 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004543 "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 -07004544 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4545 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4546 {
4547 "message": "A String", # [Output Only] An optional, human-readable error message.
4548 "code": "A String", # [Output Only] The error type identifier for this error.
4549 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4550 },
4551 ],
4552 },
4553 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4554 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004555 "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 -07004556 }</pre>
4557</div>
4558
4559<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004560 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004561 <pre>Returns permissions that a caller has on the specified resource.
4562
4563Args:
4564 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004565 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004566 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004567 The object takes the form of:
4568
4569{
4570 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
4571 "A String",
4572 ],
4573 }
4574
4575
4576Returns:
4577 An object of the form:
4578
4579 {
4580 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
4581 "A String",
4582 ],
4583 }</pre>
4584</div>
4585
4586<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004587 <code class="details" id="update">update(project, urlMap, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004588 <pre>Updates the specified UrlMap resource with the data included in the request.
4589
4590Args:
4591 project: string, Project ID for this request. (required)
4592 urlMap: string, Name of the UrlMap resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004593 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004594 The object takes the form of:
4595
Dan O'Mearadd494642020-05-01 07:42:23 -07004596{ # Represents a URL Map resource.
4597 #
4598 # Google Compute Engine has two URL Map resources:
4599 #
4600 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
4601 #
4602 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
4603 #
4604 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
4605 #
4606 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
4607 #
4608 # 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 -07004609 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
4610 "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 -07004611 "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.
4612 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
4613 "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.
4614 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
4615 },
4616 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4617 "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 -07004618 # 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 -07004619 "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.
4620 "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
4621 },
4622 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4623 # - 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.
4624 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4625 # -
4626 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4627 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4628 # - 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.
4629 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4630 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4631 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4632 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4633 "A String",
4634 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004635 "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 -07004636 },
4637 "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.
4638 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4639 "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.
4640 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4641 # The value must be between 0.0 and 100.0 inclusive.
4642 "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.
4643 "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.
4644 "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
4645 },
4646 },
4647 "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.
4648 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4649 # The value must be between 0.0 and 100.0 inclusive.
4650 "httpStatus": 42, # The HTTP status code used to abort the request.
4651 # The value must be between 200 and 599 inclusive.
4652 },
4653 },
4654 "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
4655 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
4656 "A String",
4657 ],
4658 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
4659 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4660 "A String",
4661 ],
4662 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4663 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4664 "A String",
4665 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004666 "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 -07004667 "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.
4668 # Default is false.
4669 "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.
4670 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
4671 "A String",
4672 ],
4673 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
4674 "A String",
4675 ],
4676 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004677 "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.
4678 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004679 "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 "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.
4683 # 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.
4684 { # 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
4685 "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.
4686 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4687 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4688 "A String",
4689 ],
4690 "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.
4691 "A String",
4692 ],
4693 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4694 { # Specification determining how headers are added to requests or responses.
4695 "headerName": "A String", # The name of the header.
4696 "headerValue": "A String", # The value of the header to add.
4697 "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.
4698 # The default value is false.
4699 },
4700 ],
4701 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4702 { # Specification determining how headers are added to requests or responses.
4703 "headerName": "A String", # The name of the header.
4704 "headerValue": "A String", # The value of the header to add.
4705 "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.
4706 # The default value is false.
4707 },
4708 ],
4709 },
4710 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4711 # 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.
4712 # The value must be between 0 and 1000
4713 "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.
4714 },
4715 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004716 "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 -07004717 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
4718 # The value must be between 1 and 255 characters.
4719 "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.
4720 # The value must be between 1 and 1024 characters.
4721 },
4722 },
4723 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
4724 "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.
4725 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
4726 "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 -07004727 { # Message for the expected URL mappings.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004728 "description": "A String", # Description of this test case.
4729 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004730 "expectedUrlRedirect": "A String", # The expected URL that should be redirected to for the host and path being tested.
4731 "host": "A String", # Host portion of the URL.
4732 "path": "A String", # Path portion of the URL.
4733 "backendServiceWeight": 42, # The weight to use for the supplied host and path when using advanced routing rules that involve traffic splitting.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004734 },
4735 ],
4736 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004737 "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.
4738 #
4739 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004740 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
4741 { # 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 -07004742 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
4743 "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.
4744 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
4745 "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.
4746 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
4747 },
4748 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4749 "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 -07004750 # 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 -07004751 "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.
4752 "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
4753 },
4754 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4755 # - 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.
4756 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4757 # -
4758 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4759 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4760 # - 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.
4761 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4762 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4763 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4764 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4765 "A String",
4766 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004767 "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 -07004768 },
4769 "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.
4770 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4771 "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.
4772 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4773 # The value must be between 0.0 and 100.0 inclusive.
4774 "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.
4775 "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.
4776 "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
4777 },
4778 },
4779 "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.
4780 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4781 # The value must be between 0.0 and 100.0 inclusive.
4782 "httpStatus": 42, # The HTTP status code used to abort the request.
4783 # The value must be between 200 and 599 inclusive.
4784 },
4785 },
4786 "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
4787 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
4788 "A String",
4789 ],
4790 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
4791 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4792 "A String",
4793 ],
4794 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4795 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4796 "A String",
4797 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004798 "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 -07004799 "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.
4800 # Default is false.
4801 "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.
4802 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
4803 "A String",
4804 ],
4805 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
4806 "A String",
4807 ],
4808 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004809 "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.
4810 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004811 "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.
4812 "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
4813 },
4814 "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.
4815 # 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.
4816 { # 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
4817 "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.
4818 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4819 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4820 "A String",
4821 ],
4822 "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.
4823 "A String",
4824 ],
4825 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4826 { # Specification determining how headers are added to requests or responses.
4827 "headerName": "A String", # The name of the header.
4828 "headerValue": "A String", # The value of the header to add.
4829 "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.
4830 # The default value is false.
4831 },
4832 ],
4833 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4834 { # Specification determining how headers are added to requests or responses.
4835 "headerName": "A String", # The name of the header.
4836 "headerValue": "A String", # The value of the header to add.
4837 "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.
4838 # The default value is false.
4839 },
4840 ],
4841 },
4842 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4843 # 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.
4844 # The value must be between 0 and 1000
4845 "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.
4846 },
4847 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004848 "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 -07004849 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
4850 # The value must be between 1 and 255 characters.
4851 "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.
4852 # The value must be between 1 and 1024 characters.
4853 },
4854 },
4855 "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 -07004856 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
4857 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004858 # - 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.
4859 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
4860 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
4861 # - compute.backendBuckets.use
4862 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07004863 "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.
4864 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004865 { # 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 -07004866 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
4867 # If urlRedirect is specified, service or routeAction must not be set.
4868 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
4869 # 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.
4870 # The value must be between 1 and 1024 characters.
4871 "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.
4872 # The default is set to false.
4873 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
4874 # Supported values are:
4875 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4876 # - FOUND, which corresponds to 302.
4877 # - SEE_OTHER which corresponds to 303.
4878 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4879 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4880 "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.
4881 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4882 # The default is set to false.
4883 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
4884 # 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.
4885 # The value must be between 1 and 1024 characters.
4886 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
4887 # The value must be between 1 and 255 characters.
4888 },
4889 "description": "A String", # The short description conveying the intent of this routeRule.
4890 # The description can have a maximum length of 1024 characters.
4891 "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.
4892 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4893 "httpFilterConfigs": [ # Outbound route specific configuration for networkservices.HttpFilter resources enabled by Traffic Director. httpFilterConfigs only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
4894 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
4895 "configTypeUrl": "A String", # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
4896 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
4897 "config": "A String", # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
4898 },
4899 ],
4900 "httpFilterMetadata": [ # Outbound route specific metadata supplied to networkservices.HttpFilter resources enabled by Traffic Director. httpFilterMetadata only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
4901 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
4902 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
4903 "configTypeUrl": "A String", # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
4904 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
4905 "config": "A String", # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
4906 },
4907 ],
4908 "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.
4909 # 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.
4910 # 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.
4911 "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.
4912 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4913 "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.
4914 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
4915 },
4916 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4917 "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.
4918 # 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.
4919 "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.
4920 "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
4921 },
4922 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4923 # - 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.
4924 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4925 # -
4926 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4927 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4928 # - 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.
4929 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4930 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4931 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4932 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4933 "A String",
4934 ],
4935 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4936 },
4937 "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.
4938 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4939 "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.
4940 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4941 # The value must be between 0.0 and 100.0 inclusive.
4942 "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.
4943 "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.
4944 "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
4945 },
4946 },
4947 "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.
4948 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4949 # The value must be between 0.0 and 100.0 inclusive.
4950 "httpStatus": 42, # The HTTP status code used to abort the request.
4951 # The value must be between 200 and 599 inclusive.
4952 },
4953 },
4954 "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
4955 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
4956 "A String",
4957 ],
4958 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
4959 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4960 "A String",
4961 ],
4962 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4963 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4964 "A String",
4965 ],
4966 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
4967 "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.
4968 # Default is false.
4969 "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.
4970 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
4971 "A String",
4972 ],
4973 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
4974 "A String",
4975 ],
4976 },
4977 "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.
4978 # If not specified, will use the largest timeout among all backend services associated with the route.
4979 "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.
4980 "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
4981 },
4982 "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.
4983 # 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.
4984 { # 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
4985 "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.
4986 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4987 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4988 "A String",
4989 ],
4990 "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.
4991 "A String",
4992 ],
4993 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4994 { # Specification determining how headers are added to requests or responses.
4995 "headerName": "A String", # The name of the header.
4996 "headerValue": "A String", # The value of the header to add.
4997 "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.
4998 # The default value is false.
4999 },
5000 ],
5001 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5002 { # Specification determining how headers are added to requests or responses.
5003 "headerName": "A String", # The name of the header.
5004 "headerValue": "A String", # The value of the header to add.
5005 "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.
5006 # The default value is false.
5007 },
5008 ],
5009 },
5010 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5011 # 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.
5012 # The value must be between 0 and 1000
5013 "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.
5014 },
5015 ],
5016 "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.
5017 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
5018 # The value must be between 1 and 255 characters.
5019 "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.
5020 # The value must be between 1 and 1024 characters.
5021 },
5022 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005023 "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.
5024 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
5025 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5026 "A String",
5027 ],
5028 "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.
5029 "A String",
5030 ],
5031 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5032 { # Specification determining how headers are added to requests or responses.
5033 "headerName": "A String", # The name of the header.
5034 "headerValue": "A String", # The value of the header to add.
5035 "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.
5036 # The default value is false.
5037 },
5038 ],
5039 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5040 { # Specification determining how headers are added to requests or responses.
5041 "headerName": "A String", # The name of the header.
5042 "headerValue": "A String", # The value of the header to add.
5043 "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.
5044 # The default value is false.
5045 },
5046 ],
5047 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005048 "matchRules": [
5049 { # 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 -07005050 "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 -07005051 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07005052 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005053 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
5054 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -07005055 "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 -07005056 # 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.
5057 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07005058 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005059 "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.
5060 # The default setting is false.
5061 "headerName": "A String", # The name of the HTTP header to match.
5062 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
5063 # For matching a request's method, use the headerName ":method".
5064 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
5065 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5066 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
5067 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5068 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
5069 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07005070 "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 -07005071 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5072 "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.
5073 # For example for a range [-5, 0]
5074 # - -3 will match.
5075 # - 0 will not match.
5076 # - 0.25 will not match.
5077 # - -3someString will not match.
5078 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07005079 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005080 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
5081 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
5082 },
5083 },
5084 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005085 "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.
5086 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005087 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07005088 "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 -07005089 # The value must be between 1 and 1024 characters.
5090 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5091 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
5092 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -07005093 # ignoreCase must not be used with regexMatch.
5094 "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.
5095 # 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.
5096 # 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 -07005097 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -07005098 { # 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.
5099 # 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.
5100 # 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 -07005101 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
5102 # Supported values are:
5103 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
5104 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
5105 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
5106 # This list must not be empty and can have at the most 64 entries.
5107 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
5108 "name": "A String", # Name of metadata label.
5109 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
5110 "value": "A String", # The value of the label must match the specified value.
5111 # value can have a maximum length of 1024 characters.
5112 },
5113 ],
5114 },
5115 ],
5116 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
5117 { # HttpRouteRuleMatch criteria for a request's query parameter.
5118 "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 -07005119 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005120 "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 -07005121 # Only one of presentMatch, exactMatch or regexMatch must be set.
5122 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005123 "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.
5124 "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 -07005125 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005126 },
5127 ],
5128 },
5129 ],
5130 },
5131 ],
5132 "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.
5133 # 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 -07005134 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005135 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
5136 "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.
5137 "A String",
5138 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005139 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
5140 # If urlRedirect is specified, service or routeAction must not be set.
5141 "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 -07005142 # 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 -07005143 # The value must be between 1 and 1024 characters.
5144 "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.
5145 # The default is set to false.
5146 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
5147 # Supported values are:
5148 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5149 # - FOUND, which corresponds to 302.
5150 # - SEE_OTHER which corresponds to 303.
5151 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5152 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5153 "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.
5154 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5155 # The default is set to false.
5156 "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 -07005157 # 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.
5158 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005159 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
5160 # The value must be between 1 and 255 characters.
5161 },
5162 "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.
5163 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5164 "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.
5165 # Only one of routeAction or urlRedirect must be set.
5166 "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.
5167 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
5168 },
5169 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
5170 "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 -07005171 # 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 -07005172 "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.
5173 "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
5174 },
5175 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5176 # - 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.
5177 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5178 # -
5179 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5180 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5181 # - 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.
5182 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5183 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5184 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5185 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5186 "A String",
5187 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005188 "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 -07005189 },
5190 "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.
5191 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
5192 "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.
5193 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5194 # The value must be between 0.0 and 100.0 inclusive.
5195 "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.
5196 "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.
5197 "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
5198 },
5199 },
5200 "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.
5201 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5202 # The value must be between 0.0 and 100.0 inclusive.
5203 "httpStatus": 42, # The HTTP status code used to abort the request.
5204 # The value must be between 200 and 599 inclusive.
5205 },
5206 },
5207 "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
5208 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
5209 "A String",
5210 ],
5211 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
5212 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5213 "A String",
5214 ],
5215 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
5216 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5217 "A String",
5218 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005219 "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 -07005220 "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.
5221 # Default is false.
5222 "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.
5223 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
5224 "A String",
5225 ],
5226 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
5227 "A String",
5228 ],
5229 },
Dan O'Mearadd494642020-05-01 07:42:23 -07005230 "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.
5231 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005232 "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.
5233 "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
5234 },
5235 "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.
5236 # 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.
5237 { # 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
5238 "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.
5239 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
5240 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5241 "A String",
5242 ],
5243 "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.
5244 "A String",
5245 ],
5246 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5247 { # Specification determining how headers are added to requests or responses.
5248 "headerName": "A String", # The name of the header.
5249 "headerValue": "A String", # The value of the header to add.
5250 "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.
5251 # The default value is false.
5252 },
5253 ],
5254 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5255 { # Specification determining how headers are added to requests or responses.
5256 "headerName": "A String", # The name of the header.
5257 "headerValue": "A String", # The value of the header to add.
5258 "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.
5259 # The default value is false.
5260 },
5261 ],
5262 },
5263 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5264 # 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.
5265 # The value must be between 0 and 1000
5266 "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.
5267 },
5268 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005269 "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 -07005270 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
5271 # The value must be between 1 and 255 characters.
5272 "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.
5273 # The value must be between 1 and 1024 characters.
5274 },
5275 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005276 },
5277 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005278 "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.
5279 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
5280 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5281 "A String",
5282 ],
5283 "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.
5284 "A String",
5285 ],
5286 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5287 { # Specification determining how headers are added to requests or responses.
5288 "headerName": "A String", # The name of the header.
5289 "headerValue": "A String", # The value of the header to add.
5290 "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.
5291 # The default value is false.
5292 },
5293 ],
5294 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5295 { # Specification determining how headers are added to requests or responses.
5296 "headerName": "A String", # The name of the header.
5297 "headerValue": "A String", # The value of the header to add.
5298 "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.
5299 # The default value is false.
5300 },
5301 ],
5302 },
Dan O'Mearadd494642020-05-01 07:42:23 -07005303 "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 -07005304 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
5305 "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 -07005306 # 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 -07005307 # The value must be between 1 and 1024 characters.
5308 "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.
5309 # The default is set to false.
5310 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
5311 # Supported values are:
5312 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5313 # - FOUND, which corresponds to 302.
5314 # - SEE_OTHER which corresponds to 303.
5315 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5316 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5317 "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.
5318 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5319 # The default is set to false.
5320 "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 -07005321 # 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.
5322 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005323 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
5324 # The value must be between 1 and 255 characters.
5325 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005326 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
5327 },
5328 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005329 "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.
5330 # The headerAction specified here take effect after headerAction specified under pathMatcher.
5331 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5332 "A String",
5333 ],
5334 "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.
5335 "A String",
5336 ],
5337 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5338 { # Specification determining how headers are added to requests or responses.
5339 "headerName": "A String", # The name of the header.
5340 "headerValue": "A String", # The value of the header to add.
5341 "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.
5342 # The default value is false.
5343 },
5344 ],
5345 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5346 { # Specification determining how headers are added to requests or responses.
5347 "headerName": "A String", # The name of the header.
5348 "headerValue": "A String", # The value of the header to add.
5349 "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.
5350 # The default value is false.
5351 },
5352 ],
5353 },
5354 "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.
5355 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
5356 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
5357 "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 -07005358 # 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 -07005359 # The value must be between 1 and 1024 characters.
5360 "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.
5361 # The default is set to false.
5362 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
5363 # Supported values are:
5364 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5365 # - FOUND, which corresponds to 302.
5366 # - SEE_OTHER which corresponds to 303.
5367 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5368 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5369 "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.
5370 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5371 # The default is set to false.
5372 "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 -07005373 # 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.
5374 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005375 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
5376 # The value must be between 1 and 255 characters.
5377 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005378 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
5379 "hostRules": [ # The list of HostRules to use against the URL.
5380 { # 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 -07005381 "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 -07005382 "A String",
5383 ],
5384 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
5385 "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.
5386 },
5387 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005388 "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 -07005389 }
5390
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005391 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.
5392
5393For 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.
5394
5395The 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 -07005396
5397Returns:
5398 An object of the form:
5399
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005400 { # Represents an Operation resource.
5401 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005402 # Google Compute Engine has three Operation resources:
5403 #
5404 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5405 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005406 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5407 #
5408 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005409 # - For global operations, use the `globalOperations` resource.
5410 # - For regional operations, use the `regionOperations` resource.
5411 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005412 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005413 # 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 -07005414 "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 -07005415 "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 -04005416 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07005417 "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 -07005418 "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 -07005419 "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 -07005420 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5421 "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 -07005422 "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 -07005423 "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 -07005424 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005425 "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 -07005426 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5427 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5428 {
5429 "message": "A String", # [Output Only] A human-readable description of the warning code.
5430 "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.
5431 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5432 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5433 {
5434 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5435 "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).
5436 },
5437 ],
5438 },
5439 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005440 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07005441 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005442 "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 -07005443 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5444 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005445 "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 -07005446 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5447 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5448 {
5449 "message": "A String", # [Output Only] An optional, human-readable error message.
5450 "code": "A String", # [Output Only] The error type identifier for this error.
5451 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5452 },
5453 ],
5454 },
5455 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5456 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08005457 "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 -07005458 }</pre>
5459</div>
5460
5461<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005462 <code class="details" id="validate">validate(project, urlMap, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005463 <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.
5464
5465Args:
5466 project: string, Project ID for this request. (required)
5467 urlMap: string, Name of the UrlMap resource to be validated as. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005468 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005469 The object takes the form of:
5470
5471{
Dan O'Mearadd494642020-05-01 07:42:23 -07005472 "resource": { # Represents a URL Map resource. # Content of the UrlMap to be validated.
5473 #
5474 # Google Compute Engine has two URL Map resources:
5475 #
5476 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
5477 #
5478 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
5479 #
5480 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
5481 #
5482 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
5483 #
5484 # 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 -07005485 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
5486 "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 -07005487 "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.
5488 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
5489 "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.
5490 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
5491 },
5492 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
5493 "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 -07005494 # 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 -07005495 "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.
5496 "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
5497 },
5498 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5499 # - 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.
5500 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5501 # -
5502 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5503 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5504 # - 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.
5505 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5506 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5507 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5508 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5509 "A String",
5510 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005511 "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 -07005512 },
5513 "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.
5514 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
5515 "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.
5516 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5517 # The value must be between 0.0 and 100.0 inclusive.
5518 "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.
5519 "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.
5520 "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
5521 },
5522 },
5523 "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.
5524 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5525 # The value must be between 0.0 and 100.0 inclusive.
5526 "httpStatus": 42, # The HTTP status code used to abort the request.
5527 # The value must be between 200 and 599 inclusive.
5528 },
5529 },
5530 "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
5531 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
5532 "A String",
5533 ],
5534 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
5535 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5536 "A String",
5537 ],
5538 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
5539 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5540 "A String",
5541 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005542 "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 -07005543 "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.
5544 # Default is false.
5545 "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.
5546 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
5547 "A String",
5548 ],
5549 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
5550 "A String",
5551 ],
5552 },
Dan O'Mearadd494642020-05-01 07:42:23 -07005553 "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.
5554 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005555 "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.
5556 "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
5557 },
5558 "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.
5559 # 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.
5560 { # 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
5561 "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.
5562 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
5563 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5564 "A String",
5565 ],
5566 "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.
5567 "A String",
5568 ],
5569 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5570 { # Specification determining how headers are added to requests or responses.
5571 "headerName": "A String", # The name of the header.
5572 "headerValue": "A String", # The value of the header to add.
5573 "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.
5574 # The default value is false.
5575 },
5576 ],
5577 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5578 { # Specification determining how headers are added to requests or responses.
5579 "headerName": "A String", # The name of the header.
5580 "headerValue": "A String", # The value of the header to add.
5581 "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.
5582 # The default value is false.
5583 },
5584 ],
5585 },
5586 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5587 # 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.
5588 # The value must be between 0 and 1000
5589 "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.
5590 },
5591 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005592 "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 -07005593 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
5594 # The value must be between 1 and 255 characters.
5595 "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.
5596 # The value must be between 1 and 1024 characters.
5597 },
5598 },
5599 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
5600 "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.
5601 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
5602 "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 -07005603 { # Message for the expected URL mappings.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005604 "description": "A String", # Description of this test case.
5605 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005606 "expectedUrlRedirect": "A String", # The expected URL that should be redirected to for the host and path being tested.
5607 "host": "A String", # Host portion of the URL.
5608 "path": "A String", # Path portion of the URL.
5609 "backendServiceWeight": 42, # The weight to use for the supplied host and path when using advanced routing rules that involve traffic splitting.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005610 },
5611 ],
5612 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005613 "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.
5614 #
5615 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005616 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
5617 { # 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 -07005618 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
5619 "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.
5620 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
5621 "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.
5622 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
5623 },
5624 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
5625 "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 -07005626 # 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 -07005627 "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.
5628 "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
5629 },
5630 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5631 # - 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.
5632 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5633 # -
5634 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5635 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5636 # - 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.
5637 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5638 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5639 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5640 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5641 "A String",
5642 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005643 "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 -07005644 },
5645 "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.
5646 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
5647 "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.
5648 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5649 # The value must be between 0.0 and 100.0 inclusive.
5650 "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.
5651 "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.
5652 "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
5653 },
5654 },
5655 "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.
5656 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5657 # The value must be between 0.0 and 100.0 inclusive.
5658 "httpStatus": 42, # The HTTP status code used to abort the request.
5659 # The value must be between 200 and 599 inclusive.
5660 },
5661 },
5662 "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
5663 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
5664 "A String",
5665 ],
5666 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
5667 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5668 "A String",
5669 ],
5670 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
5671 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5672 "A String",
5673 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005674 "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 -07005675 "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.
5676 # Default is false.
5677 "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.
5678 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
5679 "A String",
5680 ],
5681 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
5682 "A String",
5683 ],
5684 },
Dan O'Mearadd494642020-05-01 07:42:23 -07005685 "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.
5686 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005687 "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.
5688 "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
5689 },
5690 "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.
5691 # 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.
5692 { # 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
5693 "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.
5694 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
5695 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5696 "A String",
5697 ],
5698 "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.
5699 "A String",
5700 ],
5701 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5702 { # Specification determining how headers are added to requests or responses.
5703 "headerName": "A String", # The name of the header.
5704 "headerValue": "A String", # The value of the header to add.
5705 "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.
5706 # The default value is false.
5707 },
5708 ],
5709 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5710 { # Specification determining how headers are added to requests or responses.
5711 "headerName": "A String", # The name of the header.
5712 "headerValue": "A String", # The value of the header to add.
5713 "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.
5714 # The default value is false.
5715 },
5716 ],
5717 },
5718 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5719 # 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.
5720 # The value must be between 0 and 1000
5721 "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.
5722 },
5723 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005724 "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 -07005725 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
5726 # The value must be between 1 and 255 characters.
5727 "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.
5728 # The value must be between 1 and 1024 characters.
5729 },
5730 },
5731 "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 -07005732 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
5733 # - compute/v1/projects/project/global/backendServices/backendService
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005734 # - 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.
5735 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
5736 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
5737 # - compute.backendBuckets.use
5738 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07005739 "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.
5740 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005741 { # 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 -07005742 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
5743 # If urlRedirect is specified, service or routeAction must not be set.
5744 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
5745 # 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.
5746 # The value must be between 1 and 1024 characters.
5747 "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.
5748 # The default is set to false.
5749 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
5750 # Supported values are:
5751 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5752 # - FOUND, which corresponds to 302.
5753 # - SEE_OTHER which corresponds to 303.
5754 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5755 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5756 "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.
5757 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5758 # The default is set to false.
5759 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
5760 # 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.
5761 # The value must be between 1 and 1024 characters.
5762 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
5763 # The value must be between 1 and 255 characters.
5764 },
5765 "description": "A String", # The short description conveying the intent of this routeRule.
5766 # The description can have a maximum length of 1024 characters.
5767 "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.
5768 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5769 "httpFilterConfigs": [ # Outbound route specific configuration for networkservices.HttpFilter resources enabled by Traffic Director. httpFilterConfigs only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
5770 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
5771 "configTypeUrl": "A String", # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
5772 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
5773 "config": "A String", # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
5774 },
5775 ],
5776 "httpFilterMetadata": [ # Outbound route specific metadata supplied to networkservices.HttpFilter resources enabled by Traffic Director. httpFilterMetadata only applies for Loadbalancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details.
5777 # The only configTypeUrl supported is type.googleapis.com/google.protobuf.Struct
5778 { # HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.
5779 "configTypeUrl": "A String", # The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct
5780 "filterName": "A String", # Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm
5781 "config": "A String", # The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl
5782 },
5783 ],
5784 "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.
5785 # 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.
5786 # 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.
5787 "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.
5788 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5789 "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.
5790 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
5791 },
5792 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
5793 "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.
5794 # 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.
5795 "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.
5796 "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
5797 },
5798 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5799 # - 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.
5800 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5801 # -
5802 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5803 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5804 # - 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.
5805 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5806 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5807 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5808 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5809 "A String",
5810 ],
5811 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
5812 },
5813 "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.
5814 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
5815 "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.
5816 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5817 # The value must be between 0.0 and 100.0 inclusive.
5818 "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.
5819 "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.
5820 "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
5821 },
5822 },
5823 "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.
5824 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5825 # The value must be between 0.0 and 100.0 inclusive.
5826 "httpStatus": 42, # The HTTP status code used to abort the request.
5827 # The value must be between 200 and 599 inclusive.
5828 },
5829 },
5830 "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
5831 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
5832 "A String",
5833 ],
5834 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
5835 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5836 "A String",
5837 ],
5838 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
5839 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5840 "A String",
5841 ],
5842 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
5843 "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.
5844 # Default is false.
5845 "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.
5846 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
5847 "A String",
5848 ],
5849 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
5850 "A String",
5851 ],
5852 },
5853 "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.
5854 # If not specified, will use the largest timeout among all backend services associated with the route.
5855 "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.
5856 "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
5857 },
5858 "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.
5859 # 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.
5860 { # 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
5861 "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.
5862 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
5863 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5864 "A String",
5865 ],
5866 "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.
5867 "A String",
5868 ],
5869 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5870 { # Specification determining how headers are added to requests or responses.
5871 "headerName": "A String", # The name of the header.
5872 "headerValue": "A String", # The value of the header to add.
5873 "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.
5874 # The default value is false.
5875 },
5876 ],
5877 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5878 { # Specification determining how headers are added to requests or responses.
5879 "headerName": "A String", # The name of the header.
5880 "headerValue": "A String", # The value of the header to add.
5881 "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.
5882 # The default value is false.
5883 },
5884 ],
5885 },
5886 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5887 # 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.
5888 # The value must be between 0 and 1000
5889 "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.
5890 },
5891 ],
5892 "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.
5893 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
5894 # The value must be between 1 and 255 characters.
5895 "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.
5896 # The value must be between 1 and 1024 characters.
5897 },
5898 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005899 "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.
5900 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
5901 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5902 "A String",
5903 ],
5904 "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.
5905 "A String",
5906 ],
5907 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5908 { # Specification determining how headers are added to requests or responses.
5909 "headerName": "A String", # The name of the header.
5910 "headerValue": "A String", # The value of the header to add.
5911 "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.
5912 # The default value is false.
5913 },
5914 ],
5915 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5916 { # Specification determining how headers are added to requests or responses.
5917 "headerName": "A String", # The name of the header.
5918 "headerValue": "A String", # The value of the header to add.
5919 "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.
5920 # The default value is false.
5921 },
5922 ],
5923 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005924 "matchRules": [
5925 { # 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 -07005926 "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 -07005927 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07005928 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005929 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
5930 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -07005931 "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 -07005932 # 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.
5933 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07005934 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005935 "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.
5936 # The default setting is false.
5937 "headerName": "A String", # The name of the HTTP header to match.
5938 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
5939 # For matching a request's method, use the headerName ":method".
5940 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
5941 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5942 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
5943 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5944 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
5945 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07005946 "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 -07005947 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
5948 "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.
5949 # For example for a range [-5, 0]
5950 # - -3 will match.
5951 # - 0 will not match.
5952 # - 0.25 will not match.
5953 # - -3someString will not match.
5954 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07005955 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005956 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
5957 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
5958 },
5959 },
5960 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005961 "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.
5962 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005963 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07005964 "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 -07005965 # The value must be between 1 and 1024 characters.
5966 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
5967 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
5968 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -07005969 # ignoreCase must not be used with regexMatch.
5970 "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.
5971 # 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.
5972 # 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 -07005973 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -07005974 { # 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.
5975 # 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.
5976 # 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 -07005977 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
5978 # Supported values are:
5979 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
5980 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
5981 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
5982 # This list must not be empty and can have at the most 64 entries.
5983 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
5984 "name": "A String", # Name of metadata label.
5985 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
5986 "value": "A String", # The value of the label must match the specified value.
5987 # value can have a maximum length of 1024 characters.
5988 },
5989 ],
5990 },
5991 ],
5992 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
5993 { # HttpRouteRuleMatch criteria for a request's query parameter.
5994 "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 -07005995 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005996 "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 -07005997 # Only one of presentMatch, exactMatch or regexMatch must be set.
5998 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005999 "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.
6000 "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 -07006001 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006002 },
6003 ],
6004 },
6005 ],
6006 },
6007 ],
6008 "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.
6009 # 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 -07006010 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006011 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
6012 "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.
6013 "A String",
6014 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006015 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
6016 # If urlRedirect is specified, service or routeAction must not be set.
6017 "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 -07006018 # 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 -07006019 # The value must be between 1 and 1024 characters.
6020 "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.
6021 # The default is set to false.
6022 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
6023 # Supported values are:
6024 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
6025 # - FOUND, which corresponds to 302.
6026 # - SEE_OTHER which corresponds to 303.
6027 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
6028 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
6029 "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.
6030 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
6031 # The default is set to false.
6032 "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 -07006033 # 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.
6034 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006035 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
6036 # The value must be between 1 and 255 characters.
6037 },
6038 "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.
6039 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
6040 "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.
6041 # Only one of routeAction or urlRedirect must be set.
6042 "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.
6043 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
6044 },
6045 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
6046 "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 -07006047 # 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 -07006048 "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.
6049 "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
6050 },
6051 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
6052 # - 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.
6053 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
6054 # -
6055 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
6056 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
6057 # - 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.
6058 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
6059 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
6060 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
6061 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
6062 "A String",
6063 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07006064 "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 -07006065 },
6066 "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.
6067 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
6068 "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.
6069 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
6070 # The value must be between 0.0 and 100.0 inclusive.
6071 "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.
6072 "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.
6073 "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
6074 },
6075 },
6076 "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.
6077 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
6078 # The value must be between 0.0 and 100.0 inclusive.
6079 "httpStatus": 42, # The HTTP status code used to abort the request.
6080 # The value must be between 200 and 599 inclusive.
6081 },
6082 },
6083 "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
6084 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
6085 "A String",
6086 ],
6087 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
6088 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
6089 "A String",
6090 ],
6091 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
6092 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
6093 "A String",
6094 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07006095 "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 -07006096 "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.
6097 # Default is false.
6098 "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.
6099 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
6100 "A String",
6101 ],
6102 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
6103 "A String",
6104 ],
6105 },
Dan O'Mearadd494642020-05-01 07:42:23 -07006106 "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.
6107 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006108 "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.
6109 "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
6110 },
6111 "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.
6112 # 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.
6113 { # 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
6114 "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.
6115 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
6116 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
6117 "A String",
6118 ],
6119 "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.
6120 "A String",
6121 ],
6122 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
6123 { # Specification determining how headers are added to requests or responses.
6124 "headerName": "A String", # The name of the header.
6125 "headerValue": "A String", # The value of the header to add.
6126 "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.
6127 # The default value is false.
6128 },
6129 ],
6130 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
6131 { # Specification determining how headers are added to requests or responses.
6132 "headerName": "A String", # The name of the header.
6133 "headerValue": "A String", # The value of the header to add.
6134 "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.
6135 # The default value is false.
6136 },
6137 ],
6138 },
6139 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
6140 # 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.
6141 # The value must be between 0 and 1000
6142 "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.
6143 },
6144 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07006145 "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 -07006146 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
6147 # The value must be between 1 and 255 characters.
6148 "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.
6149 # The value must be between 1 and 1024 characters.
6150 },
6151 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006152 },
6153 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006154 "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.
6155 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
6156 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
6157 "A String",
6158 ],
6159 "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.
6160 "A String",
6161 ],
6162 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
6163 { # Specification determining how headers are added to requests or responses.
6164 "headerName": "A String", # The name of the header.
6165 "headerValue": "A String", # The value of the header to add.
6166 "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.
6167 # The default value is false.
6168 },
6169 ],
6170 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
6171 { # Specification determining how headers are added to requests or responses.
6172 "headerName": "A String", # The name of the header.
6173 "headerValue": "A String", # The value of the header to add.
6174 "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.
6175 # The default value is false.
6176 },
6177 ],
6178 },
Dan O'Mearadd494642020-05-01 07:42:23 -07006179 "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 -07006180 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
6181 "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 -07006182 # 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 -07006183 # The value must be between 1 and 1024 characters.
6184 "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.
6185 # The default is set to false.
6186 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
6187 # Supported values are:
6188 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
6189 # - FOUND, which corresponds to 302.
6190 # - SEE_OTHER which corresponds to 303.
6191 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
6192 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
6193 "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.
6194 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
6195 # The default is set to false.
6196 "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 -07006197 # 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.
6198 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006199 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
6200 # The value must be between 1 and 255 characters.
6201 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006202 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
6203 },
6204 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006205 "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.
6206 # The headerAction specified here take effect after headerAction specified under pathMatcher.
6207 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
6208 "A String",
6209 ],
6210 "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.
6211 "A String",
6212 ],
6213 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
6214 { # Specification determining how headers are added to requests or responses.
6215 "headerName": "A String", # The name of the header.
6216 "headerValue": "A String", # The value of the header to add.
6217 "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.
6218 # The default value is false.
6219 },
6220 ],
6221 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
6222 { # Specification determining how headers are added to requests or responses.
6223 "headerName": "A String", # The name of the header.
6224 "headerValue": "A String", # The value of the header to add.
6225 "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.
6226 # The default value is false.
6227 },
6228 ],
6229 },
6230 "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.
6231 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
6232 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
6233 "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 -07006234 # 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 -07006235 # The value must be between 1 and 1024 characters.
6236 "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.
6237 # The default is set to false.
6238 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
6239 # Supported values are:
6240 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
6241 # - FOUND, which corresponds to 302.
6242 # - SEE_OTHER which corresponds to 303.
6243 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
6244 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
6245 "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.
6246 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
6247 # The default is set to false.
6248 "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 -07006249 # 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.
6250 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006251 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
6252 # The value must be between 1 and 255 characters.
6253 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006254 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
6255 "hostRules": [ # The list of HostRules to use against the URL.
6256 { # 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 -07006257 "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 -07006258 "A String",
6259 ],
6260 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
6261 "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.
6262 },
6263 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006264 "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 -07006265 },
6266 }
6267
6268
6269Returns:
6270 An object of the form:
6271
6272 {
6273 "result": { # Message representing the validation result for a UrlMap.
6274 "testFailures": [
6275 {
6276 "path": "A String",
6277 "actualService": "A String",
6278 "host": "A String",
6279 "expectedService": "A String",
6280 },
6281 ],
6282 "loadErrors": [
6283 "A String",
6284 ],
6285 "testPassed": True or False, # If successfully loaded, this field indicates whether the test passed. If false, 'testFailures's indicate the reason of failure.
6286 "loadSucceeded": True or False, # Whether the given UrlMap can be successfully loaded. If false, 'loadErrors' indicates the reasons.
6287 },
6288 }</pre>
6289</div>
6290
6291</body></html>