Class: AWSCDK::ECSPatterns::ApplicationListenerProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECSPatterns::ApplicationListenerProps
- Defined in:
- ecs_patterns/application_listener_props.rb
Overview
Properties to define an application listener.
Instance Attribute Summary collapse
-
#certificate ⇒ AWSCDK::CertificateManager::ICertificate?
readonly
Certificate Manager certificate to associate with the load balancer.
-
#name ⇒ String
readonly
Name of the listener.
-
#port ⇒ Numeric?
readonly
The port on which the listener listens for requests.
-
#protocol ⇒ AWSCDK::ElasticLoadBalancingv2::ApplicationProtocol?
readonly
The protocol for connections from clients to the load balancer.
-
#ssl_policy ⇒ AWSCDK::ElasticLoadBalancingv2::SSLPolicy?
readonly
The security policy that defines which ciphers and protocols are supported by the ALB Listener.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, certificate: nil, port: nil, protocol: nil, ssl_policy: nil) ⇒ ApplicationListenerProps
constructor
A new instance of ApplicationListenerProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(name:, certificate: nil, port: nil, protocol: nil, ssl_policy: nil) ⇒ ApplicationListenerProps
Returns a new instance of ApplicationListenerProps.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'ecs_patterns/application_listener_props.rb', line 12 def initialize(name:, certificate: nil, port: nil, protocol: nil, ssl_policy: nil) @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") @certificate = certificate Jsii::Type.check_type(@certificate, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2VydGlmaWNhdGVtYW5hZ2VyLklDZXJ0aWZpY2F0ZSJ9")), "certificate") unless @certificate.nil? @port = port Jsii::Type.check_type(@port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "port") unless @port.nil? @protocol = protocol Jsii::Type.check_type(@protocol, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5BcHBsaWNhdGlvblByb3RvY29sIn0=")), "protocol") unless @protocol.nil? @ssl_policy = ssl_policy Jsii::Type.check_type(@ssl_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5Tc2xQb2xpY3kifQ==")), "sslPolicy") unless @ssl_policy.nil? end |
Instance Attribute Details
#certificate ⇒ AWSCDK::CertificateManager::ICertificate? (readonly)
Default: - No certificate associated with the load balancer, if using the HTTP protocol. For HTTPS, a DNS-validated certificate will be created for the load balancer's specified domain name.
Certificate Manager certificate to associate with the load balancer.
Setting this option will set the load balancer protocol to HTTPS.
35 36 37 |
# File 'ecs_patterns/application_listener_props.rb', line 35 def certificate @certificate end |
#name ⇒ String (readonly)
Name of the listener.
28 29 30 |
# File 'ecs_patterns/application_listener_props.rb', line 28 def name @name end |
#port ⇒ Numeric? (readonly)
Default: - Determined from protocol if known.
The port on which the listener listens for requests.
40 41 42 |
# File 'ecs_patterns/application_listener_props.rb', line 40 def port @port end |
#protocol ⇒ AWSCDK::ElasticLoadBalancingv2::ApplicationProtocol? (readonly)
Default: ApplicationProtocol.HTTP. If a certificate is specified, the protocol will be set by default to ApplicationProtocol.HTTPS.
The protocol for connections from clients to the load balancer.
The load balancer port is determined from the protocol (port 80 for HTTP, port 443 for HTTPS). A domain name and zone must be also be specified if using HTTPS.
49 50 51 |
# File 'ecs_patterns/application_listener_props.rb', line 49 def protocol @protocol end |
#ssl_policy ⇒ AWSCDK::ElasticLoadBalancingv2::SSLPolicy? (readonly)
Default: - The recommended elastic load balancing security policy
The security policy that defines which ciphers and protocols are supported by the ALB Listener.
54 55 56 |
# File 'ecs_patterns/application_listener_props.rb', line 54 def ssl_policy @ssl_policy end |
Class Method Details
.jsii_properties ⇒ Object
56 57 58 59 60 61 62 63 64 |
# File 'ecs_patterns/application_listener_props.rb', line 56 def self.jsii_properties { :name => "name", :certificate => "certificate", :port => "port", :protocol => "protocol", :ssl_policy => "sslPolicy", } end |
Instance Method Details
#to_jsii ⇒ Object
66 67 68 69 70 71 72 73 74 75 76 |
# File 'ecs_patterns/application_listener_props.rb', line 66 def to_jsii result = {} result.merge!({ "name" => @name, "certificate" => @certificate, "port" => @port, "protocol" => @protocol, "sslPolicy" => @ssl_policy, }) result.compact end |