Class: AWSCDK::ElasticLoadBalancing::LoadBalancerListener
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ElasticLoadBalancing::LoadBalancerListener
- Defined in:
- elastic_load_balancing/load_balancer_listener.rb
Overview
Add a backend to the load balancer.
Instance Attribute Summary collapse
-
#allow_connections_from ⇒ Array<AWSCDK::EC2::IConnectable>?
readonly
Allow connections to the load balancer from the given set of connection peers.
-
#external_port ⇒ Numeric
readonly
External listening port.
-
#external_protocol ⇒ AWSCDK::ElasticLoadBalancing::LoadBalancingProtocol?
readonly
What public protocol to use for load balancing.
-
#internal_port ⇒ Numeric?
readonly
Instance listening port.
-
#internal_protocol ⇒ AWSCDK::ElasticLoadBalancing::LoadBalancingProtocol?
readonly
What public protocol to use for load balancing.
-
#policy_names ⇒ Array<String>?
readonly
SSL policy names.
-
#ssl_certificate_arn ⇒ String?
readonly
the ARN of the SSL certificate.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(external_port:, allow_connections_from: nil, external_protocol: nil, internal_port: nil, internal_protocol: nil, policy_names: nil, ssl_certificate_arn: nil) ⇒ LoadBalancerListener
constructor
A new instance of LoadBalancerListener.
- #to_jsii ⇒ Object
Constructor Details
#initialize(external_port:, allow_connections_from: nil, external_protocol: nil, internal_port: nil, internal_protocol: nil, policy_names: nil, ssl_certificate_arn: nil) ⇒ LoadBalancerListener
Returns a new instance of LoadBalancerListener.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'elastic_load_balancing/load_balancer_listener.rb', line 14 def initialize(external_port:, allow_connections_from: nil, external_protocol: nil, internal_port: nil, internal_protocol: nil, policy_names: nil, ssl_certificate_arn: nil) @external_port = external_port Jsii::Type.check_type(@external_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "externalPort") @allow_connections_from = allow_connections_from Jsii::Type.check_type(@allow_connections_from, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuSUNvbm5lY3RhYmxlIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "allowConnectionsFrom") unless @allow_connections_from.nil? @external_protocol = external_protocol Jsii::Type.check_type(@external_protocol, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmcuTG9hZEJhbGFuY2luZ1Byb3RvY29sIn0=")), "externalProtocol") unless @external_protocol.nil? @internal_port = internal_port Jsii::Type.check_type(@internal_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "internalPort") unless @internal_port.nil? @internal_protocol = internal_protocol Jsii::Type.check_type(@internal_protocol, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmcuTG9hZEJhbGFuY2luZ1Byb3RvY29sIn0=")), "internalProtocol") unless @internal_protocol.nil? @policy_names = policy_names Jsii::Type.check_type(@policy_names, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "policyNames") unless @policy_names.nil? @ssl_certificate_arn = ssl_certificate_arn Jsii::Type.check_type(@ssl_certificate_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sslCertificateArn") unless @ssl_certificate_arn.nil? end |
Instance Attribute Details
#allow_connections_from ⇒ Array<AWSCDK::EC2::IConnectable>? (readonly)
Default: Anywhere
Allow connections to the load balancer from the given set of connection peers.
By default, connections will be allowed from anywhere. Set this to an empty list to deny connections, or supply a custom list of peers to allow connections from (IP ranges or security groups).
43 44 45 |
# File 'elastic_load_balancing/load_balancer_listener.rb', line 43 def allow_connections_from @allow_connections_from end |
#external_port ⇒ Numeric (readonly)
External listening port.
34 35 36 |
# File 'elastic_load_balancing/load_balancer_listener.rb', line 34 def external_port @external_port end |
#external_protocol ⇒ AWSCDK::ElasticLoadBalancing::LoadBalancingProtocol? (readonly)
What public protocol to use for load balancing.
Either 'tcp', 'ssl', 'http' or 'https'.
May be omitted if the external port is either 80 or 443.
51 52 53 |
# File 'elastic_load_balancing/load_balancer_listener.rb', line 51 def external_protocol @external_protocol end |
#internal_port ⇒ Numeric? (readonly)
Default: externalPort
Instance listening port.
Same as the externalPort if not specified.
58 59 60 |
# File 'elastic_load_balancing/load_balancer_listener.rb', line 58 def internal_port @internal_port end |
#internal_protocol ⇒ AWSCDK::ElasticLoadBalancing::LoadBalancingProtocol? (readonly)
What public protocol to use for load balancing.
Either 'tcp', 'ssl', 'http' or 'https'.
May be omitted if the internal port is either 80 or 443.
The instance protocol is 'tcp' if the front-end protocol is 'tcp' or 'ssl', the instance protocol is 'http' if the front-end protocol is 'https'.
70 71 72 |
# File 'elastic_load_balancing/load_balancer_listener.rb', line 70 def internal_protocol @internal_protocol end |
#policy_names ⇒ Array<String>? (readonly)
SSL policy names.
74 75 76 |
# File 'elastic_load_balancing/load_balancer_listener.rb', line 74 def policy_names @policy_names end |
#ssl_certificate_arn ⇒ String? (readonly)
Default: - none
the ARN of the SSL certificate.
79 80 81 |
# File 'elastic_load_balancing/load_balancer_listener.rb', line 79 def ssl_certificate_arn @ssl_certificate_arn end |
Class Method Details
.jsii_properties ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 |
# File 'elastic_load_balancing/load_balancer_listener.rb', line 81 def self.jsii_properties { :external_port => "externalPort", :allow_connections_from => "allowConnectionsFrom", :external_protocol => "externalProtocol", :internal_port => "internalPort", :internal_protocol => "internalProtocol", :policy_names => "policyNames", :ssl_certificate_arn => "sslCertificateArn", } end |
Instance Method Details
#to_jsii ⇒ Object
93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'elastic_load_balancing/load_balancer_listener.rb', line 93 def to_jsii result = {} result.merge!({ "externalPort" => @external_port, "allowConnectionsFrom" => @allow_connections_from, "externalProtocol" => @external_protocol, "internalPort" => @internal_port, "internalProtocol" => @internal_protocol, "policyNames" => @policy_names, "sslCertificateArn" => @ssl_certificate_arn, }) result.compact end |