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

volcengine.vpc.TrafficMirrorTarget

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 target

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    import * as volcengine from "@volcengine/pulumi";
    
    const fooZones = volcengine.ecs.getZones({});
    const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
        vpcName: "acc-test-vpc",
        cidrBlock: "172.16.0.0/16",
    });
    const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
        subnetName: "acc-test-subnet",
        cidrBlock: "172.16.0.0/24",
        zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
        vpcId: fooVpc.id,
    });
    const fooSecurityGroup = new volcengine.vpc.SecurityGroup("fooSecurityGroup", {
        securityGroupName: "acc-test-sg",
        vpcId: fooVpc.id,
    });
    const fooImages = volcengine.ecs.getImages({
        osType: "Linux",
        visibility: "public",
        instanceTypeId: "ecs.g3il.large",
    });
    const fooInstance = new volcengine.ecs.Instance("fooInstance", {
        instanceName: "acc-test-ecs",
        description: "acc-test",
        hostName: "tf-acc-test",
        imageId: fooImages.then(fooImages => fooImages.images?.[0]?.imageId),
        instanceType: "ecs.g3il.large",
        password: "93f0cb0614Aab12",
        instanceChargeType: "PostPaid",
        systemVolumeType: "ESSD_PL0",
        systemVolumeSize: 40,
        subnetId: fooSubnet.id,
        securityGroupIds: [fooSecurityGroup.id],
        projectName: "default",
        tags: [{
            key: "k1",
            value: "v1",
        }],
    });
    const fooNetworkInterface = new volcengine.vpc.NetworkInterface("fooNetworkInterface", {
        networkInterfaceName: "acc-test-eni",
        description: "acc-test",
        subnetId: fooSubnet.id,
        securityGroupIds: [fooSecurityGroup.id],
        primaryIpAddress: "172.16.0.253",
        portSecurityEnabled: false,
        privateIpAddresses: ["172.16.0.2"],
        projectName: "default",
        tags: [{
            key: "k1",
            value: "v1",
        }],
    });
    const fooNetworkInterfaceAttach = new volcengine.vpc.NetworkInterfaceAttach("fooNetworkInterfaceAttach", {
        networkInterfaceId: fooNetworkInterface.id,
        instanceId: fooInstance.id,
    });
    const fooTrafficMirrorTarget = new volcengine.vpc.TrafficMirrorTarget("fooTrafficMirrorTarget", {
        instanceType: "NetworkInterface",
        instanceId: fooNetworkInterface.id,
        trafficMirrorTargetName: "acc-test-traffic-mirror-target",
        description: "acc-test",
        projectName: "default",
        tags: [{
            key: "k1",
            value: "v1",
        }],
    }, {
        dependsOn: [fooNetworkInterfaceAttach],
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo_zones = volcengine.ecs.get_zones()
    foo_vpc = volcengine.vpc.Vpc("fooVpc",
        vpc_name="acc-test-vpc",
        cidr_block="172.16.0.0/16")
    foo_subnet = volcengine.vpc.Subnet("fooSubnet",
        subnet_name="acc-test-subnet",
        cidr_block="172.16.0.0/24",
        zone_id=foo_zones.zones[0].id,
        vpc_id=foo_vpc.id)
    foo_security_group = volcengine.vpc.SecurityGroup("fooSecurityGroup",
        security_group_name="acc-test-sg",
        vpc_id=foo_vpc.id)
    foo_images = volcengine.ecs.get_images(os_type="Linux",
        visibility="public",
        instance_type_id="ecs.g3il.large")
    foo_instance = volcengine.ecs.Instance("fooInstance",
        instance_name="acc-test-ecs",
        description="acc-test",
        host_name="tf-acc-test",
        image_id=foo_images.images[0].image_id,
        instance_type="ecs.g3il.large",
        password="93f0cb0614Aab12",
        instance_charge_type="PostPaid",
        system_volume_type="ESSD_PL0",
        system_volume_size=40,
        subnet_id=foo_subnet.id,
        security_group_ids=[foo_security_group.id],
        project_name="default",
        tags=[volcengine.ecs.InstanceTagArgs(
            key="k1",
            value="v1",
        )])
    foo_network_interface = volcengine.vpc.NetworkInterface("fooNetworkInterface",
        network_interface_name="acc-test-eni",
        description="acc-test",
        subnet_id=foo_subnet.id,
        security_group_ids=[foo_security_group.id],
        primary_ip_address="172.16.0.253",
        port_security_enabled=False,
        private_ip_addresses=["172.16.0.2"],
        project_name="default",
        tags=[volcengine.vpc.NetworkInterfaceTagArgs(
            key="k1",
            value="v1",
        )])
    foo_network_interface_attach = volcengine.vpc.NetworkInterfaceAttach("fooNetworkInterfaceAttach",
        network_interface_id=foo_network_interface.id,
        instance_id=foo_instance.id)
    foo_traffic_mirror_target = volcengine.vpc.TrafficMirrorTarget("fooTrafficMirrorTarget",
        instance_type="NetworkInterface",
        instance_id=foo_network_interface.id,
        traffic_mirror_target_name="acc-test-traffic-mirror-target",
        description="acc-test",
        project_name="default",
        tags=[volcengine.vpc.TrafficMirrorTargetTagArgs(
            key="k1",
            value="v1",
        )],
        opts=pulumi.ResourceOptions(depends_on=[foo_network_interface_attach]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		fooZones, err := ecs.GetZones(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
    			VpcName:   pulumi.String("acc-test-vpc"),
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
    			SubnetName: pulumi.String("acc-test-subnet"),
    			CidrBlock:  pulumi.String("172.16.0.0/24"),
    			ZoneId:     pulumi.String(fooZones.Zones[0].Id),
    			VpcId:      fooVpc.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		fooSecurityGroup, err := vpc.NewSecurityGroup(ctx, "fooSecurityGroup", &vpc.SecurityGroupArgs{
    			SecurityGroupName: pulumi.String("acc-test-sg"),
    			VpcId:             fooVpc.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		fooImages, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
    			OsType:         pulumi.StringRef("Linux"),
    			Visibility:     pulumi.StringRef("public"),
    			InstanceTypeId: pulumi.StringRef("ecs.g3il.large"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		fooInstance, err := ecs.NewInstance(ctx, "fooInstance", &ecs.InstanceArgs{
    			InstanceName:       pulumi.String("acc-test-ecs"),
    			Description:        pulumi.String("acc-test"),
    			HostName:           pulumi.String("tf-acc-test"),
    			ImageId:            pulumi.String(fooImages.Images[0].ImageId),
    			InstanceType:       pulumi.String("ecs.g3il.large"),
    			Password:           pulumi.String("93f0cb0614Aab12"),
    			InstanceChargeType: pulumi.String("PostPaid"),
    			SystemVolumeType:   pulumi.String("ESSD_PL0"),
    			SystemVolumeSize:   pulumi.Int(40),
    			SubnetId:           fooSubnet.ID(),
    			SecurityGroupIds: pulumi.StringArray{
    				fooSecurityGroup.ID(),
    			},
    			ProjectName: pulumi.String("default"),
    			Tags: ecs.InstanceTagArray{
    				&ecs.InstanceTagArgs{
    					Key:   pulumi.String("k1"),
    					Value: pulumi.String("v1"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		fooNetworkInterface, err := vpc.NewNetworkInterface(ctx, "fooNetworkInterface", &vpc.NetworkInterfaceArgs{
    			NetworkInterfaceName: pulumi.String("acc-test-eni"),
    			Description:          pulumi.String("acc-test"),
    			SubnetId:             fooSubnet.ID(),
    			SecurityGroupIds: pulumi.StringArray{
    				fooSecurityGroup.ID(),
    			},
    			PrimaryIpAddress:    pulumi.String("172.16.0.253"),
    			PortSecurityEnabled: pulumi.Bool(false),
    			PrivateIpAddresses: pulumi.StringArray{
    				pulumi.String("172.16.0.2"),
    			},
    			ProjectName: pulumi.String("default"),
    			Tags: vpc.NetworkInterfaceTagArray{
    				&vpc.NetworkInterfaceTagArgs{
    					Key:   pulumi.String("k1"),
    					Value: pulumi.String("v1"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		fooNetworkInterfaceAttach, err := vpc.NewNetworkInterfaceAttach(ctx, "fooNetworkInterfaceAttach", &vpc.NetworkInterfaceAttachArgs{
    			NetworkInterfaceId: fooNetworkInterface.ID(),
    			InstanceId:         fooInstance.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = vpc.NewTrafficMirrorTarget(ctx, "fooTrafficMirrorTarget", &vpc.TrafficMirrorTargetArgs{
    			InstanceType:            pulumi.String("NetworkInterface"),
    			InstanceId:              fooNetworkInterface.ID(),
    			TrafficMirrorTargetName: pulumi.String("acc-test-traffic-mirror-target"),
    			Description:             pulumi.String("acc-test"),
    			ProjectName:             pulumi.String("default"),
    			Tags: vpc.TrafficMirrorTargetTagArray{
    				&vpc.TrafficMirrorTargetTagArgs{
    					Key:   pulumi.String("k1"),
    					Value: pulumi.String("v1"),
    				},
    			},
    		}, pulumi.DependsOn([]pulumi.Resource{
    			fooNetworkInterfaceAttach,
    		}))
    		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 fooZones = Volcengine.Ecs.GetZones.Invoke();
    
        var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
        {
            VpcName = "acc-test-vpc",
            CidrBlock = "172.16.0.0/16",
        });
    
        var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
        {
            SubnetName = "acc-test-subnet",
            CidrBlock = "172.16.0.0/24",
            ZoneId = fooZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            VpcId = fooVpc.Id,
        });
    
        var fooSecurityGroup = new Volcengine.Vpc.SecurityGroup("fooSecurityGroup", new()
        {
            SecurityGroupName = "acc-test-sg",
            VpcId = fooVpc.Id,
        });
    
        var fooImages = Volcengine.Ecs.GetImages.Invoke(new()
        {
            OsType = "Linux",
            Visibility = "public",
            InstanceTypeId = "ecs.g3il.large",
        });
    
        var fooInstance = new Volcengine.Ecs.Instance("fooInstance", new()
        {
            InstanceName = "acc-test-ecs",
            Description = "acc-test",
            HostName = "tf-acc-test",
            ImageId = fooImages.Apply(getImagesResult => getImagesResult.Images[0]?.ImageId),
            InstanceType = "ecs.g3il.large",
            Password = "93f0cb0614Aab12",
            InstanceChargeType = "PostPaid",
            SystemVolumeType = "ESSD_PL0",
            SystemVolumeSize = 40,
            SubnetId = fooSubnet.Id,
            SecurityGroupIds = new[]
            {
                fooSecurityGroup.Id,
            },
            ProjectName = "default",
            Tags = new[]
            {
                new Volcengine.Ecs.Inputs.InstanceTagArgs
                {
                    Key = "k1",
                    Value = "v1",
                },
            },
        });
    
        var fooNetworkInterface = new Volcengine.Vpc.NetworkInterface("fooNetworkInterface", new()
        {
            NetworkInterfaceName = "acc-test-eni",
            Description = "acc-test",
            SubnetId = fooSubnet.Id,
            SecurityGroupIds = new[]
            {
                fooSecurityGroup.Id,
            },
            PrimaryIpAddress = "172.16.0.253",
            PortSecurityEnabled = false,
            PrivateIpAddresses = new[]
            {
                "172.16.0.2",
            },
            ProjectName = "default",
            Tags = new[]
            {
                new Volcengine.Vpc.Inputs.NetworkInterfaceTagArgs
                {
                    Key = "k1",
                    Value = "v1",
                },
            },
        });
    
        var fooNetworkInterfaceAttach = new Volcengine.Vpc.NetworkInterfaceAttach("fooNetworkInterfaceAttach", new()
        {
            NetworkInterfaceId = fooNetworkInterface.Id,
            InstanceId = fooInstance.Id,
        });
    
        var fooTrafficMirrorTarget = new Volcengine.Vpc.TrafficMirrorTarget("fooTrafficMirrorTarget", new()
        {
            InstanceType = "NetworkInterface",
            InstanceId = fooNetworkInterface.Id,
            TrafficMirrorTargetName = "acc-test-traffic-mirror-target",
            Description = "acc-test",
            ProjectName = "default",
            Tags = new[]
            {
                new Volcengine.Vpc.Inputs.TrafficMirrorTargetTagArgs
                {
                    Key = "k1",
                    Value = "v1",
                },
            },
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                fooNetworkInterfaceAttach,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.ecs.EcsFunctions;
    import com.pulumi.volcengine.ecs.inputs.GetZonesArgs;
    import com.pulumi.volcengine.vpc.Vpc;
    import com.pulumi.volcengine.vpc.VpcArgs;
    import com.pulumi.volcengine.vpc.Subnet;
    import com.pulumi.volcengine.vpc.SubnetArgs;
    import com.pulumi.volcengine.vpc.SecurityGroup;
    import com.pulumi.volcengine.vpc.SecurityGroupArgs;
    import com.pulumi.volcengine.ecs.inputs.GetImagesArgs;
    import com.pulumi.volcengine.ecs.Instance;
    import com.pulumi.volcengine.ecs.InstanceArgs;
    import com.pulumi.volcengine.ecs.inputs.InstanceTagArgs;
    import com.pulumi.volcengine.vpc.NetworkInterface;
    import com.pulumi.volcengine.vpc.NetworkInterfaceArgs;
    import com.pulumi.volcengine.vpc.inputs.NetworkInterfaceTagArgs;
    import com.pulumi.volcengine.vpc.NetworkInterfaceAttach;
    import com.pulumi.volcengine.vpc.NetworkInterfaceAttachArgs;
    import com.pulumi.volcengine.vpc.TrafficMirrorTarget;
    import com.pulumi.volcengine.vpc.TrafficMirrorTargetArgs;
    import com.pulumi.volcengine.vpc.inputs.TrafficMirrorTargetTagArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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 fooZones = EcsFunctions.getZones();
    
            var fooVpc = new Vpc("fooVpc", VpcArgs.builder()        
                .vpcName("acc-test-vpc")
                .cidrBlock("172.16.0.0/16")
                .build());
    
            var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()        
                .subnetName("acc-test-subnet")
                .cidrBlock("172.16.0.0/24")
                .zoneId(fooZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .vpcId(fooVpc.id())
                .build());
    
            var fooSecurityGroup = new SecurityGroup("fooSecurityGroup", SecurityGroupArgs.builder()        
                .securityGroupName("acc-test-sg")
                .vpcId(fooVpc.id())
                .build());
    
            final var fooImages = EcsFunctions.getImages(GetImagesArgs.builder()
                .osType("Linux")
                .visibility("public")
                .instanceTypeId("ecs.g3il.large")
                .build());
    
            var fooInstance = new Instance("fooInstance", InstanceArgs.builder()        
                .instanceName("acc-test-ecs")
                .description("acc-test")
                .hostName("tf-acc-test")
                .imageId(fooImages.applyValue(getImagesResult -> getImagesResult.images()[0].imageId()))
                .instanceType("ecs.g3il.large")
                .password("93f0cb0614Aab12")
                .instanceChargeType("PostPaid")
                .systemVolumeType("ESSD_PL0")
                .systemVolumeSize(40)
                .subnetId(fooSubnet.id())
                .securityGroupIds(fooSecurityGroup.id())
                .projectName("default")
                .tags(InstanceTagArgs.builder()
                    .key("k1")
                    .value("v1")
                    .build())
                .build());
    
            var fooNetworkInterface = new NetworkInterface("fooNetworkInterface", NetworkInterfaceArgs.builder()        
                .networkInterfaceName("acc-test-eni")
                .description("acc-test")
                .subnetId(fooSubnet.id())
                .securityGroupIds(fooSecurityGroup.id())
                .primaryIpAddress("172.16.0.253")
                .portSecurityEnabled(false)
                .privateIpAddresses("172.16.0.2")
                .projectName("default")
                .tags(NetworkInterfaceTagArgs.builder()
                    .key("k1")
                    .value("v1")
                    .build())
                .build());
    
            var fooNetworkInterfaceAttach = new NetworkInterfaceAttach("fooNetworkInterfaceAttach", NetworkInterfaceAttachArgs.builder()        
                .networkInterfaceId(fooNetworkInterface.id())
                .instanceId(fooInstance.id())
                .build());
    
            var fooTrafficMirrorTarget = new TrafficMirrorTarget("fooTrafficMirrorTarget", TrafficMirrorTargetArgs.builder()        
                .instanceType("NetworkInterface")
                .instanceId(fooNetworkInterface.id())
                .trafficMirrorTargetName("acc-test-traffic-mirror-target")
                .description("acc-test")
                .projectName("default")
                .tags(TrafficMirrorTargetTagArgs.builder()
                    .key("k1")
                    .value("v1")
                    .build())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(fooNetworkInterfaceAttach)
                    .build());
    
        }
    }
    
    resources:
      fooVpc:
        type: volcengine:vpc:Vpc
        properties:
          vpcName: acc-test-vpc
          cidrBlock: 172.16.0.0/16
      fooSubnet:
        type: volcengine:vpc:Subnet
        properties:
          subnetName: acc-test-subnet
          cidrBlock: 172.16.0.0/24
          zoneId: ${fooZones.zones[0].id}
          vpcId: ${fooVpc.id}
      fooSecurityGroup:
        type: volcengine:vpc:SecurityGroup
        properties:
          securityGroupName: acc-test-sg
          vpcId: ${fooVpc.id}
      fooInstance:
        type: volcengine:ecs:Instance
        properties:
          instanceName: acc-test-ecs
          description: acc-test
          hostName: tf-acc-test
          imageId: ${fooImages.images[0].imageId}
          instanceType: ecs.g3il.large
          password: 93f0cb0614Aab12
          instanceChargeType: PostPaid
          systemVolumeType: ESSD_PL0
          systemVolumeSize: 40
          subnetId: ${fooSubnet.id}
          securityGroupIds:
            - ${fooSecurityGroup.id}
          projectName: default
          tags:
            - key: k1
              value: v1
      fooNetworkInterface:
        type: volcengine:vpc:NetworkInterface
        properties:
          networkInterfaceName: acc-test-eni
          description: acc-test
          subnetId: ${fooSubnet.id}
          securityGroupIds:
            - ${fooSecurityGroup.id}
          primaryIpAddress: 172.16.0.253
          portSecurityEnabled: false
          privateIpAddresses:
            - 172.16.0.2
          projectName: default
          tags:
            - key: k1
              value: v1
      fooNetworkInterfaceAttach:
        type: volcengine:vpc:NetworkInterfaceAttach
        properties:
          networkInterfaceId: ${fooNetworkInterface.id}
          instanceId: ${fooInstance.id}
      fooTrafficMirrorTarget:
        type: volcengine:vpc:TrafficMirrorTarget
        properties:
          instanceType: NetworkInterface
          instanceId: ${fooNetworkInterface.id}
          trafficMirrorTargetName: acc-test-traffic-mirror-target
          description: acc-test
          projectName: default
          tags:
            - key: k1
              value: v1
        options:
          dependson:
            - ${fooNetworkInterfaceAttach}
    variables:
      fooZones:
        fn::invoke:
          Function: volcengine:ecs:getZones
          Arguments: {}
      fooImages:
        fn::invoke:
          Function: volcengine:ecs:getImages
          Arguments:
            osType: Linux
            visibility: public
            instanceTypeId: ecs.g3il.large
    

    Create TrafficMirrorTarget Resource

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

    Constructor syntax

    new TrafficMirrorTarget(name: string, args: TrafficMirrorTargetArgs, opts?: CustomResourceOptions);
    @overload
    def TrafficMirrorTarget(resource_name: str,
                            args: TrafficMirrorTargetArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def TrafficMirrorTarget(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            instance_id: Optional[str] = None,
                            instance_type: Optional[str] = None,
                            description: Optional[str] = None,
                            project_name: Optional[str] = None,
                            tags: Optional[Sequence[TrafficMirrorTargetTagArgs]] = None,
                            traffic_mirror_target_name: Optional[str] = None)
    func NewTrafficMirrorTarget(ctx *Context, name string, args TrafficMirrorTargetArgs, opts ...ResourceOption) (*TrafficMirrorTarget, error)
    public TrafficMirrorTarget(string name, TrafficMirrorTargetArgs args, CustomResourceOptions? opts = null)
    public TrafficMirrorTarget(String name, TrafficMirrorTargetArgs args)
    public TrafficMirrorTarget(String name, TrafficMirrorTargetArgs args, CustomResourceOptions options)
    
    type: volcengine:vpc:TrafficMirrorTarget
    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 TrafficMirrorTargetArgs
    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 TrafficMirrorTargetArgs
    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 TrafficMirrorTargetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TrafficMirrorTargetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TrafficMirrorTargetArgs
    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 trafficMirrorTargetResource = new Volcengine.Vpc.TrafficMirrorTarget("trafficMirrorTargetResource", new()
    {
        InstanceId = "string",
        InstanceType = "string",
        Description = "string",
        ProjectName = "string",
        Tags = new[]
        {
            new Volcengine.Vpc.Inputs.TrafficMirrorTargetTagArgs
            {
                Key = "string",
                Value = "string",
            },
        },
        TrafficMirrorTargetName = "string",
    });
    
    example, err := vpc.NewTrafficMirrorTarget(ctx, "trafficMirrorTargetResource", &vpc.TrafficMirrorTargetArgs{
    	InstanceId:   pulumi.String("string"),
    	InstanceType: pulumi.String("string"),
    	Description:  pulumi.String("string"),
    	ProjectName:  pulumi.String("string"),
    	Tags: vpc.TrafficMirrorTargetTagArray{
    		&vpc.TrafficMirrorTargetTagArgs{
    			Key:   pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    	TrafficMirrorTargetName: pulumi.String("string"),
    })
    
    var trafficMirrorTargetResource = new TrafficMirrorTarget("trafficMirrorTargetResource", TrafficMirrorTargetArgs.builder()
        .instanceId("string")
        .instanceType("string")
        .description("string")
        .projectName("string")
        .tags(TrafficMirrorTargetTagArgs.builder()
            .key("string")
            .value("string")
            .build())
        .trafficMirrorTargetName("string")
        .build());
    
    traffic_mirror_target_resource = volcengine.vpc.TrafficMirrorTarget("trafficMirrorTargetResource",
        instance_id="string",
        instance_type="string",
        description="string",
        project_name="string",
        tags=[{
            "key": "string",
            "value": "string",
        }],
        traffic_mirror_target_name="string")
    
    const trafficMirrorTargetResource = new volcengine.vpc.TrafficMirrorTarget("trafficMirrorTargetResource", {
        instanceId: "string",
        instanceType: "string",
        description: "string",
        projectName: "string",
        tags: [{
            key: "string",
            value: "string",
        }],
        trafficMirrorTargetName: "string",
    });
    
    type: volcengine:vpc:TrafficMirrorTarget
    properties:
        description: string
        instanceId: string
        instanceType: string
        projectName: string
        tags:
            - key: string
              value: string
        trafficMirrorTargetName: string
    

    TrafficMirrorTarget 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 TrafficMirrorTarget resource accepts the following input properties:

    InstanceId string
    The instance id of traffic mirror target.
    InstanceType string
    The instance type of traffic mirror target. Valid values: NetworkInterface, ClbInstance.
    Description string
    The description of traffic mirror target.
    ProjectName string
    The project name of traffic mirror target.
    Tags List<TrafficMirrorTargetTag>
    Tags.
    TrafficMirrorTargetName string
    The name of traffic mirror target.
    InstanceId string
    The instance id of traffic mirror target.
    InstanceType string
    The instance type of traffic mirror target. Valid values: NetworkInterface, ClbInstance.
    Description string
    The description of traffic mirror target.
    ProjectName string
    The project name of traffic mirror target.
    Tags []TrafficMirrorTargetTagArgs
    Tags.
    TrafficMirrorTargetName string
    The name of traffic mirror target.
    instanceId String
    The instance id of traffic mirror target.
    instanceType String
    The instance type of traffic mirror target. Valid values: NetworkInterface, ClbInstance.
    description String
    The description of traffic mirror target.
    projectName String
    The project name of traffic mirror target.
    tags List<TrafficMirrorTargetTag>
    Tags.
    trafficMirrorTargetName String
    The name of traffic mirror target.
    instanceId string
    The instance id of traffic mirror target.
    instanceType string
    The instance type of traffic mirror target. Valid values: NetworkInterface, ClbInstance.
    description string
    The description of traffic mirror target.
    projectName string
    The project name of traffic mirror target.
    tags TrafficMirrorTargetTag[]
    Tags.
    trafficMirrorTargetName string
    The name of traffic mirror target.
    instance_id str
    The instance id of traffic mirror target.
    instance_type str
    The instance type of traffic mirror target. Valid values: NetworkInterface, ClbInstance.
    description str
    The description of traffic mirror target.
    project_name str
    The project name of traffic mirror target.
    tags Sequence[TrafficMirrorTargetTagArgs]
    Tags.
    traffic_mirror_target_name str
    The name of traffic mirror target.
    instanceId String
    The instance id of traffic mirror target.
    instanceType String
    The instance type of traffic mirror target. Valid values: NetworkInterface, ClbInstance.
    description String
    The description of traffic mirror target.
    projectName String
    The project name of traffic mirror target.
    tags List<Property Map>
    Tags.
    trafficMirrorTargetName String
    The name of traffic mirror target.

    Outputs

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

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

    Look up Existing TrafficMirrorTarget Resource

    Get an existing TrafficMirrorTarget 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?: TrafficMirrorTargetState, opts?: CustomResourceOptions): TrafficMirrorTarget
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            description: Optional[str] = None,
            instance_id: Optional[str] = None,
            instance_type: Optional[str] = None,
            project_name: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Sequence[TrafficMirrorTargetTagArgs]] = None,
            traffic_mirror_target_name: Optional[str] = None,
            updated_at: Optional[str] = None) -> TrafficMirrorTarget
    func GetTrafficMirrorTarget(ctx *Context, name string, id IDInput, state *TrafficMirrorTargetState, opts ...ResourceOption) (*TrafficMirrorTarget, error)
    public static TrafficMirrorTarget Get(string name, Input<string> id, TrafficMirrorTargetState? state, CustomResourceOptions? opts = null)
    public static TrafficMirrorTarget get(String name, Output<String> id, TrafficMirrorTargetState state, CustomResourceOptions options)
    resources:  _:    type: volcengine:vpc:TrafficMirrorTarget    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 target.
    Description string
    The description of traffic mirror target.
    InstanceId string
    The instance id of traffic mirror target.
    InstanceType string
    The instance type of traffic mirror target. Valid values: NetworkInterface, ClbInstance.
    ProjectName string
    The project name of traffic mirror target.
    Status string
    The status of traffic mirror target.
    Tags List<TrafficMirrorTargetTag>
    Tags.
    TrafficMirrorTargetName string
    The name of traffic mirror target.
    UpdatedAt string
    The update time of traffic mirror target.
    CreatedAt string
    The create time of traffic mirror target.
    Description string
    The description of traffic mirror target.
    InstanceId string
    The instance id of traffic mirror target.
    InstanceType string
    The instance type of traffic mirror target. Valid values: NetworkInterface, ClbInstance.
    ProjectName string
    The project name of traffic mirror target.
    Status string
    The status of traffic mirror target.
    Tags []TrafficMirrorTargetTagArgs
    Tags.
    TrafficMirrorTargetName string
    The name of traffic mirror target.
    UpdatedAt string
    The update time of traffic mirror target.
    createdAt String
    The create time of traffic mirror target.
    description String
    The description of traffic mirror target.
    instanceId String
    The instance id of traffic mirror target.
    instanceType String
    The instance type of traffic mirror target. Valid values: NetworkInterface, ClbInstance.
    projectName String
    The project name of traffic mirror target.
    status String
    The status of traffic mirror target.
    tags List<TrafficMirrorTargetTag>
    Tags.
    trafficMirrorTargetName String
    The name of traffic mirror target.
    updatedAt String
    The update time of traffic mirror target.
    createdAt string
    The create time of traffic mirror target.
    description string
    The description of traffic mirror target.
    instanceId string
    The instance id of traffic mirror target.
    instanceType string
    The instance type of traffic mirror target. Valid values: NetworkInterface, ClbInstance.
    projectName string
    The project name of traffic mirror target.
    status string
    The status of traffic mirror target.
    tags TrafficMirrorTargetTag[]
    Tags.
    trafficMirrorTargetName string
    The name of traffic mirror target.
    updatedAt string
    The update time of traffic mirror target.
    created_at str
    The create time of traffic mirror target.
    description str
    The description of traffic mirror target.
    instance_id str
    The instance id of traffic mirror target.
    instance_type str
    The instance type of traffic mirror target. Valid values: NetworkInterface, ClbInstance.
    project_name str
    The project name of traffic mirror target.
    status str
    The status of traffic mirror target.
    tags Sequence[TrafficMirrorTargetTagArgs]
    Tags.
    traffic_mirror_target_name str
    The name of traffic mirror target.
    updated_at str
    The update time of traffic mirror target.
    createdAt String
    The create time of traffic mirror target.
    description String
    The description of traffic mirror target.
    instanceId String
    The instance id of traffic mirror target.
    instanceType String
    The instance type of traffic mirror target. Valid values: NetworkInterface, ClbInstance.
    projectName String
    The project name of traffic mirror target.
    status String
    The status of traffic mirror target.
    tags List<Property Map>
    Tags.
    trafficMirrorTargetName String
    The name of traffic mirror target.
    updatedAt String
    The update time of traffic mirror target.

    Supporting Types

    TrafficMirrorTargetTag, TrafficMirrorTargetTagArgs

    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.
    key string
    The Key of Tags.
    value string
    The Value of Tags.
    key str
    The Key of Tags.
    value str
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.

    Import

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

    $ pulumi import volcengine:vpc/trafficMirrorTarget:TrafficMirrorTarget 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