Class: AWSCDK::VPCLattice::CfnRule::HeaderMatchProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
vpc_lattice/cfn_rule.rb

Overview

Describes the constraints for a header match.

Matches incoming requests with rule based on request header value before applying rule action.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(match:, name:, case_sensitive: nil) ⇒ HeaderMatchProperty

Returns a new instance of HeaderMatchProperty.

Parameters:



732
733
734
735
736
737
738
739
# File 'vpc_lattice/cfn_rule.rb', line 732

def initialize(match:, name:, case_sensitive: nil)
  @match = match.is_a?(Hash) ? ::AWSCDK::VPCLattice::CfnRule::HeaderMatchTypeProperty.new(**match.transform_keys(&:to_sym)) : match
  Jsii::Type.check_type(@match, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c192cGNsYXR0aWNlLkNmblJ1bGUuSGVhZGVyTWF0Y2hUeXBlUHJvcGVydHkifV19fQ==")), "match")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @case_sensitive = case_sensitive
  Jsii::Type.check_type(@case_sensitive, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "caseSensitive") unless @case_sensitive.nil?
end

Instance Attribute Details

#case_sensitiveBoolean, ... (readonly)

Note:

Default: - false

Indicates whether the match is case sensitive.



756
757
758
# File 'vpc_lattice/cfn_rule.rb', line 756

def case_sensitive
  @case_sensitive
end

#nameString (readonly)

The name of the header.



750
751
752
# File 'vpc_lattice/cfn_rule.rb', line 750

def name
  @name
end

Class Method Details

.jsii_propertiesObject



758
759
760
761
762
763
764
# File 'vpc_lattice/cfn_rule.rb', line 758

def self.jsii_properties
  {
    :match => "match",
    :name => "name",
    :case_sensitive => "caseSensitive",
  }
end

Instance Method Details

#to_jsiiObject



766
767
768
769
770
771
772
773
774
# File 'vpc_lattice/cfn_rule.rb', line 766

def to_jsii
  result = {}
  result.merge!({
    "match" => @match,
    "name" => @name,
    "caseSensitive" => @case_sensitive,
  })
  result.compact
end