Class: AWSCDK::GlobalAccelerator::ListenerProps
- Inherits:
-
ListenerOptions
- Object
- ListenerOptions
- AWSCDK::GlobalAccelerator::ListenerProps
- Defined in:
- global_accelerator/listener_props.rb
Overview
Construct properties for Listener.
Instance Attribute Summary collapse
-
#accelerator ⇒ AWSCDK::Interfaces::AWSGlobalaccelerator::IAcceleratorRef
readonly
The accelerator for this listener.
-
#client_affinity ⇒ AWSCDK::GlobalAccelerator::ClientAffinity?
readonly
Client affinity to direct all requests from a user to the same endpoint.
-
#listener_name ⇒ String?
readonly
Name of the listener.
-
#port_ranges ⇒ Array<AWSCDK::GlobalAccelerator::PortRange>
readonly
The list of port ranges for the connections from clients to the accelerator.
-
#protocol ⇒ AWSCDK::GlobalAccelerator::ConnectionProtocol?
readonly
The protocol for the connections from clients to the accelerator.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(port_ranges:, client_affinity: nil, listener_name: nil, protocol: nil, accelerator:) ⇒ ListenerProps
constructor
A new instance of ListenerProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(port_ranges:, client_affinity: nil, listener_name: nil, protocol: nil, accelerator:) ⇒ ListenerProps
Returns a new instance of ListenerProps.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'global_accelerator/listener_props.rb', line 12 def initialize(port_ranges:, client_affinity: nil, listener_name: nil, protocol: nil, accelerator:) @port_ranges = port_ranges.is_a?(Array) ? port_ranges.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::GlobalAccelerator::PortRange.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : port_ranges Jsii::Type.check_type(@port_ranges, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19nbG9iYWxhY2NlbGVyYXRvci5Qb3J0UmFuZ2UifSwia2luZCI6ImFycmF5In19")), "portRanges") @client_affinity = client_affinity Jsii::Type.check_type(@client_affinity, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZ2xvYmFsYWNjZWxlcmF0b3IuQ2xpZW50QWZmaW5pdHkifQ==")), "clientAffinity") unless @client_affinity.nil? @listener_name = listener_name Jsii::Type.check_type(@listener_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "listenerName") unless @listener_name.nil? @protocol = protocol Jsii::Type.check_type(@protocol, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZ2xvYmFsYWNjZWxlcmF0b3IuQ29ubmVjdGlvblByb3RvY29sIn0=")), "protocol") unless @protocol.nil? @accelerator = accelerator Jsii::Type.check_type(@accelerator, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19nbG9iYWxhY2NlbGVyYXRvci5JQWNjZWxlcmF0b3JSZWYifQ==")), "accelerator") end |
Instance Attribute Details
#accelerator ⇒ AWSCDK::Interfaces::AWSGlobalaccelerator::IAcceleratorRef (readonly)
The accelerator for this listener.
54 55 56 |
# File 'global_accelerator/listener_props.rb', line 54 def accelerator @accelerator end |
#client_affinity ⇒ AWSCDK::GlobalAccelerator::ClientAffinity? (readonly)
Default: ClientAffinity.NONE
Client affinity to direct all requests from a user to the same endpoint.
If you have stateful applications, client affinity lets you direct all requests from a user to the same endpoint.
By default, each connection from each client is routed to separate endpoints. Set client affinity to SOURCE_IP to route all connections from a single client to the same endpoint.
40 41 42 |
# File 'global_accelerator/listener_props.rb', line 40 def client_affinity @client_affinity end |
#listener_name ⇒ String? (readonly)
Default: - logical ID of the resource
Name of the listener.
45 46 47 |
# File 'global_accelerator/listener_props.rb', line 45 def listener_name @listener_name end |
#port_ranges ⇒ Array<AWSCDK::GlobalAccelerator::PortRange> (readonly)
The list of port ranges for the connections from clients to the accelerator.
28 29 30 |
# File 'global_accelerator/listener_props.rb', line 28 def port_ranges @port_ranges end |
#protocol ⇒ AWSCDK::GlobalAccelerator::ConnectionProtocol? (readonly)
Default: ConnectionProtocol.TCP
The protocol for the connections from clients to the accelerator.
50 51 52 |
# File 'global_accelerator/listener_props.rb', line 50 def protocol @protocol end |
Class Method Details
.jsii_properties ⇒ Object
56 57 58 59 60 61 62 63 64 |
# File 'global_accelerator/listener_props.rb', line 56 def self.jsii_properties { :port_ranges => "portRanges", :client_affinity => "clientAffinity", :listener_name => "listenerName", :protocol => "protocol", :accelerator => "accelerator", } end |
Instance Method Details
#to_jsii ⇒ Object
66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'global_accelerator/listener_props.rb', line 66 def to_jsii result = {} result.merge!(super) result.merge!({ "portRanges" => @port_ranges, "clientAffinity" => @client_affinity, "listenerName" => @listener_name, "protocol" => @protocol, "accelerator" => @accelerator, }) result.compact end |