Class: Google::Apis::ComputeAlpha::HttpHeaderMatch
- Inherits:
-
Object
- Object
- Google::Apis::ComputeAlpha::HttpHeaderMatch
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/compute_alpha/classes.rb,
lib/google/apis/compute_alpha/representations.rb,
lib/google/apis/compute_alpha/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::ComputeAlpha::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.
Constructor Details
#initialize(**args) ⇒ HttpHeaderMatch
Returns a new instance of HttpHeaderMatch.
11833 11834 11835 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 11833 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
11764 11765 11766 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 11764 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 target gRPC proxy that has 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`
11779 11780 11781 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 11779 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
11787 11788 11789 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 11787 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
11795 11796 11797 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 11795 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
11803 11804 11805 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 11803 def present_match @present_match end |
#range_match ⇒ Google::Apis::ComputeAlpha::Int64RangeMatch
HttpRouteRuleMatch criteria for field values that must stay within the
specified integer range.
Corresponds to the JSON property rangeMatch
11810 11811 11812 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 11810 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: github.com/google/re2/
wiki/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.
Note that regexMatch only applies to Loadbalancers that have their
loadBalancingScheme set to INTERNAL_SELF_MANAGED.
Corresponds to the JSON property regexMatch
11824 11825 11826 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 11824 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
11831 11832 11833 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 11831 def suffix_match @suffix_match end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
11838 11839 11840 11841 11842 11843 11844 11845 11846 11847 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 11838 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 |