Class HttpRoute (0.5.10)

HttpRoute(mapping=None, *, ignore_unknown_fields=False, **kwargs)

HttpRoute is the resource defining how HTTP traffic should be routed by a Mesh or Gateway resource.

Attributes

NameDescription
name str
Required. Name of the HttpRoute resource. It matches pattern projects/*/locations/global/httpRoutes/http_route_name>.
self_link str
Output only. Server-defined URL of this resource
description str
Optional. A free-text description of the resource. Max length 1024 characters.
create_time google.protobuf.timestamp_pb2.Timestamp
Output only. The timestamp when the resource was created.
update_time google.protobuf.timestamp_pb2.Timestamp
Output only. The timestamp when the resource was updated.
hostnames MutableSequence[str]
Required. Hostnames define a set of hosts that should match against the HTTP host header to select a HttpRoute to process the request. Hostname is the fully qualified domain name of a network host, as defined by RFC 1123 with the exception that: - IPs are not allowed. - A hostname may be prefixed with a wildcard label (*.). The wildcard label must appear by itself as the first label. Hostname can be "precise" which is a domain name without the terminating dot of a network host (e.g. foo.example.com) or "wildcard", which is a domain name prefixed with a single wildcard label (e.g. *.example.com). Note that as per RFC1035 and RFC1123, a label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character. No other punctuation is allowed. The routes associated with a Mesh or Gateways must have unique hostnames. If you attempt to attach multiple routes with conflicting hostnames, the configuration will be rejected. For example, while it is acceptable for routes for the hostnames *.foo.bar.com and *.bar.com to be associated with the same Mesh (or Gateways under the same scope), it is not possible to associate two routes both with *.bar.com or both with bar.com.
meshes MutableSequence[str]
Optional. Meshes defines a list of meshes this HttpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: projects/*/locations/global/meshes/ The attached Mesh should be of a type SIDECAR
gateways MutableSequence[str]
Optional. Gateways defines a list of gateways this HttpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: projects/*/locations/global/gateways/
labels MutableMapping[str, str]
Optional. Set of label tags associated with the HttpRoute resource.
rules MutableSequence[google.cloud.network_services_v1.types.HttpRoute.RouteRule]
Required. Rules that define how traffic is routed and handled. Rules will be matched sequentially based on the RouteMatch specified for the rule.

Classes

CorsPolicy

CorsPolicy(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The Specification for allowing client side cross-origin requests.

Destination

Destination(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Specifications of a destination to which the request should be routed to.

FaultInjectionPolicy

FaultInjectionPolicy(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The specification for fault injection introduced into traffic to test the resiliency of clients to destination service failure. As part of fault injection, when clients send requests to a destination, delays can be introduced by client proxy on a percentage of requests before sending those requests to the destination service. Similarly requests can be aborted by client proxy for a percentage of requests.

HeaderMatch

HeaderMatch(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Specifies how to select a route rule based on HTTP request headers.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

HeaderModifier

HeaderModifier(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The specification for modifying HTTP header in HTTP request and HTTP response.

LabelsEntry

LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The abstract base class for a message.

Parameters
NameDescription
kwargs dict

Keys and values corresponding to the fields of the message.

mapping Union[dict, .Message]

A dictionary or message to be used to determine the values for this message.

ignore_unknown_fields Optional(bool)

If True, do not raise errors for unknown fields. Only applied if mapping is a mapping type or there are keyword parameters.

QueryParameterMatch

QueryParameterMatch(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Specifications to match a query parameter in the request.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Redirect

Redirect(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The specification for redirecting traffic.

RequestMirrorPolicy

RequestMirrorPolicy(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Specifies the policy on how requests are shadowed to a separate mirrored destination service. The proxy 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.

RetryPolicy

RetryPolicy(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The specifications for retries.

RouteAction

RouteAction(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The specifications for routing traffic and applying associated policies.

RouteMatch

RouteMatch(mapping=None, *, ignore_unknown_fields=False, **kwargs)

RouteMatch defines specifications used to match requests. If multiple match types are set, this RouteMatch will match if ALL type of matches are matched.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

RouteRule

RouteRule(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Specifies how to match traffic and how to route traffic when traffic is matched.

URLRewrite

URLRewrite(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The specification for modifying the URL of the request, prior to forwarding the request to the destination.