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