@Stability(value=Stable)
public static interface CfnRuleGroup.StatefulRuleProperty
extends software.amazon.jsii.JsiiSerializable
Use this option to specify a simple Suricata rule with protocol, source and destination, ports, direction, and rule options. For information about the Suricata Rules format, see Rules Format .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.networkfirewall.*;
StatefulRuleProperty statefulRuleProperty = StatefulRuleProperty.builder()
.action("action")
.header(HeaderProperty.builder()
.destination("destination")
.destinationPort("destinationPort")
.direction("direction")
.protocol("protocol")
.source("source")
.sourcePort("sourcePort")
.build())
.ruleOptions(List.of(RuleOptionProperty.builder()
.keyword("keyword")
// the properties below are optional
.settings(List.of("settings"))
.build()))
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnRuleGroup.StatefulRuleProperty.Builder
A builder for
CfnRuleGroup.StatefulRuleProperty |
static class |
CfnRuleGroup.StatefulRuleProperty.Jsii$Proxy
An implementation for
CfnRuleGroup.StatefulRuleProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnRuleGroup.StatefulRuleProperty.Builder |
builder() |
String |
getAction()
Defines what Network Firewall should do with the packets in a traffic flow when the flow matches the stateful rule criteria.
|
Object |
getHeader()
The stateful inspection criteria for this rule, used to inspect traffic flows.
|
Object |
getRuleOptions()
Additional settings for a stateful rule, provided as keywords and settings.
|
@Stability(value=Stable) @NotNull String getAction()
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:
LoggingConfiguration .LoggingConfiguration .
You can use this action to test a rule that you intend to use to drop traffic. You can enable the rule with ALERT action, verify in the logs that the rule is filtering as you want, then change the action to DROP .
@Stability(value=Stable) @NotNull Object getHeader()
@Stability(value=Stable) @NotNull Object getRuleOptions()
@Stability(value=Stable) static CfnRuleGroup.StatefulRuleProperty.Builder builder()
Copyright © 2022. All rights reserved.