Class: AWSCDK::EC2::CfnNetworkInsightsAnalysis::PortRangeProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/cfn_network_insights_analysis.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.



2050
2051
2052
2053
2054
2055
# File 'ec2/cfn_network_insights_analysis.rb', line 2050

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.



2061
2062
2063
# File 'ec2/cfn_network_insights_analysis.rb', line 2061

def from
  @from
end

#toNumeric? (readonly)

The last port in the range.



2066
2067
2068
# File 'ec2/cfn_network_insights_analysis.rb', line 2066

def to
  @to
end

Class Method Details

.jsii_propertiesObject



2068
2069
2070
2071
2072
2073
# File 'ec2/cfn_network_insights_analysis.rb', line 2068

def self.jsii_properties
  {
    :from => "from",
    :to => "to",
  }
end

Instance Method Details

#to_jsiiObject



2075
2076
2077
2078
2079
2080
2081
2082
# File 'ec2/cfn_network_insights_analysis.rb', line 2075

def to_jsii
  result = {}
  result.merge!({
    "from" => @from,
    "to" => @to,
  })
  result.compact
end