RuleGroupProperty Struct
The object that defines the rules in a rule group.
AWS Network Firewall uses a rule group to inspect and control network traffic. You define stateless rule groups to inspect individual packets and you define stateful rule groups to inspect packets in the context of their traffic flow.
To use a rule group, you include it by reference in an Network Firewall firewall policy, then you use the policy in a firewall. You can reference a rule group from more than one firewall policy, and you can use a firewall policy in more than one firewall.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_networkfirewall as networkfirewall } from 'aws-cdk-lib';
const ruleGroupProperty: networkfirewall.CfnRuleGroup.RuleGroupProperty = {
rulesSource: {
rulesSourceList: {
generatedRulesType: 'generatedRulesType',
targets: ['targets'],
targetTypes: ['targetTypes'],
},
rulesString: 'rulesString',
statefulRules: [{
action: 'action',
header: {
destination: 'destination',
destinationPort: 'destinationPort',
direction: 'direction',
protocol: 'protocol',
source: 'source',
sourcePort: 'sourcePort',
},
ruleOptions: [{
keyword: 'keyword',
// the properties below are optional
settings: ['settings'],
}],
}],
statelessRulesAndCustomActions: {
statelessRules: [{
priority: 123,
ruleDefinition: {
actions: ['actions'],
matchAttributes: {
destinationPorts: [{
fromPort: 123,
toPort: 123,
}],
destinations: [{
addressDefinition: 'addressDefinition',
}],
protocols: [123],
sourcePorts: [{
fromPort: 123,
toPort: 123,
}],
sources: [{
addressDefinition: 'addressDefinition',
}],
tcpFlags: [{
flags: ['flags'],
// the properties below are optional
masks: ['masks'],
}],
},
},
}],
// the properties below are optional
customActions: [{
actionDefinition: {
publishMetricAction: {
dimensions: [{
value: 'value',
}],
},
},
actionName: 'actionName',
}],
},
},
// the properties below are optional
referenceSets: {
ipSetReferences: {
ipSetReferencesKey: {
referenceArn: 'referenceArn',
},
},
},
ruleVariables: {
ipSets: {
ipSetsKey: {
definition: ['definition'],
},
},
portSets: {
portSetsKey: {
definition: ['definition'],
},
},
},
statefulRuleOptions: {
ruleOrder: 'ruleOrder',
},
};
Properties
referenceSetsoptionalIResolvable | CfnRuleGroup.ReferenceSetsPropertyreference_setsoptionaltyping.Union[IResolvable, ReferenceSetsProperty]referenceSetsoptionalIResolvableReferenceSetsoptionalIResolvableReferenceSetsoptionalinterface{}#rulesSourceIResolvable | CfnRuleGroup.RulesSourcePropertyrules_sourcetyping.Union[IResolvable, RulesSourceProperty]rulesSourceIResolvableRulesSourceIResolvableRulesSourceinterface{}required#ruleVariablesoptionalIResolvable | CfnRuleGroup.RuleVariablesPropertyrule_variablesoptionaltyping.Union[IResolvable, RuleVariablesProperty]ruleVariablesoptionalIResolvableRuleVariablesoptionalIResolvableRuleVariablesoptionalinterface{}#You can only use these for stateful rule groups.
statefulRuleOptionsoptionalIResolvable | CfnRuleGroup.StatefulRuleOptionsPropertystateful_rule_optionsoptionaltyping.Union[IResolvable, StatefulRuleOptionsProperty]statefulRuleOptionsoptionalIResolvableStatefulRuleOptionsoptionalIResolvableStatefulRuleOptionsoptionalinterface{}#notes
The policies where you use your stateful rule group must have stateful rule options settings that are compatible with these settings. Some limitations apply; for more information, see Strict evaluation order in the AWS Network Firewall Developer Guide .