Class: AWSCDK::NetworkFirewall::CfnRuleGroup::PortRangeProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
network_firewall/cfn_rule_group.rb

Overview

A single port range specification.

This is used for source and destination port ranges in the stateless match attributes.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from_port:, to_port:) ⇒ PortRangeProperty

Returns a new instance of PortRangeProperty.

Parameters:

  • from_port (Numeric)

    The lower limit of the port range.

  • to_port (Numeric)

    The upper limit of the port range.



1076
1077
1078
1079
1080
1081
# File 'network_firewall/cfn_rule_group.rb', line 1076

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 lower limit of the port range.

This must be less than or equal to the ToPort specification.



1089
1090
1091
# File 'network_firewall/cfn_rule_group.rb', line 1089

def from_port
  @from_port
end

#to_portNumeric (readonly)

The upper limit of the port range.

This must be greater than or equal to the FromPort specification.



1096
1097
1098
# File 'network_firewall/cfn_rule_group.rb', line 1096

def to_port
  @to_port
end

Class Method Details

.jsii_propertiesObject



1098
1099
1100
1101
1102
1103
# File 'network_firewall/cfn_rule_group.rb', line 1098

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

Instance Method Details

#to_jsiiObject



1105
1106
1107
1108
1109
1110
1111
1112
# File 'network_firewall/cfn_rule_group.rb', line 1105

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