PathMatcher class final
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 is used.
Constructors
-
PathMatcher({CustomErrorResponsePolicy? defaultCustomErrorResponsePolicy, HttpRouteAction? defaultRouteAction, String? defaultService, HttpRedirectAction? defaultUrlRedirect, String? description, HttpHeaderAction? headerAction, String? name, List<
PathRule> pathRules = const [], List<HttpRouteRule> routeRules = const []}) - PathMatcher.fromJson(Object? j)
-
factory
Properties
- defaultCustomErrorResponsePolicy → CustomErrorResponsePolicy?
-
defaultCustomErrorResponsePolicy specifies how the Load
Balancer returns error responses when BackendServiceorBackendBucket responds with an error.
final
- defaultRouteAction → HttpRouteAction?
-
defaultRouteAction takes effect when none of the
pathRules or routeRules match. The load balancer
performs advanced routing actions, such as URL rewrites and
header transformations, before forwarding the request to the
selected backend.
final
- defaultService → String?
-
The full or partial URL to the BackendService resource. This
URL is used if none of the pathRules orrouteRules defined by this PathMatcher are
matched. For example, the
following are all valid URLs to a BackendService resource:
final
- defaultUrlRedirect → HttpRedirectAction?
-
When none of the specified pathRules orrouteRules match, the request is redirected to a URL specified
by defaultUrlRedirect.
final
- description → String?
-
An optional description of this resource. Provide this property when you
create the resource.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- headerAction → HttpHeaderAction?
-
Specifies changes to request and response headers that need to take effect
for the selected backend service.
final
- name → String?
-
The name to which this PathMatcher is referred by theHostRule.
final
-
pathRules
→ List<
PathRule> -
The list of path rules. Use this list instead of routeRules
when routing based on simple path matching is all that's required. A path
rule can only include a wildcard character (*) after a
forward slash character ("/").
final
- qualifiedName → String
-
The fully qualified name of this message, i.e.,
google.protobuf.Durationorgoogle.rpc.ErrorInfo.finalinherited -
routeRules
→ List<
HttpRouteRule> -
The list of HTTP route rules. Use this list instead ofpathRules when advanced route matching and routing actions are
desired. routeRules are evaluated in order of priority, from
the lowest to highest number.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Object -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- fullyQualifiedName → const String