Class: AWSCDK::APIGatewayv2::CfnRoutingRule::ConditionProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGatewayv2::CfnRoutingRule::ConditionProperty
- Defined in:
- api_gatewayv2/cfn_routing_rule.rb
Overview
Represents a condition.
Conditions can contain up to two match_headers conditions and one match_base_paths conditions. API Gateway evaluates header conditions and base path conditions together. You can only use AND between header and base path conditions.
Instance Attribute Summary collapse
-
#match_base_paths ⇒ AWSCDK::IResolvable, ...
readonly
The base path to be matched.
-
#match_headers ⇒ AWSCDK::IResolvable, ...
readonly
The headers to be matched.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(match_base_paths: nil, match_headers: nil) ⇒ ConditionProperty
constructor
A new instance of ConditionProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(match_base_paths: nil, match_headers: nil) ⇒ ConditionProperty
Returns a new instance of ConditionProperty.
649 650 651 652 653 654 |
# File 'api_gatewayv2/cfn_routing_rule.rb', line 649 def initialize(match_base_paths: nil, match_headers: nil) @match_base_paths = match_base_paths.is_a?(Hash) ? ::AWSCDK::APIGatewayv2::CfnRoutingRule::MatchBasePathsProperty.new(**match_base_paths.transform_keys(&:to_sym)) : match_base_paths Jsii::Type.check_type(@match_base_paths, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcGlnYXRld2F5djIuQ2ZuUm91dGluZ1J1bGUuTWF0Y2hCYXNlUGF0aHNQcm9wZXJ0eSJ9XX19")), "matchBasePaths") unless @match_base_paths.nil? @match_headers = match_headers.is_a?(Hash) ? ::AWSCDK::APIGatewayv2::CfnRoutingRule::MatchHeadersProperty.new(**match_headers.transform_keys(&:to_sym)) : match_headers Jsii::Type.check_type(@match_headers, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcGlnYXRld2F5djIuQ2ZuUm91dGluZ1J1bGUuTWF0Y2hIZWFkZXJzUHJvcGVydHkifV19fQ==")), "matchHeaders") unless @match_headers.nil? end |
Instance Attribute Details
#match_base_paths ⇒ AWSCDK::IResolvable, ... (readonly)
The base path to be matched.
660 661 662 |
# File 'api_gatewayv2/cfn_routing_rule.rb', line 660 def match_base_paths @match_base_paths end |
#match_headers ⇒ AWSCDK::IResolvable, ... (readonly)
The headers to be matched.
665 666 667 |
# File 'api_gatewayv2/cfn_routing_rule.rb', line 665 def match_headers @match_headers end |
Class Method Details
.jsii_properties ⇒ Object
667 668 669 670 671 672 |
# File 'api_gatewayv2/cfn_routing_rule.rb', line 667 def self.jsii_properties { :match_base_paths => "matchBasePaths", :match_headers => "matchHeaders", } end |
Instance Method Details
#to_jsii ⇒ Object
674 675 676 677 678 679 680 681 |
# File 'api_gatewayv2/cfn_routing_rule.rb', line 674 def to_jsii result = {} result.merge!({ "matchBasePaths" => @match_base_paths, "matchHeaders" => @match_headers, }) result.compact end |