UrlMap class final
Represents a URL Map resource.
Compute Engine has two URL Map resources:
A URL map resource is a component of certain types of cloud load balancers and Traffic Director:
- urlMaps are used by global external Application Load Balancers, classic Application Load Balancers, and cross-region internal Application Load Balancers.
- regionUrlMaps are used by internal Application Load Balancers, regional external Application Load Balancers and regional internal Application Load Balancers.
For a list of supported URL map features by the load balancer type, see the Load balancing features: Routing and traffic management table.
For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table.
This resource defines mappings from hostnames and URL paths to either a backend service or a backend bucket.
To use the global urlMaps resource, the backend service must have a loadBalancingScheme of either EXTERNAL,EXTERNAL_MANAGED, or INTERNAL_SELF_MANAGED. To use the regionUrlMaps resource, the backend service must have aloadBalancingScheme of INTERNAL_MANAGED. For more information, read URL Map Concepts.
Constructors
-
UrlMap({String? creationTimestamp, CustomErrorResponsePolicy? defaultCustomErrorResponsePolicy, HttpRouteAction? defaultRouteAction, String? defaultService, HttpRedirectAction? defaultUrlRedirect, String? description, String? fingerprint, HttpHeaderAction? headerAction, List<
HostRule> hostRules = const [], BigInt? id, String? kind, String? name, List<PathMatcher> pathMatchers = const [], String? region, String? selfLink, List<UrlMapTest> tests = const []}) - UrlMap.fromJson(Object? j)
-
factory
Properties
- creationTimestamp → String?
-
Output only.
Output OnlyCreation timestamp inRFC3339 text format.final - 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
hostRules 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 of the defaultService resource to
which traffic is directed if none of the hostRules match.
If defaultRouteAction is also specified, advanced
routing actions, such as URL rewrites, take effect before sending the
request to the backend.
final
- defaultUrlRedirect → HttpRedirectAction?
-
When none of the specified hostRules 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
- fingerprint → String?
-
Fingerprint of this resource. A hash of the contents stored in this object.
This field is used in optimistic locking. This field is 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.
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 backendService.
final
-
hostRules
→ List<
HostRule> -
The list of host rules to use against the URL.
final
- id → BigInt?
-
Output OnlyThe unique identifier for the resource. This identifier is defined by the server.final - kind → String?
-
Output only.
Output OnlyType of the resource. Always compute#urlMaps for url maps.final - name → String?
-
Name of the resource. Provided by the client when the resource is created.
The name must be 1-63 characters long, and comply withRFC1035.
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.final -
pathMatchers
→ List<
PathMatcher> -
The list of named PathMatchers to use against the URL.
final
- qualifiedName → String
-
The fully qualified name of this message, i.e.,
google.protobuf.Durationorgoogle.rpc.ErrorInfo.finalinherited - region → String?
-
Output only.
Output OnlyURL 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.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selfLink → String?
-
Output OnlyServer-defined URL for the resource.final -
tests
→ List<
UrlMapTest> -
The list of expected URL mapping tests. Request to update theUrlMap succeeds only if all test cases pass. You can specify a
maximum of 100 tests per UrlMap.
final
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