Class: AWSCDK::ElasticLoadBalancingv2::BaseNetworkListenerProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
elastic_load_balancingv2/base_network_listener_props.rb

Overview

Basic properties for a Network Listener.

Direct Known Subclasses

NetworkListenerProps

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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) ⇒ BaseNetworkListenerProps

Returns a new instance of BaseNetworkListenerProps.

Parameters:



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'elastic_load_balancingv2/base_network_listener_props.rb', line 15

def initialize(port:, alpn_policy: nil, certificates: nil, default_action: nil, default_target_groups: nil, protocol: nil, ssl_policy: nil, tcp_idle_timeout: nil)
  @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?
end

Instance Attribute Details

#alpn_policyAWSCDK::ElasticLoadBalancingv2::AlpnPolicy? (readonly)

Note:

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.



46
47
48
# File 'elastic_load_balancingv2/base_network_listener_props.rb', line 46

def alpn_policy
  @alpn_policy
end

#certificatesArray<AWSCDK::ElasticLoadBalancingv2::IListenerCertificate>? (readonly)

Note:

Default: - No certificates.

Certificate list of ACM cert ARNs.

You must provide exactly one certificate if the listener protocol is HTTPS or TLS.



53
54
55
# File 'elastic_load_balancingv2/base_network_listener_props.rb', line 53

def certificates
  @certificates
end

#default_actionAWSCDK::ElasticLoadBalancingv2::NetworkListenerAction? (readonly)

Note:

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.



64
65
66
# File 'elastic_load_balancingv2/base_network_listener_props.rb', line 64

def default_action
  @default_action
end

#default_target_groupsArray<AWSCDK::ElasticLoadBalancingv2::INetworkTargetGroup>? (readonly)

Note:

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.



75
76
77
# File 'elastic_load_balancingv2/base_network_listener_props.rb', line 75

def default_target_groups
  @default_target_groups
end

#portNumeric (readonly)

The port on which the listener listens for requests.

Returns:

  • (Numeric)


37
38
39
# File 'elastic_load_balancingv2/base_network_listener_props.rb', line 37

def port
  @port
end

#protocolAWSCDK::ElasticLoadBalancingv2::Protocol? (readonly)

Note:

Default: - TLS if certificates are provided. TCP otherwise.

Protocol for listener, expects TCP, TLS, UDP, or TCP_UDP.



80
81
82
# File 'elastic_load_balancingv2/base_network_listener_props.rb', line 80

def protocol
  @protocol
end

#ssl_policyAWSCDK::ElasticLoadBalancingv2::SSLPolicy? (readonly)

Note:

Default: - Current predefined security policy.

SSL Policy.



85
86
87
# File 'elastic_load_balancingv2/base_network_listener_props.rb', line 85

def ssl_policy
  @ssl_policy
end

#tcp_idle_timeoutAWSCDK::Duration? (readonly)

Note:

Default: Duration.seconds(350)

The load balancer TCP idle timeout.

Returns:



90
91
92
# File 'elastic_load_balancingv2/base_network_listener_props.rb', line 90

def tcp_idle_timeout
  @tcp_idle_timeout
end

Class Method Details

.jsii_propertiesObject



92
93
94
95
96
97
98
99
100
101
102
103
# File 'elastic_load_balancingv2/base_network_listener_props.rb', line 92

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",
  }
end

Instance Method Details

#to_jsiiObject



105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'elastic_load_balancingv2/base_network_listener_props.rb', line 105

def to_jsii
  result = {}
  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,
  })
  result.compact
end