AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::EC2::TrafficMirrorFilterRule

CfnTrafficMirrorFilterRule

Creates a Traffic Mirror filter rule. A Traffic Mirror rule defines the Traffic Mirror source traffic to mirror. You need the Traffic Mirror filter ID when you create the rule.

Import

import { CfnTrafficMirrorFilterRule } from 'aws-cdk-lib/aws-ec2';

Or use the module namespace:

import * as ec2 from 'aws-cdk-lib/aws-ec2';
// ec2.CfnTrafficMirrorFilterRule

Properties

Configuration passed to the constructor as CfnTrafficMirrorFilterRuleProps.

destinationCidrBlockRequired
string

The destination CIDR block to assign to the Traffic Mirror rule.

ruleActionRequired
string

The action to take on the filtered traffic.

ruleNumberRequired
number

The number of the Traffic Mirror rule. This number must be unique for each Traffic Mirror rule in a given direction. The rules are processed in ascending order by rule number.

sourceCidrBlockRequired
string

The source CIDR block to assign to the Traffic Mirror rule.

trafficDirectionRequired
string

The type of traffic.

trafficMirrorFilterIdRequired
string

The ID of the filter that this rule is associated with.

descriptionOptional
string

The description of the Traffic Mirror rule.

destinationPortRangeOptional
IResolvable | TrafficMirrorPortRangeProperty

The destination port range.

protocolOptional
number

The protocol, for example UDP, to assign to the Traffic Mirror rule. For information about the protocol value, see [Protocol Numbers](https://docs.aws.amazon.com/https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml) on the Internet Assigned Numbers Authority (IANA) website.

sourcePortRangeOptional
IResolvable | TrafficMirrorPortRangeProperty

The source port range.

tagsOptional
CfnTag[]

Tags on Traffic Mirroring filter rules.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the Amazon EC2 Cheat Sheet

Everything you need to know about Amazon EC2 on one page. HD quality, print-friendly.

Download Free Infographic