1. Packages
  2. Volcengine
  3. API Docs
  4. vpc
  5. TrafficMirrorFilterRule
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine

volcengine.vpc.TrafficMirrorFilterRule

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine

    Provides a resource to manage traffic mirror filter rule

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const foo = new volcengine.vpc.TrafficMirrorFilter("foo", {
        trafficMirrorFilterName: "acc-test-traffic-mirror-filter",
        description: "acc-test",
        projectName: "default",
        tags: [{
            key: "k1",
            value: "v1",
        }],
    });
    const foo_ingress = new volcengine.vpc.TrafficMirrorFilterRule("foo-ingress", {
        trafficMirrorFilterId: foo.id,
        trafficDirection: "ingress",
        description: "acc-test",
        priority: 1,
        policy: "reject",
        protocol: "all",
        sourceCidrBlock: "10.0.1.0/24",
        sourcePortRange: "-1/-1",
        destinationCidrBlock: "10.0.0.0/24",
        destinationPortRange: "-1/-1",
    });
    const foo_egress = new volcengine.vpc.TrafficMirrorFilterRule("foo-egress", {
        trafficMirrorFilterId: foo.id,
        trafficDirection: "egress",
        description: "acc-test",
        priority: 2,
        policy: "reject",
        protocol: "tcp",
        sourceCidrBlock: "10.0.1.0/24",
        sourcePortRange: "80/80",
        destinationCidrBlock: "10.0.0.0/24",
        destinationPortRange: "88/90",
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo = volcengine.vpc.TrafficMirrorFilter("foo",
        traffic_mirror_filter_name="acc-test-traffic-mirror-filter",
        description="acc-test",
        project_name="default",
        tags=[volcengine.vpc.TrafficMirrorFilterTagArgs(
            key="k1",
            value="v1",
        )])
    foo_ingress = volcengine.vpc.TrafficMirrorFilterRule("foo-ingress",
        traffic_mirror_filter_id=foo.id,
        traffic_direction="ingress",
        description="acc-test",
        priority=1,
        policy="reject",
        protocol="all",
        source_cidr_block="10.0.1.0/24",
        source_port_range="-1/-1",
        destination_cidr_block="10.0.0.0/24",
        destination_port_range="-1/-1")
    foo_egress = volcengine.vpc.TrafficMirrorFilterRule("foo-egress",
        traffic_mirror_filter_id=foo.id,
        traffic_direction="egress",
        description="acc-test",
        priority=2,
        policy="reject",
        protocol="tcp",
        source_cidr_block="10.0.1.0/24",
        source_port_range="80/80",
        destination_cidr_block="10.0.0.0/24",
        destination_port_range="88/90")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		foo, err := vpc.NewTrafficMirrorFilter(ctx, "foo", &vpc.TrafficMirrorFilterArgs{
    			TrafficMirrorFilterName: pulumi.String("acc-test-traffic-mirror-filter"),
    			Description:             pulumi.String("acc-test"),
    			ProjectName:             pulumi.String("default"),
    			Tags: vpc.TrafficMirrorFilterTagArray{
    				&vpc.TrafficMirrorFilterTagArgs{
    					Key:   pulumi.String("k1"),
    					Value: pulumi.String("v1"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = vpc.NewTrafficMirrorFilterRule(ctx, "foo-ingress", &vpc.TrafficMirrorFilterRuleArgs{
    			TrafficMirrorFilterId: foo.ID(),
    			TrafficDirection:      pulumi.String("ingress"),
    			Description:           pulumi.String("acc-test"),
    			Priority:              pulumi.Int(1),
    			Policy:                pulumi.String("reject"),
    			Protocol:              pulumi.String("all"),
    			SourceCidrBlock:       pulumi.String("10.0.1.0/24"),
    			SourcePortRange:       pulumi.String("-1/-1"),
    			DestinationCidrBlock:  pulumi.String("10.0.0.0/24"),
    			DestinationPortRange:  pulumi.String("-1/-1"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = vpc.NewTrafficMirrorFilterRule(ctx, "foo-egress", &vpc.TrafficMirrorFilterRuleArgs{
    			TrafficMirrorFilterId: foo.ID(),
    			TrafficDirection:      pulumi.String("egress"),
    			Description:           pulumi.String("acc-test"),
    			Priority:              pulumi.Int(2),
    			Policy:                pulumi.String("reject"),
    			Protocol:              pulumi.String("tcp"),
    			SourceCidrBlock:       pulumi.String("10.0.1.0/24"),
    			SourcePortRange:       pulumi.String("80/80"),
    			DestinationCidrBlock:  pulumi.String("10.0.0.0/24"),
    			DestinationPortRange:  pulumi.String("88/90"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Volcengine.Vpc.TrafficMirrorFilter("foo", new()
        {
            TrafficMirrorFilterName = "acc-test-traffic-mirror-filter",
            Description = "acc-test",
            ProjectName = "default",
            Tags = new[]
            {
                new Volcengine.Vpc.Inputs.TrafficMirrorFilterTagArgs
                {
                    Key = "k1",
                    Value = "v1",
                },
            },
        });
    
        var foo_ingress = new Volcengine.Vpc.TrafficMirrorFilterRule("foo-ingress", new()
        {
            TrafficMirrorFilterId = foo.Id,
            TrafficDirection = "ingress",
            Description = "acc-test",
            Priority = 1,
            Policy = "reject",
            Protocol = "all",
            SourceCidrBlock = "10.0.1.0/24",
            SourcePortRange = "-1/-1",
            DestinationCidrBlock = "10.0.0.0/24",
            DestinationPortRange = "-1/-1",
        });
    
        var foo_egress = new Volcengine.Vpc.TrafficMirrorFilterRule("foo-egress", new()
        {
            TrafficMirrorFilterId = foo.Id,
            TrafficDirection = "egress",
            Description = "acc-test",
            Priority = 2,
            Policy = "reject",
            Protocol = "tcp",
            SourceCidrBlock = "10.0.1.0/24",
            SourcePortRange = "80/80",
            DestinationCidrBlock = "10.0.0.0/24",
            DestinationPortRange = "88/90",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.vpc.TrafficMirrorFilter;
    import com.pulumi.volcengine.vpc.TrafficMirrorFilterArgs;
    import com.pulumi.volcengine.vpc.inputs.TrafficMirrorFilterTagArgs;
    import com.pulumi.volcengine.vpc.TrafficMirrorFilterRule;
    import com.pulumi.volcengine.vpc.TrafficMirrorFilterRuleArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var foo = new TrafficMirrorFilter("foo", TrafficMirrorFilterArgs.builder()        
                .trafficMirrorFilterName("acc-test-traffic-mirror-filter")
                .description("acc-test")
                .projectName("default")
                .tags(TrafficMirrorFilterTagArgs.builder()
                    .key("k1")
                    .value("v1")
                    .build())
                .build());
    
            var foo_ingress = new TrafficMirrorFilterRule("foo-ingress", TrafficMirrorFilterRuleArgs.builder()        
                .trafficMirrorFilterId(foo.id())
                .trafficDirection("ingress")
                .description("acc-test")
                .priority(1)
                .policy("reject")
                .protocol("all")
                .sourceCidrBlock("10.0.1.0/24")
                .sourcePortRange("-1/-1")
                .destinationCidrBlock("10.0.0.0/24")
                .destinationPortRange("-1/-1")
                .build());
    
            var foo_egress = new TrafficMirrorFilterRule("foo-egress", TrafficMirrorFilterRuleArgs.builder()        
                .trafficMirrorFilterId(foo.id())
                .trafficDirection("egress")
                .description("acc-test")
                .priority(2)
                .policy("reject")
                .protocol("tcp")
                .sourceCidrBlock("10.0.1.0/24")
                .sourcePortRange("80/80")
                .destinationCidrBlock("10.0.0.0/24")
                .destinationPortRange("88/90")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: volcengine:vpc:TrafficMirrorFilter
        properties:
          trafficMirrorFilterName: acc-test-traffic-mirror-filter
          description: acc-test
          projectName: default
          tags:
            - key: k1
              value: v1
      foo-ingress:
        type: volcengine:vpc:TrafficMirrorFilterRule
        properties:
          trafficMirrorFilterId: ${foo.id}
          trafficDirection: ingress
          description: acc-test
          priority: 1
          policy: reject
          protocol: all
          sourceCidrBlock: 10.0.1.0/24
          sourcePortRange: -1/-1
          destinationCidrBlock: 10.0.0.0/24
          destinationPortRange: -1/-1
      foo-egress:
        type: volcengine:vpc:TrafficMirrorFilterRule
        properties:
          trafficMirrorFilterId: ${foo.id}
          trafficDirection: egress
          description: acc-test
          priority: 2
          policy: reject
          protocol: tcp
          sourceCidrBlock: 10.0.1.0/24
          sourcePortRange: 80/80
          destinationCidrBlock: 10.0.0.0/24
          destinationPortRange: 88/90
    

    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,
                                policy: Optional[str] = None,
                                protocol: Optional[str] = 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[str] = None,
                                priority: Optional[int] = None,
                                source_port_range: Optional[str] = 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: volcengine:vpc: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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var trafficMirrorFilterRuleResource = new Volcengine.Vpc.TrafficMirrorFilterRule("trafficMirrorFilterRuleResource", new()
    {
        DestinationCidrBlock = "string",
        Policy = "string",
        Protocol = "string",
        SourceCidrBlock = "string",
        TrafficDirection = "string",
        TrafficMirrorFilterId = "string",
        Description = "string",
        DestinationPortRange = "string",
        Priority = 0,
        SourcePortRange = "string",
    });
    
    example, err := vpc.NewTrafficMirrorFilterRule(ctx, "trafficMirrorFilterRuleResource", &vpc.TrafficMirrorFilterRuleArgs{
    	DestinationCidrBlock:  pulumi.String("string"),
    	Policy:                pulumi.String("string"),
    	Protocol:              pulumi.String("string"),
    	SourceCidrBlock:       pulumi.String("string"),
    	TrafficDirection:      pulumi.String("string"),
    	TrafficMirrorFilterId: pulumi.String("string"),
    	Description:           pulumi.String("string"),
    	DestinationPortRange:  pulumi.String("string"),
    	Priority:              pulumi.Int(0),
    	SourcePortRange:       pulumi.String("string"),
    })
    
    var trafficMirrorFilterRuleResource = new TrafficMirrorFilterRule("trafficMirrorFilterRuleResource", TrafficMirrorFilterRuleArgs.builder()
        .destinationCidrBlock("string")
        .policy("string")
        .protocol("string")
        .sourceCidrBlock("string")
        .trafficDirection("string")
        .trafficMirrorFilterId("string")
        .description("string")
        .destinationPortRange("string")
        .priority(0)
        .sourcePortRange("string")
        .build());
    
    traffic_mirror_filter_rule_resource = volcengine.vpc.TrafficMirrorFilterRule("trafficMirrorFilterRuleResource",
        destination_cidr_block="string",
        policy="string",
        protocol="string",
        source_cidr_block="string",
        traffic_direction="string",
        traffic_mirror_filter_id="string",
        description="string",
        destination_port_range="string",
        priority=0,
        source_port_range="string")
    
    const trafficMirrorFilterRuleResource = new volcengine.vpc.TrafficMirrorFilterRule("trafficMirrorFilterRuleResource", {
        destinationCidrBlock: "string",
        policy: "string",
        protocol: "string",
        sourceCidrBlock: "string",
        trafficDirection: "string",
        trafficMirrorFilterId: "string",
        description: "string",
        destinationPortRange: "string",
        priority: 0,
        sourcePortRange: "string",
    });
    
    type: volcengine:vpc:TrafficMirrorFilterRule
    properties:
        description: string
        destinationCidrBlock: string
        destinationPortRange: string
        policy: string
        priority: 0
        protocol: string
        sourceCidrBlock: string
        sourcePortRange: string
        trafficDirection: string
        trafficMirrorFilterId: string
    

    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 of traffic mirror filter rule.
    Policy string
    The policy of traffic mirror filter rule. Valid values: accept, reject.
    Protocol string
    The protocol of traffic mirror filter rule. Valid values: tcp, udp, icmp, all.
    SourceCidrBlock string
    The source cidr block of traffic mirror filter rule.
    TrafficDirection string
    The traffic direction of traffic mirror filter rule. Valid values: ingress; egress.
    TrafficMirrorFilterId string
    The ID of traffic mirror filter.
    Description string
    The description of traffic mirror filter rule.
    DestinationPortRange string
    The destination port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.
    Priority int
    The priority of traffic mirror filter rule. Valid values: 1~1000. Default value is 1.
    SourcePortRange string
    The source port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.
    DestinationCidrBlock string
    The destination cidr block of traffic mirror filter rule.
    Policy string
    The policy of traffic mirror filter rule. Valid values: accept, reject.
    Protocol string
    The protocol of traffic mirror filter rule. Valid values: tcp, udp, icmp, all.
    SourceCidrBlock string
    The source cidr block of traffic mirror filter rule.
    TrafficDirection string
    The traffic direction of traffic mirror filter rule. Valid values: ingress; egress.
    TrafficMirrorFilterId string
    The ID of traffic mirror filter.
    Description string
    The description of traffic mirror filter rule.
    DestinationPortRange string
    The destination port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.
    Priority int
    The priority of traffic mirror filter rule. Valid values: 1~1000. Default value is 1.
    SourcePortRange string
    The source port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.
    destinationCidrBlock String
    The destination cidr block of traffic mirror filter rule.
    policy String
    The policy of traffic mirror filter rule. Valid values: accept, reject.
    protocol String
    The protocol of traffic mirror filter rule. Valid values: tcp, udp, icmp, all.
    sourceCidrBlock String
    The source cidr block of traffic mirror filter rule.
    trafficDirection String
    The traffic direction of traffic mirror filter rule. Valid values: ingress; egress.
    trafficMirrorFilterId String
    The ID of traffic mirror filter.
    description String
    The description of traffic mirror filter rule.
    destinationPortRange String
    The destination port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.
    priority Integer
    The priority of traffic mirror filter rule. Valid values: 1~1000. Default value is 1.
    sourcePortRange String
    The source port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.
    destinationCidrBlock string
    The destination cidr block of traffic mirror filter rule.
    policy string
    The policy of traffic mirror filter rule. Valid values: accept, reject.
    protocol string
    The protocol of traffic mirror filter rule. Valid values: tcp, udp, icmp, all.
    sourceCidrBlock string
    The source cidr block of traffic mirror filter rule.
    trafficDirection string
    The traffic direction of traffic mirror filter rule. Valid values: ingress; egress.
    trafficMirrorFilterId string
    The ID of traffic mirror filter.
    description string
    The description of traffic mirror filter rule.
    destinationPortRange string
    The destination port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.
    priority number
    The priority of traffic mirror filter rule. Valid values: 1~1000. Default value is 1.
    sourcePortRange string
    The source port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.
    destination_cidr_block str
    The destination cidr block of traffic mirror filter rule.
    policy str
    The policy of traffic mirror filter rule. Valid values: accept, reject.
    protocol str
    The protocol of traffic mirror filter rule. Valid values: tcp, udp, icmp, all.
    source_cidr_block str
    The source cidr block of traffic mirror filter rule.
    traffic_direction str
    The traffic direction of traffic mirror filter rule. Valid values: ingress; egress.
    traffic_mirror_filter_id str
    The ID of traffic mirror filter.
    description str
    The description of traffic mirror filter rule.
    destination_port_range str
    The destination port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.
    priority int
    The priority of traffic mirror filter rule. Valid values: 1~1000. Default value is 1.
    source_port_range str
    The source port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.
    destinationCidrBlock String
    The destination cidr block of traffic mirror filter rule.
    policy String
    The policy of traffic mirror filter rule. Valid values: accept, reject.
    protocol String
    The protocol of traffic mirror filter rule. Valid values: tcp, udp, icmp, all.
    sourceCidrBlock String
    The source cidr block of traffic mirror filter rule.
    trafficDirection String
    The traffic direction of traffic mirror filter rule. Valid values: ingress; egress.
    trafficMirrorFilterId String
    The ID of traffic mirror filter.
    description String
    The description of traffic mirror filter rule.
    destinationPortRange String
    The destination port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.
    priority Number
    The priority of traffic mirror filter rule. Valid values: 1~1000. Default value is 1.
    sourcePortRange String
    The source port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.

    Outputs

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

    CreatedAt string
    The create time of traffic mirror filter rule.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of traffic mirror filter rule.
    TrafficMirrorFilterRuleId string
    The ID of traffic mirror filter rule.
    UpdatedAt string
    The last update time of traffic mirror filter rule.
    CreatedAt string
    The create time of traffic mirror filter rule.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of traffic mirror filter rule.
    TrafficMirrorFilterRuleId string
    The ID of traffic mirror filter rule.
    UpdatedAt string
    The last update time of traffic mirror filter rule.
    createdAt String
    The create time of traffic mirror filter rule.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of traffic mirror filter rule.
    trafficMirrorFilterRuleId String
    The ID of traffic mirror filter rule.
    updatedAt String
    The last update time of traffic mirror filter rule.
    createdAt string
    The create time of traffic mirror filter rule.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of traffic mirror filter rule.
    trafficMirrorFilterRuleId string
    The ID of traffic mirror filter rule.
    updatedAt string
    The last update time of traffic mirror filter rule.
    created_at str
    The create time of traffic mirror filter rule.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of traffic mirror filter rule.
    traffic_mirror_filter_rule_id str
    The ID of traffic mirror filter rule.
    updated_at str
    The last update time of traffic mirror filter rule.
    createdAt String
    The create time of traffic mirror filter rule.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of traffic mirror filter rule.
    trafficMirrorFilterRuleId String
    The ID of traffic mirror filter rule.
    updatedAt String
    The last update time of traffic mirror filter rule.

    Look up Existing TrafficMirrorFilterRule Resource

    Get an existing TrafficMirrorFilterRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: TrafficMirrorFilterRuleState, opts?: CustomResourceOptions): TrafficMirrorFilterRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            description: Optional[str] = None,
            destination_cidr_block: Optional[str] = None,
            destination_port_range: Optional[str] = None,
            policy: Optional[str] = None,
            priority: Optional[int] = None,
            protocol: Optional[str] = None,
            source_cidr_block: Optional[str] = None,
            source_port_range: Optional[str] = None,
            status: Optional[str] = None,
            traffic_direction: Optional[str] = None,
            traffic_mirror_filter_id: Optional[str] = None,
            traffic_mirror_filter_rule_id: Optional[str] = None,
            updated_at: Optional[str] = None) -> TrafficMirrorFilterRule
    func GetTrafficMirrorFilterRule(ctx *Context, name string, id IDInput, state *TrafficMirrorFilterRuleState, opts ...ResourceOption) (*TrafficMirrorFilterRule, error)
    public static TrafficMirrorFilterRule Get(string name, Input<string> id, TrafficMirrorFilterRuleState? state, CustomResourceOptions? opts = null)
    public static TrafficMirrorFilterRule get(String name, Output<String> id, TrafficMirrorFilterRuleState state, CustomResourceOptions options)
    resources:  _:    type: volcengine:vpc:TrafficMirrorFilterRule    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CreatedAt string
    The create time of traffic mirror filter rule.
    Description string
    The description of traffic mirror filter rule.
    DestinationCidrBlock string
    The destination cidr block of traffic mirror filter rule.
    DestinationPortRange string
    The destination port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.
    Policy string
    The policy of traffic mirror filter rule. Valid values: accept, reject.
    Priority int
    The priority of traffic mirror filter rule. Valid values: 1~1000. Default value is 1.
    Protocol string
    The protocol of traffic mirror filter rule. Valid values: tcp, udp, icmp, all.
    SourceCidrBlock string
    The source cidr block of traffic mirror filter rule.
    SourcePortRange string
    The source port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.
    Status string
    The status of traffic mirror filter rule.
    TrafficDirection string
    The traffic direction of traffic mirror filter rule. Valid values: ingress; egress.
    TrafficMirrorFilterId string
    The ID of traffic mirror filter.
    TrafficMirrorFilterRuleId string
    The ID of traffic mirror filter rule.
    UpdatedAt string
    The last update time of traffic mirror filter rule.
    CreatedAt string
    The create time of traffic mirror filter rule.
    Description string
    The description of traffic mirror filter rule.
    DestinationCidrBlock string
    The destination cidr block of traffic mirror filter rule.
    DestinationPortRange string
    The destination port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.
    Policy string
    The policy of traffic mirror filter rule. Valid values: accept, reject.
    Priority int
    The priority of traffic mirror filter rule. Valid values: 1~1000. Default value is 1.
    Protocol string
    The protocol of traffic mirror filter rule. Valid values: tcp, udp, icmp, all.
    SourceCidrBlock string
    The source cidr block of traffic mirror filter rule.
    SourcePortRange string
    The source port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.
    Status string
    The status of traffic mirror filter rule.
    TrafficDirection string
    The traffic direction of traffic mirror filter rule. Valid values: ingress; egress.
    TrafficMirrorFilterId string
    The ID of traffic mirror filter.
    TrafficMirrorFilterRuleId string
    The ID of traffic mirror filter rule.
    UpdatedAt string
    The last update time of traffic mirror filter rule.
    createdAt String
    The create time of traffic mirror filter rule.
    description String
    The description of traffic mirror filter rule.
    destinationCidrBlock String
    The destination cidr block of traffic mirror filter rule.
    destinationPortRange String
    The destination port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.
    policy String
    The policy of traffic mirror filter rule. Valid values: accept, reject.
    priority Integer
    The priority of traffic mirror filter rule. Valid values: 1~1000. Default value is 1.
    protocol String
    The protocol of traffic mirror filter rule. Valid values: tcp, udp, icmp, all.
    sourceCidrBlock String
    The source cidr block of traffic mirror filter rule.
    sourcePortRange String
    The source port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.
    status String
    The status of traffic mirror filter rule.
    trafficDirection String
    The traffic direction of traffic mirror filter rule. Valid values: ingress; egress.
    trafficMirrorFilterId String
    The ID of traffic mirror filter.
    trafficMirrorFilterRuleId String
    The ID of traffic mirror filter rule.
    updatedAt String
    The last update time of traffic mirror filter rule.
    createdAt string
    The create time of traffic mirror filter rule.
    description string
    The description of traffic mirror filter rule.
    destinationCidrBlock string
    The destination cidr block of traffic mirror filter rule.
    destinationPortRange string
    The destination port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.
    policy string
    The policy of traffic mirror filter rule. Valid values: accept, reject.
    priority number
    The priority of traffic mirror filter rule. Valid values: 1~1000. Default value is 1.
    protocol string
    The protocol of traffic mirror filter rule. Valid values: tcp, udp, icmp, all.
    sourceCidrBlock string
    The source cidr block of traffic mirror filter rule.
    sourcePortRange string
    The source port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.
    status string
    The status of traffic mirror filter rule.
    trafficDirection string
    The traffic direction of traffic mirror filter rule. Valid values: ingress; egress.
    trafficMirrorFilterId string
    The ID of traffic mirror filter.
    trafficMirrorFilterRuleId string
    The ID of traffic mirror filter rule.
    updatedAt string
    The last update time of traffic mirror filter rule.
    created_at str
    The create time of traffic mirror filter rule.
    description str
    The description of traffic mirror filter rule.
    destination_cidr_block str
    The destination cidr block of traffic mirror filter rule.
    destination_port_range str
    The destination port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.
    policy str
    The policy of traffic mirror filter rule. Valid values: accept, reject.
    priority int
    The priority of traffic mirror filter rule. Valid values: 1~1000. Default value is 1.
    protocol str
    The protocol of traffic mirror filter rule. Valid values: tcp, udp, icmp, all.
    source_cidr_block str
    The source cidr block of traffic mirror filter rule.
    source_port_range str
    The source port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.
    status str
    The status of traffic mirror filter rule.
    traffic_direction str
    The traffic direction of traffic mirror filter rule. Valid values: ingress; egress.
    traffic_mirror_filter_id str
    The ID of traffic mirror filter.
    traffic_mirror_filter_rule_id str
    The ID of traffic mirror filter rule.
    updated_at str
    The last update time of traffic mirror filter rule.
    createdAt String
    The create time of traffic mirror filter rule.
    description String
    The description of traffic mirror filter rule.
    destinationCidrBlock String
    The destination cidr block of traffic mirror filter rule.
    destinationPortRange String
    The destination port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.
    policy String
    The policy of traffic mirror filter rule. Valid values: accept, reject.
    priority Number
    The priority of traffic mirror filter rule. Valid values: 1~1000. Default value is 1.
    protocol String
    The protocol of traffic mirror filter rule. Valid values: tcp, udp, icmp, all.
    sourceCidrBlock String
    The source cidr block of traffic mirror filter rule.
    sourcePortRange String
    The source port range of traffic mirror filter rule. When the protocol is all or icmp, the value is -1/-1. When the protocol is tcp or udp, the value can be 1/200, 80/80, which means port 1 to port 200, port 80.
    status String
    The status of traffic mirror filter rule.
    trafficDirection String
    The traffic direction of traffic mirror filter rule. Valid values: ingress; egress.
    trafficMirrorFilterId String
    The ID of traffic mirror filter.
    trafficMirrorFilterRuleId String
    The ID of traffic mirror filter rule.
    updatedAt String
    The last update time of traffic mirror filter rule.

    Import

    TrafficMirrorFilterRule can be imported using the id, e.g.

    $ pulumi import volcengine:vpc/trafficMirrorFilterRule:TrafficMirrorFilterRule default resource_id
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine