Class: AWSCDK::EC2::AclPortRange

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

Overview

Properties to create PortRange.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of AclPortRange.

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.



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

#fromNumeric? (readonly)

The first port in the range.

Required if you specify 6 (TCP) or 17 (UDP) for the protocol parameter.

Returns:

  • (Numeric, nil)


21
22
23
# File 'ec2/acl_port_range.rb', line 21

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.

Returns:

  • (Numeric, nil)


27
28
29
# File 'ec2/acl_port_range.rb', line 27

def to
  @to
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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