Reference documentation and code samples for the Google Cloud Network Services V1 Client class HeaderMatch.
Specifies how to select a route rule based on HTTP request headers.
Generated from protobuf message google.cloud.networkservices.v1.HttpRoute.HeaderMatch
Namespace
Google \ Cloud \ NetworkServices \ V1 \ HttpRouteMethods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ exact_match
string
The value of the header should match exactly the content of exact_match.
↳ regex_match
string
The value of the header must match the regular expression specified in regex_match. For regular expression grammar, please see: https://github.com/google/re2/wiki/Syntax
↳ prefix_match
string
The value of the header must start with the contents of prefix_match.
↳ present_match
bool
A header with header_name must exist. The match takes place whether or not the header has a value.
↳ suffix_match
string
The value of the header must end with the contents of suffix_match.
↳ range_match
HeaderMatch\IntegerRange
If specified, the rule will match if the request header value is within the range.
↳ header
string
The name of the HTTP header to match against.
↳ invert_match
bool
If specified, the match result will be inverted before checking. Default value is set to false.
getExactMatch
The value of the header should match exactly the content of exact_match.
string
hasExactMatch
setExactMatch
The value of the header should match exactly the content of exact_match.
var
string
$this
getRegexMatch
The value of the header must match the regular expression specified in regex_match. For regular expression grammar, please see: https://github.com/google/re2/wiki/Syntax
string
hasRegexMatch
setRegexMatch
The value of the header must match the regular expression specified in regex_match. For regular expression grammar, please see: https://github.com/google/re2/wiki/Syntax
var
string
$this
getPrefixMatch
The value of the header must start with the contents of prefix_match.
string
hasPrefixMatch
setPrefixMatch
The value of the header must start with the contents of prefix_match.
var
string
$this
getPresentMatch
A header with header_name must exist. The match takes place whether or not the header has a value.
bool
hasPresentMatch
setPresentMatch
A header with header_name must exist. The match takes place whether or not the header has a value.
var
bool
$this
getSuffixMatch
The value of the header must end with the contents of suffix_match.
string
hasSuffixMatch
setSuffixMatch
The value of the header must end with the contents of suffix_match.
var
string
$this
getRangeMatch
If specified, the rule will match if the request header value is within the range.
hasRangeMatch
setRangeMatch
If specified, the rule will match if the request header value is within the range.
$this
getHeader
The name of the HTTP header to match against.
string
setHeader
The name of the HTTP header to match against.
var
string
$this
getInvertMatch
If specified, the match result will be inverted before checking. Default value is set to false.
bool
setInvertMatch
If specified, the match result will be inverted before checking. Default value is set to false.
var
bool
$this
getMatchType
string