Class CfnRuleGroupPropsMixin.StatefulRuleProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.networkfirewall.CfnRuleGroupPropsMixin.StatefulRuleProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRuleGroupPropsMixin.StatefulRuleProperty>
- Enclosing interface:
CfnRuleGroupPropsMixin.StatefulRuleProperty
@Stability(Stable)
public static final class CfnRuleGroupPropsMixin.StatefulRuleProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnRuleGroupPropsMixin.StatefulRuleProperty>
A builder for
CfnRuleGroupPropsMixin.StatefulRuleProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnRuleGroupPropsMixin.StatefulRuleProperty.getAction()build()Builds the configured instance.Sets the value ofCfnRuleGroupPropsMixin.StatefulRuleProperty.getHeader()header(IResolvable header) Sets the value ofCfnRuleGroupPropsMixin.StatefulRuleProperty.getHeader()ruleOptions(List<? extends Object> ruleOptions) Sets the value ofCfnRuleGroupPropsMixin.StatefulRuleProperty.getRuleOptions()ruleOptions(IResolvable ruleOptions) Sets the value ofCfnRuleGroupPropsMixin.StatefulRuleProperty.getRuleOptions()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
action
Sets the value ofCfnRuleGroupPropsMixin.StatefulRuleProperty.getAction()- Parameters:
action- Defines what Network Firewall should do with the packets in a traffic flow when the flow matches the stateful rule criteria. For all actions, Network Firewall performs the specified action and discontinues stateful inspection of the traffic flow.The actions for a stateful rule are defined as follows:
- PASS - Permits the packets to go to the intended destination.
- DROP - Blocks the packets from going to the intended destination and sends an alert log message, if alert logging is configured in the firewall logging configuration.
- REJECT - Drops traffic that matches the conditions of the stateful rule and sends a TCP reset packet back to sender of the packet. A TCP reset packet is a packet with no payload and a
RSTbit contained in the TCP header flags.REJECTis available only for TCP traffic. - ALERT - Permits the packets to go to the intended destination and sends an alert log message, if alert logging is configured in the firewall logging configuration.
You can use this action to test a rule that you intend to use to drop traffic. You can enable the rule with
ALERTaction, verify in the logs that the rule is filtering as you want, then change the action toDROP.- REJECT - Drops TCP traffic that matches the conditions of the stateful rule, and sends a TCP reset packet back to sender of the packet. A TCP reset packet is a packet with no payload and a
RSTbit contained in the TCP header flags. Also sends an alert log mesage if alert logging is configured in the firewall logging configuration.
REJECTisn't currently available for use with IMAP and FTP protocols.- Returns:
this
-
header
@Stability(Stable) public CfnRuleGroupPropsMixin.StatefulRuleProperty.Builder header(IResolvable header) Sets the value ofCfnRuleGroupPropsMixin.StatefulRuleProperty.getHeader()- Parameters:
header- The stateful inspection criteria for this rule, used to inspect traffic flows.- Returns:
this
-
header
@Stability(Stable) public CfnRuleGroupPropsMixin.StatefulRuleProperty.Builder header(CfnRuleGroupPropsMixin.HeaderProperty header) Sets the value ofCfnRuleGroupPropsMixin.StatefulRuleProperty.getHeader()- Parameters:
header- The stateful inspection criteria for this rule, used to inspect traffic flows.- Returns:
this
-
ruleOptions
@Stability(Stable) public CfnRuleGroupPropsMixin.StatefulRuleProperty.Builder ruleOptions(IResolvable ruleOptions) Sets the value ofCfnRuleGroupPropsMixin.StatefulRuleProperty.getRuleOptions()- Parameters:
ruleOptions- Additional settings for a stateful rule, provided as keywords and settings.- Returns:
this
-
ruleOptions
@Stability(Stable) public CfnRuleGroupPropsMixin.StatefulRuleProperty.Builder ruleOptions(List<? extends Object> ruleOptions) Sets the value ofCfnRuleGroupPropsMixin.StatefulRuleProperty.getRuleOptions()- Parameters:
ruleOptions- Additional settings for a stateful rule, provided as keywords and settings.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnRuleGroupPropsMixin.StatefulRuleProperty>- Returns:
- a new instance of
CfnRuleGroupPropsMixin.StatefulRuleProperty - Throws:
NullPointerException- if any required attribute was not provided
-