Class: AWSCDK::EC2::AclPortRange
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::AclPortRange
- Defined in:
- ec2/acl_port_range.rb
Overview
Properties to create PortRange.
Instance Attribute Summary collapse
-
#from ⇒ Numeric?
readonly
The first port in the range.
-
#to ⇒ Numeric?
readonly
The last port in the range.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(from: nil, to: nil) ⇒ AclPortRange
constructor
A new instance of AclPortRange.
- #to_jsii ⇒ Object
Constructor Details
#initialize(from: nil, to: nil) ⇒ AclPortRange
Returns a new instance of AclPortRange.
9 10 11 12 13 14 |
# File 'ec2/acl_port_range.rb', line 9 def initialize(from: nil, to: nil) @from = from Jsii::Type.check_type(@from, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "from") unless @from.nil? @to = to Jsii::Type.check_type(@to, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "to") unless @to.nil? end |
Instance Attribute Details
#from ⇒ Numeric? (readonly)
The first port in the range.
Required if you specify 6 (TCP) or 17 (UDP) for the protocol parameter.
21 22 23 |
# File 'ec2/acl_port_range.rb', line 21 def from @from end |
#to ⇒ Numeric? (readonly)
The last port in the range.
Required if you specify 6 (TCP) or 17 (UDP) for the protocol parameter.
27 28 29 |
# File 'ec2/acl_port_range.rb', line 27 def to @to end |
Class Method Details
.jsii_properties ⇒ Object
29 30 31 32 33 34 |
# File 'ec2/acl_port_range.rb', line 29 def self.jsii_properties { :from => "from", :to => "to", } end |
Instance Method Details
#to_jsii ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'ec2/acl_port_range.rb', line 36 def to_jsii result = {} result.merge!({ "from" => @from, "to" => @to, }) result.compact end |