Class: AWSCDK::GlobalAccelerator::CfnListenerProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::GlobalAccelerator::CfnListenerProps
- Defined in:
- global_accelerator/cfn_listener_props.rb
Overview
Properties for defining a CfnListener.
Instance Attribute Summary collapse
-
#accelerator_arn ⇒ String, AWSCDK::Interfaces::AWSGlobalaccelerator::IAcceleratorRef
readonly
The Amazon Resource Name (ARN) of your accelerator.
-
#client_affinity ⇒ String?
readonly
Client affinity lets you direct all requests from a user to the same endpoint, if you have stateful applications, regardless of the port and protocol of the client request.
-
#port_ranges ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::GlobalAccelerator::CfnListener::PortRangeProperty>
readonly
The list of port ranges for the connections from clients to the accelerator.
-
#protocol ⇒ String
readonly
The protocol for the connections from clients to the accelerator.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(accelerator_arn:, port_ranges:, protocol:, client_affinity: nil) ⇒ CfnListenerProps
constructor
A new instance of CfnListenerProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(accelerator_arn:, port_ranges:, protocol:, client_affinity: nil) ⇒ CfnListenerProps
Returns a new instance of CfnListenerProps.
13 14 15 16 17 18 19 20 21 22 |
# File 'global_accelerator/cfn_listener_props.rb', line 13 def initialize(accelerator_arn:, port_ranges:, protocol:, client_affinity: nil) @accelerator_arn = accelerator_arn Jsii::Type.check_type(@accelerator_arn, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19nbG9iYWxhY2NlbGVyYXRvci5JQWNjZWxlcmF0b3JSZWYifV19fQ==")), "acceleratorArn") @port_ranges = port_ranges Jsii::Type.check_type(@port_ranges, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZ2xvYmFsYWNjZWxlcmF0b3IuQ2ZuTGlzdGVuZXIuUG9ydFJhbmdlUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "portRanges") @protocol = protocol Jsii::Type.check_type(@protocol, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "protocol") @client_affinity = client_affinity Jsii::Type.check_type(@client_affinity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clientAffinity") unless @client_affinity.nil? end |
Instance Attribute Details
#accelerator_arn ⇒ String, AWSCDK::Interfaces::AWSGlobalaccelerator::IAcceleratorRef (readonly)
The Amazon Resource Name (ARN) of your accelerator.
28 29 30 |
# File 'global_accelerator/cfn_listener_props.rb', line 28 def accelerator_arn @accelerator_arn end |
#client_affinity ⇒ String? (readonly)
Default: - "NONE"
Client affinity lets you direct all requests from a user to the same endpoint, if you have stateful applications, regardless of the port and protocol of the client request.
Client affinity gives you control over whether to always route each client to the same specific endpoint.
AWS Global Accelerator uses a consistent-flow hashing algorithm to choose the optimal endpoint for a connection. If client affinity is NONE , Global Accelerator uses the "five-tuple" (5-tuple) properties—source IP address, source port, destination IP address, destination port, and protocol—to select the hash value, and then chooses the best endpoint. However, with this setting, if someone uses different ports to connect to Global Accelerator, their connections might not be always routed to the same endpoint because the hash value changes.
If you want a given client to always be routed to the same endpoint, set client affinity to SOURCE_IP instead. When you use the SOURCE_IP setting, Global Accelerator uses the "two-tuple" (2-tuple) properties— source (client) IP address and destination IP address—to select the hash value.
The default value is NONE .
53 54 55 |
# File 'global_accelerator/cfn_listener_props.rb', line 53 def client_affinity @client_affinity end |
#port_ranges ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::GlobalAccelerator::CfnListener::PortRangeProperty> (readonly)
The list of port ranges for the connections from clients to the accelerator.
33 34 35 |
# File 'global_accelerator/cfn_listener_props.rb', line 33 def port_ranges @port_ranges end |
#protocol ⇒ String (readonly)
Default: - "TCP"
The protocol for the connections from clients to the accelerator.
39 40 41 |
# File 'global_accelerator/cfn_listener_props.rb', line 39 def protocol @protocol end |
Class Method Details
.jsii_properties ⇒ Object
55 56 57 58 59 60 61 62 |
# File 'global_accelerator/cfn_listener_props.rb', line 55 def self.jsii_properties { :accelerator_arn => "acceleratorArn", :port_ranges => "portRanges", :protocol => "protocol", :client_affinity => "clientAffinity", } end |
Instance Method Details
#to_jsii ⇒ Object
64 65 66 67 68 69 70 71 72 73 |
# File 'global_accelerator/cfn_listener_props.rb', line 64 def to_jsii result = {} result.merge!({ "acceleratorArn" => @accelerator_arn, "portRanges" => @port_ranges, "protocol" => @protocol, "clientAffinity" => @client_affinity, }) result.compact end |