Class: AWSCDK::ElasticLoadBalancing::CfnLoadBalancer::ListenersProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ElasticLoadBalancing::CfnLoadBalancer::ListenersProperty
- Defined in:
- elastic_load_balancing/cfn_load_balancer.rb
Overview
Specifies a listener for your Classic Load Balancer.
Modifying any property replaces the listener.
Instance Attribute Summary collapse
-
#instance_port ⇒ String
readonly
The port on which the instance is listening.
-
#instance_protocol ⇒ String?
readonly
The protocol to use for routing traffic to instances: HTTP, HTTPS, TCP, or SSL.
-
#load_balancer_port ⇒ String
readonly
The port on which the load balancer is listening.
-
#policy_names ⇒ Array<String>?
readonly
The names of the policies to associate with the listener.
-
#protocol ⇒ String
readonly
The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, or SSL.
-
#ssl_certificate_id ⇒ String?
readonly
The Amazon Resource Name (ARN) of the server certificate.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(instance_port:, load_balancer_port:, protocol:, instance_protocol: nil, policy_names: nil, ssl_certificate_id: nil) ⇒ ListenersProperty
constructor
A new instance of ListenersProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(instance_port:, load_balancer_port:, protocol:, instance_protocol: nil, policy_names: nil, ssl_certificate_id: nil) ⇒ ListenersProperty
Returns a new instance of ListenersProperty.
1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 |
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1108 def initialize(instance_port:, load_balancer_port:, protocol:, instance_protocol: nil, policy_names: nil, ssl_certificate_id: nil) @instance_port = instance_port Jsii::Type.check_type(@instance_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instancePort") @load_balancer_port = load_balancer_port Jsii::Type.check_type(@load_balancer_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "loadBalancerPort") @protocol = protocol Jsii::Type.check_type(@protocol, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "protocol") @instance_protocol = instance_protocol Jsii::Type.check_type(@instance_protocol, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceProtocol") unless @instance_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_id = ssl_certificate_id Jsii::Type.check_type(@ssl_certificate_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sslCertificateId") unless @ssl_certificate_id.nil? end |
Instance Attribute Details
#instance_port ⇒ String (readonly)
The port on which the instance is listening.
1127 1128 1129 |
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1127 def instance_port @instance_port end |
#instance_protocol ⇒ String? (readonly)
The protocol to use for routing traffic to instances: HTTP, HTTPS, TCP, or SSL.
If the front-end protocol is TCP or SSL, the back-end protocol must be TCP or SSL. If the front-end protocol is HTTP or HTTPS, the back-end protocol must be HTTP or HTTPS.
If there is another listener with the same InstancePort whose InstanceProtocol is secure, (HTTPS or SSL), the listener's InstanceProtocol must also be secure.
If there is another listener with the same InstancePort whose InstanceProtocol is HTTP or TCP, the listener's InstanceProtocol must be HTTP or TCP.
1150 1151 1152 |
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1150 def instance_protocol @instance_protocol end |
#load_balancer_port ⇒ String (readonly)
The port on which the load balancer is listening.
On EC2-VPC, you can specify any port from the range 1-65535. On EC2-Classic, you can specify any port from the following list: 25, 80, 443, 465, 587, 1024-65535.
1134 1135 1136 |
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1134 def load_balancer_port @load_balancer_port end |
#policy_names ⇒ Array<String>? (readonly)
The names of the policies to associate with the listener.
1155 1156 1157 |
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1155 def policy_names @policy_names end |
#protocol ⇒ String (readonly)
The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, or SSL.
1139 1140 1141 |
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1139 def protocol @protocol end |
#ssl_certificate_id ⇒ String? (readonly)
The Amazon Resource Name (ARN) of the server certificate.
1160 1161 1162 |
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1160 def ssl_certificate_id @ssl_certificate_id end |
Class Method Details
.jsii_properties ⇒ Object
1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 |
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1162 def self.jsii_properties { :instance_port => "instancePort", :load_balancer_port => "loadBalancerPort", :protocol => "protocol", :instance_protocol => "instanceProtocol", :policy_names => "policyNames", :ssl_certificate_id => "sslCertificateId", } end |
Instance Method Details
#to_jsii ⇒ Object
1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 |
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1173 def to_jsii result = {} result.merge!({ "instancePort" => @instance_port, "loadBalancerPort" => @load_balancer_port, "protocol" => @protocol, "instanceProtocol" => @instance_protocol, "policyNames" => @policy_names, "sslCertificateId" => @ssl_certificate_id, }) result.compact end |