Class: Google::Apis::ComputeAlpha::HttpHeaderMatch

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ HttpHeaderMatch

Returns a new instance of HttpHeaderMatch.



12780
12781
12782
# File 'lib/google/apis/compute_alpha/classes.rb', line 12780

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#exact_matchString

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

Returns:

  • (String)


12716
12717
12718
# File 'lib/google/apis/compute_alpha/classes.rb', line 12716

def exact_match
  @exact_match
end

#header_nameString

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

Returns:

  • (String)


12730
12731
12732
# File 'lib/google/apis/compute_alpha/classes.rb', line 12730

def header_name
  @header_name
end

#invert_matchBoolean 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

Returns:

  • (Boolean)


12737
12738
12739
# File 'lib/google/apis/compute_alpha/classes.rb', line 12737

def invert_match
  @invert_match
end

#prefix_matchString

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

Returns:

  • (String)


12745
12746
12747
# File 'lib/google/apis/compute_alpha/classes.rb', line 12745

def prefix_match
  @prefix_match
end

#present_matchBoolean 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

Returns:

  • (Boolean)


12752
12753
12754
# File 'lib/google/apis/compute_alpha/classes.rb', line 12752

def present_match
  @present_match
end

#range_matchGoogle::Apis::ComputeAlpha::Int64RangeMatch

HttpRouteRuleMatch criteria for field values that must stay within the specified integer range. Corresponds to the JSON property rangeMatch



12759
12760
12761
# File 'lib/google/apis/compute_alpha/classes.rb', line 12759

def range_match
  @range_match
end

#regex_matchString

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. regexMatch only applies to load balancers that have loadBalancingScheme set to INTERNAL_SELF_MANAGED. Corresponds to the JSON property regexMatch

Returns:

  • (String)


12771
12772
12773
# File 'lib/google/apis/compute_alpha/classes.rb', line 12771

def regex_match
  @regex_match
end

#suffix_matchString

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

Returns:

  • (String)


12778
12779
12780
# File 'lib/google/apis/compute_alpha/classes.rb', line 12778

def suffix_match
  @suffix_match
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
# File 'lib/google/apis/compute_alpha/classes.rb', line 12785

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