Class: AWSCDK::EC2::CfnNetworkInsightsPath::FilterPortRangeProperty

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

Overview

Describes a port range.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from_port: nil, to_port: nil) ⇒ FilterPortRangeProperty

Returns a new instance of FilterPortRangeProperty.

Parameters:

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

    The first port in the range.

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

    The last port in the range.



684
685
686
687
688
689
# File 'ec2/cfn_network_insights_path.rb', line 684

def initialize(from_port: nil, to_port: nil)
  @from_port = from_port
  Jsii::Type.check_type(@from_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "fromPort") unless @from_port.nil?
  @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_portNumeric? (readonly)

The first port in the range.



695
696
697
# File 'ec2/cfn_network_insights_path.rb', line 695

def from_port
  @from_port
end

#to_portNumeric? (readonly)

The last port in the range.



700
701
702
# File 'ec2/cfn_network_insights_path.rb', line 700

def to_port
  @to_port
end

Class Method Details

.jsii_propertiesObject



702
703
704
705
706
707
# File 'ec2/cfn_network_insights_path.rb', line 702

def self.jsii_properties
  {
    :from_port => "fromPort",
    :to_port => "toPort",
  }
end

Instance Method Details

#to_jsiiObject



709
710
711
712
713
714
715
716
# File 'ec2/cfn_network_insights_path.rb', line 709

def to_jsii
  result = {}
  result.merge!({
    "fromPort" => @from_port,
    "toPort" => @to_port,
  })
  result.compact
end