Class: AWSCDK::EC2::CfnNetworkAclEntry::PortRangeProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/cfn_network_acl_entry.rb

Overview

Describes a range of ports.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from: nil, to: nil) ⇒ PortRangeProperty

Returns a new instance of PortRangeProperty.

Parameters:

  • from (Numeric, nil) (defaults to: nil)

    The first port in the range.

  • to (Numeric, nil) (defaults to: nil)

    The last port in the range.



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

#fromNumeric? (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

#toNumeric? (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_propertiesObject



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_jsiiObject



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