Class: AWSCDK::NetworkFirewall::CfnRuleGroup::RuleDefinitionProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::NetworkFirewall::CfnRuleGroup::RuleDefinitionProperty
- Defined in:
- network_firewall/cfn_rule_group.rb
Overview
The inspection criteria and action for a single stateless rule.
AWS Network Firewall inspects each packet for the specified matching criteria. When a packet matches the criteria, Network Firewall performs the rule's actions on the packet.
Instance Attribute Summary collapse
-
#actions ⇒ Array<String>
readonly
The actions to take on a packet that matches one of the stateless rule definition's match attributes.
-
#match_attributes ⇒ AWSCDK::IResolvable, AWSCDK::NetworkFirewall::CfnRuleGroup::MatchAttributesProperty
readonly
Criteria for Network Firewall to use to inspect an individual packet in stateless rule inspection.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(actions:, match_attributes:) ⇒ RuleDefinitionProperty
constructor
A new instance of RuleDefinitionProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(actions:, match_attributes:) ⇒ RuleDefinitionProperty
Returns a new instance of RuleDefinitionProperty.
1226 1227 1228 1229 1230 1231 |
# File 'network_firewall/cfn_rule_group.rb', line 1226 def initialize(actions:, match_attributes:) @actions = actions Jsii::Type.check_type(@actions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "actions") @match_attributes = match_attributes.is_a?(Hash) ? ::AWSCDK::NetworkFirewall::CfnRuleGroup::MatchAttributesProperty.new(**match_attributes.transform_keys(&:to_sym)) : match_attributes Jsii::Type.check_type(@match_attributes, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19uZXR3b3JrZmlyZXdhbGwuQ2ZuUnVsZUdyb3VwLk1hdGNoQXR0cmlidXRlc1Byb3BlcnR5In1dfX0=")), "matchAttributes") end |
Instance Attribute Details
#actions ⇒ Array<String> (readonly)
The actions to take on a packet that matches one of the stateless rule definition's match attributes.
You must specify a standard action and you can add custom actions.
Network Firewall only forwards a packet for stateful rule inspection if you specify
aws:forward_to_sfefor a rule that the packet matches, or if the packet doesn't match any stateless rule and you specifyaws:forward_to_sfefor theStatelessDefaultActionssetting for the firewall policy.
For every rule, you must specify exactly one of the following standard actions.
- aws:pass - Discontinues all inspection of the packet and permits it to go to its intended destination.
- aws:drop - Discontinues all inspection of the packet and blocks it from going to its intended destination.
- aws:forward_to_sfe - Discontinues stateless inspection of the packet and forwards it to the stateful rule engine for inspection.
Additionally, you can specify a custom action. To do this, you define a custom action by name and type, then provide the name you've assigned to the action in this Actions setting.
To provide more than one action in this setting, separate the settings with a comma. For example, if you have a publish metrics custom action that you've named MyMetricsAction , then you could specify the standard action aws:pass combined with the custom action using [“aws:pass”, “MyMetricsAction”] .
1251 1252 1253 |
# File 'network_firewall/cfn_rule_group.rb', line 1251 def actions @actions end |
#match_attributes ⇒ AWSCDK::IResolvable, AWSCDK::NetworkFirewall::CfnRuleGroup::MatchAttributesProperty (readonly)
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.
1258 1259 1260 |
# File 'network_firewall/cfn_rule_group.rb', line 1258 def match_attributes @match_attributes end |
Class Method Details
.jsii_properties ⇒ Object
1260 1261 1262 1263 1264 1265 |
# File 'network_firewall/cfn_rule_group.rb', line 1260 def self.jsii_properties { :actions => "actions", :match_attributes => "matchAttributes", } end |
Instance Method Details
#to_jsii ⇒ Object
1267 1268 1269 1270 1271 1272 1273 1274 |
# File 'network_firewall/cfn_rule_group.rb', line 1267 def to_jsii result = {} result.merge!({ "actions" => @actions, "matchAttributes" => @match_attributes, }) result.compact end |