Class: Google::Apis::ComputeV1::HttpHeaderMatch
- Inherits:
-
Object
- Object
- Google::Apis::ComputeV1::HttpHeaderMatch
- Defined in:
- generated/google/apis/compute_v1/classes.rb,
generated/google/apis/compute_v1/representations.rb,
generated/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 match criteria above are met.
-
#prefix_match ⇒ String
The value of the header must start with the contents of prefixMatch.
-
#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 in regexMatch.
-
#suffix_match ⇒ String
The value of the header must end with the contents of suffixMatch.
Instance Method Summary collapse
-
#initialize(**args) ⇒ HttpHeaderMatch
constructor
A new instance of HttpHeaderMatch.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ HttpHeaderMatch
Returns a new instance of HttpHeaderMatch.
8270 8271 8272 |
# File 'generated/google/apis/compute_v1/classes.rb', line 8270 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
8208 8209 8210 |
# File 'generated/google/apis/compute_v1/classes.rb', line 8208 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".
Corresponds to the JSON property headerName
8216 8217 8218 |
# File 'generated/google/apis/compute_v1/classes.rb', line 8216 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 match criteria
above are met. If set to true, the headerMatch is considered a match if the
match criteria above are NOT met.
The default setting is false.
Corresponds to the JSON property invertMatch
8224 8225 8226 |
# File 'generated/google/apis/compute_v1/classes.rb', line 8224 def invert_match @invert_match end |
#prefix_match ⇒ String
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.
Corresponds to the JSON property prefixMatch
8232 8233 8234 |
# File 'generated/google/apis/compute_v1/classes.rb', line 8232 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
8240 8241 8242 |
# File 'generated/google/apis/compute_v1/classes.rb', line 8240 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
8247 8248 8249 |
# File 'generated/google/apis/compute_v1/classes.rb', line 8247 def range_match @range_match end |
#regex_match ⇒ String
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 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.
Note that regexMatch only applies to Loadbalancers that have their
loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Corresponds to the JSON property regexMatch
8261 8262 8263 |
# File 'generated/google/apis/compute_v1/classes.rb', line 8261 def regex_match @regex_match end |
#suffix_match ⇒ String
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.
Corresponds to the JSON property suffixMatch
8268 8269 8270 |
# File 'generated/google/apis/compute_v1/classes.rb', line 8268 def suffix_match @suffix_match end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 |
# File 'generated/google/apis/compute_v1/classes.rb', line 8275 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 |