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