aws-cdk-lib.aws_networkfirewall.CfnRuleGroup.RulesSourceProperty

interface RulesSourceProperty

LanguageType name
.NETAmazon.CDK.AWS.NetworkFirewall.CfnRuleGroup.RulesSourceProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsnetworkfirewall#CfnRuleGroup_RulesSourceProperty
Javasoftware.amazon.awscdk.services.networkfirewall.CfnRuleGroup.RulesSourceProperty
Pythonaws_cdk.aws_networkfirewall.CfnRuleGroup.RulesSourceProperty
TypeScript aws-cdk-lib » aws_networkfirewall » CfnRuleGroup » RulesSourceProperty

The stateless or stateful rules definitions for use in a single rule group.

Each rule group requires a single RulesSource . You can use an instance of this for either stateless rules or stateful rules.

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 rulesSourceProperty: networkfirewall.CfnRuleGroup.RulesSourceProperty = {
  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',
    }],
  },
};

Properties

NameTypeDescription
rulesSourceList?IResolvable | RulesSourceListPropertyStateful inspection criteria for a domain list rule group.
rulesString?stringStateful inspection criteria, provided in Suricata compatible intrusion prevention system (IPS) rules.
statefulRules?IResolvable | IResolvable | StatefulRuleProperty[]An array of individual stateful rules inspection criteria to be used together in a stateful rule group.
statelessRulesAndCustomActions?IResolvable | StatelessRulesAndCustomActionsPropertyStateless inspection criteria to be used in a stateless rule group.

rulesSourceList?

Type: IResolvable | RulesSourceListProperty (optional)

Stateful inspection criteria for a domain list rule group.


rulesString?

Type: string (optional)

Stateful inspection criteria, provided in Suricata compatible intrusion prevention system (IPS) rules.

Suricata is an open-source network IPS that includes a standard rule-based language for network traffic inspection.

These rules contain the inspection criteria and the action to take for traffic that matches the criteria, so this type of rule group doesn't have a separate action setting.


statefulRules?

Type: IResolvable | IResolvable | StatefulRuleProperty[] (optional)

An array of individual stateful rules inspection criteria to be used together in a stateful rule group.

Use this option to specify simple Suricata rules with protocol, source and destination, ports, direction, and rule options. For information about the Suricata Rules format, see Rules Format .


statelessRulesAndCustomActions?

Type: IResolvable | StatelessRulesAndCustomActionsProperty (optional)

Stateless inspection criteria to be used in a stateless rule group.