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