interface RuleGroupProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.NetworkFirewall.CfnRuleGroup.RuleGroupProperty |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsnetworkfirewall#CfnRuleGroup_RuleGroupProperty |
Java | software.amazon.awscdk.services.networkfirewall.CfnRuleGroup.RuleGroupProperty |
Python | aws_cdk.aws_networkfirewall.CfnRuleGroup.RuleGroupProperty |
TypeScript | aws-cdk-lib » aws_networkfirewall » CfnRuleGroup » RuleGroupProperty |
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
Name | Type | Description |
---|---|---|
rules | IResolvable | Rules | The stateful rules or stateless rules for the rule group. |
reference | IResolvable | Reference | The reference sets for the stateful rule group. |
rule | IResolvable | Rule | Settings that are available for use in the rules in the rule group. |
stateful | IResolvable | Stateful | Additional options governing how Network Firewall handles stateful rules. |
rulesSource
Type:
IResolvable
|
Rules
The stateful rules or stateless rules for the rule group.
referenceSets?
Type:
IResolvable
|
Reference
(optional)
The reference sets for the stateful rule group.
ruleVariables?
Type:
IResolvable
|
Rule
(optional)
Settings that are available for use in the rules in the rule group.
You can only use these for stateful rule groups.
statefulRuleOptions?
Type:
IResolvable
|
Stateful
(optional)
Additional options governing how Network Firewall handles stateful rules.
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 .