Class: AWSCDK::ElasticLoadBalancingv2::ApplicationListenerProps

Inherits:
BaseApplicationListenerProps
  • Object
show all
Defined in:
elastic_load_balancingv2/application_listener_props.rb

Overview

Properties for defining a standalone ApplicationListener.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(certificates: nil, default_action: nil, default_target_groups: nil, mutual_authentication: nil, open: nil, port: nil, protocol: nil, ssl_policy: nil, load_balancer:) ⇒ ApplicationListenerProps

Returns a new instance of ApplicationListenerProps.

Parameters:



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

def initialize(certificates: nil, default_action: nil, default_target_groups: nil, mutual_authentication: nil, open: nil, port: nil, protocol: nil, ssl_policy: nil, load_balancer:)
  @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("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5MaXN0ZW5lckFjdGlvbiJ9")), "defaultAction") unless @default_action.nil?
  @default_target_groups = default_target_groups
  Jsii::Type.check_type(@default_target_groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lbGFzdGljbG9hZGJhbGFuY2luZ3YyLklBcHBsaWNhdGlvblRhcmdldEdyb3VwIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "defaultTargetGroups") unless @default_target_groups.nil?
  @mutual_authentication = mutual_authentication.is_a?(Hash) ? ::AWSCDK::ElasticLoadBalancingv2::MutualAuthentication.new(**mutual_authentication.transform_keys(&:to_sym)) : mutual_authentication
  Jsii::Type.check_type(@mutual_authentication, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5NdXR1YWxBdXRoZW50aWNhdGlvbiJ9")), "mutualAuthentication") unless @mutual_authentication.nil?
  @open = open
  Jsii::Type.check_type(@open, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "open") unless @open.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?
  @load_balancer = load_balancer
  Jsii::Type.check_type(@load_balancer, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5JQXBwbGljYXRpb25Mb2FkQmFsYW5jZXIifQ==")), "loadBalancer")
end

Instance Attribute Details

#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.



43
44
45
# File 'elastic_load_balancingv2/application_listener_props.rb', line 43

def certificates
  @certificates
end

#default_actionAWSCDK::ElasticLoadBalancingv2::ListenerAction? (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 Action chaining, fixed responses and redirect responses.

See the ListenerAction class for all options.

Cannot be specified together with default_target_groups.



55
56
57
# File 'elastic_load_balancingv2/application_listener_props.rb', line 55

def default_action
  @default_action
end

#default_target_groupsArray<AWSCDK::ElasticLoadBalancingv2::IApplicationTargetGroup>? (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.



66
67
68
# File 'elastic_load_balancingv2/application_listener_props.rb', line 66

def default_target_groups
  @default_target_groups
end

#load_balancerAWSCDK::ElasticLoadBalancingv2::IApplicationLoadBalancer (readonly)

The load balancer to attach this listener to.



104
105
106
# File 'elastic_load_balancingv2/application_listener_props.rb', line 104

def load_balancer
  @load_balancer
end

#mutual_authenticationAWSCDK::ElasticLoadBalancingv2::MutualAuthentication? (readonly)

Note:

Default: - No mutual authentication configuration

The mutual authentication configuration information.



72
73
74
# File 'elastic_load_balancingv2/application_listener_props.rb', line 72

def mutual_authentication
  @mutual_authentication
end

#openBoolean? (readonly)

Note:

Default: true

Allow anyone to connect to the load balancer on the listener port.

If this is specified, the load balancer will be opened up to anyone who can reach it. For internal load balancers this is anyone in the same VPC. For public load balancers, this is anyone on the internet.

If you want to be more selective about who can access this load balancer, set this to false and use the listener's connections object to selectively grant access to the load balancer on the listener port.

Returns:

  • (Boolean, nil)


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

def open
  @open
end

#portNumeric? (readonly)

Note:

Default: - Determined from protocol if known.

The port on which the listener listens for requests.

Returns:

  • (Numeric, nil)


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

def port
  @port
end

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

Note:

Default: - Determined from port if known.

The protocol to use.



95
96
97
# File 'elastic_load_balancingv2/application_listener_props.rb', line 95

def protocol
  @protocol
end

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

Note:

Default: - The current predefined security policy.

The security policy that defines which ciphers and protocols are supported.



100
101
102
# File 'elastic_load_balancingv2/application_listener_props.rb', line 100

def ssl_policy
  @ssl_policy
end

Class Method Details

.jsii_propertiesObject



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

def self.jsii_properties
  {
    :certificates => "certificates",
    :default_action => "defaultAction",
    :default_target_groups => "defaultTargetGroups",
    :mutual_authentication => "mutualAuthentication",
    :open => "open",
    :port => "port",
    :protocol => "protocol",
    :ssl_policy => "sslPolicy",
    :load_balancer => "loadBalancer",
  }
end

Instance Method Details

#to_jsiiObject



120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# File 'elastic_load_balancingv2/application_listener_props.rb', line 120

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "certificates" => @certificates,
    "defaultAction" => @default_action,
    "defaultTargetGroups" => @default_target_groups,
    "mutualAuthentication" => @mutual_authentication,
    "open" => @open,
    "port" => @port,
    "protocol" => @protocol,
    "sslPolicy" => @ssl_policy,
    "loadBalancer" => @load_balancer,
  })
  result.compact
end