Class: AWSCDK::ECSPatterns::ApplicationListenerProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecs_patterns/application_listener_props.rb

Overview

Properties to define an application listener.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, certificate: nil, port: nil, protocol: nil, ssl_policy: nil) ⇒ ApplicationListenerProps

Returns a new instance of ApplicationListenerProps.

Parameters:



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

#certificateAWSCDK::CertificateManager::ICertificate? (readonly)

Note:

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

#nameString (readonly)

Name of the listener.

Returns:

  • (String)


28
29
30
# File 'ecs_patterns/application_listener_props.rb', line 28

def name
  @name
end

#portNumeric? (readonly)

Note:

Default: - Determined from protocol if known.

The port on which the listener listens for requests.

Returns:

  • (Numeric, nil)


40
41
42
# File 'ecs_patterns/application_listener_props.rb', line 40

def port
  @port
end

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

Note:

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_policyAWSCDK::ElasticLoadBalancingv2::SSLPolicy? (readonly)

Note:

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_propertiesObject



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_jsiiObject



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