1. Packages
  2. Alicloud Provider
  3. API Docs
  4. vpc
  5. TrafficMirrorFilter
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.vpc.TrafficMirrorFilter

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    Provides a VPC Traffic Mirror Filter resource. Traffic mirror filter criteria.

    For information about VPC Traffic Mirror Filter and how to use it, see What is Traffic Mirror Filter.

    NOTE: Available in v1.140.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const default3iXhoa = new alicloud.resourcemanager.ResourceGroup("default3iXhoa", {
        displayName: "testname03",
        resourceGroupName: name,
    });
    const defaultdNz2qk = new alicloud.resourcemanager.ResourceGroup("defaultdNz2qk", {
        displayName: "testname04",
        resourceGroupName: `${name}1`,
    });
    const _default = new alicloud.vpc.TrafficMirrorFilter("default", {
        trafficMirrorFilterDescription: "test",
        trafficMirrorFilterName: name,
        resourceGroupId: default3iXhoa.id,
        egressRules: [{
            priority: 1,
            protocol: "TCP",
            action: "accept",
            destinationCidrBlock: "32.0.0.0/4",
            destinationPortRange: "80/80",
            sourceCidrBlock: "16.0.0.0/4",
            sourcePortRange: "80/80",
        }],
        ingressRules: [{
            priority: 1,
            protocol: "TCP",
            action: "accept",
            destinationCidrBlock: "10.64.0.0/10",
            destinationPortRange: "80/80",
            sourceCidrBlock: "10.0.0.0/8",
            sourcePortRange: "80/80",
        }],
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default3i_xhoa = alicloud.resourcemanager.ResourceGroup("default3iXhoa",
        display_name="testname03",
        resource_group_name=name)
    defaultd_nz2qk = alicloud.resourcemanager.ResourceGroup("defaultdNz2qk",
        display_name="testname04",
        resource_group_name=f"{name}1")
    default = alicloud.vpc.TrafficMirrorFilter("default",
        traffic_mirror_filter_description="test",
        traffic_mirror_filter_name=name,
        resource_group_id=default3i_xhoa.id,
        egress_rules=[{
            "priority": 1,
            "protocol": "TCP",
            "action": "accept",
            "destination_cidr_block": "32.0.0.0/4",
            "destination_port_range": "80/80",
            "source_cidr_block": "16.0.0.0/4",
            "source_port_range": "80/80",
        }],
        ingress_rules=[{
            "priority": 1,
            "protocol": "TCP",
            "action": "accept",
            "destination_cidr_block": "10.64.0.0/10",
            "destination_port_range": "80/80",
            "source_cidr_block": "10.0.0.0/8",
            "source_port_range": "80/80",
        }])
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		default3iXhoa, err := resourcemanager.NewResourceGroup(ctx, "default3iXhoa", &resourcemanager.ResourceGroupArgs{
    			DisplayName:       pulumi.String("testname03"),
    			ResourceGroupName: pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = resourcemanager.NewResourceGroup(ctx, "defaultdNz2qk", &resourcemanager.ResourceGroupArgs{
    			DisplayName:       pulumi.String("testname04"),
    			ResourceGroupName: pulumi.Sprintf("%v1", name),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = vpc.NewTrafficMirrorFilter(ctx, "default", &vpc.TrafficMirrorFilterArgs{
    			TrafficMirrorFilterDescription: pulumi.String("test"),
    			TrafficMirrorFilterName:        pulumi.String(name),
    			ResourceGroupId:                default3iXhoa.ID(),
    			EgressRules: vpc.TrafficMirrorFilterEgressRuleTypeArray{
    				&vpc.TrafficMirrorFilterEgressRuleTypeArgs{
    					Priority:             pulumi.Int(1),
    					Protocol:             pulumi.String("TCP"),
    					Action:               pulumi.String("accept"),
    					DestinationCidrBlock: pulumi.String("32.0.0.0/4"),
    					DestinationPortRange: pulumi.String("80/80"),
    					SourceCidrBlock:      pulumi.String("16.0.0.0/4"),
    					SourcePortRange:      pulumi.String("80/80"),
    				},
    			},
    			IngressRules: vpc.TrafficMirrorFilterIngressRuleTypeArray{
    				&vpc.TrafficMirrorFilterIngressRuleTypeArgs{
    					Priority:             pulumi.Int(1),
    					Protocol:             pulumi.String("TCP"),
    					Action:               pulumi.String("accept"),
    					DestinationCidrBlock: pulumi.String("10.64.0.0/10"),
    					DestinationPortRange: pulumi.String("80/80"),
    					SourceCidrBlock:      pulumi.String("10.0.0.0/8"),
    					SourcePortRange:      pulumi.String("80/80"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var default3iXhoa = new AliCloud.ResourceManager.ResourceGroup("default3iXhoa", new()
        {
            DisplayName = "testname03",
            ResourceGroupName = name,
        });
    
        var defaultdNz2qk = new AliCloud.ResourceManager.ResourceGroup("defaultdNz2qk", new()
        {
            DisplayName = "testname04",
            ResourceGroupName = $"{name}1",
        });
    
        var @default = new AliCloud.Vpc.TrafficMirrorFilter("default", new()
        {
            TrafficMirrorFilterDescription = "test",
            TrafficMirrorFilterName = name,
            ResourceGroupId = default3iXhoa.Id,
            EgressRules = new[]
            {
                new AliCloud.Vpc.Inputs.TrafficMirrorFilterEgressRuleArgs
                {
                    Priority = 1,
                    Protocol = "TCP",
                    Action = "accept",
                    DestinationCidrBlock = "32.0.0.0/4",
                    DestinationPortRange = "80/80",
                    SourceCidrBlock = "16.0.0.0/4",
                    SourcePortRange = "80/80",
                },
            },
            IngressRules = new[]
            {
                new AliCloud.Vpc.Inputs.TrafficMirrorFilterIngressRuleArgs
                {
                    Priority = 1,
                    Protocol = "TCP",
                    Action = "accept",
                    DestinationCidrBlock = "10.64.0.0/10",
                    DestinationPortRange = "80/80",
                    SourceCidrBlock = "10.0.0.0/8",
                    SourcePortRange = "80/80",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.resourcemanager.ResourceGroup;
    import com.pulumi.alicloud.resourcemanager.ResourceGroupArgs;
    import com.pulumi.alicloud.vpc.TrafficMirrorFilter;
    import com.pulumi.alicloud.vpc.TrafficMirrorFilterArgs;
    import com.pulumi.alicloud.vpc.inputs.TrafficMirrorFilterEgressRuleArgs;
    import com.pulumi.alicloud.vpc.inputs.TrafficMirrorFilterIngressRuleArgs;
    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) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            var default3iXhoa = new ResourceGroup("default3iXhoa", ResourceGroupArgs.builder()
                .displayName("testname03")
                .resourceGroupName(name)
                .build());
    
            var defaultdNz2qk = new ResourceGroup("defaultdNz2qk", ResourceGroupArgs.builder()
                .displayName("testname04")
                .resourceGroupName(String.format("%s1", name))
                .build());
    
            var default_ = new TrafficMirrorFilter("default", TrafficMirrorFilterArgs.builder()
                .trafficMirrorFilterDescription("test")
                .trafficMirrorFilterName(name)
                .resourceGroupId(default3iXhoa.id())
                .egressRules(TrafficMirrorFilterEgressRuleArgs.builder()
                    .priority(1)
                    .protocol("TCP")
                    .action("accept")
                    .destinationCidrBlock("32.0.0.0/4")
                    .destinationPortRange("80/80")
                    .sourceCidrBlock("16.0.0.0/4")
                    .sourcePortRange("80/80")
                    .build())
                .ingressRules(TrafficMirrorFilterIngressRuleArgs.builder()
                    .priority(1)
                    .protocol("TCP")
                    .action("accept")
                    .destinationCidrBlock("10.64.0.0/10")
                    .destinationPortRange("80/80")
                    .sourceCidrBlock("10.0.0.0/8")
                    .sourcePortRange("80/80")
                    .build())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      default3iXhoa:
        type: alicloud:resourcemanager:ResourceGroup
        properties:
          displayName: testname03
          resourceGroupName: ${name}
      defaultdNz2qk:
        type: alicloud:resourcemanager:ResourceGroup
        properties:
          displayName: testname04
          resourceGroupName: ${name}1
      default:
        type: alicloud:vpc:TrafficMirrorFilter
        properties:
          trafficMirrorFilterDescription: test
          trafficMirrorFilterName: ${name}
          resourceGroupId: ${default3iXhoa.id}
          egressRules:
            - priority: 1
              protocol: TCP
              action: accept
              destinationCidrBlock: 32.0.0.0/4
              destinationPortRange: 80/80
              sourceCidrBlock: 16.0.0.0/4
              sourcePortRange: 80/80
          ingressRules:
            - priority: 1
              protocol: TCP
              action: accept
              destinationCidrBlock: 10.64.0.0/10
              destinationPortRange: 80/80
              sourceCidrBlock: 10.0.0.0/8
              sourcePortRange: 80/80
    

    Create TrafficMirrorFilter Resource

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

    Constructor syntax

    new TrafficMirrorFilter(name: string, args?: TrafficMirrorFilterArgs, opts?: CustomResourceOptions);
    @overload
    def TrafficMirrorFilter(resource_name: str,
                            args: Optional[TrafficMirrorFilterArgs] = None,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def TrafficMirrorFilter(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            dry_run: Optional[bool] = None,
                            egress_rules: Optional[Sequence[TrafficMirrorFilterEgressRuleArgs]] = None,
                            ingress_rules: Optional[Sequence[TrafficMirrorFilterIngressRuleArgs]] = None,
                            resource_group_id: Optional[str] = None,
                            tags: Optional[Mapping[str, str]] = None,
                            traffic_mirror_filter_description: Optional[str] = None,
                            traffic_mirror_filter_name: Optional[str] = None)
    func NewTrafficMirrorFilter(ctx *Context, name string, args *TrafficMirrorFilterArgs, opts ...ResourceOption) (*TrafficMirrorFilter, error)
    public TrafficMirrorFilter(string name, TrafficMirrorFilterArgs? args = null, CustomResourceOptions? opts = null)
    public TrafficMirrorFilter(String name, TrafficMirrorFilterArgs args)
    public TrafficMirrorFilter(String name, TrafficMirrorFilterArgs args, CustomResourceOptions options)
    
    type: alicloud:vpc:TrafficMirrorFilter
    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 TrafficMirrorFilterArgs
    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 TrafficMirrorFilterArgs
    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 TrafficMirrorFilterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TrafficMirrorFilterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TrafficMirrorFilterArgs
    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 trafficMirrorFilterResource = new AliCloud.Vpc.TrafficMirrorFilter("trafficMirrorFilterResource", new()
    {
        DryRun = false,
        EgressRules = new[]
        {
            new AliCloud.Vpc.Inputs.TrafficMirrorFilterEgressRuleArgs
            {
                Action = "string",
                Protocol = "string",
                DestinationCidrBlock = "string",
                DestinationPortRange = "string",
                Priority = 0,
                SourceCidrBlock = "string",
                SourcePortRange = "string",
                TrafficMirrorFilterRuleStatus = "string",
            },
        },
        IngressRules = new[]
        {
            new AliCloud.Vpc.Inputs.TrafficMirrorFilterIngressRuleArgs
            {
                Action = "string",
                Protocol = "string",
                DestinationCidrBlock = "string",
                DestinationPortRange = "string",
                Priority = 0,
                SourceCidrBlock = "string",
                SourcePortRange = "string",
                TrafficMirrorFilterRuleStatus = "string",
            },
        },
        ResourceGroupId = "string",
        Tags = 
        {
            { "string", "string" },
        },
        TrafficMirrorFilterDescription = "string",
        TrafficMirrorFilterName = "string",
    });
    
    example, err := vpc.NewTrafficMirrorFilter(ctx, "trafficMirrorFilterResource", &vpc.TrafficMirrorFilterArgs{
    	DryRun: pulumi.Bool(false),
    	EgressRules: vpc.TrafficMirrorFilterEgressRuleTypeArray{
    		&vpc.TrafficMirrorFilterEgressRuleTypeArgs{
    			Action:                        pulumi.String("string"),
    			Protocol:                      pulumi.String("string"),
    			DestinationCidrBlock:          pulumi.String("string"),
    			DestinationPortRange:          pulumi.String("string"),
    			Priority:                      pulumi.Int(0),
    			SourceCidrBlock:               pulumi.String("string"),
    			SourcePortRange:               pulumi.String("string"),
    			TrafficMirrorFilterRuleStatus: pulumi.String("string"),
    		},
    	},
    	IngressRules: vpc.TrafficMirrorFilterIngressRuleTypeArray{
    		&vpc.TrafficMirrorFilterIngressRuleTypeArgs{
    			Action:                        pulumi.String("string"),
    			Protocol:                      pulumi.String("string"),
    			DestinationCidrBlock:          pulumi.String("string"),
    			DestinationPortRange:          pulumi.String("string"),
    			Priority:                      pulumi.Int(0),
    			SourceCidrBlock:               pulumi.String("string"),
    			SourcePortRange:               pulumi.String("string"),
    			TrafficMirrorFilterRuleStatus: pulumi.String("string"),
    		},
    	},
    	ResourceGroupId: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	TrafficMirrorFilterDescription: pulumi.String("string"),
    	TrafficMirrorFilterName:        pulumi.String("string"),
    })
    
    var trafficMirrorFilterResource = new TrafficMirrorFilter("trafficMirrorFilterResource", TrafficMirrorFilterArgs.builder()
        .dryRun(false)
        .egressRules(TrafficMirrorFilterEgressRuleArgs.builder()
            .action("string")
            .protocol("string")
            .destinationCidrBlock("string")
            .destinationPortRange("string")
            .priority(0)
            .sourceCidrBlock("string")
            .sourcePortRange("string")
            .trafficMirrorFilterRuleStatus("string")
            .build())
        .ingressRules(TrafficMirrorFilterIngressRuleArgs.builder()
            .action("string")
            .protocol("string")
            .destinationCidrBlock("string")
            .destinationPortRange("string")
            .priority(0)
            .sourceCidrBlock("string")
            .sourcePortRange("string")
            .trafficMirrorFilterRuleStatus("string")
            .build())
        .resourceGroupId("string")
        .tags(Map.of("string", "string"))
        .trafficMirrorFilterDescription("string")
        .trafficMirrorFilterName("string")
        .build());
    
    traffic_mirror_filter_resource = alicloud.vpc.TrafficMirrorFilter("trafficMirrorFilterResource",
        dry_run=False,
        egress_rules=[alicloud.vpc.TrafficMirrorFilterEgressRuleArgs(
            action="string",
            protocol="string",
            destination_cidr_block="string",
            destination_port_range="string",
            priority=0,
            source_cidr_block="string",
            source_port_range="string",
            traffic_mirror_filter_rule_status="string",
        )],
        ingress_rules=[alicloud.vpc.TrafficMirrorFilterIngressRuleArgs(
            action="string",
            protocol="string",
            destination_cidr_block="string",
            destination_port_range="string",
            priority=0,
            source_cidr_block="string",
            source_port_range="string",
            traffic_mirror_filter_rule_status="string",
        )],
        resource_group_id="string",
        tags={
            "string": "string",
        },
        traffic_mirror_filter_description="string",
        traffic_mirror_filter_name="string")
    
    const trafficMirrorFilterResource = new alicloud.vpc.TrafficMirrorFilter("trafficMirrorFilterResource", {
        dryRun: false,
        egressRules: [{
            action: "string",
            protocol: "string",
            destinationCidrBlock: "string",
            destinationPortRange: "string",
            priority: 0,
            sourceCidrBlock: "string",
            sourcePortRange: "string",
            trafficMirrorFilterRuleStatus: "string",
        }],
        ingressRules: [{
            action: "string",
            protocol: "string",
            destinationCidrBlock: "string",
            destinationPortRange: "string",
            priority: 0,
            sourceCidrBlock: "string",
            sourcePortRange: "string",
            trafficMirrorFilterRuleStatus: "string",
        }],
        resourceGroupId: "string",
        tags: {
            string: "string",
        },
        trafficMirrorFilterDescription: "string",
        trafficMirrorFilterName: "string",
    });
    
    type: alicloud:vpc:TrafficMirrorFilter
    properties:
        dryRun: false
        egressRules:
            - action: string
              destinationCidrBlock: string
              destinationPortRange: string
              priority: 0
              protocol: string
              sourceCidrBlock: string
              sourcePortRange: string
              trafficMirrorFilterRuleStatus: string
        ingressRules:
            - action: string
              destinationCidrBlock: string
              destinationPortRange: string
              priority: 0
              protocol: string
              sourceCidrBlock: string
              sourcePortRange: string
              trafficMirrorFilterRuleStatus: string
        resourceGroupId: string
        tags:
            string: string
        trafficMirrorFilterDescription: string
        trafficMirrorFilterName: string
    

    TrafficMirrorFilter Resource Properties

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

    Inputs

    The TrafficMirrorFilter resource accepts the following input properties:

    DryRun bool
    Whether to PreCheck only this request. Value:

    • true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
    EgressRules List<Pulumi.AliCloud.Vpc.Inputs.TrafficMirrorFilterEgressRule>
    Information about the outbound rule. See the following Block EgressRules.
    IngressRules List<Pulumi.AliCloud.Vpc.Inputs.TrafficMirrorFilterIngressRule>
    Inward direction rule information. See the following Block IngressRules.
    ResourceGroupId string
    The ID of the resource group to which the VPC belongs.
    Tags Dictionary<string, string>
    The tags of this resource.
    TrafficMirrorFilterDescription string
    The description of the TrafficMirrorFilter.
    TrafficMirrorFilterName string
    The name of the TrafficMirrorFilter.
    DryRun bool
    Whether to PreCheck only this request. Value:

    • true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
    EgressRules []TrafficMirrorFilterEgressRuleTypeArgs
    Information about the outbound rule. See the following Block EgressRules.
    IngressRules []TrafficMirrorFilterIngressRuleTypeArgs
    Inward direction rule information. See the following Block IngressRules.
    ResourceGroupId string
    The ID of the resource group to which the VPC belongs.
    Tags map[string]string
    The tags of this resource.
    TrafficMirrorFilterDescription string
    The description of the TrafficMirrorFilter.
    TrafficMirrorFilterName string
    The name of the TrafficMirrorFilter.
    dryRun Boolean
    Whether to PreCheck only this request. Value:

    • true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
    egressRules List<TrafficMirrorFilterEgressRule>
    Information about the outbound rule. See the following Block EgressRules.
    ingressRules List<TrafficMirrorFilterIngressRule>
    Inward direction rule information. See the following Block IngressRules.
    resourceGroupId String
    The ID of the resource group to which the VPC belongs.
    tags Map<String,String>
    The tags of this resource.
    trafficMirrorFilterDescription String
    The description of the TrafficMirrorFilter.
    trafficMirrorFilterName String
    The name of the TrafficMirrorFilter.
    dryRun boolean
    Whether to PreCheck only this request. Value:

    • true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
    egressRules TrafficMirrorFilterEgressRule[]
    Information about the outbound rule. See the following Block EgressRules.
    ingressRules TrafficMirrorFilterIngressRule[]
    Inward direction rule information. See the following Block IngressRules.
    resourceGroupId string
    The ID of the resource group to which the VPC belongs.
    tags {[key: string]: string}
    The tags of this resource.
    trafficMirrorFilterDescription string
    The description of the TrafficMirrorFilter.
    trafficMirrorFilterName string
    The name of the TrafficMirrorFilter.
    dry_run bool
    Whether to PreCheck only this request. Value:

    • true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
    egress_rules Sequence[TrafficMirrorFilterEgressRuleArgs]
    Information about the outbound rule. See the following Block EgressRules.
    ingress_rules Sequence[TrafficMirrorFilterIngressRuleArgs]
    Inward direction rule information. See the following Block IngressRules.
    resource_group_id str
    The ID of the resource group to which the VPC belongs.
    tags Mapping[str, str]
    The tags of this resource.
    traffic_mirror_filter_description str
    The description of the TrafficMirrorFilter.
    traffic_mirror_filter_name str
    The name of the TrafficMirrorFilter.
    dryRun Boolean
    Whether to PreCheck only this request. Value:

    • true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
    egressRules List<Property Map>
    Information about the outbound rule. See the following Block EgressRules.
    ingressRules List<Property Map>
    Inward direction rule information. See the following Block IngressRules.
    resourceGroupId String
    The ID of the resource group to which the VPC belongs.
    tags Map<String>
    The tags of this resource.
    trafficMirrorFilterDescription String
    The description of the TrafficMirrorFilter.
    trafficMirrorFilterName String
    The name of the TrafficMirrorFilter.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the resource.

    Look up Existing TrafficMirrorFilter Resource

    Get an existing TrafficMirrorFilter 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?: TrafficMirrorFilterState, opts?: CustomResourceOptions): TrafficMirrorFilter
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            dry_run: Optional[bool] = None,
            egress_rules: Optional[Sequence[TrafficMirrorFilterEgressRuleArgs]] = None,
            ingress_rules: Optional[Sequence[TrafficMirrorFilterIngressRuleArgs]] = None,
            resource_group_id: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            traffic_mirror_filter_description: Optional[str] = None,
            traffic_mirror_filter_name: Optional[str] = None) -> TrafficMirrorFilter
    func GetTrafficMirrorFilter(ctx *Context, name string, id IDInput, state *TrafficMirrorFilterState, opts ...ResourceOption) (*TrafficMirrorFilter, error)
    public static TrafficMirrorFilter Get(string name, Input<string> id, TrafficMirrorFilterState? state, CustomResourceOptions? opts = null)
    public static TrafficMirrorFilter get(String name, Output<String> id, TrafficMirrorFilterState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    DryRun bool
    Whether to PreCheck only this request. Value:

    • true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
    EgressRules List<Pulumi.AliCloud.Vpc.Inputs.TrafficMirrorFilterEgressRule>
    Information about the outbound rule. See the following Block EgressRules.
    IngressRules List<Pulumi.AliCloud.Vpc.Inputs.TrafficMirrorFilterIngressRule>
    Inward direction rule information. See the following Block IngressRules.
    ResourceGroupId string
    The ID of the resource group to which the VPC belongs.
    Status string
    The status of the resource.
    Tags Dictionary<string, string>
    The tags of this resource.
    TrafficMirrorFilterDescription string
    The description of the TrafficMirrorFilter.
    TrafficMirrorFilterName string
    The name of the TrafficMirrorFilter.
    DryRun bool
    Whether to PreCheck only this request. Value:

    • true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
    EgressRules []TrafficMirrorFilterEgressRuleTypeArgs
    Information about the outbound rule. See the following Block EgressRules.
    IngressRules []TrafficMirrorFilterIngressRuleTypeArgs
    Inward direction rule information. See the following Block IngressRules.
    ResourceGroupId string
    The ID of the resource group to which the VPC belongs.
    Status string
    The status of the resource.
    Tags map[string]string
    The tags of this resource.
    TrafficMirrorFilterDescription string
    The description of the TrafficMirrorFilter.
    TrafficMirrorFilterName string
    The name of the TrafficMirrorFilter.
    dryRun Boolean
    Whether to PreCheck only this request. Value:

    • true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
    egressRules List<TrafficMirrorFilterEgressRule>
    Information about the outbound rule. See the following Block EgressRules.
    ingressRules List<TrafficMirrorFilterIngressRule>
    Inward direction rule information. See the following Block IngressRules.
    resourceGroupId String
    The ID of the resource group to which the VPC belongs.
    status String
    The status of the resource.
    tags Map<String,String>
    The tags of this resource.
    trafficMirrorFilterDescription String
    The description of the TrafficMirrorFilter.
    trafficMirrorFilterName String
    The name of the TrafficMirrorFilter.
    dryRun boolean
    Whether to PreCheck only this request. Value:

    • true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
    egressRules TrafficMirrorFilterEgressRule[]
    Information about the outbound rule. See the following Block EgressRules.
    ingressRules TrafficMirrorFilterIngressRule[]
    Inward direction rule information. See the following Block IngressRules.
    resourceGroupId string
    The ID of the resource group to which the VPC belongs.
    status string
    The status of the resource.
    tags {[key: string]: string}
    The tags of this resource.
    trafficMirrorFilterDescription string
    The description of the TrafficMirrorFilter.
    trafficMirrorFilterName string
    The name of the TrafficMirrorFilter.
    dry_run bool
    Whether to PreCheck only this request. Value:

    • true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
    egress_rules Sequence[TrafficMirrorFilterEgressRuleArgs]
    Information about the outbound rule. See the following Block EgressRules.
    ingress_rules Sequence[TrafficMirrorFilterIngressRuleArgs]
    Inward direction rule information. See the following Block IngressRules.
    resource_group_id str
    The ID of the resource group to which the VPC belongs.
    status str
    The status of the resource.
    tags Mapping[str, str]
    The tags of this resource.
    traffic_mirror_filter_description str
    The description of the TrafficMirrorFilter.
    traffic_mirror_filter_name str
    The name of the TrafficMirrorFilter.
    dryRun Boolean
    Whether to PreCheck only this request. Value:

    • true: The check request is sent without creating traffic Image filter conditions. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request, returns a 2xx HTTP status code after passing the check, and directly creates a filter condition.
    egressRules List<Property Map>
    Information about the outbound rule. See the following Block EgressRules.
    ingressRules List<Property Map>
    Inward direction rule information. See the following Block IngressRules.
    resourceGroupId String
    The ID of the resource group to which the VPC belongs.
    status String
    The status of the resource.
    tags Map<String>
    The tags of this resource.
    trafficMirrorFilterDescription String
    The description of the TrafficMirrorFilter.
    trafficMirrorFilterName String
    The name of the TrafficMirrorFilter.

    Supporting Types

    TrafficMirrorFilterEgressRule, TrafficMirrorFilterEgressRuleArgs

    TrafficMirrorFilterIngressRule, TrafficMirrorFilterIngressRuleArgs

    Import

    VPC Traffic Mirror Filter can be imported using the id, e.g.

    $ pulumi import alicloud:vpc/trafficMirrorFilter:TrafficMirrorFilter example <id>
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi