Class: AWSCDK::NetworkFirewall::CfnRuleGroup::MatchAttributesProperty

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

Overview

Criteria for Network Firewall to use to inspect an individual packet in stateless rule inspection.

Each match attributes set can include one or more items such as IP address, CIDR range, port number, protocol, and TCP flags.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(destination_ports: nil, destinations: nil, protocols: nil, source_ports: nil, sources: nil, tcp_flags: nil) ⇒ MatchAttributesProperty

Returns a new instance of MatchAttributesProperty.

Parameters:



977
978
979
980
981
982
983
984
985
986
987
988
989
990
# File 'network_firewall/cfn_rule_group.rb', line 977

def initialize(destination_ports: nil, destinations: nil, protocols: nil, source_ports: nil, sources: nil, tcp_flags: nil)
  @destination_ports = destination_ports
  Jsii::Type.check_type(@destination_ports, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbmV0d29ya2ZpcmV3YWxsLkNmblJ1bGVHcm91cC5Qb3J0UmFuZ2VQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "destinationPorts") unless @destination_ports.nil?
  @destinations = destinations
  Jsii::Type.check_type(@destinations, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbmV0d29ya2ZpcmV3YWxsLkNmblJ1bGVHcm91cC5BZGRyZXNzUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "destinations") unless @destinations.nil?
  @protocols = protocols
  Jsii::Type.check_type(@protocols, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siY29sbGVjdGlvbiI6eyJlbGVtZW50dHlwZSI6eyJwcmltaXRpdmUiOiJudW1iZXIifSwia2luZCI6ImFycmF5In19LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "protocols") unless @protocols.nil?
  @source_ports = source_ports
  Jsii::Type.check_type(@source_ports, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbmV0d29ya2ZpcmV3YWxsLkNmblJ1bGVHcm91cC5Qb3J0UmFuZ2VQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "sourcePorts") unless @source_ports.nil?
  @sources = sources
  Jsii::Type.check_type(@sources, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbmV0d29ya2ZpcmV3YWxsLkNmblJ1bGVHcm91cC5BZGRyZXNzUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "sources") unless @sources.nil?
  @tcp_flags = tcp_flags
  Jsii::Type.check_type(@tcp_flags, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbmV0d29ya2ZpcmV3YWxsLkNmblJ1bGVHcm91cC5UQ1BGbGFnRmllbGRQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "tcpFlags") unless @tcp_flags.nil?
end

Instance Attribute Details

#destination_portsAWSCDK::IResolvable, ... (readonly)

The destination port to inspect for.

You can specify an individual port, for example 1994 and you can specify a port range, for example 1990:1994 . To match with any port, specify ANY .

This setting is only used for protocols 6 (TCP) and 17 (UDP).



1000
1001
1002
# File 'network_firewall/cfn_rule_group.rb', line 1000

def destination_ports
  @destination_ports
end

#destinationsAWSCDK::IResolvable, ... (readonly)

The destination IP addresses and address ranges to inspect for, in CIDR notation.

If not specified, this matches with any destination address.



1007
1008
1009
# File 'network_firewall/cfn_rule_group.rb', line 1007

def destinations
  @destinations
end

#protocolsArray<Numeric>, ... (readonly)

The protocols to inspect for, specified using the assigned internet protocol number (IANA) for each protocol.

If not specified, this matches with any protocol.



1014
1015
1016
# File 'network_firewall/cfn_rule_group.rb', line 1014

def protocols
  @protocols
end

#source_portsAWSCDK::IResolvable, ... (readonly)

The source port to inspect for.

You can specify an individual port, for example 1994 and you can specify a port range, for example 1990:1994 . To match with any port, specify ANY .

If not specified, this matches with any source port.

This setting is only used for protocols 6 (TCP) and 17 (UDP).



1025
1026
1027
# File 'network_firewall/cfn_rule_group.rb', line 1025

def source_ports
  @source_ports
end

#sourcesAWSCDK::IResolvable, ... (readonly)

The source IP addresses and address ranges to inspect for, in CIDR notation.

If not specified, this matches with any source address.



1032
1033
1034
# File 'network_firewall/cfn_rule_group.rb', line 1032

def sources
  @sources
end

#tcp_flagsAWSCDK::IResolvable, ... (readonly)

The TCP flags and masks to inspect for.

If not specified, this matches with any settings. This setting is only used for protocol 6 (TCP).



1039
1040
1041
# File 'network_firewall/cfn_rule_group.rb', line 1039

def tcp_flags
  @tcp_flags
end

Class Method Details

.jsii_propertiesObject



1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
# File 'network_firewall/cfn_rule_group.rb', line 1041

def self.jsii_properties
  {
    :destination_ports => "destinationPorts",
    :destinations => "destinations",
    :protocols => "protocols",
    :source_ports => "sourcePorts",
    :sources => "sources",
    :tcp_flags => "tcpFlags",
  }
end

Instance Method Details

#to_jsiiObject



1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
# File 'network_firewall/cfn_rule_group.rb', line 1052

def to_jsii
  result = {}
  result.merge!({
    "destinationPorts" => @destination_ports,
    "destinations" => @destinations,
    "protocols" => @protocols,
    "sourcePorts" => @source_ports,
    "sources" => @sources,
    "tcpFlags" => @tcp_flags,
  })
  result.compact
end