Class: AWSCDK::GlobalAccelerator::PortRange
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::GlobalAccelerator::PortRange
- Defined in:
- global_accelerator/port_range.rb
Overview
The list of port ranges for the connections from clients to the accelerator.
Instance Attribute Summary collapse
-
#from_port ⇒ Numeric
readonly
The first port in the range of ports, inclusive.
-
#to_port ⇒ Numeric?
readonly
The last port in the range of ports, inclusive.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(from_port:, to_port: nil) ⇒ PortRange
constructor
A new instance of PortRange.
- #to_jsii ⇒ Object
Constructor Details
#initialize(from_port:, to_port: nil) ⇒ PortRange
Returns a new instance of PortRange.
9 10 11 12 13 14 |
# File 'global_accelerator/port_range.rb', line 9 def initialize(from_port:, to_port: nil) @from_port = from_port Jsii::Type.check_type(@from_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "fromPort") @to_port = to_port Jsii::Type.check_type(@to_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "toPort") unless @to_port.nil? end |
Instance Attribute Details
#from_port ⇒ Numeric (readonly)
The first port in the range of ports, inclusive.
19 20 21 |
# File 'global_accelerator/port_range.rb', line 19 def from_port @from_port end |
#to_port ⇒ Numeric? (readonly)
Note:
Default: - same as fromPort
The last port in the range of ports, inclusive.
24 25 26 |
# File 'global_accelerator/port_range.rb', line 24 def to_port @to_port end |
Class Method Details
.jsii_properties ⇒ Object
26 27 28 29 30 31 |
# File 'global_accelerator/port_range.rb', line 26 def self.jsii_properties { :from_port => "fromPort", :to_port => "toPort", } end |
Instance Method Details
#to_jsii ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'global_accelerator/port_range.rb', line 33 def to_jsii result = {} result.merge!({ "fromPort" => @from_port, "toPort" => @to_port, }) result.compact end |