Destination(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Specification of traffic destination attributes. .. attribute:: hosts
Required. List of host names to match. Matched against HOST header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example "mydomain.") or a suffix match (example // *.myorg.com") or a presence(any) match "".
:type: Sequence[str]
Attributes | |
---|---|
Name | Description |
ports |
Sequence[int]
Required. List of destination ports to match. At least one port should match. |
methods |
Sequence[str]
Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services. |
http_header_match |
google.cloud.network_security_v1beta1.types.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch
Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. |
Classes
HttpHeaderMatch
HttpHeaderMatch(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Specification of HTTP header match atrributes. .. attribute:: regex_match
Required. The value of the header must match the regular expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/cpp/regex/ecmascript For matching against a port specified in the HTTP request, use a headerMatch with headerName set to Host and a regular expression that satisfies the RFC2616 Host header's port specifier.
:type: str