Class: AWSCDK::ElasticLoadBalancingv2::ApplicationListenerRuleProps
- Inherits:
-
BaseApplicationListenerRuleProps
- Object
- BaseApplicationListenerRuleProps
- AWSCDK::ElasticLoadBalancingv2::ApplicationListenerRuleProps
- Defined in:
- elastic_load_balancingv2/application_listener_rule_props.rb
Overview
Properties for defining a listener rule.
Instance Attribute Summary collapse
-
#action ⇒ AWSCDK::ElasticLoadBalancingv2::ListenerAction?
readonly
Action to perform when requests are received.
-
#conditions ⇒ Array<AWSCDK::ElasticLoadBalancingv2::ListenerCondition>?
readonly
Rule applies if matches the conditions.
-
#listener ⇒ AWSCDK::ElasticLoadBalancingv2::IApplicationListener
readonly
The listener to attach the rule to.
-
#priority ⇒ Numeric
readonly
Priority of the rule.
-
#target_groups ⇒ Array<AWSCDK::ElasticLoadBalancingv2::IApplicationTargetGroup>?
readonly
Target groups to forward requests to.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(priority:, action: nil, conditions: nil, target_groups: nil, listener:) ⇒ ApplicationListenerRuleProps
constructor
A new instance of ApplicationListenerRuleProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(priority:, action: nil, conditions: nil, target_groups: nil, listener:) ⇒ ApplicationListenerRuleProps
Returns a new instance of ApplicationListenerRuleProps.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'elastic_load_balancingv2/application_listener_rule_props.rb', line 12 def initialize(priority:, action: nil, conditions: nil, target_groups: nil, listener:) @priority = priority Jsii::Type.check_type(@priority, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "priority") @action = action Jsii::Type.check_type(@action, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5MaXN0ZW5lckFjdGlvbiJ9")), "action") unless @action.nil? @conditions = conditions Jsii::Type.check_type(@conditions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lbGFzdGljbG9hZGJhbGFuY2luZ3YyLkxpc3RlbmVyQ29uZGl0aW9uIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "conditions") unless @conditions.nil? @target_groups = target_groups Jsii::Type.check_type(@target_groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lbGFzdGljbG9hZGJhbGFuY2luZ3YyLklBcHBsaWNhdGlvblRhcmdldEdyb3VwIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "targetGroups") unless @target_groups.nil? @listener = listener Jsii::Type.check_type(@listener, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5JQXBwbGljYXRpb25MaXN0ZW5lciJ9")), "listener") end |
Instance Attribute Details
#action ⇒ AWSCDK::ElasticLoadBalancingv2::ListenerAction? (readonly)
Default: - No action
Action to perform when requests are received.
Only one of action, fixed_response, redirect_response or target_groups can be specified.
39 40 41 |
# File 'elastic_load_balancingv2/application_listener_rule_props.rb', line 39 def action @action end |
#conditions ⇒ Array<AWSCDK::ElasticLoadBalancingv2::ListenerCondition>? (readonly)
Default: - No conditions.
Rule applies if matches the conditions.
45 46 47 |
# File 'elastic_load_balancingv2/application_listener_rule_props.rb', line 45 def conditions @conditions end |
#listener ⇒ AWSCDK::ElasticLoadBalancingv2::IApplicationListener (readonly)
The listener to attach the rule to.
58 59 60 |
# File 'elastic_load_balancingv2/application_listener_rule_props.rb', line 58 def listener @listener end |
#priority ⇒ Numeric (readonly)
Priority of the rule.
The rule with the lowest priority will be used for every request.
Priorities must be unique.
32 33 34 |
# File 'elastic_load_balancingv2/application_listener_rule_props.rb', line 32 def priority @priority end |
#target_groups ⇒ Array<AWSCDK::ElasticLoadBalancingv2::IApplicationTargetGroup>? (readonly)
Default: - No target groups.
Target groups to forward requests to.
Only one of action, fixed_response, redirect_response or target_groups can be specified.
Implies a forward action.
54 55 56 |
# File 'elastic_load_balancingv2/application_listener_rule_props.rb', line 54 def target_groups @target_groups end |
Class Method Details
.jsii_properties ⇒ Object
60 61 62 63 64 65 66 67 68 |
# File 'elastic_load_balancingv2/application_listener_rule_props.rb', line 60 def self.jsii_properties { :priority => "priority", :action => "action", :conditions => "conditions", :target_groups => "targetGroups", :listener => "listener", } end |
Instance Method Details
#to_jsii ⇒ Object
70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'elastic_load_balancingv2/application_listener_rule_props.rb', line 70 def to_jsii result = {} result.merge!(super) result.merge!({ "priority" => @priority, "action" => @action, "conditions" => @conditions, "targetGroups" => @target_groups, "listener" => @listener, }) result.compact end |