blob: 76ea7fd87c34d4eec065940c3c536c6610f586bf [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_beta.html">Compute Engine API</a> . <a href="compute_beta.regionUrlMaps.html">regionUrlMaps</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#delete">delete(project, region, urlMap, requestId=None)</a></code></p>
79<p class="firstline">Deletes the specified UrlMap resource.</p>
80<p class="toc_element">
81 <code><a href="#get">get(project, region, urlMap)</a></code></p>
82<p class="firstline">Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.</p>
83<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#insert">insert(project, region, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070085<p class="firstline">Creates a UrlMap resource in the specified project using the data included in the request.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#invalidateCache">invalidateCache(project, region, urlMap, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.</p>
89<p class="toc_element">
90 <code><a href="#list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
91<p class="firstline">Retrieves the list of UrlMap resources available to the specified project in the specified region.</p>
92<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#patch">patch(project, region, urlMap, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#update">update(project, region, urlMap, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100<p class="firstline">Updates the specified UrlMap resource with the data included in the request.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#validate">validate(project, region, urlMap, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<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>
104<h3>Method Details</h3>
105<div class="method">
106 <code class="details" id="delete">delete(project, region, urlMap, requestId=None)</code>
107 <pre>Deletes the specified UrlMap resource.
108
109Args:
110 project: string, Project ID for this request. (required)
111 region: string, Name of the region scoping this request. (required)
112 urlMap: string, Name of the UrlMap resource to delete. (required)
113 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
114
115Returns:
116 An object of the form:
117
118 { # Represents an Operation resource.
119 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 # Google Compute Engine has three Operation resources:
121 #
122 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
123 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700124 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
125 #
126 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700127 # - For global operations, use the `globalOperations` resource.
128 # - For regional operations, use the `regionOperations` resource.
129 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700130 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700131 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700132 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
133 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
134 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700135 "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 -0700136 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
137 "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 -0700138 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
139 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700140 "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 -0700141 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700142 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700143 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700144 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
145 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
146 {
147 "message": "A String", # [Output Only] A human-readable description of the warning code.
148 "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.
149 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
150 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
151 {
152 "value": "A String", # [Output Only] A warning data value corresponding to the key.
153 "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).
154 },
155 ],
156 },
157 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700158 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700159 "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 -0700160 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
161 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700162 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
163 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
164 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
165 {
166 "message": "A String", # [Output Only] An optional, human-readable error message.
167 "code": "A String", # [Output Only] The error type identifier for this error.
168 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
169 },
170 ],
171 },
172 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
173 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
174 "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.
175 }</pre>
176</div>
177
178<div class="method">
179 <code class="details" id="get">get(project, region, urlMap)</code>
180 <pre>Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.
181
182Args:
183 project: string, Project ID for this request. (required)
184 region: string, Name of the region scoping this request. (required)
185 urlMap: string, Name of the UrlMap resource to return. (required)
186
187Returns:
188 An object of the form:
189
Dan O'Mearadd494642020-05-01 07:42:23 -0700190 { # Represents a URL Map resource.
191 #
192 # Google Compute Engine has two URL Map resources:
193 #
194 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
195 #
196 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
197 #
198 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
199 #
200 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
201 #
202 # 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 -0700203 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
204 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
205 "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.
206 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
207 "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.
208 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
209 },
210 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
211 "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 -0700212 # 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 -0700213 "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.
214 "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
215 },
216 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
217 # - 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.
218 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
219 # -
220 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
221 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
222 # - 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.
223 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
224 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
225 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
226 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
227 "A String",
228 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700229 "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 -0700230 },
231 "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.
232 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
233 "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.
234 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
235 # The value must be between 0.0 and 100.0 inclusive.
236 "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.
237 "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.
238 "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
239 },
240 },
241 "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.
242 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
243 # The value must be between 0.0 and 100.0 inclusive.
244 "httpStatus": 42, # The HTTP status code used to abort the request.
245 # The value must be between 200 and 599 inclusive.
246 },
247 },
248 "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
249 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
250 "A String",
251 ],
252 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
253 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
254 "A String",
255 ],
256 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
257 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
258 "A String",
259 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700260 "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 -0700261 "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.
262 # Default is false.
263 "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.
264 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
265 "A String",
266 ],
267 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
268 "A String",
269 ],
270 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700271 "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.
272 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700273 "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.
274 "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
275 },
276 "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.
277 # 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.
278 { # 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
279 "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.
280 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
281 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
282 "A String",
283 ],
284 "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.
285 "A String",
286 ],
287 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
288 { # Specification determining how headers are added to requests or responses.
289 "headerName": "A String", # The name of the header.
290 "headerValue": "A String", # The value of the header to add.
291 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
292 # The default value is false.
293 },
294 ],
295 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
296 { # Specification determining how headers are added to requests or responses.
297 "headerName": "A String", # The name of the header.
298 "headerValue": "A String", # The value of the header to add.
299 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
300 # The default value is false.
301 },
302 ],
303 },
304 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
305 # 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.
306 # The value must be between 0 and 1000
307 "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.
308 },
309 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700310 "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 -0700311 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
312 # The value must be between 1 and 255 characters.
313 "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.
314 # The value must be between 1 and 1024 characters.
315 },
316 },
317 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
318 "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.
319 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
320 "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.
321 { # Message for the expected URL mappings.
322 "path": "A String", # Path portion of the URL.
323 "host": "A String", # Host portion of the URL.
324 "description": "A String", # Description of this test case.
325 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
326 },
327 ],
328 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
329 "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.
330 #
331 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
332 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
333 { # 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.
334 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
335 "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.
336 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
337 "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.
338 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
339 },
340 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
341 "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 -0700342 # 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 -0700343 "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.
344 "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
345 },
346 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
347 # - 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.
348 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
349 # -
350 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
351 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
352 # - 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.
353 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
354 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
355 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
356 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
357 "A String",
358 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700359 "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 -0700360 },
361 "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.
362 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
363 "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.
364 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
365 # The value must be between 0.0 and 100.0 inclusive.
366 "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.
367 "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.
368 "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
369 },
370 },
371 "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.
372 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
373 # The value must be between 0.0 and 100.0 inclusive.
374 "httpStatus": 42, # The HTTP status code used to abort the request.
375 # The value must be between 200 and 599 inclusive.
376 },
377 },
378 "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
379 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
380 "A String",
381 ],
382 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
383 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
384 "A String",
385 ],
386 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
387 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
388 "A String",
389 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700390 "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 -0700391 "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.
392 # Default is false.
393 "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.
394 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
395 "A String",
396 ],
397 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
398 "A String",
399 ],
400 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700401 "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.
402 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700403 "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.
404 "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
405 },
406 "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.
407 # 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.
408 { # 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
409 "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.
410 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
411 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
412 "A String",
413 ],
414 "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.
415 "A String",
416 ],
417 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
418 { # Specification determining how headers are added to requests or responses.
419 "headerName": "A String", # The name of the header.
420 "headerValue": "A String", # The value of the header to add.
421 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
422 # The default value is false.
423 },
424 ],
425 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
426 { # Specification determining how headers are added to requests or responses.
427 "headerName": "A String", # The name of the header.
428 "headerValue": "A String", # The value of the header to add.
429 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
430 # The default value is false.
431 },
432 ],
433 },
434 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
435 # 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.
436 # The value must be between 0 and 1000
437 "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.
438 },
439 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700440 "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 -0700441 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
442 # The value must be between 1 and 255 characters.
443 "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.
444 # The value must be between 1 and 1024 characters.
445 },
446 },
447 "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:
448 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
449 # - compute/v1/projects/project/global/backendServices/backendService
450 # - 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.
451 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
452 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
453 # - compute.backendBuckets.use
454 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -0700455 "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.
456 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700457 { # 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 -0700458 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
459 # If urlRedirect is specified, service or routeAction must not be set.
460 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
461 # 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.
462 # The value must be between 1 and 1024 characters.
463 "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.
464 # The default is set to false.
465 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
466 # Supported values are:
467 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
468 # - FOUND, which corresponds to 302.
469 # - SEE_OTHER which corresponds to 303.
470 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
471 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
472 "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.
473 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
474 # The default is set to false.
475 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
476 # 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.
477 # The value must be between 1 and 1024 characters.
478 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
479 # The value must be between 1 and 255 characters.
480 },
481 "description": "A String", # The short description conveying the intent of this routeRule.
482 # The description can have a maximum length of 1024 characters.
483 "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.
484 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
485 "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.
486 # 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.
487 # 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.
488 "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.
489 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
490 "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.
491 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
492 },
493 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
494 "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.
495 # 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.
496 "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.
497 "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
498 },
499 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
500 # - 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.
501 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
502 # -
503 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
504 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
505 # - 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.
506 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
507 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
508 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
509 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
510 "A String",
511 ],
512 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
513 },
514 "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.
515 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
516 "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.
517 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
518 # The value must be between 0.0 and 100.0 inclusive.
519 "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.
520 "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.
521 "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
522 },
523 },
524 "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.
525 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
526 # The value must be between 0.0 and 100.0 inclusive.
527 "httpStatus": 42, # The HTTP status code used to abort the request.
528 # The value must be between 200 and 599 inclusive.
529 },
530 },
531 "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
532 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
533 "A String",
534 ],
535 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
536 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
537 "A String",
538 ],
539 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
540 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
541 "A String",
542 ],
543 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
544 "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.
545 # Default is false.
546 "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.
547 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
548 "A String",
549 ],
550 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
551 "A String",
552 ],
553 },
554 "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.
555 # If not specified, will use the largest timeout among all backend services associated with the route.
556 "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.
557 "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
558 },
559 "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.
560 # 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.
561 { # 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
562 "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.
563 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
564 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
565 "A String",
566 ],
567 "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.
568 "A String",
569 ],
570 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
571 { # Specification determining how headers are added to requests or responses.
572 "headerName": "A String", # The name of the header.
573 "headerValue": "A String", # The value of the header to add.
574 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
575 # The default value is false.
576 },
577 ],
578 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
579 { # Specification determining how headers are added to requests or responses.
580 "headerName": "A String", # The name of the header.
581 "headerValue": "A String", # The value of the header to add.
582 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
583 # The default value is false.
584 },
585 ],
586 },
587 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
588 # 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.
589 # The value must be between 0 and 1000
590 "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.
591 },
592 ],
593 "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.
594 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
595 # The value must be between 1 and 255 characters.
596 "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.
597 # The value must be between 1 and 1024 characters.
598 },
599 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700600 "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.
601 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
602 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
603 "A String",
604 ],
605 "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.
606 "A String",
607 ],
608 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
609 { # Specification determining how headers are added to requests or responses.
610 "headerName": "A String", # The name of the header.
611 "headerValue": "A String", # The value of the header to add.
612 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
613 # The default value is false.
614 },
615 ],
616 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
617 { # Specification determining how headers are added to requests or responses.
618 "headerName": "A String", # The name of the header.
619 "headerValue": "A String", # The value of the header to add.
620 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
621 # The default value is false.
622 },
623 ],
624 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700625 "matchRules": [
626 { # 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 -0700627 "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 -0700628 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -0700629 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700630 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
631 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -0700632 "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 -0700633 # 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.
634 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -0700635 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700636 "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.
637 # The default setting is false.
638 "headerName": "A String", # The name of the HTTP header to match.
639 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
640 # For matching a request's method, use the headerName ":method".
641 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
642 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
643 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
644 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
645 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
646 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -0700647 "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 -0700648 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
649 "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.
650 # For example for a range [-5, 0]
651 # - -3 will match.
652 # - 0 will not match.
653 # - 0.25 will not match.
654 # - -3someString will not match.
655 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -0700656 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700657 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
658 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
659 },
660 },
661 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700662 "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.
663 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700664 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -0700665 "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 -0700666 # The value must be between 1 and 1024 characters.
667 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
668 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
669 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -0700670 # ignoreCase must not be used with regexMatch.
671 "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.
672 # 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.
673 # 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 -0700674 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -0700675 { # 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.
676 # 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.
677 # 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 -0700678 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
679 # Supported values are:
680 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
681 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
682 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
683 # This list must not be empty and can have at the most 64 entries.
684 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
685 "name": "A String", # Name of metadata label.
686 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
687 "value": "A String", # The value of the label must match the specified value.
688 # value can have a maximum length of 1024 characters.
689 },
690 ],
691 },
692 ],
693 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
694 { # HttpRouteRuleMatch criteria for a request's query parameter.
695 "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 -0700696 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700697 "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 -0700698 # Only one of presentMatch, exactMatch or regexMatch must be set.
699 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700700 "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.
701 "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 -0700702 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700703 },
704 ],
705 },
706 ],
707 },
708 ],
709 "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.
710 # 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 -0700711 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700712 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
713 "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.
714 "A String",
715 ],
716 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
717 # If urlRedirect is specified, service or routeAction must not be set.
718 "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 -0700719 # 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 -0700720 # The value must be between 1 and 1024 characters.
721 "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.
722 # The default is set to false.
723 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
724 # Supported values are:
725 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
726 # - FOUND, which corresponds to 302.
727 # - SEE_OTHER which corresponds to 303.
728 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
729 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
730 "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.
731 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
732 # The default is set to false.
733 "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 -0700734 # 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.
735 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700736 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
737 # The value must be between 1 and 255 characters.
738 },
739 "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.
740 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
741 "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.
742 # Only one of routeAction or urlRedirect must be set.
743 "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.
744 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
745 },
746 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
747 "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 -0700748 # 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 -0700749 "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.
750 "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
751 },
752 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
753 # - 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.
754 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
755 # -
756 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
757 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
758 # - 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.
759 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
760 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
761 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
762 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
763 "A String",
764 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700765 "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 -0700766 },
767 "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.
768 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
769 "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.
770 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
771 # The value must be between 0.0 and 100.0 inclusive.
772 "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.
773 "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.
774 "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
775 },
776 },
777 "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.
778 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
779 # The value must be between 0.0 and 100.0 inclusive.
780 "httpStatus": 42, # The HTTP status code used to abort the request.
781 # The value must be between 200 and 599 inclusive.
782 },
783 },
784 "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
785 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
786 "A String",
787 ],
788 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
789 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
790 "A String",
791 ],
792 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
793 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
794 "A String",
795 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700796 "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 -0700797 "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.
798 # Default is false.
799 "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.
800 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
801 "A String",
802 ],
803 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
804 "A String",
805 ],
806 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700807 "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.
808 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700809 "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.
810 "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
811 },
812 "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.
813 # 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.
814 { # 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
815 "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.
816 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
817 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
818 "A String",
819 ],
820 "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.
821 "A String",
822 ],
823 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
824 { # Specification determining how headers are added to requests or responses.
825 "headerName": "A String", # The name of the header.
826 "headerValue": "A String", # The value of the header to add.
827 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
828 # The default value is false.
829 },
830 ],
831 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
832 { # Specification determining how headers are added to requests or responses.
833 "headerName": "A String", # The name of the header.
834 "headerValue": "A String", # The value of the header to add.
835 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
836 # The default value is false.
837 },
838 ],
839 },
840 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
841 # 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.
842 # The value must be between 0 and 1000
843 "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.
844 },
845 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700846 "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 -0700847 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
848 # The value must be between 1 and 255 characters.
849 "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.
850 # The value must be between 1 and 1024 characters.
851 },
852 },
853 },
854 ],
855 "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.
856 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
857 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
858 "A String",
859 ],
860 "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.
861 "A String",
862 ],
863 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
864 { # Specification determining how headers are added to requests or responses.
865 "headerName": "A String", # The name of the header.
866 "headerValue": "A String", # The value of the header to add.
867 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
868 # The default value is false.
869 },
870 ],
871 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
872 { # Specification determining how headers are added to requests or responses.
873 "headerName": "A String", # The name of the header.
874 "headerValue": "A String", # The value of the header to add.
875 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
876 # The default value is false.
877 },
878 ],
879 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700880 "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 -0700881 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
882 "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 -0700883 # 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 -0700884 # The value must be between 1 and 1024 characters.
885 "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.
886 # The default is set to false.
887 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
888 # Supported values are:
889 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
890 # - FOUND, which corresponds to 302.
891 # - SEE_OTHER which corresponds to 303.
892 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
893 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
894 "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.
895 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
896 # The default is set to false.
897 "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 -0700898 # 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.
899 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700900 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
901 # The value must be between 1 and 255 characters.
902 },
903 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
904 },
905 ],
906 "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.
907 # The headerAction specified here take effect after headerAction specified under pathMatcher.
908 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
909 "A String",
910 ],
911 "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.
912 "A String",
913 ],
914 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
915 { # Specification determining how headers are added to requests or responses.
916 "headerName": "A String", # The name of the header.
917 "headerValue": "A String", # The value of the header to add.
918 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
919 # The default value is false.
920 },
921 ],
922 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
923 { # Specification determining how headers are added to requests or responses.
924 "headerName": "A String", # The name of the header.
925 "headerValue": "A String", # The value of the header to add.
926 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
927 # The default value is false.
928 },
929 ],
930 },
931 "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.
932 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
933 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
934 "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 -0700935 # 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 -0700936 # The value must be between 1 and 1024 characters.
937 "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.
938 # The default is set to false.
939 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
940 # Supported values are:
941 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
942 # - FOUND, which corresponds to 302.
943 # - SEE_OTHER which corresponds to 303.
944 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
945 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
946 "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.
947 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
948 # The default is set to false.
949 "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 -0700950 # 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.
951 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700952 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
953 # The value must be between 1 and 255 characters.
954 },
955 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
956 "hostRules": [ # The list of HostRules to use against the URL.
957 { # 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 -0700958 "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 -0700959 "A String",
960 ],
961 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
962 "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.
963 },
964 ],
965 "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.
966 }</pre>
967</div>
968
969<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700970 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700971 <pre>Creates a UrlMap resource in the specified project using the data included in the request.
972
973Args:
974 project: string, Project ID for this request. (required)
975 region: string, Name of the region scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700976 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700977 The object takes the form of:
978
Dan O'Mearadd494642020-05-01 07:42:23 -0700979{ # Represents a URL Map resource.
980 #
981 # Google Compute Engine has two URL Map resources:
982 #
983 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
984 #
985 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
986 #
987 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
988 #
989 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
990 #
991 # 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 -0700992 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
993 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
994 "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.
995 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
996 "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.
997 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
998 },
999 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1000 "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 -07001001 # 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 -07001002 "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.
1003 "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
1004 },
1005 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1006 # - 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.
1007 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1008 # -
1009 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1010 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1011 # - 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.
1012 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1013 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1014 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1015 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1016 "A String",
1017 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001018 "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 -07001019 },
1020 "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.
1021 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1022 "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.
1023 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1024 # The value must be between 0.0 and 100.0 inclusive.
1025 "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.
1026 "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.
1027 "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
1028 },
1029 },
1030 "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.
1031 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1032 # The value must be between 0.0 and 100.0 inclusive.
1033 "httpStatus": 42, # The HTTP status code used to abort the request.
1034 # The value must be between 200 and 599 inclusive.
1035 },
1036 },
1037 "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
1038 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1039 "A String",
1040 ],
1041 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1042 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1043 "A String",
1044 ],
1045 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1046 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1047 "A String",
1048 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001049 "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 -07001050 "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.
1051 # Default is false.
1052 "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.
1053 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
1054 "A String",
1055 ],
1056 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
1057 "A String",
1058 ],
1059 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001060 "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.
1061 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001062 "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.
1063 "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
1064 },
1065 "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.
1066 # 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.
1067 { # 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
1068 "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.
1069 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1070 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1071 "A String",
1072 ],
1073 "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.
1074 "A String",
1075 ],
1076 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1077 { # Specification determining how headers are added to requests or responses.
1078 "headerName": "A String", # The name of the header.
1079 "headerValue": "A String", # The value of the header to add.
1080 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1081 # The default value is false.
1082 },
1083 ],
1084 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1085 { # Specification determining how headers are added to requests or responses.
1086 "headerName": "A String", # The name of the header.
1087 "headerValue": "A String", # The value of the header to add.
1088 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1089 # The default value is false.
1090 },
1091 ],
1092 },
1093 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1094 # 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.
1095 # The value must be between 0 and 1000
1096 "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.
1097 },
1098 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001099 "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 -07001100 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
1101 # The value must be between 1 and 255 characters.
1102 "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.
1103 # The value must be between 1 and 1024 characters.
1104 },
1105 },
1106 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1107 "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.
1108 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
1109 "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.
1110 { # Message for the expected URL mappings.
1111 "path": "A String", # Path portion of the URL.
1112 "host": "A String", # Host portion of the URL.
1113 "description": "A String", # Description of this test case.
1114 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
1115 },
1116 ],
1117 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1118 "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.
1119 #
1120 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
1121 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
1122 { # 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.
1123 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1124 "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.
1125 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
1126 "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.
1127 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1128 },
1129 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1130 "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 -07001131 # 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 -07001132 "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.
1133 "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
1134 },
1135 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1136 # - 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.
1137 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1138 # -
1139 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1140 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1141 # - 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.
1142 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1143 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1144 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1145 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1146 "A String",
1147 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001148 "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 -07001149 },
1150 "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.
1151 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1152 "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.
1153 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1154 # The value must be between 0.0 and 100.0 inclusive.
1155 "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.
1156 "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.
1157 "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
1158 },
1159 },
1160 "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.
1161 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1162 # The value must be between 0.0 and 100.0 inclusive.
1163 "httpStatus": 42, # The HTTP status code used to abort the request.
1164 # The value must be between 200 and 599 inclusive.
1165 },
1166 },
1167 "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
1168 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1169 "A String",
1170 ],
1171 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1172 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1173 "A String",
1174 ],
1175 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1176 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1177 "A String",
1178 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001179 "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 -07001180 "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.
1181 # Default is false.
1182 "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.
1183 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
1184 "A String",
1185 ],
1186 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
1187 "A String",
1188 ],
1189 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001190 "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.
1191 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001192 "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.
1193 "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
1194 },
1195 "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.
1196 # 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.
1197 { # 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
1198 "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.
1199 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1200 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1201 "A String",
1202 ],
1203 "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.
1204 "A String",
1205 ],
1206 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1207 { # Specification determining how headers are added to requests or responses.
1208 "headerName": "A String", # The name of the header.
1209 "headerValue": "A String", # The value of the header to add.
1210 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1211 # The default value is false.
1212 },
1213 ],
1214 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1215 { # Specification determining how headers are added to requests or responses.
1216 "headerName": "A String", # The name of the header.
1217 "headerValue": "A String", # The value of the header to add.
1218 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1219 # The default value is false.
1220 },
1221 ],
1222 },
1223 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1224 # 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.
1225 # The value must be between 0 and 1000
1226 "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.
1227 },
1228 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001229 "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 -07001230 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
1231 # The value must be between 1 and 255 characters.
1232 "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.
1233 # The value must be between 1 and 1024 characters.
1234 },
1235 },
1236 "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:
1237 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
1238 # - compute/v1/projects/project/global/backendServices/backendService
1239 # - 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.
1240 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
1241 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
1242 # - compute.backendBuckets.use
1243 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07001244 "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.
1245 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001246 { # 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 -07001247 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
1248 # If urlRedirect is specified, service or routeAction must not be set.
1249 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
1250 # 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.
1251 # The value must be between 1 and 1024 characters.
1252 "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.
1253 # The default is set to false.
1254 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
1255 # Supported values are:
1256 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1257 # - FOUND, which corresponds to 302.
1258 # - SEE_OTHER which corresponds to 303.
1259 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1260 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1261 "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.
1262 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1263 # The default is set to false.
1264 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
1265 # 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.
1266 # The value must be between 1 and 1024 characters.
1267 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
1268 # The value must be between 1 and 255 characters.
1269 },
1270 "description": "A String", # The short description conveying the intent of this routeRule.
1271 # The description can have a maximum length of 1024 characters.
1272 "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.
1273 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1274 "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.
1275 # 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.
1276 # 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.
1277 "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.
1278 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1279 "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.
1280 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1281 },
1282 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1283 "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.
1284 # 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.
1285 "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.
1286 "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
1287 },
1288 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1289 # - 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.
1290 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1291 # -
1292 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1293 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1294 # - 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.
1295 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1296 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1297 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1298 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1299 "A String",
1300 ],
1301 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
1302 },
1303 "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.
1304 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1305 "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.
1306 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1307 # The value must be between 0.0 and 100.0 inclusive.
1308 "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.
1309 "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.
1310 "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
1311 },
1312 },
1313 "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.
1314 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1315 # The value must be between 0.0 and 100.0 inclusive.
1316 "httpStatus": 42, # The HTTP status code used to abort the request.
1317 # The value must be between 200 and 599 inclusive.
1318 },
1319 },
1320 "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
1321 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1322 "A String",
1323 ],
1324 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1325 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1326 "A String",
1327 ],
1328 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1329 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1330 "A String",
1331 ],
1332 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
1333 "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.
1334 # Default is false.
1335 "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.
1336 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
1337 "A String",
1338 ],
1339 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
1340 "A String",
1341 ],
1342 },
1343 "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.
1344 # If not specified, will use the largest timeout among all backend services associated with the route.
1345 "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.
1346 "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
1347 },
1348 "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.
1349 # 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.
1350 { # 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
1351 "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.
1352 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1353 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1354 "A String",
1355 ],
1356 "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.
1357 "A String",
1358 ],
1359 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1360 { # Specification determining how headers are added to requests or responses.
1361 "headerName": "A String", # The name of the header.
1362 "headerValue": "A String", # The value of the header to add.
1363 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1364 # The default value is false.
1365 },
1366 ],
1367 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1368 { # Specification determining how headers are added to requests or responses.
1369 "headerName": "A String", # The name of the header.
1370 "headerValue": "A String", # The value of the header to add.
1371 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1372 # The default value is false.
1373 },
1374 ],
1375 },
1376 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1377 # 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.
1378 # The value must be between 0 and 1000
1379 "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.
1380 },
1381 ],
1382 "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.
1383 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
1384 # The value must be between 1 and 255 characters.
1385 "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.
1386 # The value must be between 1 and 1024 characters.
1387 },
1388 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001389 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
1390 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
1391 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1392 "A String",
1393 ],
1394 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
1395 "A String",
1396 ],
1397 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1398 { # Specification determining how headers are added to requests or responses.
1399 "headerName": "A String", # The name of the header.
1400 "headerValue": "A String", # The value of the header to add.
1401 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1402 # The default value is false.
1403 },
1404 ],
1405 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1406 { # Specification determining how headers are added to requests or responses.
1407 "headerName": "A String", # The name of the header.
1408 "headerValue": "A String", # The value of the header to add.
1409 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1410 # The default value is false.
1411 },
1412 ],
1413 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001414 "matchRules": [
1415 { # 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 -07001416 "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 -07001417 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07001418 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001419 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
1420 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -07001421 "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 -07001422 # 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.
1423 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07001424 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001425 "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.
1426 # The default setting is false.
1427 "headerName": "A String", # The name of the HTTP header to match.
1428 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
1429 # For matching a request's method, use the headerName ":method".
1430 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
1431 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1432 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
1433 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1434 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
1435 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07001436 "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 -07001437 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
1438 "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.
1439 # For example for a range [-5, 0]
1440 # - -3 will match.
1441 # - 0 will not match.
1442 # - 0.25 will not match.
1443 # - -3someString will not match.
1444 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07001445 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001446 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
1447 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
1448 },
1449 },
1450 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001451 "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.
1452 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001453 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07001454 "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 -07001455 # The value must be between 1 and 1024 characters.
1456 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
1457 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
1458 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -07001459 # ignoreCase must not be used with regexMatch.
1460 "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.
1461 # 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.
1462 # 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 -07001463 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -07001464 { # 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.
1465 # 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.
1466 # 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 -07001467 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
1468 # Supported values are:
1469 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
1470 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
1471 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
1472 # This list must not be empty and can have at the most 64 entries.
1473 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
1474 "name": "A String", # Name of metadata label.
1475 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
1476 "value": "A String", # The value of the label must match the specified value.
1477 # value can have a maximum length of 1024 characters.
1478 },
1479 ],
1480 },
1481 ],
1482 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
1483 { # HttpRouteRuleMatch criteria for a request's query parameter.
1484 "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 -07001485 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001486 "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 -07001487 # Only one of presentMatch, exactMatch or regexMatch must be set.
1488 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001489 "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.
1490 "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 -07001491 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001492 },
1493 ],
1494 },
1495 ],
1496 },
1497 ],
1498 "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.
1499 # 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 -07001500 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001501 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
1502 "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.
1503 "A String",
1504 ],
1505 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
1506 # If urlRedirect is specified, service or routeAction must not be set.
1507 "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 -07001508 # 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 -07001509 # The value must be between 1 and 1024 characters.
1510 "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.
1511 # The default is set to false.
1512 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
1513 # Supported values are:
1514 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1515 # - FOUND, which corresponds to 302.
1516 # - SEE_OTHER which corresponds to 303.
1517 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1518 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1519 "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.
1520 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1521 # The default is set to false.
1522 "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 -07001523 # 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.
1524 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001525 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
1526 # The value must be between 1 and 255 characters.
1527 },
1528 "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.
1529 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
1530 "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.
1531 # Only one of routeAction or urlRedirect must be set.
1532 "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.
1533 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1534 },
1535 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1536 "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 -07001537 # 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 -07001538 "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.
1539 "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
1540 },
1541 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1542 # - 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.
1543 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1544 # -
1545 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1546 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1547 # - 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.
1548 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1549 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1550 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1551 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1552 "A String",
1553 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001554 "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 -07001555 },
1556 "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.
1557 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1558 "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.
1559 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1560 # The value must be between 0.0 and 100.0 inclusive.
1561 "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.
1562 "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.
1563 "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
1564 },
1565 },
1566 "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.
1567 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1568 # The value must be between 0.0 and 100.0 inclusive.
1569 "httpStatus": 42, # The HTTP status code used to abort the request.
1570 # The value must be between 200 and 599 inclusive.
1571 },
1572 },
1573 "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
1574 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1575 "A String",
1576 ],
1577 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1578 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1579 "A String",
1580 ],
1581 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1582 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1583 "A String",
1584 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001585 "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 -07001586 "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.
1587 # Default is false.
1588 "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.
1589 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
1590 "A String",
1591 ],
1592 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
1593 "A String",
1594 ],
1595 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001596 "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.
1597 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001598 "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.
1599 "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
1600 },
1601 "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.
1602 # 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.
1603 { # 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
1604 "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.
1605 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
1606 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1607 "A String",
1608 ],
1609 "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.
1610 "A String",
1611 ],
1612 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1613 { # Specification determining how headers are added to requests or responses.
1614 "headerName": "A String", # The name of the header.
1615 "headerValue": "A String", # The value of the header to add.
1616 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1617 # The default value is false.
1618 },
1619 ],
1620 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1621 { # Specification determining how headers are added to requests or responses.
1622 "headerName": "A String", # The name of the header.
1623 "headerValue": "A String", # The value of the header to add.
1624 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1625 # The default value is false.
1626 },
1627 ],
1628 },
1629 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
1630 # 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.
1631 # The value must be between 0 and 1000
1632 "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.
1633 },
1634 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001635 "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 -07001636 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
1637 # The value must be between 1 and 255 characters.
1638 "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.
1639 # The value must be between 1 and 1024 characters.
1640 },
1641 },
1642 },
1643 ],
1644 "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.
1645 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
1646 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1647 "A String",
1648 ],
1649 "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.
1650 "A String",
1651 ],
1652 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1653 { # Specification determining how headers are added to requests or responses.
1654 "headerName": "A String", # The name of the header.
1655 "headerValue": "A String", # The value of the header to add.
1656 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1657 # The default value is false.
1658 },
1659 ],
1660 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1661 { # Specification determining how headers are added to requests or responses.
1662 "headerName": "A String", # The name of the header.
1663 "headerValue": "A String", # The value of the header to add.
1664 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1665 # The default value is false.
1666 },
1667 ],
1668 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001669 "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 -07001670 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
1671 "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 -07001672 # 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 -07001673 # The value must be between 1 and 1024 characters.
1674 "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.
1675 # The default is set to false.
1676 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
1677 # Supported values are:
1678 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1679 # - FOUND, which corresponds to 302.
1680 # - SEE_OTHER which corresponds to 303.
1681 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1682 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1683 "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.
1684 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1685 # The default is set to false.
1686 "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 -07001687 # 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.
1688 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001689 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
1690 # The value must be between 1 and 255 characters.
1691 },
1692 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
1693 },
1694 ],
1695 "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.
1696 # The headerAction specified here take effect after headerAction specified under pathMatcher.
1697 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
1698 "A String",
1699 ],
1700 "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.
1701 "A String",
1702 ],
1703 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
1704 { # Specification determining how headers are added to requests or responses.
1705 "headerName": "A String", # The name of the header.
1706 "headerValue": "A String", # The value of the header to add.
1707 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1708 # The default value is false.
1709 },
1710 ],
1711 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
1712 { # Specification determining how headers are added to requests or responses.
1713 "headerName": "A String", # The name of the header.
1714 "headerValue": "A String", # The value of the header to add.
1715 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
1716 # The default value is false.
1717 },
1718 ],
1719 },
1720 "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.
1721 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
1722 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
1723 "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 -07001724 # 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 -07001725 # The value must be between 1 and 1024 characters.
1726 "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.
1727 # The default is set to false.
1728 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
1729 # Supported values are:
1730 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
1731 # - FOUND, which corresponds to 302.
1732 # - SEE_OTHER which corresponds to 303.
1733 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
1734 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
1735 "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.
1736 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
1737 # The default is set to false.
1738 "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 -07001739 # 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.
1740 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001741 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
1742 # The value must be between 1 and 255 characters.
1743 },
1744 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1745 "hostRules": [ # The list of HostRules to use against the URL.
1746 { # 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 -07001747 "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 -07001748 "A String",
1749 ],
1750 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1751 "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.
1752 },
1753 ],
1754 "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.
1755 }
1756
1757 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
1758
1759Returns:
1760 An object of the form:
1761
1762 { # Represents an Operation resource.
1763 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001764 # Google Compute Engine has three Operation resources:
1765 #
1766 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1767 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001768 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1769 #
1770 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001771 # - For global operations, use the `globalOperations` resource.
1772 # - For regional operations, use the `regionOperations` resource.
1773 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001774 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001775 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001776 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1777 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1778 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001779 "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 -07001780 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1781 "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 -07001782 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1783 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001784 "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 -07001785 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001786 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001787 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001788 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1789 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1790 {
1791 "message": "A String", # [Output Only] A human-readable description of the warning code.
1792 "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.
1793 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1794 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1795 {
1796 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1797 "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).
1798 },
1799 ],
1800 },
1801 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001802 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001803 "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 -07001804 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1805 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001806 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1807 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1808 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1809 {
1810 "message": "A String", # [Output Only] An optional, human-readable error message.
1811 "code": "A String", # [Output Only] The error type identifier for this error.
1812 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1813 },
1814 ],
1815 },
1816 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1817 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1818 "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.
1819 }</pre>
1820</div>
1821
1822<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001823 <code class="details" id="invalidateCache">invalidateCache(project, region, urlMap, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001824 <pre>Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.
1825
1826Args:
1827 project: string, Project ID for this request. (required)
1828 region: string, Name of the region scoping this request. (required)
1829 urlMap: string, Name of the UrlMap scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001830 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001831 The object takes the form of:
1832
1833{
1834 "path": "A String",
1835 "host": "A String", # If set, this invalidation rule will only apply to requests with a Host header matching host.
1836 }
1837
1838 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
1839
1840Returns:
1841 An object of the form:
1842
1843 { # Represents an Operation resource.
1844 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001845 # Google Compute Engine has three Operation resources:
1846 #
1847 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1848 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001849 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1850 #
1851 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001852 # - For global operations, use the `globalOperations` resource.
1853 # - For regional operations, use the `regionOperations` resource.
1854 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001855 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001856 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001857 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1858 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1859 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001860 "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 -07001861 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1862 "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 -07001863 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1864 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001865 "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 -07001866 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001867 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001868 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001869 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1870 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1871 {
1872 "message": "A String", # [Output Only] A human-readable description of the warning code.
1873 "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.
1874 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1875 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1876 {
1877 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1878 "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).
1879 },
1880 ],
1881 },
1882 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001883 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001884 "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 -07001885 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1886 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001887 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1888 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1889 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1890 {
1891 "message": "A String", # [Output Only] An optional, human-readable error message.
1892 "code": "A String", # [Output Only] The error type identifier for this error.
1893 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1894 },
1895 ],
1896 },
1897 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1898 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1899 "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.
1900 }</pre>
1901</div>
1902
1903<div class="method">
1904 <code class="details" id="list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
1905 <pre>Retrieves the list of UrlMap resources available to the specified project in the specified region.
1906
1907Args:
1908 project: string, Project ID for this request. (required)
1909 region: string, Name of the region scoping this request. (required)
1910 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1911
Dan O'Mearadd494642020-05-01 07:42:23 -07001912You 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 -07001913
Dan O'Mearadd494642020-05-01 07:42:23 -07001914Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1915 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`)
1916 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.
1917 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 -07001918
Dan O'Mearadd494642020-05-01 07:42:23 -07001919For 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 -07001920
Dan O'Mearadd494642020-05-01 07:42:23 -07001921You 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 -07001922
Dan O'Mearadd494642020-05-01 07:42:23 -07001923To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001924
1925Returns:
1926 An object of the form:
1927
1928 { # Contains a list of UrlMap resources.
1929 "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.
1930 "kind": "compute#urlMapList", # Type of resource.
1931 "items": [ # A list of UrlMap resources.
Dan O'Mearadd494642020-05-01 07:42:23 -07001932 { # Represents a URL Map resource.
1933 #
1934 # Google Compute Engine has two URL Map resources:
1935 #
1936 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
1937 #
1938 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
1939 #
1940 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
1941 #
1942 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
1943 #
1944 # 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 -07001945 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
1946 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1947 "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.
1948 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
1949 "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.
1950 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
1951 },
1952 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
1953 "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 -07001954 # 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 -07001955 "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.
1956 "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
1957 },
1958 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
1959 # - 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.
1960 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
1961 # -
1962 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
1963 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
1964 # - 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.
1965 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
1966 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
1967 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
1968 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
1969 "A String",
1970 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001971 "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 -07001972 },
1973 "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.
1974 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
1975 "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.
1976 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
1977 # The value must be between 0.0 and 100.0 inclusive.
1978 "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.
1979 "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.
1980 "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
1981 },
1982 },
1983 "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.
1984 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
1985 # The value must be between 0.0 and 100.0 inclusive.
1986 "httpStatus": 42, # The HTTP status code used to abort the request.
1987 # The value must be between 200 and 599 inclusive.
1988 },
1989 },
1990 "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
1991 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
1992 "A String",
1993 ],
1994 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
1995 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
1996 "A String",
1997 ],
1998 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
1999 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2000 "A String",
2001 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002002 "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 -07002003 "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.
2004 # Default is false.
2005 "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.
2006 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
2007 "A String",
2008 ],
2009 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
2010 "A String",
2011 ],
2012 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002013 "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.
2014 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002015 "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.
2016 "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
2017 },
2018 "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.
2019 # 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.
2020 { # 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
2021 "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.
2022 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2023 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2024 "A String",
2025 ],
2026 "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.
2027 "A String",
2028 ],
2029 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2030 { # Specification determining how headers are added to requests or responses.
2031 "headerName": "A String", # The name of the header.
2032 "headerValue": "A String", # The value of the header to add.
2033 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2034 # The default value is false.
2035 },
2036 ],
2037 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2038 { # Specification determining how headers are added to requests or responses.
2039 "headerName": "A String", # The name of the header.
2040 "headerValue": "A String", # The value of the header to add.
2041 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2042 # The default value is false.
2043 },
2044 ],
2045 },
2046 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2047 # 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.
2048 # The value must be between 0 and 1000
2049 "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.
2050 },
2051 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002052 "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 -07002053 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
2054 # The value must be between 1 and 255 characters.
2055 "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.
2056 # The value must be between 1 and 1024 characters.
2057 },
2058 },
2059 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
2060 "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.
2061 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
2062 "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.
2063 { # Message for the expected URL mappings.
2064 "path": "A String", # Path portion of the URL.
2065 "host": "A String", # Host portion of the URL.
2066 "description": "A String", # Description of this test case.
2067 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
2068 },
2069 ],
2070 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2071 "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.
2072 #
2073 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
2074 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
2075 { # 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.
2076 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
2077 "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.
2078 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
2079 "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.
2080 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
2081 },
2082 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2083 "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 -07002084 # 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 -07002085 "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.
2086 "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
2087 },
2088 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2089 # - 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.
2090 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2091 # -
2092 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2093 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2094 # - 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.
2095 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2096 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2097 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2098 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2099 "A String",
2100 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002101 "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 -07002102 },
2103 "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.
2104 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2105 "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.
2106 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2107 # The value must be between 0.0 and 100.0 inclusive.
2108 "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.
2109 "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.
2110 "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
2111 },
2112 },
2113 "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.
2114 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2115 # The value must be between 0.0 and 100.0 inclusive.
2116 "httpStatus": 42, # The HTTP status code used to abort the request.
2117 # The value must be between 200 and 599 inclusive.
2118 },
2119 },
2120 "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
2121 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2122 "A String",
2123 ],
2124 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2125 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2126 "A String",
2127 ],
2128 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2129 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2130 "A String",
2131 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002132 "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 -07002133 "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.
2134 # Default is false.
2135 "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.
2136 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
2137 "A String",
2138 ],
2139 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
2140 "A String",
2141 ],
2142 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002143 "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.
2144 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002145 "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.
2146 "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
2147 },
2148 "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.
2149 # 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.
2150 { # 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
2151 "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.
2152 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2153 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2154 "A String",
2155 ],
2156 "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.
2157 "A String",
2158 ],
2159 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2160 { # Specification determining how headers are added to requests or responses.
2161 "headerName": "A String", # The name of the header.
2162 "headerValue": "A String", # The value of the header to add.
2163 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2164 # The default value is false.
2165 },
2166 ],
2167 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2168 { # Specification determining how headers are added to requests or responses.
2169 "headerName": "A String", # The name of the header.
2170 "headerValue": "A String", # The value of the header to add.
2171 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2172 # The default value is false.
2173 },
2174 ],
2175 },
2176 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2177 # 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.
2178 # The value must be between 0 and 1000
2179 "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.
2180 },
2181 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002182 "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 -07002183 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
2184 # The value must be between 1 and 255 characters.
2185 "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.
2186 # The value must be between 1 and 1024 characters.
2187 },
2188 },
2189 "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:
2190 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
2191 # - compute/v1/projects/project/global/backendServices/backendService
2192 # - 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.
2193 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
2194 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
2195 # - compute.backendBuckets.use
2196 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07002197 "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.
2198 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002199 { # 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 -07002200 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
2201 # If urlRedirect is specified, service or routeAction must not be set.
2202 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
2203 # 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.
2204 # The value must be between 1 and 1024 characters.
2205 "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.
2206 # The default is set to false.
2207 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
2208 # Supported values are:
2209 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2210 # - FOUND, which corresponds to 302.
2211 # - SEE_OTHER which corresponds to 303.
2212 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2213 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2214 "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.
2215 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2216 # The default is set to false.
2217 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
2218 # 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.
2219 # The value must be between 1 and 1024 characters.
2220 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
2221 # The value must be between 1 and 255 characters.
2222 },
2223 "description": "A String", # The short description conveying the intent of this routeRule.
2224 # The description can have a maximum length of 1024 characters.
2225 "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.
2226 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2227 "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.
2228 # 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.
2229 # 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.
2230 "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.
2231 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2232 "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.
2233 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
2234 },
2235 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2236 "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.
2237 # 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.
2238 "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.
2239 "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
2240 },
2241 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2242 # - 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.
2243 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2244 # -
2245 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2246 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2247 # - 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.
2248 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2249 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2250 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2251 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2252 "A String",
2253 ],
2254 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
2255 },
2256 "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.
2257 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2258 "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.
2259 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2260 # The value must be between 0.0 and 100.0 inclusive.
2261 "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.
2262 "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.
2263 "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
2264 },
2265 },
2266 "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.
2267 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2268 # The value must be between 0.0 and 100.0 inclusive.
2269 "httpStatus": 42, # The HTTP status code used to abort the request.
2270 # The value must be between 200 and 599 inclusive.
2271 },
2272 },
2273 "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
2274 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2275 "A String",
2276 ],
2277 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2278 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2279 "A String",
2280 ],
2281 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2282 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2283 "A String",
2284 ],
2285 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
2286 "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.
2287 # Default is false.
2288 "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.
2289 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
2290 "A String",
2291 ],
2292 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
2293 "A String",
2294 ],
2295 },
2296 "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.
2297 # If not specified, will use the largest timeout among all backend services associated with the route.
2298 "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.
2299 "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
2300 },
2301 "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.
2302 # 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.
2303 { # 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
2304 "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.
2305 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2306 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2307 "A String",
2308 ],
2309 "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.
2310 "A String",
2311 ],
2312 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2313 { # Specification determining how headers are added to requests or responses.
2314 "headerName": "A String", # The name of the header.
2315 "headerValue": "A String", # The value of the header to add.
2316 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2317 # The default value is false.
2318 },
2319 ],
2320 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2321 { # Specification determining how headers are added to requests or responses.
2322 "headerName": "A String", # The name of the header.
2323 "headerValue": "A String", # The value of the header to add.
2324 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2325 # The default value is false.
2326 },
2327 ],
2328 },
2329 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2330 # 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.
2331 # The value must be between 0 and 1000
2332 "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.
2333 },
2334 ],
2335 "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.
2336 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
2337 # The value must be between 1 and 255 characters.
2338 "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.
2339 # The value must be between 1 and 1024 characters.
2340 },
2341 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002342 "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.
2343 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
2344 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2345 "A String",
2346 ],
2347 "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.
2348 "A String",
2349 ],
2350 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2351 { # Specification determining how headers are added to requests or responses.
2352 "headerName": "A String", # The name of the header.
2353 "headerValue": "A String", # The value of the header to add.
2354 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2355 # The default value is false.
2356 },
2357 ],
2358 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2359 { # Specification determining how headers are added to requests or responses.
2360 "headerName": "A String", # The name of the header.
2361 "headerValue": "A String", # The value of the header to add.
2362 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2363 # The default value is false.
2364 },
2365 ],
2366 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002367 "matchRules": [
2368 { # 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 -07002369 "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 -07002370 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07002371 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002372 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
2373 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -07002374 "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 -07002375 # 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.
2376 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07002377 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002378 "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.
2379 # The default setting is false.
2380 "headerName": "A String", # The name of the HTTP header to match.
2381 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
2382 # For matching a request's method, use the headerName ":method".
2383 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
2384 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2385 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
2386 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2387 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
2388 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07002389 "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 -07002390 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
2391 "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.
2392 # For example for a range [-5, 0]
2393 # - -3 will match.
2394 # - 0 will not match.
2395 # - 0.25 will not match.
2396 # - -3someString will not match.
2397 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07002398 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002399 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
2400 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
2401 },
2402 },
2403 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002404 "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.
2405 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002406 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07002407 "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 -07002408 # The value must be between 1 and 1024 characters.
2409 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
2410 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
2411 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -07002412 # ignoreCase must not be used with regexMatch.
2413 "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.
2414 # 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.
2415 # 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 -07002416 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -07002417 { # 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.
2418 # 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.
2419 # 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 -07002420 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
2421 # Supported values are:
2422 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
2423 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
2424 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
2425 # This list must not be empty and can have at the most 64 entries.
2426 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
2427 "name": "A String", # Name of metadata label.
2428 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
2429 "value": "A String", # The value of the label must match the specified value.
2430 # value can have a maximum length of 1024 characters.
2431 },
2432 ],
2433 },
2434 ],
2435 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
2436 { # HttpRouteRuleMatch criteria for a request's query parameter.
2437 "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 -07002438 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002439 "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 -07002440 # Only one of presentMatch, exactMatch or regexMatch must be set.
2441 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002442 "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.
2443 "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 -07002444 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002445 },
2446 ],
2447 },
2448 ],
2449 },
2450 ],
2451 "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.
2452 # 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 -07002453 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002454 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
2455 "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.
2456 "A String",
2457 ],
2458 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
2459 # If urlRedirect is specified, service or routeAction must not be set.
2460 "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 -07002461 # 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 -07002462 # The value must be between 1 and 1024 characters.
2463 "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.
2464 # The default is set to false.
2465 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
2466 # Supported values are:
2467 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2468 # - FOUND, which corresponds to 302.
2469 # - SEE_OTHER which corresponds to 303.
2470 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2471 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2472 "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.
2473 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2474 # The default is set to false.
2475 "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 -07002476 # 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.
2477 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002478 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
2479 # The value must be between 1 and 255 characters.
2480 },
2481 "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.
2482 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
2483 "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.
2484 # Only one of routeAction or urlRedirect must be set.
2485 "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.
2486 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
2487 },
2488 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2489 "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 -07002490 # 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 -07002491 "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.
2492 "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
2493 },
2494 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2495 # - 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.
2496 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2497 # -
2498 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2499 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2500 # - 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.
2501 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2502 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2503 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2504 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2505 "A String",
2506 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002507 "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 -07002508 },
2509 "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.
2510 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2511 "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.
2512 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2513 # The value must be between 0.0 and 100.0 inclusive.
2514 "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.
2515 "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.
2516 "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
2517 },
2518 },
2519 "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.
2520 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2521 # The value must be between 0.0 and 100.0 inclusive.
2522 "httpStatus": 42, # The HTTP status code used to abort the request.
2523 # The value must be between 200 and 599 inclusive.
2524 },
2525 },
2526 "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
2527 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2528 "A String",
2529 ],
2530 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2531 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2532 "A String",
2533 ],
2534 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2535 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2536 "A String",
2537 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002538 "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 -07002539 "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.
2540 # Default is false.
2541 "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.
2542 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
2543 "A String",
2544 ],
2545 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
2546 "A String",
2547 ],
2548 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002549 "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.
2550 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002551 "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.
2552 "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
2553 },
2554 "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.
2555 # 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.
2556 { # 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
2557 "headerAction": { # The request and response header transformations that take effect before the request is passed along to the selected backendService. # Specifies changes to request and response headers that need to take effect for the selected backendService.
2558 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2559 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2560 "A String",
2561 ],
2562 "responseHeadersToRemove": [ # A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
2563 "A String",
2564 ],
2565 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2566 { # Specification determining how headers are added to requests or responses.
2567 "headerName": "A String", # The name of the header.
2568 "headerValue": "A String", # The value of the header to add.
2569 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2570 # The default value is false.
2571 },
2572 ],
2573 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2574 { # Specification determining how headers are added to requests or responses.
2575 "headerName": "A String", # The name of the header.
2576 "headerValue": "A String", # The value of the header to add.
2577 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2578 # The default value is false.
2579 },
2580 ],
2581 },
2582 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2583 # 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.
2584 # The value must be between 0 and 1000
2585 "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.
2586 },
2587 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002588 "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 -07002589 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
2590 # The value must be between 1 and 255 characters.
2591 "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.
2592 # The value must be between 1 and 1024 characters.
2593 },
2594 },
2595 },
2596 ],
2597 "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.
2598 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
2599 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2600 "A String",
2601 ],
2602 "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.
2603 "A String",
2604 ],
2605 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2606 { # Specification determining how headers are added to requests or responses.
2607 "headerName": "A String", # The name of the header.
2608 "headerValue": "A String", # The value of the header to add.
2609 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2610 # The default value is false.
2611 },
2612 ],
2613 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2614 { # Specification determining how headers are added to requests or responses.
2615 "headerName": "A String", # The name of the header.
2616 "headerValue": "A String", # The value of the header to add.
2617 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2618 # The default value is false.
2619 },
2620 ],
2621 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002622 "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 -07002623 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
2624 "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 -07002625 # 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 -07002626 # The value must be between 1 and 1024 characters.
2627 "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.
2628 # The default is set to false.
2629 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
2630 # Supported values are:
2631 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2632 # - FOUND, which corresponds to 302.
2633 # - SEE_OTHER which corresponds to 303.
2634 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2635 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2636 "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.
2637 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2638 # The default is set to false.
2639 "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 -07002640 # prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
2641 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002642 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
2643 # The value must be between 1 and 255 characters.
2644 },
2645 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
2646 },
2647 ],
2648 "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.
2649 # The headerAction specified here take effect after headerAction specified under pathMatcher.
2650 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2651 "A String",
2652 ],
2653 "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.
2654 "A String",
2655 ],
2656 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2657 { # Specification determining how headers are added to requests or responses.
2658 "headerName": "A String", # The name of the header.
2659 "headerValue": "A String", # The value of the header to add.
2660 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2661 # The default value is false.
2662 },
2663 ],
2664 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2665 { # Specification determining how headers are added to requests or responses.
2666 "headerName": "A String", # The name of the header.
2667 "headerValue": "A String", # The value of the header to add.
2668 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2669 # The default value is false.
2670 },
2671 ],
2672 },
2673 "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.
2674 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
2675 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
2676 "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 -07002677 # 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 -07002678 # The value must be between 1 and 1024 characters.
2679 "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.
2680 # The default is set to false.
2681 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
2682 # Supported values are:
2683 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
2684 # - FOUND, which corresponds to 302.
2685 # - SEE_OTHER which corresponds to 303.
2686 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
2687 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
2688 "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.
2689 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
2690 # The default is set to false.
2691 "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 -07002692 # 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.
2693 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002694 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
2695 # The value must be between 1 and 255 characters.
2696 },
2697 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2698 "hostRules": [ # The list of HostRules to use against the URL.
2699 { # 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 -07002700 "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 -07002701 "A String",
2702 ],
2703 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
2704 "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.
2705 },
2706 ],
2707 "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.
2708 },
2709 ],
2710 "warning": { # [Output Only] Informational warning message.
2711 "message": "A String", # [Output Only] A human-readable description of the warning code.
2712 "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.
2713 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2714 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2715 {
2716 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2717 "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).
2718 },
2719 ],
2720 },
2721 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
2722 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
2723 }</pre>
2724</div>
2725
2726<div class="method">
2727 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2728 <pre>Retrieves the next page of results.
2729
2730Args:
2731 previous_request: The request for the previous page. (required)
2732 previous_response: The response from the request for the previous page. (required)
2733
2734Returns:
2735 A request object that you can call 'execute()' on to request the next
2736 page. Returns None if there are no more items in the collection.
2737 </pre>
2738</div>
2739
2740<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002741 <code class="details" id="patch">patch(project, region, urlMap, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002742 <pre>Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
2743
2744Args:
2745 project: string, Project ID for this request. (required)
2746 region: string, Name of the region scoping this request. (required)
2747 urlMap: string, Name of the UrlMap resource to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002748 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002749 The object takes the form of:
2750
Dan O'Mearadd494642020-05-01 07:42:23 -07002751{ # Represents a URL Map resource.
2752 #
2753 # Google Compute Engine has two URL Map resources:
2754 #
2755 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
2756 #
2757 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
2758 #
2759 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
2760 #
2761 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
2762 #
2763 # 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 -07002764 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
2765 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
2766 "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.
2767 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
2768 "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.
2769 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
2770 },
2771 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2772 "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 -07002773 # 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 -07002774 "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.
2775 "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
2776 },
2777 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2778 # - 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.
2779 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2780 # -
2781 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2782 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2783 # - 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.
2784 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2785 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2786 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2787 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2788 "A String",
2789 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002790 "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 -07002791 },
2792 "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.
2793 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2794 "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.
2795 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2796 # The value must be between 0.0 and 100.0 inclusive.
2797 "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.
2798 "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.
2799 "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
2800 },
2801 },
2802 "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.
2803 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2804 # The value must be between 0.0 and 100.0 inclusive.
2805 "httpStatus": 42, # The HTTP status code used to abort the request.
2806 # The value must be between 200 and 599 inclusive.
2807 },
2808 },
2809 "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
2810 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2811 "A String",
2812 ],
2813 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2814 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2815 "A String",
2816 ],
2817 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2818 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2819 "A String",
2820 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002821 "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 -07002822 "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.
2823 # Default is false.
2824 "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.
2825 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
2826 "A String",
2827 ],
2828 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
2829 "A String",
2830 ],
2831 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002832 "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.
2833 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002834 "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.
2835 "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
2836 },
2837 "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.
2838 # 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.
2839 { # 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
2840 "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.
2841 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2842 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2843 "A String",
2844 ],
2845 "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.
2846 "A String",
2847 ],
2848 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2849 { # Specification determining how headers are added to requests or responses.
2850 "headerName": "A String", # The name of the header.
2851 "headerValue": "A String", # The value of the header to add.
2852 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2853 # The default value is false.
2854 },
2855 ],
2856 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2857 { # Specification determining how headers are added to requests or responses.
2858 "headerName": "A String", # The name of the header.
2859 "headerValue": "A String", # The value of the header to add.
2860 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2861 # The default value is false.
2862 },
2863 ],
2864 },
2865 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2866 # 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.
2867 # The value must be between 0 and 1000
2868 "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.
2869 },
2870 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002871 "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 -07002872 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
2873 # The value must be between 1 and 255 characters.
2874 "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.
2875 # The value must be between 1 and 1024 characters.
2876 },
2877 },
2878 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
2879 "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.
2880 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
2881 "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.
2882 { # Message for the expected URL mappings.
2883 "path": "A String", # Path portion of the URL.
2884 "host": "A String", # Host portion of the URL.
2885 "description": "A String", # Description of this test case.
2886 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
2887 },
2888 ],
2889 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2890 "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.
2891 #
2892 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
2893 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
2894 { # 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.
2895 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
2896 "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.
2897 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
2898 "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.
2899 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
2900 },
2901 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
2902 "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 -07002903 # 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 -07002904 "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.
2905 "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
2906 },
2907 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
2908 # - 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.
2909 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
2910 # -
2911 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
2912 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
2913 # - 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.
2914 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
2915 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
2916 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
2917 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
2918 "A String",
2919 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002920 "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 -07002921 },
2922 "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.
2923 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
2924 "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.
2925 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
2926 # The value must be between 0.0 and 100.0 inclusive.
2927 "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.
2928 "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.
2929 "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
2930 },
2931 },
2932 "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.
2933 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
2934 # The value must be between 0.0 and 100.0 inclusive.
2935 "httpStatus": 42, # The HTTP status code used to abort the request.
2936 # The value must be between 200 and 599 inclusive.
2937 },
2938 },
2939 "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
2940 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
2941 "A String",
2942 ],
2943 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
2944 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2945 "A String",
2946 ],
2947 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
2948 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
2949 "A String",
2950 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002951 "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 -07002952 "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.
2953 # Default is false.
2954 "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.
2955 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
2956 "A String",
2957 ],
2958 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
2959 "A String",
2960 ],
2961 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002962 "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.
2963 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002964 "nanos": 42, # Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2965 "seconds": "A String", # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2966 },
2967 "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.
2968 # 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.
2969 { # 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
2970 "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.
2971 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
2972 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
2973 "A String",
2974 ],
2975 "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.
2976 "A String",
2977 ],
2978 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
2979 { # Specification determining how headers are added to requests or responses.
2980 "headerName": "A String", # The name of the header.
2981 "headerValue": "A String", # The value of the header to add.
2982 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2983 # The default value is false.
2984 },
2985 ],
2986 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
2987 { # Specification determining how headers are added to requests or responses.
2988 "headerName": "A String", # The name of the header.
2989 "headerValue": "A String", # The value of the header to add.
2990 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
2991 # The default value is false.
2992 },
2993 ],
2994 },
2995 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
2996 # 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.
2997 # The value must be between 0 and 1000
2998 "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.
2999 },
3000 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003001 "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 -07003002 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3003 # The value must be between 1 and 255 characters.
3004 "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.
3005 # The value must be between 1 and 1024 characters.
3006 },
3007 },
3008 "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:
3009 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
3010 # - compute/v1/projects/project/global/backendServices/backendService
3011 # - 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.
3012 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3013 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
3014 # - compute.backendBuckets.use
3015 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07003016 "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.
3017 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003018 { # 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 -07003019 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
3020 # If urlRedirect is specified, service or routeAction must not be set.
3021 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
3022 # 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.
3023 # The value must be between 1 and 1024 characters.
3024 "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.
3025 # The default is set to false.
3026 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3027 # Supported values are:
3028 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3029 # - FOUND, which corresponds to 302.
3030 # - SEE_OTHER which corresponds to 303.
3031 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3032 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3033 "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.
3034 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3035 # The default is set to false.
3036 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
3037 # 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.
3038 # The value must be between 1 and 1024 characters.
3039 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3040 # The value must be between 1 and 255 characters.
3041 },
3042 "description": "A String", # The short description conveying the intent of this routeRule.
3043 # The description can have a maximum length of 1024 characters.
3044 "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.
3045 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3046 "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.
3047 # 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.
3048 # 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.
3049 "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.
3050 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3051 "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.
3052 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3053 },
3054 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3055 "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.
3056 # 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.
3057 "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.
3058 "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
3059 },
3060 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3061 # - 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.
3062 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3063 # -
3064 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3065 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3066 # - 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.
3067 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3068 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3069 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3070 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3071 "A String",
3072 ],
3073 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3074 },
3075 "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.
3076 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3077 "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.
3078 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3079 # The value must be between 0.0 and 100.0 inclusive.
3080 "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.
3081 "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.
3082 "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
3083 },
3084 },
3085 "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.
3086 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3087 # The value must be between 0.0 and 100.0 inclusive.
3088 "httpStatus": 42, # The HTTP status code used to abort the request.
3089 # The value must be between 200 and 599 inclusive.
3090 },
3091 },
3092 "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
3093 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3094 "A String",
3095 ],
3096 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3097 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3098 "A String",
3099 ],
3100 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3101 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3102 "A String",
3103 ],
3104 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
3105 "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.
3106 # Default is false.
3107 "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.
3108 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3109 "A String",
3110 ],
3111 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3112 "A String",
3113 ],
3114 },
3115 "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.
3116 # If not specified, will use the largest timeout among all backend services associated with the route.
3117 "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.
3118 "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
3119 },
3120 "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.
3121 # 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.
3122 { # 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
3123 "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.
3124 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3125 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3126 "A String",
3127 ],
3128 "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.
3129 "A String",
3130 ],
3131 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3132 { # Specification determining how headers are added to requests or responses.
3133 "headerName": "A String", # The name of the header.
3134 "headerValue": "A String", # The value of the header to add.
3135 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3136 # The default value is false.
3137 },
3138 ],
3139 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3140 { # Specification determining how headers are added to requests or responses.
3141 "headerName": "A String", # The name of the header.
3142 "headerValue": "A String", # The value of the header to add.
3143 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3144 # The default value is false.
3145 },
3146 ],
3147 },
3148 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3149 # 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.
3150 # The value must be between 0 and 1000
3151 "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.
3152 },
3153 ],
3154 "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.
3155 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3156 # The value must be between 1 and 255 characters.
3157 "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.
3158 # The value must be between 1 and 1024 characters.
3159 },
3160 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003161 "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.
3162 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
3163 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3164 "A String",
3165 ],
3166 "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.
3167 "A String",
3168 ],
3169 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3170 { # Specification determining how headers are added to requests or responses.
3171 "headerName": "A String", # The name of the header.
3172 "headerValue": "A String", # The value of the header to add.
3173 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3174 # The default value is false.
3175 },
3176 ],
3177 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3178 { # Specification determining how headers are added to requests or responses.
3179 "headerName": "A String", # The name of the header.
3180 "headerValue": "A String", # The value of the header to add.
3181 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3182 # The default value is false.
3183 },
3184 ],
3185 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003186 "matchRules": [
3187 { # 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 -07003188 "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 -07003189 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07003190 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003191 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
3192 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -07003193 "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 -07003194 # 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.
3195 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07003196 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003197 "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.
3198 # The default setting is false.
3199 "headerName": "A String", # The name of the HTTP header to match.
3200 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
3201 # For matching a request's method, use the headerName ":method".
3202 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
3203 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3204 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
3205 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3206 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
3207 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07003208 "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 -07003209 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
3210 "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.
3211 # For example for a range [-5, 0]
3212 # - -3 will match.
3213 # - 0 will not match.
3214 # - 0.25 will not match.
3215 # - -3someString will not match.
3216 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07003217 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003218 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
3219 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
3220 },
3221 },
3222 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003223 "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.
3224 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003225 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07003226 "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 -07003227 # The value must be between 1 and 1024 characters.
3228 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
3229 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
3230 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -07003231 # ignoreCase must not be used with regexMatch.
3232 "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.
3233 # 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.
3234 # 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 -07003235 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -07003236 { # 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.
3237 # 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.
3238 # 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 -07003239 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
3240 # Supported values are:
3241 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
3242 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
3243 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
3244 # This list must not be empty and can have at the most 64 entries.
3245 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
3246 "name": "A String", # Name of metadata label.
3247 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
3248 "value": "A String", # The value of the label must match the specified value.
3249 # value can have a maximum length of 1024 characters.
3250 },
3251 ],
3252 },
3253 ],
3254 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
3255 { # HttpRouteRuleMatch criteria for a request's query parameter.
3256 "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 -07003257 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003258 "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 -07003259 # Only one of presentMatch, exactMatch or regexMatch must be set.
3260 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003261 "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.
3262 "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 -07003263 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003264 },
3265 ],
3266 },
3267 ],
3268 },
3269 ],
3270 "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.
3271 # 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 -07003272 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003273 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
3274 "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.
3275 "A String",
3276 ],
3277 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
3278 # If urlRedirect is specified, service or routeAction must not be set.
3279 "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 -07003280 # 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 -07003281 # The value must be between 1 and 1024 characters.
3282 "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.
3283 # The default is set to false.
3284 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3285 # Supported values are:
3286 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3287 # - FOUND, which corresponds to 302.
3288 # - SEE_OTHER which corresponds to 303.
3289 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3290 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3291 "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.
3292 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3293 # The default is set to false.
3294 "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 -07003295 # 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.
3296 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003297 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3298 # The value must be between 1 and 255 characters.
3299 },
3300 "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.
3301 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3302 "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.
3303 # Only one of routeAction or urlRedirect must be set.
3304 "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.
3305 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3306 },
3307 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3308 "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 -07003309 # 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 -07003310 "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.
3311 "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
3312 },
3313 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3314 # - 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.
3315 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3316 # -
3317 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3318 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3319 # - 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.
3320 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3321 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3322 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3323 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3324 "A String",
3325 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003326 "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 -07003327 },
3328 "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.
3329 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3330 "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.
3331 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3332 # The value must be between 0.0 and 100.0 inclusive.
3333 "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.
3334 "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.
3335 "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
3336 },
3337 },
3338 "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.
3339 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3340 # The value must be between 0.0 and 100.0 inclusive.
3341 "httpStatus": 42, # The HTTP status code used to abort the request.
3342 # The value must be between 200 and 599 inclusive.
3343 },
3344 },
3345 "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
3346 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3347 "A String",
3348 ],
3349 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3350 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3351 "A String",
3352 ],
3353 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3354 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3355 "A String",
3356 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003357 "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 -07003358 "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.
3359 # Default is false.
3360 "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.
3361 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3362 "A String",
3363 ],
3364 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3365 "A String",
3366 ],
3367 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003368 "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.
3369 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003370 "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.
3371 "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
3372 },
3373 "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.
3374 # 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.
3375 { # 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
3376 "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.
3377 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3378 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3379 "A String",
3380 ],
3381 "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.
3382 "A String",
3383 ],
3384 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3385 { # Specification determining how headers are added to requests or responses.
3386 "headerName": "A String", # The name of the header.
3387 "headerValue": "A String", # The value of the header to add.
3388 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3389 # The default value is false.
3390 },
3391 ],
3392 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3393 { # Specification determining how headers are added to requests or responses.
3394 "headerName": "A String", # The name of the header.
3395 "headerValue": "A String", # The value of the header to add.
3396 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3397 # The default value is false.
3398 },
3399 ],
3400 },
3401 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3402 # 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.
3403 # The value must be between 0 and 1000
3404 "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.
3405 },
3406 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003407 "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 -07003408 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3409 # The value must be between 1 and 255 characters.
3410 "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.
3411 # The value must be between 1 and 1024 characters.
3412 },
3413 },
3414 },
3415 ],
3416 "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.
3417 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
3418 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3419 "A String",
3420 ],
3421 "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.
3422 "A String",
3423 ],
3424 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3425 { # Specification determining how headers are added to requests or responses.
3426 "headerName": "A String", # The name of the header.
3427 "headerValue": "A String", # The value of the header to add.
3428 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3429 # The default value is false.
3430 },
3431 ],
3432 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3433 { # Specification determining how headers are added to requests or responses.
3434 "headerName": "A String", # The name of the header.
3435 "headerValue": "A String", # The value of the header to add.
3436 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3437 # The default value is false.
3438 },
3439 ],
3440 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003441 "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 -07003442 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
3443 "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 -07003444 # 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 -07003445 # The value must be between 1 and 1024 characters.
3446 "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.
3447 # The default is set to false.
3448 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3449 # Supported values are:
3450 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3451 # - FOUND, which corresponds to 302.
3452 # - SEE_OTHER which corresponds to 303.
3453 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3454 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3455 "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.
3456 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3457 # The default is set to false.
3458 "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 -07003459 # 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.
3460 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003461 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3462 # The value must be between 1 and 255 characters.
3463 },
3464 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
3465 },
3466 ],
3467 "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.
3468 # The headerAction specified here take effect after headerAction specified under pathMatcher.
3469 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3470 "A String",
3471 ],
3472 "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.
3473 "A String",
3474 ],
3475 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3476 { # Specification determining how headers are added to requests or responses.
3477 "headerName": "A String", # The name of the header.
3478 "headerValue": "A String", # The value of the header to add.
3479 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3480 # The default value is false.
3481 },
3482 ],
3483 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3484 { # Specification determining how headers are added to requests or responses.
3485 "headerName": "A String", # The name of the header.
3486 "headerValue": "A String", # The value of the header to add.
3487 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3488 # The default value is false.
3489 },
3490 ],
3491 },
3492 "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.
3493 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
3494 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
3495 "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 -07003496 # 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 -07003497 # The value must be between 1 and 1024 characters.
3498 "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.
3499 # The default is set to false.
3500 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3501 # Supported values are:
3502 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3503 # - FOUND, which corresponds to 302.
3504 # - SEE_OTHER which corresponds to 303.
3505 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3506 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3507 "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.
3508 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3509 # The default is set to false.
3510 "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 -07003511 # 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.
3512 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003513 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3514 # The value must be between 1 and 255 characters.
3515 },
3516 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3517 "hostRules": [ # The list of HostRules to use against the URL.
3518 { # 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 -07003519 "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 -07003520 "A String",
3521 ],
3522 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
3523 "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.
3524 },
3525 ],
3526 "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.
3527 }
3528
3529 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
3530
3531Returns:
3532 An object of the form:
3533
3534 { # Represents an Operation resource.
3535 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003536 # Google Compute Engine has three Operation resources:
3537 #
3538 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3539 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003540 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3541 #
3542 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003543 # - For global operations, use the `globalOperations` resource.
3544 # - For regional operations, use the `regionOperations` resource.
3545 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003546 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003547 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003548 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3549 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3550 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07003551 "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 -07003552 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
3553 "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 -07003554 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3555 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003556 "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 -07003557 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003558 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003559 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003560 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3561 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3562 {
3563 "message": "A String", # [Output Only] A human-readable description of the warning code.
3564 "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.
3565 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3566 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3567 {
3568 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3569 "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).
3570 },
3571 ],
3572 },
3573 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003574 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003575 "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 -07003576 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3577 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003578 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3579 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3580 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3581 {
3582 "message": "A String", # [Output Only] An optional, human-readable error message.
3583 "code": "A String", # [Output Only] The error type identifier for this error.
3584 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3585 },
3586 ],
3587 },
3588 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3589 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3590 "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.
3591 }</pre>
3592</div>
3593
3594<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003595 <code class="details" id="update">update(project, region, urlMap, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003596 <pre>Updates the specified UrlMap resource with the data included in the request.
3597
3598Args:
3599 project: string, Project ID for this request. (required)
3600 region: string, Name of the region scoping this request. (required)
3601 urlMap: string, Name of the UrlMap resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003602 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003603 The object takes the form of:
3604
Dan O'Mearadd494642020-05-01 07:42:23 -07003605{ # Represents a URL Map resource.
3606 #
3607 # Google Compute Engine has two URL Map resources:
3608 #
3609 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
3610 #
3611 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
3612 #
3613 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
3614 #
3615 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
3616 #
3617 # 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 -07003618 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
3619 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
3620 "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.
3621 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
3622 "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.
3623 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3624 },
3625 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3626 "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 -07003627 # 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 -07003628 "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.
3629 "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
3630 },
3631 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3632 # - 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.
3633 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3634 # -
3635 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3636 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3637 # - 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.
3638 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3639 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3640 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3641 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3642 "A String",
3643 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003644 "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 -07003645 },
3646 "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.
3647 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3648 "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.
3649 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3650 # The value must be between 0.0 and 100.0 inclusive.
3651 "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.
3652 "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.
3653 "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
3654 },
3655 },
3656 "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.
3657 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3658 # The value must be between 0.0 and 100.0 inclusive.
3659 "httpStatus": 42, # The HTTP status code used to abort the request.
3660 # The value must be between 200 and 599 inclusive.
3661 },
3662 },
3663 "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
3664 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3665 "A String",
3666 ],
3667 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3668 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3669 "A String",
3670 ],
3671 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3672 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3673 "A String",
3674 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003675 "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 -07003676 "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.
3677 # Default is false.
3678 "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.
3679 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3680 "A String",
3681 ],
3682 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3683 "A String",
3684 ],
3685 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003686 "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.
3687 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003688 "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.
3689 "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
3690 },
3691 "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.
3692 # 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.
3693 { # 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
3694 "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.
3695 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3696 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3697 "A String",
3698 ],
3699 "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.
3700 "A String",
3701 ],
3702 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3703 { # Specification determining how headers are added to requests or responses.
3704 "headerName": "A String", # The name of the header.
3705 "headerValue": "A String", # The value of the header to add.
3706 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3707 # The default value is false.
3708 },
3709 ],
3710 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3711 { # Specification determining how headers are added to requests or responses.
3712 "headerName": "A String", # The name of the header.
3713 "headerValue": "A String", # The value of the header to add.
3714 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3715 # The default value is false.
3716 },
3717 ],
3718 },
3719 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3720 # 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.
3721 # The value must be between 0 and 1000
3722 "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.
3723 },
3724 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003725 "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 -07003726 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3727 # The value must be between 1 and 255 characters.
3728 "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.
3729 # The value must be between 1 and 1024 characters.
3730 },
3731 },
3732 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
3733 "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.
3734 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3735 "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.
3736 { # Message for the expected URL mappings.
3737 "path": "A String", # Path portion of the URL.
3738 "host": "A String", # Host portion of the URL.
3739 "description": "A String", # Description of this test case.
3740 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
3741 },
3742 ],
3743 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3744 "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.
3745 #
3746 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
3747 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
3748 { # 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.
3749 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
3750 "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.
3751 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
3752 "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.
3753 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3754 },
3755 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3756 "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 -07003757 # 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 -07003758 "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.
3759 "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
3760 },
3761 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3762 # - 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.
3763 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3764 # -
3765 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3766 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3767 # - 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.
3768 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3769 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3770 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3771 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3772 "A String",
3773 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003774 "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 -07003775 },
3776 "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.
3777 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3778 "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.
3779 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3780 # The value must be between 0.0 and 100.0 inclusive.
3781 "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.
3782 "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.
3783 "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
3784 },
3785 },
3786 "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.
3787 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3788 # The value must be between 0.0 and 100.0 inclusive.
3789 "httpStatus": 42, # The HTTP status code used to abort the request.
3790 # The value must be between 200 and 599 inclusive.
3791 },
3792 },
3793 "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
3794 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3795 "A String",
3796 ],
3797 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3798 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3799 "A String",
3800 ],
3801 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3802 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3803 "A String",
3804 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003805 "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 -07003806 "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.
3807 # Default is false.
3808 "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.
3809 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3810 "A String",
3811 ],
3812 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3813 "A String",
3814 ],
3815 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003816 "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.
3817 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003818 "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.
3819 "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
3820 },
3821 "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.
3822 # 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.
3823 { # 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
3824 "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.
3825 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3826 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3827 "A String",
3828 ],
3829 "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.
3830 "A String",
3831 ],
3832 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3833 { # Specification determining how headers are added to requests or responses.
3834 "headerName": "A String", # The name of the header.
3835 "headerValue": "A String", # The value of the header to add.
3836 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3837 # The default value is false.
3838 },
3839 ],
3840 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3841 { # Specification determining how headers are added to requests or responses.
3842 "headerName": "A String", # The name of the header.
3843 "headerValue": "A String", # The value of the header to add.
3844 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3845 # The default value is false.
3846 },
3847 ],
3848 },
3849 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
3850 # 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.
3851 # The value must be between 0 and 1000
3852 "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.
3853 },
3854 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003855 "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 -07003856 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
3857 # The value must be between 1 and 255 characters.
3858 "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.
3859 # The value must be between 1 and 1024 characters.
3860 },
3861 },
3862 "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:
3863 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
3864 # - compute/v1/projects/project/global/backendServices/backendService
3865 # - 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.
3866 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
3867 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
3868 # - compute.backendBuckets.use
3869 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07003870 "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.
3871 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003872 { # 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 -07003873 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
3874 # If urlRedirect is specified, service or routeAction must not be set.
3875 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
3876 # 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.
3877 # The value must be between 1 and 1024 characters.
3878 "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.
3879 # The default is set to false.
3880 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
3881 # Supported values are:
3882 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
3883 # - FOUND, which corresponds to 302.
3884 # - SEE_OTHER which corresponds to 303.
3885 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
3886 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
3887 "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.
3888 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
3889 # The default is set to false.
3890 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
3891 # 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.
3892 # The value must be between 1 and 1024 characters.
3893 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
3894 # The value must be between 1 and 255 characters.
3895 },
3896 "description": "A String", # The short description conveying the intent of this routeRule.
3897 # The description can have a maximum length of 1024 characters.
3898 "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.
3899 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3900 "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.
3901 # 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.
3902 # 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.
3903 "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.
3904 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
3905 "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.
3906 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
3907 },
3908 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
3909 "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.
3910 # 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.
3911 "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.
3912 "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
3913 },
3914 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
3915 # - 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.
3916 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
3917 # -
3918 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
3919 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
3920 # - 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.
3921 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
3922 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
3923 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
3924 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
3925 "A String",
3926 ],
3927 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
3928 },
3929 "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.
3930 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
3931 "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.
3932 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
3933 # The value must be between 0.0 and 100.0 inclusive.
3934 "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.
3935 "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.
3936 "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
3937 },
3938 },
3939 "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.
3940 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
3941 # The value must be between 0.0 and 100.0 inclusive.
3942 "httpStatus": 42, # The HTTP status code used to abort the request.
3943 # The value must be between 200 and 599 inclusive.
3944 },
3945 },
3946 "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
3947 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
3948 "A String",
3949 ],
3950 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
3951 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3952 "A String",
3953 ],
3954 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
3955 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
3956 "A String",
3957 ],
3958 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
3959 "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.
3960 # Default is false.
3961 "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.
3962 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
3963 "A String",
3964 ],
3965 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
3966 "A String",
3967 ],
3968 },
3969 "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.
3970 # If not specified, will use the largest timeout among all backend services associated with the route.
3971 "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.
3972 "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
3973 },
3974 "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.
3975 # 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.
3976 { # 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
3977 "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.
3978 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
3979 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
3980 "A String",
3981 ],
3982 "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.
3983 "A String",
3984 ],
3985 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
3986 { # Specification determining how headers are added to requests or responses.
3987 "headerName": "A String", # The name of the header.
3988 "headerValue": "A String", # The value of the header to add.
3989 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3990 # The default value is false.
3991 },
3992 ],
3993 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
3994 { # Specification determining how headers are added to requests or responses.
3995 "headerName": "A String", # The name of the header.
3996 "headerValue": "A String", # The value of the header to add.
3997 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
3998 # The default value is false.
3999 },
4000 ],
4001 },
4002 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4003 # 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.
4004 # The value must be between 0 and 1000
4005 "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.
4006 },
4007 ],
4008 "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.
4009 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
4010 # The value must be between 1 and 255 characters.
4011 "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.
4012 # The value must be between 1 and 1024 characters.
4013 },
4014 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004015 "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.
4016 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
4017 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4018 "A String",
4019 ],
4020 "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.
4021 "A String",
4022 ],
4023 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4024 { # Specification determining how headers are added to requests or responses.
4025 "headerName": "A String", # The name of the header.
4026 "headerValue": "A String", # The value of the header to add.
4027 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4028 # The default value is false.
4029 },
4030 ],
4031 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4032 { # Specification determining how headers are added to requests or responses.
4033 "headerName": "A String", # The name of the header.
4034 "headerValue": "A String", # The value of the header to add.
4035 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4036 # The default value is false.
4037 },
4038 ],
4039 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004040 "matchRules": [
4041 { # 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 -07004042 "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 -07004043 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07004044 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004045 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
4046 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -07004047 "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 -07004048 # 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.
4049 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07004050 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004051 "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.
4052 # The default setting is false.
4053 "headerName": "A String", # The name of the HTTP header to match.
4054 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
4055 # For matching a request's method, use the headerName ":method".
4056 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
4057 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4058 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
4059 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4060 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
4061 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07004062 "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 -07004063 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4064 "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.
4065 # For example for a range [-5, 0]
4066 # - -3 will match.
4067 # - 0 will not match.
4068 # - 0.25 will not match.
4069 # - -3someString will not match.
4070 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07004071 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004072 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
4073 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
4074 },
4075 },
4076 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004077 "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.
4078 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004079 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07004080 "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 -07004081 # The value must be between 1 and 1024 characters.
4082 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4083 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
4084 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -07004085 # ignoreCase must not be used with regexMatch.
4086 "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.
4087 # 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.
4088 # 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 -07004089 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -07004090 { # 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.
4091 # 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.
4092 # 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 -07004093 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
4094 # Supported values are:
4095 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
4096 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
4097 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
4098 # This list must not be empty and can have at the most 64 entries.
4099 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
4100 "name": "A String", # Name of metadata label.
4101 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
4102 "value": "A String", # The value of the label must match the specified value.
4103 # value can have a maximum length of 1024 characters.
4104 },
4105 ],
4106 },
4107 ],
4108 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
4109 { # HttpRouteRuleMatch criteria for a request's query parameter.
4110 "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 -07004111 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004112 "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 -07004113 # Only one of presentMatch, exactMatch or regexMatch must be set.
4114 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004115 "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.
4116 "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 -07004117 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004118 },
4119 ],
4120 },
4121 ],
4122 },
4123 ],
4124 "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.
4125 # 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 -07004126 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004127 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
4128 "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.
4129 "A String",
4130 ],
4131 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
4132 # If urlRedirect is specified, service or routeAction must not be set.
4133 "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 -07004134 # 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 -07004135 # The value must be between 1 and 1024 characters.
4136 "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.
4137 # The default is set to false.
4138 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
4139 # Supported values are:
4140 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4141 # - FOUND, which corresponds to 302.
4142 # - SEE_OTHER which corresponds to 303.
4143 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4144 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4145 "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.
4146 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4147 # The default is set to false.
4148 "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 -07004149 # 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.
4150 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004151 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
4152 # The value must be between 1 and 255 characters.
4153 },
4154 "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.
4155 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4156 "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.
4157 # Only one of routeAction or urlRedirect must be set.
4158 "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.
4159 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
4160 },
4161 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4162 "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 -07004163 # 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 -07004164 "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.
4165 "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
4166 },
4167 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4168 # - 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.
4169 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4170 # -
4171 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4172 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4173 # - 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.
4174 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4175 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4176 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4177 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4178 "A String",
4179 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004180 "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 -07004181 },
4182 "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.
4183 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4184 "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.
4185 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4186 # The value must be between 0.0 and 100.0 inclusive.
4187 "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.
4188 "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.
4189 "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
4190 },
4191 },
4192 "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.
4193 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4194 # The value must be between 0.0 and 100.0 inclusive.
4195 "httpStatus": 42, # The HTTP status code used to abort the request.
4196 # The value must be between 200 and 599 inclusive.
4197 },
4198 },
4199 "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
4200 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
4201 "A String",
4202 ],
4203 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
4204 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4205 "A String",
4206 ],
4207 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4208 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4209 "A String",
4210 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004211 "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 -07004212 "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.
4213 # Default is false.
4214 "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.
4215 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
4216 "A String",
4217 ],
4218 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
4219 "A String",
4220 ],
4221 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004222 "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.
4223 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004224 "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.
4225 "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
4226 },
4227 "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.
4228 # 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.
4229 { # 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
4230 "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.
4231 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4232 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4233 "A String",
4234 ],
4235 "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.
4236 "A String",
4237 ],
4238 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4239 { # Specification determining how headers are added to requests or responses.
4240 "headerName": "A String", # The name of the header.
4241 "headerValue": "A String", # The value of the header to add.
4242 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4243 # The default value is false.
4244 },
4245 ],
4246 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4247 { # Specification determining how headers are added to requests or responses.
4248 "headerName": "A String", # The name of the header.
4249 "headerValue": "A String", # The value of the header to add.
4250 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4251 # The default value is false.
4252 },
4253 ],
4254 },
4255 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4256 # 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.
4257 # The value must be between 0 and 1000
4258 "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.
4259 },
4260 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004261 "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 -07004262 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
4263 # The value must be between 1 and 255 characters.
4264 "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.
4265 # The value must be between 1 and 1024 characters.
4266 },
4267 },
4268 },
4269 ],
4270 "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.
4271 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
4272 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4273 "A String",
4274 ],
4275 "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.
4276 "A String",
4277 ],
4278 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4279 { # Specification determining how headers are added to requests or responses.
4280 "headerName": "A String", # The name of the header.
4281 "headerValue": "A String", # The value of the header to add.
4282 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4283 # The default value is false.
4284 },
4285 ],
4286 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4287 { # Specification determining how headers are added to requests or responses.
4288 "headerName": "A String", # The name of the header.
4289 "headerValue": "A String", # The value of the header to add.
4290 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4291 # The default value is false.
4292 },
4293 ],
4294 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004295 "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 -07004296 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
4297 "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 -07004298 # 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 -07004299 # The value must be between 1 and 1024 characters.
4300 "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.
4301 # The default is set to false.
4302 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
4303 # Supported values are:
4304 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4305 # - FOUND, which corresponds to 302.
4306 # - SEE_OTHER which corresponds to 303.
4307 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4308 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4309 "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.
4310 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4311 # The default is set to false.
4312 "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 -07004313 # 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.
4314 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004315 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
4316 # The value must be between 1 and 255 characters.
4317 },
4318 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
4319 },
4320 ],
4321 "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.
4322 # The headerAction specified here take effect after headerAction specified under pathMatcher.
4323 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4324 "A String",
4325 ],
4326 "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.
4327 "A String",
4328 ],
4329 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4330 { # Specification determining how headers are added to requests or responses.
4331 "headerName": "A String", # The name of the header.
4332 "headerValue": "A String", # The value of the header to add.
4333 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4334 # The default value is false.
4335 },
4336 ],
4337 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4338 { # Specification determining how headers are added to requests or responses.
4339 "headerName": "A String", # The name of the header.
4340 "headerValue": "A String", # The value of the header to add.
4341 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4342 # The default value is false.
4343 },
4344 ],
4345 },
4346 "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.
4347 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
4348 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
4349 "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 -07004350 # 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 -07004351 # The value must be between 1 and 1024 characters.
4352 "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.
4353 # The default is set to false.
4354 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
4355 # Supported values are:
4356 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4357 # - FOUND, which corresponds to 302.
4358 # - SEE_OTHER which corresponds to 303.
4359 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4360 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4361 "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.
4362 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4363 # The default is set to false.
4364 "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 -07004365 # 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.
4366 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004367 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
4368 # The value must be between 1 and 255 characters.
4369 },
4370 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4371 "hostRules": [ # The list of HostRules to use against the URL.
4372 { # 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 -07004373 "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 -07004374 "A String",
4375 ],
4376 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
4377 "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.
4378 },
4379 ],
4380 "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.
4381 }
4382
4383 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
4384
4385Returns:
4386 An object of the form:
4387
4388 { # Represents an Operation resource.
4389 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004390 # Google Compute Engine has three Operation resources:
4391 #
4392 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4393 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004394 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4395 #
4396 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004397 # - For global operations, use the `globalOperations` resource.
4398 # - For regional operations, use the `regionOperations` resource.
4399 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004400 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004401 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004402 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4403 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4404 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004405 "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 -07004406 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
4407 "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 -07004408 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4409 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004410 "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 -07004411 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004412 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004413 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004414 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4415 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4416 {
4417 "message": "A String", # [Output Only] A human-readable description of the warning code.
4418 "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.
4419 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4420 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4421 {
4422 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4423 "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).
4424 },
4425 ],
4426 },
4427 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004428 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004429 "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 -07004430 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4431 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004432 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4433 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4434 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4435 {
4436 "message": "A String", # [Output Only] An optional, human-readable error message.
4437 "code": "A String", # [Output Only] The error type identifier for this error.
4438 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4439 },
4440 ],
4441 },
4442 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4443 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4444 "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.
4445 }</pre>
4446</div>
4447
4448<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004449 <code class="details" id="validate">validate(project, region, urlMap, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004450 <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.
4451
4452Args:
4453 project: string, Project ID for this request. (required)
4454 region: string, Name of the region scoping this request. (required)
4455 urlMap: string, Name of the UrlMap resource to be validated as. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004456 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004457 The object takes the form of:
4458
4459{
Dan O'Mearadd494642020-05-01 07:42:23 -07004460 "resource": { # Represents a URL Map resource. # Content of the UrlMap to be validated.
4461 #
4462 # Google Compute Engine has two URL Map resources:
4463 #
4464 # * [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps)
4465 #
4466 # A URL map resource is a component of certain types of GCP load balancers and Traffic Director.
4467 #
4468 # * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers.
4469 #
4470 # This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.
4471 #
4472 # 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 -07004473 "kind": "compute#urlMap", # [Output Only] Type of the resource. Always compute#urlMaps for url maps.
4474 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
4475 "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.
4476 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
4477 "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.
4478 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
4479 },
4480 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4481 "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 -07004482 # 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 -07004483 "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.
4484 "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
4485 },
4486 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4487 # - 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.
4488 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4489 # -
4490 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4491 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4492 # - 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.
4493 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4494 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4495 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4496 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4497 "A String",
4498 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004499 "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 -07004500 },
4501 "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.
4502 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4503 "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.
4504 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4505 # The value must be between 0.0 and 100.0 inclusive.
4506 "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.
4507 "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.
4508 "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
4509 },
4510 },
4511 "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.
4512 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4513 # The value must be between 0.0 and 100.0 inclusive.
4514 "httpStatus": 42, # The HTTP status code used to abort the request.
4515 # The value must be between 200 and 599 inclusive.
4516 },
4517 },
4518 "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
4519 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
4520 "A String",
4521 ],
4522 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
4523 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4524 "A String",
4525 ],
4526 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4527 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4528 "A String",
4529 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004530 "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 -07004531 "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.
4532 # Default is false.
4533 "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.
4534 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
4535 "A String",
4536 ],
4537 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
4538 "A String",
4539 ],
4540 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004541 "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.
4542 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004543 "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.
4544 "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
4545 },
4546 "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.
4547 # 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.
4548 { # 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
4549 "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.
4550 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4551 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4552 "A String",
4553 ],
4554 "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.
4555 "A String",
4556 ],
4557 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4558 { # Specification determining how headers are added to requests or responses.
4559 "headerName": "A String", # The name of the header.
4560 "headerValue": "A String", # The value of the header to add.
4561 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4562 # The default value is false.
4563 },
4564 ],
4565 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4566 { # Specification determining how headers are added to requests or responses.
4567 "headerName": "A String", # The name of the header.
4568 "headerValue": "A String", # The value of the header to add.
4569 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4570 # The default value is false.
4571 },
4572 ],
4573 },
4574 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4575 # 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.
4576 # The value must be between 0 and 1000
4577 "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.
4578 },
4579 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004580 "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 -07004581 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
4582 # The value must be between 1 and 255 characters.
4583 "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.
4584 # The value must be between 1 and 1024 characters.
4585 },
4586 },
4587 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
4588 "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.
4589 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
4590 "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.
4591 { # Message for the expected URL mappings.
4592 "path": "A String", # Path portion of the URL.
4593 "host": "A String", # Host portion of the URL.
4594 "description": "A String", # Description of this test case.
4595 "service": "A String", # Expected BackendService resource the given URL should be mapped to.
4596 },
4597 ],
4598 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4599 "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.
4600 #
4601 # To see the latest fingerprint, make a get() request to retrieve a UrlMap.
4602 "pathMatchers": [ # The list of named PathMatchers to use against the URL.
4603 { # 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.
4604 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
4605 "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.
4606 # Only one of defaultRouteAction or defaultUrlRedirect must be set.
4607 "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.
4608 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
4609 },
4610 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4611 "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 -07004612 # 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 -07004613 "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.
4614 "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
4615 },
4616 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4617 # - 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.
4618 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4619 # -
4620 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4621 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4622 # - 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.
4623 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4624 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4625 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4626 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4627 "A String",
4628 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004629 "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 -07004630 },
4631 "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.
4632 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4633 "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.
4634 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4635 # The value must be between 0.0 and 100.0 inclusive.
4636 "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.
4637 "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.
4638 "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
4639 },
4640 },
4641 "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.
4642 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4643 # The value must be between 0.0 and 100.0 inclusive.
4644 "httpStatus": 42, # The HTTP status code used to abort the request.
4645 # The value must be between 200 and 599 inclusive.
4646 },
4647 },
4648 "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
4649 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
4650 "A String",
4651 ],
4652 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
4653 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4654 "A String",
4655 ],
4656 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4657 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4658 "A String",
4659 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004660 "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 -07004661 "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.
4662 # Default is false.
4663 "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.
4664 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
4665 "A String",
4666 ],
4667 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
4668 "A String",
4669 ],
4670 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004671 "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.
4672 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004673 "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.
4674 "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
4675 },
4676 "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.
4677 # 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.
4678 { # 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
4679 "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.
4680 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4681 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4682 "A String",
4683 ],
4684 "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.
4685 "A String",
4686 ],
4687 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4688 { # Specification determining how headers are added to requests or responses.
4689 "headerName": "A String", # The name of the header.
4690 "headerValue": "A String", # The value of the header to add.
4691 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4692 # The default value is false.
4693 },
4694 ],
4695 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4696 { # Specification determining how headers are added to requests or responses.
4697 "headerName": "A String", # The name of the header.
4698 "headerValue": "A String", # The value of the header to add.
4699 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4700 # The default value is false.
4701 },
4702 ],
4703 },
4704 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4705 # 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.
4706 # The value must be between 0 and 1000
4707 "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.
4708 },
4709 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004710 "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 -07004711 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
4712 # The value must be between 1 and 255 characters.
4713 "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.
4714 # The value must be between 1 and 1024 characters.
4715 },
4716 },
4717 "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:
4718 # - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
4719 # - compute/v1/projects/project/global/backendServices/backendService
4720 # - 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.
4721 # Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.
4722 # Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
4723 # - compute.backendBuckets.use
4724 # - compute.backendServices.use
Dan O'Mearadd494642020-05-01 07:42:23 -07004725 "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.
4726 # Within a given pathMatcher, you can set only one of pathRules or routeRules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004727 { # 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 -07004728 "urlRedirect": { # Specifies settings for an HTTP redirect. # When this rule is matched, the request is redirected to a URL specified by urlRedirect.
4729 # If urlRedirect is specified, service or routeAction must not be set.
4730 "pathRedirect": "A String", # The path that will be used in the redirect response instead of the one that was supplied in the request.
4731 # 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.
4732 # The value must be between 1 and 1024 characters.
4733 "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.
4734 # The default is set to false.
4735 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
4736 # Supported values are:
4737 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4738 # - FOUND, which corresponds to 302.
4739 # - SEE_OTHER which corresponds to 303.
4740 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4741 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
4742 "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.
4743 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
4744 # The default is set to false.
4745 "prefixRedirect": "A String", # The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.
4746 # 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.
4747 # The value must be between 1 and 1024 characters.
4748 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
4749 # The value must be between 1 and 255 characters.
4750 },
4751 "description": "A String", # The short description conveying the intent of this routeRule.
4752 # The description can have a maximum length of 1024 characters.
4753 "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.
4754 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4755 "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.
4756 # 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.
4757 # 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.
4758 "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.
4759 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
4760 "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.
4761 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
4762 },
4763 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
4764 "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.
4765 # 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.
4766 "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.
4767 "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
4768 },
4769 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
4770 # - 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.
4771 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
4772 # -
4773 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
4774 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
4775 # - 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.
4776 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
4777 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
4778 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
4779 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
4780 "A String",
4781 ],
4782 "numRetries": 42, # Specifies the allowed number retries. This number must be &gt; 0. If not specified, defaults to 1.
4783 },
4784 "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.
4785 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
4786 "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.
4787 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
4788 # The value must be between 0.0 and 100.0 inclusive.
4789 "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.
4790 "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.
4791 "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
4792 },
4793 },
4794 "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.
4795 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
4796 # The value must be between 0.0 and 100.0 inclusive.
4797 "httpStatus": 42, # The HTTP status code used to abort the request.
4798 # The value must be between 200 and 599 inclusive.
4799 },
4800 },
4801 "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
4802 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
4803 "A String",
4804 ],
4805 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
4806 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4807 "A String",
4808 ],
4809 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
4810 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
4811 "A String",
4812 ],
4813 "maxAge": 42, # Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
4814 "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.
4815 # Default is false.
4816 "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.
4817 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
4818 "A String",
4819 ],
4820 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
4821 "A String",
4822 ],
4823 },
4824 "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.
4825 # If not specified, will use the largest timeout among all backend services associated with the route.
4826 "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.
4827 "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
4828 },
4829 "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.
4830 # 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.
4831 { # 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
4832 "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.
4833 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
4834 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4835 "A String",
4836 ],
4837 "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.
4838 "A String",
4839 ],
4840 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4841 { # Specification determining how headers are added to requests or responses.
4842 "headerName": "A String", # The name of the header.
4843 "headerValue": "A String", # The value of the header to add.
4844 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4845 # The default value is false.
4846 },
4847 ],
4848 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4849 { # Specification determining how headers are added to requests or responses.
4850 "headerName": "A String", # The name of the header.
4851 "headerValue": "A String", # The value of the header to add.
4852 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4853 # The default value is false.
4854 },
4855 ],
4856 },
4857 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
4858 # 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.
4859 # The value must be between 0 and 1000
4860 "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.
4861 },
4862 ],
4863 "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.
4864 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
4865 # The value must be between 1 and 255 characters.
4866 "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.
4867 # The value must be between 1 and 1024 characters.
4868 },
4869 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004870 "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.
4871 # The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
4872 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
4873 "A String",
4874 ],
4875 "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.
4876 "A String",
4877 ],
4878 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
4879 { # Specification determining how headers are added to requests or responses.
4880 "headerName": "A String", # The name of the header.
4881 "headerValue": "A String", # The value of the header to add.
4882 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4883 # The default value is false.
4884 },
4885 ],
4886 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
4887 { # Specification determining how headers are added to requests or responses.
4888 "headerName": "A String", # The name of the header.
4889 "headerValue": "A String", # The value of the header to add.
4890 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
4891 # The default value is false.
4892 },
4893 ],
4894 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004895 "matchRules": [
4896 { # 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 -07004897 "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 -07004898 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07004899 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004900 "headerMatches": [ # Specifies a list of header match criteria, all of which must match corresponding headers in the request.
4901 { # matchRule criteria for request header matches.
Dan O'Mearadd494642020-05-01 07:42:23 -07004902 "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 -07004903 # 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.
4904 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07004905 # Note that regexMatch only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004906 "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.
4907 # The default setting is false.
4908 "headerName": "A String", # The name of the HTTP header to match.
4909 # For matching against the HTTP request's authority, use a headerMatch with the header name ":authority".
4910 # For matching a request's method, use the headerName ":method".
4911 "prefixMatch": "A String", # The value of the header must start with the contents of prefixMatch.
4912 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4913 "suffixMatch": "A String", # The value of the header must end with the contents of suffixMatch.
4914 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4915 "exactMatch": "A String", # The value should exactly match contents of exactMatch.
4916 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07004917 "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 -07004918 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
4919 "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.
4920 # For example for a range [-5, 0]
4921 # - -3 will match.
4922 # - 0 will not match.
4923 # - 0.25 will not match.
4924 # - -3someString will not match.
4925 # Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07004926 # Note that rangeMatch is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004927 "rangeEnd": "A String", # The end of the range (exclusive) in signed long integer format.
4928 "rangeStart": "A String", # The start of the range (inclusive) in signed long integer format.
4929 },
4930 },
4931 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004932 "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.
4933 # fullPathMatch must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004934 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
Dan O'Mearadd494642020-05-01 07:42:23 -07004935 "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 -07004936 # The value must be between 1 and 1024 characters.
4937 # Only one of prefixMatch, fullPathMatch or regexMatch must be specified.
4938 "ignoreCase": True or False, # Specifies that prefixMatch and fullPathMatch matches are case sensitive.
4939 # The default value is false.
Dan O'Mearadd494642020-05-01 07:42:23 -07004940 # ignoreCase must not be used with regexMatch.
4941 "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.
4942 # 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.
4943 # 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 -07004944 # metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Dan O'Mearadd494642020-05-01 07:42:23 -07004945 { # 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.
4946 # 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.
4947 # 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 -07004948 "filterMatchCriteria": "A String", # Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.
4949 # Supported values are:
4950 # - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
4951 # - MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
4952 "filterLabels": [ # The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria
4953 # This list must not be empty and can have at the most 64 entries.
4954 { # MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.
4955 "name": "A String", # Name of metadata label.
4956 # The name can have a maximum length of 1024 characters and must be at least 1 character long.
4957 "value": "A String", # The value of the label must match the specified value.
4958 # value can have a maximum length of 1024 characters.
4959 },
4960 ],
4961 },
4962 ],
4963 "queryParameterMatches": [ # Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.
4964 { # HttpRouteRuleMatch criteria for a request's query parameter.
4965 "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 -07004966 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004967 "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 -07004968 # Only one of presentMatch, exactMatch or regexMatch must be set.
4969 # Note that regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004970 "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.
4971 "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 -07004972 # Only one of presentMatch, exactMatch or regexMatch must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004973 },
4974 ],
4975 },
4976 ],
4977 },
4978 ],
4979 "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.
4980 # 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 -07004981 # Within a given pathMatcher, only one of pathRules or routeRules must be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004982 { # A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.
4983 "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.
4984 "A String",
4985 ],
4986 "urlRedirect": { # Specifies settings for an HTTP redirect. # When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.
4987 # If urlRedirect is specified, service or routeAction must not be set.
4988 "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 -07004989 # 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 -07004990 # The value must be between 1 and 1024 characters.
4991 "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.
4992 # The default is set to false.
4993 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
4994 # Supported values are:
4995 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
4996 # - FOUND, which corresponds to 302.
4997 # - SEE_OTHER which corresponds to 303.
4998 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
4999 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5000 "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.
5001 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5002 # The default is set to false.
5003 "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 -07005004 # 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.
5005 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005006 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
5007 # The value must be between 1 and 255 characters.
5008 },
5009 "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.
5010 # Only one of urlRedirect, service or routeAction.weightedBackendService must be set.
5011 "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.
5012 # Only one of routeAction or urlRedirect must be set.
5013 "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.
5014 "backendService": "A String", # The full or partial URL to the BackendService resource being mirrored to.
5015 },
5016 "retryPolicy": { # The retry policy associates with HttpRouteRule # Specifies the retry policy associated with this route.
5017 "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 -07005018 # 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 -07005019 "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.
5020 "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
5021 },
5022 "retryConditions": [ # Specfies one or more conditions when this retry rule applies. Valid values are:
5023 # - 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.
5024 # - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
5025 # -
5026 # - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
5027 # - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
5028 # - 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.
5029 # - cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled
5030 # - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
5031 # - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
5032 # - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
5033 "A String",
5034 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005035 "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 -07005036 },
5037 "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.
5038 # timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.
5039 "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.
5040 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.
5041 # The value must be between 0.0 and 100.0 inclusive.
5042 "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.
5043 "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.
5044 "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
5045 },
5046 },
5047 "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.
5048 "percentage": 3.14, # The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.
5049 # The value must be between 0.0 and 100.0 inclusive.
5050 "httpStatus": 42, # The HTTP status code used to abort the request.
5051 # The value must be between 200 and 599 inclusive.
5052 },
5053 },
5054 "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
5055 "allowMethods": [ # Specifies the content for the Access-Control-Allow-Methods header.
5056 "A String",
5057 ],
5058 "allowOrigins": [ # Specifies the list of origins that will be allowed to do CORS requests.
5059 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5060 "A String",
5061 ],
5062 "allowOriginRegexes": [ # Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript
5063 # An origin is allowed if it matches either allow_origins or allow_origin_regex.
5064 "A String",
5065 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005066 "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 -07005067 "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.
5068 # Default is false.
5069 "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.
5070 "allowHeaders": [ # Specifies the content for the Access-Control-Allow-Headers header.
5071 "A String",
5072 ],
5073 "exposeHeaders": [ # Specifies the content for the Access-Control-Expose-Headers header.
5074 "A String",
5075 ],
5076 },
Dan O'Mearadd494642020-05-01 07:42:23 -07005077 "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.
5078 # If not specified, will use the largest timeout among all backend services associated with the route.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005079 "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.
5080 "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
5081 },
5082 "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.
5083 # 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.
5084 { # 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
5085 "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.
5086 # headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap.
5087 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5088 "A String",
5089 ],
5090 "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.
5091 "A String",
5092 ],
5093 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5094 { # Specification determining how headers are added to requests or responses.
5095 "headerName": "A String", # The name of the header.
5096 "headerValue": "A String", # The value of the header to add.
5097 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5098 # The default value is false.
5099 },
5100 ],
5101 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5102 { # Specification determining how headers are added to requests or responses.
5103 "headerName": "A String", # The name of the header.
5104 "headerValue": "A String", # The value of the header to add.
5105 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5106 # The default value is false.
5107 },
5108 ],
5109 },
5110 "weight": 42, # Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
5111 # 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.
5112 # The value must be between 0 and 1000
5113 "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.
5114 },
5115 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005116 "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 -07005117 "hostRewrite": "A String", # Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.
5118 # The value must be between 1 and 255 characters.
5119 "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.
5120 # The value must be between 1 and 1024 characters.
5121 },
5122 },
5123 },
5124 ],
5125 "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.
5126 # HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
5127 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5128 "A String",
5129 ],
5130 "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.
5131 "A String",
5132 ],
5133 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5134 { # Specification determining how headers are added to requests or responses.
5135 "headerName": "A String", # The name of the header.
5136 "headerValue": "A String", # The value of the header to add.
5137 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5138 # The default value is false.
5139 },
5140 ],
5141 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5142 { # Specification determining how headers are added to requests or responses.
5143 "headerName": "A String", # The name of the header.
5144 "headerValue": "A String", # The value of the header to add.
5145 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5146 # The default value is false.
5147 },
5148 ],
5149 },
Dan O'Mearadd494642020-05-01 07:42:23 -07005150 "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 -07005151 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
5152 "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 -07005153 # 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 -07005154 # The value must be between 1 and 1024 characters.
5155 "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.
5156 # The default is set to false.
5157 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
5158 # Supported values are:
5159 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5160 # - FOUND, which corresponds to 302.
5161 # - SEE_OTHER which corresponds to 303.
5162 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5163 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5164 "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.
5165 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5166 # The default is set to false.
5167 "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 -07005168 # 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.
5169 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005170 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
5171 # The value must be between 1 and 255 characters.
5172 },
5173 "name": "A String", # The name to which this PathMatcher is referred by the HostRule.
5174 },
5175 ],
5176 "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.
5177 # The headerAction specified here take effect after headerAction specified under pathMatcher.
5178 "requestHeadersToRemove": [ # A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.
5179 "A String",
5180 ],
5181 "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.
5182 "A String",
5183 ],
5184 "requestHeadersToAdd": [ # Headers to add to a matching request prior to forwarding the request to the backendService.
5185 { # Specification determining how headers are added to requests or responses.
5186 "headerName": "A String", # The name of the header.
5187 "headerValue": "A String", # The value of the header to add.
5188 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5189 # The default value is false.
5190 },
5191 ],
5192 "responseHeadersToAdd": [ # Headers to add the response prior to sending the response back to the client.
5193 { # Specification determining how headers are added to requests or responses.
5194 "headerName": "A String", # The name of the header.
5195 "headerValue": "A String", # The value of the header to add.
5196 "replace": True or False, # If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
5197 # The default value is false.
5198 },
5199 ],
5200 },
5201 "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.
5202 "defaultUrlRedirect": { # Specifies settings for an HTTP redirect. # When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.
5203 # If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.
5204 "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 -07005205 # 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 -07005206 # The value must be between 1 and 1024 characters.
5207 "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.
5208 # The default is set to false.
5209 "redirectResponseCode": "A String", # The HTTP Status code to use for this RedirectAction.
5210 # Supported values are:
5211 # - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
5212 # - FOUND, which corresponds to 302.
5213 # - SEE_OTHER which corresponds to 303.
5214 # - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
5215 # - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
5216 "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.
5217 # This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
5218 # The default is set to false.
5219 "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 -07005220 # 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.
5221 # The value must be between 1 and 1024 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005222 "hostRedirect": "A String", # The host that will be used in the redirect response instead of the one that was supplied in the request.
5223 # The value must be between 1 and 255 characters.
5224 },
5225 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
5226 "hostRules": [ # The list of HostRules to use against the URL.
5227 { # 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 -07005228 "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 -07005229 "A String",
5230 ],
5231 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
5232 "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.
5233 },
5234 ],
5235 "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.
5236 },
5237 }
5238
5239
5240Returns:
5241 An object of the form:
5242
5243 {
5244 "result": { # Message representing the validation result for a UrlMap.
5245 "testFailures": [
5246 {
5247 "path": "A String",
5248 "actualService": "A String",
5249 "host": "A String",
5250 "expectedService": "A String",
5251 },
5252 ],
5253 "loadErrors": [
5254 "A String",
5255 ],
5256 "testPassed": True or False, # If successfully loaded, this field indicates whether the test passed. If false, 'testFailures's indicate the reason of failure.
5257 "loadSucceeded": True or False, # Whether the given UrlMap can be successfully loaded. If false, 'loadErrors' indicates the reasons.
5258 },
5259 }</pre>
5260</div>
5261
5262</body></html>