Class: Google::Apis::ComputeV1::HttpHeaderMatch
- Inherits:
-
Object
- Object
- Google::Apis::ComputeV1::HttpHeaderMatch
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/compute_v1/classes.rb,
lib/google/apis/compute_v1/representations.rb,
lib/google/apis/compute_v1/representations.rb
Overview
matchRule criteria for request header matches.
Instance Attribute Summary collapse
-
#exact_match ⇒ String
The value should exactly match contents of exactMatch.
-
#header_name ⇒ String
The name of the HTTP header to match.
-
#invert_match ⇒ Boolean
(also: #invert_match?)
If set to false, the headerMatch is considered a match if the preceding match criteria are met.
-
#prefix_match ⇒ String
The value of the header must start with the contents ofprefixMatch.
-
#present_match ⇒ Boolean
(also: #present_match?)
A header with the contents of headerName must exist.
-
#range_match ⇒ Google::Apis::ComputeV1::Int64RangeMatch
HttpRouteRuleMatch criteria for field values that must stay within the specified integer range.
-
#regex_match ⇒ String
The value of the header must match the regular expression specified inregexMatch.
-
#suffix_match ⇒ String
The value of the header must end with the contents ofsuffixMatch.
Instance Method Summary collapse
-
#initialize(**args) ⇒ HttpHeaderMatch
constructor
A new instance of HttpHeaderMatch.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ HttpHeaderMatch
Returns a new instance of HttpHeaderMatch.
17046 17047 17048 |
# File 'lib/google/apis/compute_v1/classes.rb', line 17046 def initialize(**args) update!(**args) end |
Instance Attribute Details
#exact_match ⇒ String
The value should exactly match contents of exactMatch.
Only one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or
rangeMatch must be set.
Corresponds to the JSON property exactMatch
16972 16973 16974 |
# File 'lib/google/apis/compute_v1/classes.rb', line 16972 def exact_match @exact_match end |
#header_name ⇒ String
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.
Corresponds to the JSON property headerName
16990 16991 16992 |
# File 'lib/google/apis/compute_v1/classes.rb', line 16990 def header_name @header_name end |
#invert_match ⇒ Boolean Also known as: invert_match?
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.
Corresponds to the JSON property invertMatch
16999 17000 17001 |
# File 'lib/google/apis/compute_v1/classes.rb', line 16999 def invert_match @invert_match end |
#prefix_match ⇒ String
The value of the header must start with the contents ofprefixMatch.
Only one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or
rangeMatch must be set.
Corresponds to the JSON property prefixMatch
17007 17008 17009 |
# File 'lib/google/apis/compute_v1/classes.rb', line 17007 def prefix_match @prefix_match end |
#present_match ⇒ Boolean Also known as: present_match?
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.
Corresponds to the JSON property presentMatch
17015 17016 17017 |
# File 'lib/google/apis/compute_v1/classes.rb', line 17015 def present_match @present_match end |
#range_match ⇒ Google::Apis::ComputeV1::Int64RangeMatch
HttpRouteRuleMatch criteria for field values that must stay
within the specified integer range.
Corresponds to the JSON property rangeMatch
17022 17023 17024 |
# File 'lib/google/apis/compute_v1/classes.rb', line 17022 def range_match @range_match end |
#regex_match ⇒ String
The value of the header must match the regular expression specified
inregexMatch.
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, EXTERNAL_MANAGED
(regional scope) or INTERNAL_MANAGED.
Corresponds to the JSON property regexMatch
17037 17038 17039 |
# File 'lib/google/apis/compute_v1/classes.rb', line 17037 def regex_match @regex_match end |
#suffix_match ⇒ String
The value of the header must end with the contents ofsuffixMatch.
Only one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or
rangeMatch must be set.
Corresponds to the JSON property suffixMatch
17044 17045 17046 |
# File 'lib/google/apis/compute_v1/classes.rb', line 17044 def suffix_match @suffix_match end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
17051 17052 17053 17054 17055 17056 17057 17058 17059 17060 |
# File 'lib/google/apis/compute_v1/classes.rb', line 17051 def update!(**args) @exact_match = args[:exact_match] if args.key?(:exact_match) @header_name = args[:header_name] if args.key?(:header_name) @invert_match = args[:invert_match] if args.key?(:invert_match) @prefix_match = args[:prefix_match] if args.key?(:prefix_match) @present_match = args[:present_match] if args.key?(:present_match) @range_match = args[:range_match] if args.key?(:range_match) @regex_match = args[:regex_match] if args.key?(:regex_match) @suffix_match = args[:suffix_match] if args.key?(:suffix_match) end |