Class: AWSCDK::EC2::CfnNetworkAclEntry::PortRangeProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnNetworkAclEntry::PortRangeProperty
- Defined in:
- ec2/cfn_network_acl_entry.rb
Overview
Describes a range of ports.
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) ⇒ PortRangeProperty
constructor
A new instance of PortRangeProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(from: nil, to: nil) ⇒ PortRangeProperty
Returns a new instance of PortRangeProperty.
660 661 662 663 664 665 |
# File 'ec2/cfn_network_acl_entry.rb', line 660 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.
673 674 675 |
# File 'ec2/cfn_network_acl_entry.rb', line 673 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.
680 681 682 |
# File 'ec2/cfn_network_acl_entry.rb', line 680 def to @to end |
Class Method Details
.jsii_properties ⇒ Object
682 683 684 685 686 687 |
# File 'ec2/cfn_network_acl_entry.rb', line 682 def self.jsii_properties { :from => "from", :to => "to", } end |
Instance Method Details
#to_jsii ⇒ Object
689 690 691 692 693 694 695 696 |
# File 'ec2/cfn_network_acl_entry.rb', line 689 def to_jsii result = {} result.merge!({ "from" => @from, "to" => @to, }) result.compact end |