Class: AWSCDK::RTBFabric::CfnLinkRoutingRule::RuleConditionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
rtb_fabric/cfn_link_routing_rule.rb

Overview

Conditions for a routing rule.

All non-null fields must match (AND logic). At least one field must be set. HostHeader and HostHeaderWildcard are mutually exclusive. PathPrefix and PathExact are mutually exclusive.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host_header: nil, host_header_wildcard: nil, path_exact: nil, path_prefix: nil, query_string_equals: nil, query_string_exists: nil) ⇒ RuleConditionProperty

Returns a new instance of RuleConditionProperty.

Parameters:

  • host_header (String, nil) (defaults to: nil)

    Exact host match — RFC 3986 unreserved characters.

  • host_header_wildcard (String, nil) (defaults to: nil)

    Wildcard host pattern (e.g., *.example.com) — RFC 3986 unreserved characters plus *. Mutually exclusive with HostHeader.

  • path_exact (String, nil) (defaults to: nil)

    Exact path match — must start with /.

  • path_prefix (String, nil) (defaults to: nil)

    Path prefix matching — strict starts-with, must start with /.

  • query_string_equals (AWSCDK::IResolvable, AWSCDK::RTBFabric::CfnLinkRoutingRule::QueryStringKeyValuePairProperty, nil) (defaults to: nil)
  • query_string_exists (String, nil) (defaults to: nil)

    Query string key presence check (any value accepted).



636
637
638
639
640
641
642
643
644
645
646
647
648
649
# File 'rtb_fabric/cfn_link_routing_rule.rb', line 636

def initialize(host_header: nil, host_header_wildcard: nil, path_exact: nil, path_prefix: nil, query_string_equals: nil, query_string_exists: nil)
  @host_header = host_header
  Jsii::Type.check_type(@host_header, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "hostHeader") unless @host_header.nil?
  @host_header_wildcard = host_header_wildcard
  Jsii::Type.check_type(@host_header_wildcard, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "hostHeaderWildcard") unless @host_header_wildcard.nil?
  @path_exact = path_exact
  Jsii::Type.check_type(@path_exact, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pathExact") unless @path_exact.nil?
  @path_prefix = path_prefix
  Jsii::Type.check_type(@path_prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pathPrefix") unless @path_prefix.nil?
  @query_string_equals = query_string_equals.is_a?(Hash) ? ::AWSCDK::RTBFabric::CfnLinkRoutingRule::QueryStringKeyValuePairProperty.new(**query_string_equals.transform_keys(&:to_sym)) : query_string_equals
  Jsii::Type.check_type(@query_string_equals, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ydGJmYWJyaWMuQ2ZuTGlua1JvdXRpbmdSdWxlLlF1ZXJ5U3RyaW5nS2V5VmFsdWVQYWlyUHJvcGVydHkifV19fQ==")), "queryStringEquals") unless @query_string_equals.nil?
  @query_string_exists = query_string_exists
  Jsii::Type.check_type(@query_string_exists, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "queryStringExists") unless @query_string_exists.nil?
end

Instance Attribute Details

#host_headerString? (readonly)

Exact host match — RFC 3986 unreserved characters.

Mutually exclusive with HostHeaderWildcard.



657
658
659
# File 'rtb_fabric/cfn_link_routing_rule.rb', line 657

def host_header
  @host_header
end

#host_header_wildcardString? (readonly)

Wildcard host pattern (e.g., *.example.com) — RFC 3986 unreserved characters plus *. Mutually exclusive with HostHeader.



662
663
664
# File 'rtb_fabric/cfn_link_routing_rule.rb', line 662

def host_header_wildcard
  @host_header_wildcard
end

#path_exactString? (readonly)

Exact path match — must start with /.

Mutually exclusive with PathPrefix.



669
670
671
# File 'rtb_fabric/cfn_link_routing_rule.rb', line 669

def path_exact
  @path_exact
end

#path_prefixString? (readonly)

Path prefix matching — strict starts-with, must start with /.

Mutually exclusive with PathExact.



676
677
678
# File 'rtb_fabric/cfn_link_routing_rule.rb', line 676

def path_prefix
  @path_prefix
end

#query_string_existsString? (readonly)

Query string key presence check (any value accepted).



684
685
686
# File 'rtb_fabric/cfn_link_routing_rule.rb', line 684

def query_string_exists
  @query_string_exists
end

Class Method Details

.jsii_propertiesObject



686
687
688
689
690
691
692
693
694
695
# File 'rtb_fabric/cfn_link_routing_rule.rb', line 686

def self.jsii_properties
  {
    :host_header => "hostHeader",
    :host_header_wildcard => "hostHeaderWildcard",
    :path_exact => "pathExact",
    :path_prefix => "pathPrefix",
    :query_string_equals => "queryStringEquals",
    :query_string_exists => "queryStringExists",
  }
end

Instance Method Details

#to_jsiiObject



697
698
699
700
701
702
703
704
705
706
707
708
# File 'rtb_fabric/cfn_link_routing_rule.rb', line 697

def to_jsii
  result = {}
  result.merge!({
    "hostHeader" => @host_header,
    "hostHeaderWildcard" => @host_header_wildcard,
    "pathExact" => @path_exact,
    "pathPrefix" => @path_prefix,
    "queryStringEquals" => @query_string_equals,
    "queryStringExists" => @query_string_exists,
  })
  result.compact
end