Class: AWSCDK::ElasticLoadBalancingv2::NetworkListenerProps
- Inherits:
-
BaseNetworkListenerProps
- Object
- BaseNetworkListenerProps
- AWSCDK::ElasticLoadBalancingv2::NetworkListenerProps
- Defined in:
- elastic_load_balancingv2/network_listener_props.rb
Overview
Properties for a Network Listener attached to a Load Balancer.
Instance Attribute Summary collapse
-
#alpn_policy ⇒ AWSCDK::ElasticLoadBalancingv2::AlpnPolicy?
readonly
Application-Layer Protocol Negotiation (ALPN) is a TLS extension that is sent on the initial TLS handshake hello messages.
-
#certificates ⇒ Array<AWSCDK::ElasticLoadBalancingv2::IListenerCertificate>?
readonly
Certificate list of ACM cert ARNs.
-
#default_action ⇒ AWSCDK::ElasticLoadBalancingv2::NetworkListenerAction?
readonly
Default action to take for requests to this listener.
-
#default_target_groups ⇒ Array<AWSCDK::ElasticLoadBalancingv2::INetworkTargetGroup>?
readonly
Default target groups to load balance to.
-
#load_balancer ⇒ AWSCDK::ElasticLoadBalancingv2::INetworkLoadBalancer
readonly
The load balancer to attach this listener to.
-
#port ⇒ Numeric
readonly
The port on which the listener listens for requests.
-
#protocol ⇒ AWSCDK::ElasticLoadBalancingv2::Protocol?
readonly
Protocol for listener, expects TCP, TLS, UDP, or TCP_UDP.
-
#ssl_policy ⇒ AWSCDK::ElasticLoadBalancingv2::SSLPolicy?
readonly
SSL Policy.
-
#tcp_idle_timeout ⇒ AWSCDK::Duration?
readonly
The load balancer TCP idle timeout.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(port:, alpn_policy: nil, certificates: nil, default_action: nil, default_target_groups: nil, protocol: nil, ssl_policy: nil, tcp_idle_timeout: nil, load_balancer:) ⇒ NetworkListenerProps
constructor
A new instance of NetworkListenerProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(port:, alpn_policy: nil, certificates: nil, default_action: nil, default_target_groups: nil, protocol: nil, ssl_policy: nil, tcp_idle_timeout: nil, load_balancer:) ⇒ NetworkListenerProps
Returns a new instance of NetworkListenerProps.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'elastic_load_balancingv2/network_listener_props.rb', line 16 def initialize(port:, alpn_policy: nil, certificates: nil, default_action: nil, default_target_groups: nil, protocol: nil, ssl_policy: nil, tcp_idle_timeout: nil, load_balancer:) @port = port Jsii::Type.check_type(@port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "port") @alpn_policy = alpn_policy Jsii::Type.check_type(@alpn_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5BbHBuUG9saWN5In0=")), "alpnPolicy") unless @alpn_policy.nil? @certificates = certificates Jsii::Type.check_type(@certificates, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lbGFzdGljbG9hZGJhbGFuY2luZ3YyLklMaXN0ZW5lckNlcnRpZmljYXRlIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "certificates") unless @certificates.nil? @default_action = default_action Jsii::Type.check_type(@default_action, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5OZXR3b3JrTGlzdGVuZXJBY3Rpb24ifQ==")), "defaultAction") unless @default_action.nil? @default_target_groups = default_target_groups Jsii::Type.check_type(@default_target_groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lbGFzdGljbG9hZGJhbGFuY2luZ3YyLklOZXR3b3JrVGFyZ2V0R3JvdXAifSwia2luZCI6ImFycmF5In19")), "defaultTargetGroups") unless @default_target_groups.nil? @protocol = protocol Jsii::Type.check_type(@protocol, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5Qcm90b2NvbCJ9")), "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? @tcp_idle_timeout = tcp_idle_timeout Jsii::Type.check_type(@tcp_idle_timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "tcpIdleTimeout") unless @tcp_idle_timeout.nil? @load_balancer = load_balancer Jsii::Type.check_type(@load_balancer, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5JTmV0d29ya0xvYWRCYWxhbmNlciJ9")), "loadBalancer") end |
Instance Attribute Details
#alpn_policy ⇒ AWSCDK::ElasticLoadBalancingv2::AlpnPolicy? (readonly)
Default: - None
Application-Layer Protocol Negotiation (ALPN) is a TLS extension that is sent on the initial TLS handshake hello messages.
ALPN enables the application layer to negotiate which protocols should be used over a secure connection, such as HTTP/1 and HTTP/2.
Can only be specified together with Protocol TLS.
49 50 51 |
# File 'elastic_load_balancingv2/network_listener_props.rb', line 49 def alpn_policy @alpn_policy end |
#certificates ⇒ Array<AWSCDK::ElasticLoadBalancingv2::IListenerCertificate>? (readonly)
Default: - No certificates.
Certificate list of ACM cert ARNs.
You must provide exactly one certificate if the listener protocol is HTTPS or TLS.
56 57 58 |
# File 'elastic_load_balancingv2/network_listener_props.rb', line 56 def certificates @certificates end |
#default_action ⇒ AWSCDK::ElasticLoadBalancingv2::NetworkListenerAction? (readonly)
Default: - None.
Default action to take for requests to this listener.
This allows full control of the default Action of the load balancer,
including weighted forwarding. See the NetworkListenerAction class for
all options.
Cannot be specified together with default_target_groups.
67 68 69 |
# File 'elastic_load_balancingv2/network_listener_props.rb', line 67 def default_action @default_action end |
#default_target_groups ⇒ Array<AWSCDK::ElasticLoadBalancingv2::INetworkTargetGroup>? (readonly)
Default: - None.
Default target groups to load balance to.
All target groups will be load balanced to with equal weight and without
stickiness. For a more complex configuration than that, use
either default_action or add_action().
Cannot be specified together with default_action.
78 79 80 |
# File 'elastic_load_balancingv2/network_listener_props.rb', line 78 def default_target_groups @default_target_groups end |
#load_balancer ⇒ AWSCDK::ElasticLoadBalancingv2::INetworkLoadBalancer (readonly)
The load balancer to attach this listener to.
97 98 99 |
# File 'elastic_load_balancingv2/network_listener_props.rb', line 97 def load_balancer @load_balancer end |
#port ⇒ Numeric (readonly)
The port on which the listener listens for requests.
40 41 42 |
# File 'elastic_load_balancingv2/network_listener_props.rb', line 40 def port @port end |
#protocol ⇒ AWSCDK::ElasticLoadBalancingv2::Protocol? (readonly)
Default: - TLS if certificates are provided. TCP otherwise.
Protocol for listener, expects TCP, TLS, UDP, or TCP_UDP.
83 84 85 |
# File 'elastic_load_balancingv2/network_listener_props.rb', line 83 def protocol @protocol end |
#ssl_policy ⇒ AWSCDK::ElasticLoadBalancingv2::SSLPolicy? (readonly)
Default: - Current predefined security policy.
SSL Policy.
88 89 90 |
# File 'elastic_load_balancingv2/network_listener_props.rb', line 88 def ssl_policy @ssl_policy end |
#tcp_idle_timeout ⇒ AWSCDK::Duration? (readonly)
Default: Duration.seconds(350)
The load balancer TCP idle timeout.
93 94 95 |
# File 'elastic_load_balancingv2/network_listener_props.rb', line 93 def tcp_idle_timeout @tcp_idle_timeout end |
Class Method Details
.jsii_properties ⇒ Object
99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'elastic_load_balancingv2/network_listener_props.rb', line 99 def self.jsii_properties { :port => "port", :alpn_policy => "alpnPolicy", :certificates => "certificates", :default_action => "defaultAction", :default_target_groups => "defaultTargetGroups", :protocol => "protocol", :ssl_policy => "sslPolicy", :tcp_idle_timeout => "tcpIdleTimeout", :load_balancer => "loadBalancer", } end |
Instance Method Details
#to_jsii ⇒ Object
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'elastic_load_balancingv2/network_listener_props.rb', line 113 def to_jsii result = {} result.merge!(super) result.merge!({ "port" => @port, "alpnPolicy" => @alpn_policy, "certificates" => @certificates, "defaultAction" => @default_action, "defaultTargetGroups" => @default_target_groups, "protocol" => @protocol, "sslPolicy" => @ssl_policy, "tcpIdleTimeout" => @tcp_idle_timeout, "loadBalancer" => @load_balancer, }) result.compact end |