1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. ec2
  5. TrafficMirrorFilterRule

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.32.0 published on Wednesday, Aug 13, 2025 by Pulumi

aws-native.ec2.TrafficMirrorFilterRule

Explore with Pulumi AI

aws-native logo

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.32.0 published on Wednesday, Aug 13, 2025 by Pulumi

    Resource Type definition for for AWS::EC2::TrafficMirrorFilterRule

    Create TrafficMirrorFilterRule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new TrafficMirrorFilterRule(name: string, args: TrafficMirrorFilterRuleArgs, opts?: CustomResourceOptions);
    @overload
    def TrafficMirrorFilterRule(resource_name: str,
                                args: TrafficMirrorFilterRuleArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def TrafficMirrorFilterRule(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                destination_cidr_block: Optional[str] = None,
                                rule_action: Optional[str] = None,
                                rule_number: Optional[int] = None,
                                source_cidr_block: Optional[str] = None,
                                traffic_direction: Optional[str] = None,
                                traffic_mirror_filter_id: Optional[str] = None,
                                description: Optional[str] = None,
                                destination_port_range: Optional[TrafficMirrorFilterRuleTrafficMirrorPortRangeArgs] = None,
                                protocol: Optional[int] = None,
                                source_port_range: Optional[TrafficMirrorFilterRuleTrafficMirrorPortRangeArgs] = None,
                                tags: Optional[Sequence[_root_inputs.TagArgs]] = None)
    func NewTrafficMirrorFilterRule(ctx *Context, name string, args TrafficMirrorFilterRuleArgs, opts ...ResourceOption) (*TrafficMirrorFilterRule, error)
    public TrafficMirrorFilterRule(string name, TrafficMirrorFilterRuleArgs args, CustomResourceOptions? opts = null)
    public TrafficMirrorFilterRule(String name, TrafficMirrorFilterRuleArgs args)
    public TrafficMirrorFilterRule(String name, TrafficMirrorFilterRuleArgs args, CustomResourceOptions options)
    
    type: aws-native:ec2:TrafficMirrorFilterRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args TrafficMirrorFilterRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args TrafficMirrorFilterRuleArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args TrafficMirrorFilterRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TrafficMirrorFilterRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TrafficMirrorFilterRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    TrafficMirrorFilterRule Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The TrafficMirrorFilterRule resource accepts the following input properties:

    DestinationCidrBlock string
    The destination CIDR block to assign to the Traffic Mirror rule.
    RuleAction string
    The action to take on the filtered traffic (accept/reject).
    RuleNumber int
    The number of the Traffic Mirror rule.
    SourceCidrBlock string
    The source CIDR block to assign to the Traffic Mirror Filter rule.
    TrafficDirection string
    The direction of traffic (ingress/egress).
    TrafficMirrorFilterId string
    The ID of the filter that this rule is associated with.
    Description string
    The description of the Traffic Mirror Filter rule.
    DestinationPortRange Pulumi.AwsNative.Ec2.Inputs.TrafficMirrorFilterRuleTrafficMirrorPortRange
    The destination port range.
    Protocol int
    The number of protocol, for example 17 (UDP), to assign to the Traffic Mirror rule.
    SourcePortRange Pulumi.AwsNative.Ec2.Inputs.TrafficMirrorFilterRuleTrafficMirrorPortRange
    The source port range.
    Tags List<Pulumi.AwsNative.Inputs.Tag>
    Any tags assigned to the Traffic Mirror Filter rule.
    DestinationCidrBlock string
    The destination CIDR block to assign to the Traffic Mirror rule.
    RuleAction string
    The action to take on the filtered traffic (accept/reject).
    RuleNumber int
    The number of the Traffic Mirror rule.
    SourceCidrBlock string
    The source CIDR block to assign to the Traffic Mirror Filter rule.
    TrafficDirection string
    The direction of traffic (ingress/egress).
    TrafficMirrorFilterId string
    The ID of the filter that this rule is associated with.
    Description string
    The description of the Traffic Mirror Filter rule.
    DestinationPortRange TrafficMirrorFilterRuleTrafficMirrorPortRangeArgs
    The destination port range.
    Protocol int
    The number of protocol, for example 17 (UDP), to assign to the Traffic Mirror rule.
    SourcePortRange TrafficMirrorFilterRuleTrafficMirrorPortRangeArgs
    The source port range.
    Tags TagArgs
    Any tags assigned to the Traffic Mirror Filter rule.
    destinationCidrBlock String
    The destination CIDR block to assign to the Traffic Mirror rule.
    ruleAction String
    The action to take on the filtered traffic (accept/reject).
    ruleNumber Integer
    The number of the Traffic Mirror rule.
    sourceCidrBlock String
    The source CIDR block to assign to the Traffic Mirror Filter rule.
    trafficDirection String
    The direction of traffic (ingress/egress).
    trafficMirrorFilterId String
    The ID of the filter that this rule is associated with.
    description String
    The description of the Traffic Mirror Filter rule.
    destinationPortRange TrafficMirrorFilterRuleTrafficMirrorPortRange
    The destination port range.
    protocol Integer
    The number of protocol, for example 17 (UDP), to assign to the Traffic Mirror rule.
    sourcePortRange TrafficMirrorFilterRuleTrafficMirrorPortRange
    The source port range.
    tags List<Tag>
    Any tags assigned to the Traffic Mirror Filter rule.
    destinationCidrBlock string
    The destination CIDR block to assign to the Traffic Mirror rule.
    ruleAction string
    The action to take on the filtered traffic (accept/reject).
    ruleNumber number
    The number of the Traffic Mirror rule.
    sourceCidrBlock string
    The source CIDR block to assign to the Traffic Mirror Filter rule.
    trafficDirection string
    The direction of traffic (ingress/egress).
    trafficMirrorFilterId string
    The ID of the filter that this rule is associated with.
    description string
    The description of the Traffic Mirror Filter rule.
    destinationPortRange TrafficMirrorFilterRuleTrafficMirrorPortRange
    The destination port range.
    protocol number
    The number of protocol, for example 17 (UDP), to assign to the Traffic Mirror rule.
    sourcePortRange TrafficMirrorFilterRuleTrafficMirrorPortRange
    The source port range.
    tags Tag[]
    Any tags assigned to the Traffic Mirror Filter rule.
    destination_cidr_block str
    The destination CIDR block to assign to the Traffic Mirror rule.
    rule_action str
    The action to take on the filtered traffic (accept/reject).
    rule_number int
    The number of the Traffic Mirror rule.
    source_cidr_block str
    The source CIDR block to assign to the Traffic Mirror Filter rule.
    traffic_direction str
    The direction of traffic (ingress/egress).
    traffic_mirror_filter_id str
    The ID of the filter that this rule is associated with.
    description str
    The description of the Traffic Mirror Filter rule.
    destination_port_range TrafficMirrorFilterRuleTrafficMirrorPortRangeArgs
    The destination port range.
    protocol int
    The number of protocol, for example 17 (UDP), to assign to the Traffic Mirror rule.
    source_port_range TrafficMirrorFilterRuleTrafficMirrorPortRangeArgs
    The source port range.
    tags Sequence[TagArgs]
    Any tags assigned to the Traffic Mirror Filter rule.
    destinationCidrBlock String
    The destination CIDR block to assign to the Traffic Mirror rule.
    ruleAction String
    The action to take on the filtered traffic (accept/reject).
    ruleNumber Number
    The number of the Traffic Mirror rule.
    sourceCidrBlock String
    The source CIDR block to assign to the Traffic Mirror Filter rule.
    trafficDirection String
    The direction of traffic (ingress/egress).
    trafficMirrorFilterId String
    The ID of the filter that this rule is associated with.
    description String
    The description of the Traffic Mirror Filter rule.
    destinationPortRange Property Map
    The destination port range.
    protocol Number
    The number of protocol, for example 17 (UDP), to assign to the Traffic Mirror rule.
    sourcePortRange Property Map
    The source port range.
    tags List<Property Map>
    Any tags assigned to the Traffic Mirror Filter rule.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the TrafficMirrorFilterRule resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    TrafficMirrorFilterRuleId string
    The ID of the Traffic Mirror Filter rule.
    Id string
    The provider-assigned unique ID for this managed resource.
    TrafficMirrorFilterRuleId string
    The ID of the Traffic Mirror Filter rule.
    id String
    The provider-assigned unique ID for this managed resource.
    trafficMirrorFilterRuleId String
    The ID of the Traffic Mirror Filter rule.
    id string
    The provider-assigned unique ID for this managed resource.
    trafficMirrorFilterRuleId string
    The ID of the Traffic Mirror Filter rule.
    id str
    The provider-assigned unique ID for this managed resource.
    traffic_mirror_filter_rule_id str
    The ID of the Traffic Mirror Filter rule.
    id String
    The provider-assigned unique ID for this managed resource.
    trafficMirrorFilterRuleId String
    The ID of the Traffic Mirror Filter rule.

    Supporting Types

    Tag, TagArgs

    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    TrafficMirrorFilterRuleTrafficMirrorPortRange, TrafficMirrorFilterRuleTrafficMirrorPortRangeArgs

    FromPort int
    The first port in the Traffic Mirror port range.
    ToPort int
    The last port in the Traffic Mirror port range.
    FromPort int
    The first port in the Traffic Mirror port range.
    ToPort int
    The last port in the Traffic Mirror port range.
    fromPort Integer
    The first port in the Traffic Mirror port range.
    toPort Integer
    The last port in the Traffic Mirror port range.
    fromPort number
    The first port in the Traffic Mirror port range.
    toPort number
    The last port in the Traffic Mirror port range.
    from_port int
    The first port in the Traffic Mirror port range.
    to_port int
    The last port in the Traffic Mirror port range.
    fromPort Number
    The first port in the Traffic Mirror port range.
    toPort Number
    The last port in the Traffic Mirror port range.

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    We recommend new projects start with resources from the AWS provider.

    AWS Cloud Control v1.32.0 published on Wednesday, Aug 13, 2025 by Pulumi