Class: AWSCDK::RTBFabric::CfnLinkRoutingRule::RuleConditionProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::RTBFabric::CfnLinkRoutingRule::RuleConditionProperty
- 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
-
#host_header ⇒ String?
readonly
Exact host match — RFC 3986 unreserved characters.
-
#host_header_wildcard ⇒ String?
readonly
Wildcard host pattern (e.g., *.example.com) — RFC 3986 unreserved characters plus *.
-
#path_exact ⇒ String?
readonly
Exact path match — must start with /.
-
#path_prefix ⇒ String?
readonly
Path prefix matching — strict starts-with, must start with /.
- #query_string_equals ⇒ AWSCDK::IResolvable, ... readonly
-
#query_string_exists ⇒ String?
readonly
Query string key presence check (any value accepted).
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(host_header: nil, host_header_wildcard: nil, path_exact: nil, path_prefix: nil, query_string_equals: nil, query_string_exists: nil) ⇒ RuleConditionProperty
constructor
A new instance of RuleConditionProperty.
- #to_jsii ⇒ Object
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.
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_header ⇒ String? (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_wildcard ⇒ String? (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_exact ⇒ String? (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_prefix ⇒ String? (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_equals ⇒ AWSCDK::IResolvable, ... (readonly)
679 680 681 |
# File 'rtb_fabric/cfn_link_routing_rule.rb', line 679 def query_string_equals @query_string_equals end |
#query_string_exists ⇒ String? (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_properties ⇒ Object
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_jsii ⇒ Object
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 |