public sealed class HttpHeaderMatch : IMessage<HttpHeaderMatch>, IEquatable<HttpHeaderMatch>, IDeepCloneable<HttpHeaderMatch>, IBufferMessage, IMessage
Reference documentation and code samples for the Compute Engine v1 API class HttpHeaderMatch.
matchRule criteria for request header matches.
Implements
IMessageHttpHeaderMatch, IEquatableHttpHeaderMatch, IDeepCloneableHttpHeaderMatch, IBufferMessage, IMessageNamespace
Google.Cloud.Compute.V1Assembly
Google.Cloud.Compute.V1.dll
Constructors
HttpHeaderMatch()
public HttpHeaderMatch()
HttpHeaderMatch(HttpHeaderMatch)
public HttpHeaderMatch(HttpHeaderMatch other)
Parameter | |
---|---|
Name | Description |
other |
HttpHeaderMatch |
Properties
ExactMatch
public string ExactMatch { get; set; }
The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Property Value | |
---|---|
Type | Description |
string |
HasExactMatch
public bool HasExactMatch { get; }
Gets whether the "exact_match" field is set
Property Value | |
---|---|
Type | Description |
bool |
HasHeaderName
public bool HasHeaderName { get; }
Gets whether the "header_name" field is set
Property Value | |
---|---|
Type | Description |
bool |
HasInvertMatch
public bool HasInvertMatch { get; }
Gets whether the "invert_match" field is set
Property Value | |
---|---|
Type | Description |
bool |
HasPrefixMatch
public bool HasPrefixMatch { get; }
Gets whether the "prefix_match" field is set
Property Value | |
---|---|
Type | Description |
bool |
HasPresentMatch
public bool HasPresentMatch { get; }
Gets whether the "present_match" field is set
Property Value | |
---|---|
Type | Description |
bool |
HasRegexMatch
public bool HasRegexMatch { get; }
Gets whether the "regex_match" field is set
Property Value | |
---|---|
Type | Description |
bool |
HasSuffixMatch
public bool HasSuffixMatch { get; }
Gets whether the "suffix_match" field is set
Property Value | |
---|---|
Type | Description |
bool |
HeaderName
public string HeaderName { get; set; }
The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name ":authority". For matching a request's method, use the headerName ":method". When the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true, only non-binary user-specified custom metadata and the content-type
header are supported. The following transport-level headers cannot be used in header matching rules: :authority
, :method
, :path
, :scheme
, user-agent
, accept-encoding
, content-encoding
, grpc-accept-encoding
, grpc-encoding
, grpc-previous-rpc-attempts
, grpc-tags-bin
, grpc-timeout
and grpc-trace-bin
.
Property Value | |
---|---|
Type | Description |
string |
InvertMatch
public bool InvertMatch { get; set; }
If set to false, the headerMatch is considered a match if the preceding match criteria are met. If set to true, the headerMatch is considered a match if the preceding match criteria are NOT met. The default setting is false.
Property Value | |
---|---|
Type | Description |
bool |
PrefixMatch
public string PrefixMatch { get; set; }
The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Property Value | |
---|---|
Type | Description |
string |
PresentMatch
public bool PresentMatch { get; set; }
A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Property Value | |
---|---|
Type | Description |
bool |
RangeMatch
public Int64RangeMatch RangeMatch { get; set; }
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. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. rangeMatch is not supported for load balancers that have loadBalancingScheme set to EXTERNAL.
Property Value | |
---|---|
Type | Description |
Int64RangeMatch |
RegexMatch
public string RegexMatch { get; set; }
The value of the header must match the regular expression specified in regexMatch. For more information about regular expression syntax, see Syntax. 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. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Property Value | |
---|---|
Type | Description |
string |
SuffixMatch
public string SuffixMatch { get; set; }
The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
Property Value | |
---|---|
Type | Description |
string |