CreateTrafficMirrorFilterRule
In this article:
CreateTrafficMirrorFilterRule#
Description#
Creates a mirror filter rule.
Request Parameters#
Required parameters#
destinationCidrBlock — The CIDR block of the traffic destination.
Type: String
Required: Yes
ruleAction — The action triggered by the mirror filter rule.
Type: String
Required: Yes
Valid values:
accept|reject
ruleNumber — The number of the mirror filter rule.
Type: Integer
Required: Yes
Range: From 1 to 128
sourceCidrBlock — The CIDR block of the traffic source.
Type: String
Required: Yes
trafficDirection — The direction of the traffic.
Type: String
Required: Yes
Valid values:
ingress|egress
trafficMirrorFilterId — The mirror filter ID.
Type: String
Required: Yes
Optional parameters#
description — The description of the mirror filter rule.
Type: String
Required: No
Constraints: From 1 to 255 characters
destinationPortRange — The port range for the traffic destination. Only for TCP (6) or UDP (17) protocol.
Type: List of TrafficMirrorPortRange objects
Required: No
protocol — The protocol whose packets are filtered by the rule.
Type: Integer
Required: No
sourcePortRange — The port range for the traffic source. Only for TCP (6) or UDP (17) protocol.
Type: List of TrafficMirrorPortRange objects
Required: No
TagSpecification.N — The tags assigned to the mirror filter rule.
Type: List of TagSpecification objects
Required: No
Response Elements#
trafficMirrorFilterRule — Information about the mirror filter rule.
Type: TrafficMirrorFilterRule object
Examples#
c2-ec2 CreateTrafficMirrorFilterRule trafficMirrorFilterId tmf-FA88E939 description "text description" destinationCidrBlock 0.0.0.0/0 sourceCidrBlock 0.0.0.0/0 ruleAction accept trafficDirection ingress ruleNumber 10 protocol 6