Class: AWSCDK::EC2::CfnTrafficMirrorFilterRule::TrafficMirrorPortRangeProperty

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

Overview

Describes the Traffic Mirror port range.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from_port:, to_port:) ⇒ TrafficMirrorPortRangeProperty

Returns a new instance of TrafficMirrorPortRangeProperty.

Parameters:

  • from_port (Numeric)

    The start of the Traffic Mirror port range.

  • to_port (Numeric)

    The end of the Traffic Mirror port range.



667
668
669
670
671
672
# File 'ec2/cfn_traffic_mirror_filter_rule.rb', line 667

def initialize(from_port:, to_port:)
  @from_port = from_port
  Jsii::Type.check_type(@from_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "fromPort")
  @to_port = to_port
  Jsii::Type.check_type(@to_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "toPort")
end

Instance Attribute Details

#from_portNumeric (readonly)

The start of the Traffic Mirror port range.

This applies to the TCP and UDP protocols.



680
681
682
# File 'ec2/cfn_traffic_mirror_filter_rule.rb', line 680

def from_port
  @from_port
end

#to_portNumeric (readonly)

The end of the Traffic Mirror port range.

This applies to the TCP and UDP protocols.



687
688
689
# File 'ec2/cfn_traffic_mirror_filter_rule.rb', line 687

def to_port
  @to_port
end

Class Method Details

.jsii_propertiesObject



689
690
691
692
693
694
# File 'ec2/cfn_traffic_mirror_filter_rule.rb', line 689

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

Instance Method Details

#to_jsiiObject



696
697
698
699
700
701
702
703
# File 'ec2/cfn_traffic_mirror_filter_rule.rb', line 696

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