published on Thursday, Apr 23, 2026 by Volcengine
published on Thursday, Apr 23, 2026 by Volcengine
The mirror session links the mirror source, mirror destination, and filter conditions, enabling private network forwarding of traffic copied from the mirror source to the mirror destination. It serves as the carrier for traffic mirroring
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcenginecc from "@volcengine/pulumi-volcenginecc";
const vPCTrafficMirrorSessionDemo = new volcenginecc.vpc.TrafficMirrorSession("VPCTrafficMirrorSessionDemo", {
description: "test-description",
networkInterfaceId: "eni-1a1s0wz7xkm4g8nvexxxxx",
packetLength: 64,
priority: 12,
projectName: "default",
tags: [{
key: "env",
value: "test",
}],
trafficMirrorFilterId: "tmf-bu54sj0bl2bk5h0xxxxx",
trafficMirrorSessionName: "test-1",
trafficMirrorTargetId: "tmt-ij32u0acvta874o8ctxxxxx",
virtualNetworkId: 13,
});
import pulumi
import pulumi_volcenginecc as volcenginecc
v_pc_traffic_mirror_session_demo = volcenginecc.vpc.TrafficMirrorSession("VPCTrafficMirrorSessionDemo",
description="test-description",
network_interface_id="eni-1a1s0wz7xkm4g8nvexxxxx",
packet_length=64,
priority=12,
project_name="default",
tags=[{
"key": "env",
"value": "test",
}],
traffic_mirror_filter_id="tmf-bu54sj0bl2bk5h0xxxxx",
traffic_mirror_session_name="test-1",
traffic_mirror_target_id="tmt-ij32u0acvta874o8ctxxxxx",
virtual_network_id=13)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcenginecc/sdk/go/volcenginecc/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vpc.NewTrafficMirrorSession(ctx, "VPCTrafficMirrorSessionDemo", &vpc.TrafficMirrorSessionArgs{
Description: pulumi.String("test-description"),
NetworkInterfaceId: pulumi.String("eni-1a1s0wz7xkm4g8nvexxxxx"),
PacketLength: pulumi.Int(64),
Priority: pulumi.Int(12),
ProjectName: pulumi.String("default"),
Tags: vpc.TrafficMirrorSessionTagArray{
&vpc.TrafficMirrorSessionTagArgs{
Key: pulumi.String("env"),
Value: pulumi.String("test"),
},
},
TrafficMirrorFilterId: pulumi.String("tmf-bu54sj0bl2bk5h0xxxxx"),
TrafficMirrorSessionName: pulumi.String("test-1"),
TrafficMirrorTargetId: pulumi.String("tmt-ij32u0acvta874o8ctxxxxx"),
VirtualNetworkId: pulumi.Int(13),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcenginecc = Volcengine.Pulumi.Volcenginecc;
return await Deployment.RunAsync(() =>
{
var vPCTrafficMirrorSessionDemo = new Volcenginecc.Vpc.TrafficMirrorSession("VPCTrafficMirrorSessionDemo", new()
{
Description = "test-description",
NetworkInterfaceId = "eni-1a1s0wz7xkm4g8nvexxxxx",
PacketLength = 64,
Priority = 12,
ProjectName = "default",
Tags = new[]
{
new Volcenginecc.Vpc.Inputs.TrafficMirrorSessionTagArgs
{
Key = "env",
Value = "test",
},
},
TrafficMirrorFilterId = "tmf-bu54sj0bl2bk5h0xxxxx",
TrafficMirrorSessionName = "test-1",
TrafficMirrorTargetId = "tmt-ij32u0acvta874o8ctxxxxx",
VirtualNetworkId = 13,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.volcengine.volcenginecc.vpc.TrafficMirrorSession;
import com.volcengine.volcenginecc.vpc.TrafficMirrorSessionArgs;
import com.pulumi.volcenginecc.vpc.inputs.TrafficMirrorSessionTagArgs;
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 vPCTrafficMirrorSessionDemo = new TrafficMirrorSession("vPCTrafficMirrorSessionDemo", TrafficMirrorSessionArgs.builder()
.description("test-description")
.networkInterfaceId("eni-1a1s0wz7xkm4g8nvexxxxx")
.packetLength(64)
.priority(12)
.projectName("default")
.tags(TrafficMirrorSessionTagArgs.builder()
.key("env")
.value("test")
.build())
.trafficMirrorFilterId("tmf-bu54sj0bl2bk5h0xxxxx")
.trafficMirrorSessionName("test-1")
.trafficMirrorTargetId("tmt-ij32u0acvta874o8ctxxxxx")
.virtualNetworkId(13)
.build());
}
}
resources:
vPCTrafficMirrorSessionDemo:
type: volcenginecc:vpc:TrafficMirrorSession
name: VPCTrafficMirrorSessionDemo
properties:
description: test-description
networkInterfaceId: eni-1a1s0wz7xkm4g8nvexxxxx
packetLength: 64
priority: 12
projectName: default
tags:
- key: env
value: test
trafficMirrorFilterId: tmf-bu54sj0bl2bk5h0xxxxx
trafficMirrorSessionName: test-1
trafficMirrorTargetId: tmt-ij32u0acvta874o8ctxxxxx
virtualNetworkId: 13
Create TrafficMirrorSession Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TrafficMirrorSession(name: string, args: TrafficMirrorSessionArgs, opts?: CustomResourceOptions);@overload
def TrafficMirrorSession(resource_name: str,
args: TrafficMirrorSessionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TrafficMirrorSession(resource_name: str,
opts: Optional[ResourceOptions] = None,
network_interface_id: Optional[str] = None,
priority: Optional[int] = None,
traffic_mirror_filter_id: Optional[str] = None,
traffic_mirror_target_id: Optional[str] = None,
description: Optional[str] = None,
packet_length: Optional[int] = None,
project_name: Optional[str] = None,
tags: Optional[Sequence[TrafficMirrorSessionTagArgs]] = None,
traffic_mirror_session_name: Optional[str] = None,
virtual_network_id: Optional[int] = None)func NewTrafficMirrorSession(ctx *Context, name string, args TrafficMirrorSessionArgs, opts ...ResourceOption) (*TrafficMirrorSession, error)public TrafficMirrorSession(string name, TrafficMirrorSessionArgs args, CustomResourceOptions? opts = null)
public TrafficMirrorSession(String name, TrafficMirrorSessionArgs args)
public TrafficMirrorSession(String name, TrafficMirrorSessionArgs args, CustomResourceOptions options)
type: volcenginecc:vpc:TrafficMirrorSession
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 TrafficMirrorSessionArgs
- 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 TrafficMirrorSessionArgs
- 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 TrafficMirrorSessionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TrafficMirrorSessionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TrafficMirrorSessionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TrafficMirrorSession 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 TrafficMirrorSession resource accepts the following input properties:
- Network
Interface stringId - Mirror source instance ID. Currently, only ECS primary and secondary network interfaces are supported
- Priority int
- Mirror session priority. Range: 1–32766. Priority values must be unique within the same account
- Traffic
Mirror stringFilter Id - Filter condition instance ID
- Traffic
Mirror stringTarget Id - Mirror destination instance ID
- Description string
- Mirror session instance description
- Packet
Length int - Mirror session MTU. Values exceeding this will be truncated. Range: 64–9600
- Project
Name string - Name of the associated project
-
List<Volcengine.
Traffic Mirror Session Tag> - Traffic
Mirror stringSession Name - Mirror session name
- Virtual
Network intId - Mirror session VNI. Range: 1–16777215
- Network
Interface stringId - Mirror source instance ID. Currently, only ECS primary and secondary network interfaces are supported
- Priority int
- Mirror session priority. Range: 1–32766. Priority values must be unique within the same account
- Traffic
Mirror stringFilter Id - Filter condition instance ID
- Traffic
Mirror stringTarget Id - Mirror destination instance ID
- Description string
- Mirror session instance description
- Packet
Length int - Mirror session MTU. Values exceeding this will be truncated. Range: 64–9600
- Project
Name string - Name of the associated project
-
[]Traffic
Mirror Session Tag Args - Traffic
Mirror stringSession Name - Mirror session name
- Virtual
Network intId - Mirror session VNI. Range: 1–16777215
- network
Interface StringId - Mirror source instance ID. Currently, only ECS primary and secondary network interfaces are supported
- priority Integer
- Mirror session priority. Range: 1–32766. Priority values must be unique within the same account
- traffic
Mirror StringFilter Id - Filter condition instance ID
- traffic
Mirror StringTarget Id - Mirror destination instance ID
- description String
- Mirror session instance description
- packet
Length Integer - Mirror session MTU. Values exceeding this will be truncated. Range: 64–9600
- project
Name String - Name of the associated project
-
List<Traffic
Mirror Session Tag> - traffic
Mirror StringSession Name - Mirror session name
- virtual
Network IntegerId - Mirror session VNI. Range: 1–16777215
- network
Interface stringId - Mirror source instance ID. Currently, only ECS primary and secondary network interfaces are supported
- priority number
- Mirror session priority. Range: 1–32766. Priority values must be unique within the same account
- traffic
Mirror stringFilter Id - Filter condition instance ID
- traffic
Mirror stringTarget Id - Mirror destination instance ID
- description string
- Mirror session instance description
- packet
Length number - Mirror session MTU. Values exceeding this will be truncated. Range: 64–9600
- project
Name string - Name of the associated project
-
Traffic
Mirror Session Tag[] - traffic
Mirror stringSession Name - Mirror session name
- virtual
Network numberId - Mirror session VNI. Range: 1–16777215
- network_
interface_ strid - Mirror source instance ID. Currently, only ECS primary and secondary network interfaces are supported
- priority int
- Mirror session priority. Range: 1–32766. Priority values must be unique within the same account
- traffic_
mirror_ strfilter_ id - Filter condition instance ID
- traffic_
mirror_ strtarget_ id - Mirror destination instance ID
- description str
- Mirror session instance description
- packet_
length int - Mirror session MTU. Values exceeding this will be truncated. Range: 64–9600
- project_
name str - Name of the associated project
-
Sequence[Traffic
Mirror Session Tag Args] - traffic_
mirror_ strsession_ name - Mirror session name
- virtual_
network_ intid - Mirror session VNI. Range: 1–16777215
- network
Interface StringId - Mirror source instance ID. Currently, only ECS primary and secondary network interfaces are supported
- priority Number
- Mirror session priority. Range: 1–32766. Priority values must be unique within the same account
- traffic
Mirror StringFilter Id - Filter condition instance ID
- traffic
Mirror StringTarget Id - Mirror destination instance ID
- description String
- Mirror session instance description
- packet
Length Number - Mirror session MTU. Values exceeding this will be truncated. Range: 64–9600
- project
Name String - Name of the associated project
- List<Property Map>
- traffic
Mirror StringSession Name - Mirror session name
- virtual
Network NumberId - Mirror session VNI. Range: 1–16777215
Outputs
All input properties are implicitly available as output properties. Additionally, the TrafficMirrorSession resource produces the following output properties:
- Business
Status string - Session billing status. Normal: Billing in progress. - FinancialLocked: Locked due to overdue payment
- Created
Time string - Creation time
- Id string
- The provider-assigned unique ID for this managed resource.
- Lock
Reason string - Lock reason
- Status string
- Session status
- Traffic
Mirror stringSession Id - Mirror session instance ID
- Traffic
Mirror List<string>Source Ids - Mirror source instance list
- Business
Status string - Session billing status. Normal: Billing in progress. - FinancialLocked: Locked due to overdue payment
- Created
Time string - Creation time
- Id string
- The provider-assigned unique ID for this managed resource.
- Lock
Reason string - Lock reason
- Status string
- Session status
- Traffic
Mirror stringSession Id - Mirror session instance ID
- Traffic
Mirror []stringSource Ids - Mirror source instance list
- business
Status String - Session billing status. Normal: Billing in progress. - FinancialLocked: Locked due to overdue payment
- created
Time String - Creation time
- id String
- The provider-assigned unique ID for this managed resource.
- lock
Reason String - Lock reason
- status String
- Session status
- traffic
Mirror StringSession Id - Mirror session instance ID
- traffic
Mirror List<String>Source Ids - Mirror source instance list
- business
Status string - Session billing status. Normal: Billing in progress. - FinancialLocked: Locked due to overdue payment
- created
Time string - Creation time
- id string
- The provider-assigned unique ID for this managed resource.
- lock
Reason string - Lock reason
- status string
- Session status
- traffic
Mirror stringSession Id - Mirror session instance ID
- traffic
Mirror string[]Source Ids - Mirror source instance list
- business_
status str - Session billing status. Normal: Billing in progress. - FinancialLocked: Locked due to overdue payment
- created_
time str - Creation time
- id str
- The provider-assigned unique ID for this managed resource.
- lock_
reason str - Lock reason
- status str
- Session status
- traffic_
mirror_ strsession_ id - Mirror session instance ID
- traffic_
mirror_ Sequence[str]source_ ids - Mirror source instance list
- business
Status String - Session billing status. Normal: Billing in progress. - FinancialLocked: Locked due to overdue payment
- created
Time String - Creation time
- id String
- The provider-assigned unique ID for this managed resource.
- lock
Reason String - Lock reason
- status String
- Session status
- traffic
Mirror StringSession Id - Mirror session instance ID
- traffic
Mirror List<String>Source Ids - Mirror source instance list
Look up Existing TrafficMirrorSession Resource
Get an existing TrafficMirrorSession 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?: TrafficMirrorSessionState, opts?: CustomResourceOptions): TrafficMirrorSession@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
business_status: Optional[str] = None,
created_time: Optional[str] = None,
description: Optional[str] = None,
lock_reason: Optional[str] = None,
network_interface_id: Optional[str] = None,
packet_length: Optional[int] = None,
priority: Optional[int] = None,
project_name: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Sequence[TrafficMirrorSessionTagArgs]] = None,
traffic_mirror_filter_id: Optional[str] = None,
traffic_mirror_session_id: Optional[str] = None,
traffic_mirror_session_name: Optional[str] = None,
traffic_mirror_source_ids: Optional[Sequence[str]] = None,
traffic_mirror_target_id: Optional[str] = None,
virtual_network_id: Optional[int] = None) -> TrafficMirrorSessionfunc GetTrafficMirrorSession(ctx *Context, name string, id IDInput, state *TrafficMirrorSessionState, opts ...ResourceOption) (*TrafficMirrorSession, error)public static TrafficMirrorSession Get(string name, Input<string> id, TrafficMirrorSessionState? state, CustomResourceOptions? opts = null)public static TrafficMirrorSession get(String name, Output<String> id, TrafficMirrorSessionState state, CustomResourceOptions options)resources: _: type: volcenginecc:vpc:TrafficMirrorSession 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.
- Business
Status string - Session billing status. Normal: Billing in progress. - FinancialLocked: Locked due to overdue payment
- Created
Time string - Creation time
- Description string
- Mirror session instance description
- Lock
Reason string - Lock reason
- Network
Interface stringId - Mirror source instance ID. Currently, only ECS primary and secondary network interfaces are supported
- Packet
Length int - Mirror session MTU. Values exceeding this will be truncated. Range: 64–9600
- Priority int
- Mirror session priority. Range: 1–32766. Priority values must be unique within the same account
- Project
Name string - Name of the associated project
- Status string
- Session status
-
List<Volcengine.
Traffic Mirror Session Tag> - Traffic
Mirror stringFilter Id - Filter condition instance ID
- Traffic
Mirror stringSession Id - Mirror session instance ID
- Traffic
Mirror stringSession Name - Mirror session name
- Traffic
Mirror List<string>Source Ids - Mirror source instance list
- Traffic
Mirror stringTarget Id - Mirror destination instance ID
- Virtual
Network intId - Mirror session VNI. Range: 1–16777215
- Business
Status string - Session billing status. Normal: Billing in progress. - FinancialLocked: Locked due to overdue payment
- Created
Time string - Creation time
- Description string
- Mirror session instance description
- Lock
Reason string - Lock reason
- Network
Interface stringId - Mirror source instance ID. Currently, only ECS primary and secondary network interfaces are supported
- Packet
Length int - Mirror session MTU. Values exceeding this will be truncated. Range: 64–9600
- Priority int
- Mirror session priority. Range: 1–32766. Priority values must be unique within the same account
- Project
Name string - Name of the associated project
- Status string
- Session status
-
[]Traffic
Mirror Session Tag Args - Traffic
Mirror stringFilter Id - Filter condition instance ID
- Traffic
Mirror stringSession Id - Mirror session instance ID
- Traffic
Mirror stringSession Name - Mirror session name
- Traffic
Mirror []stringSource Ids - Mirror source instance list
- Traffic
Mirror stringTarget Id - Mirror destination instance ID
- Virtual
Network intId - Mirror session VNI. Range: 1–16777215
- business
Status String - Session billing status. Normal: Billing in progress. - FinancialLocked: Locked due to overdue payment
- created
Time String - Creation time
- description String
- Mirror session instance description
- lock
Reason String - Lock reason
- network
Interface StringId - Mirror source instance ID. Currently, only ECS primary and secondary network interfaces are supported
- packet
Length Integer - Mirror session MTU. Values exceeding this will be truncated. Range: 64–9600
- priority Integer
- Mirror session priority. Range: 1–32766. Priority values must be unique within the same account
- project
Name String - Name of the associated project
- status String
- Session status
-
List<Traffic
Mirror Session Tag> - traffic
Mirror StringFilter Id - Filter condition instance ID
- traffic
Mirror StringSession Id - Mirror session instance ID
- traffic
Mirror StringSession Name - Mirror session name
- traffic
Mirror List<String>Source Ids - Mirror source instance list
- traffic
Mirror StringTarget Id - Mirror destination instance ID
- virtual
Network IntegerId - Mirror session VNI. Range: 1–16777215
- business
Status string - Session billing status. Normal: Billing in progress. - FinancialLocked: Locked due to overdue payment
- created
Time string - Creation time
- description string
- Mirror session instance description
- lock
Reason string - Lock reason
- network
Interface stringId - Mirror source instance ID. Currently, only ECS primary and secondary network interfaces are supported
- packet
Length number - Mirror session MTU. Values exceeding this will be truncated. Range: 64–9600
- priority number
- Mirror session priority. Range: 1–32766. Priority values must be unique within the same account
- project
Name string - Name of the associated project
- status string
- Session status
-
Traffic
Mirror Session Tag[] - traffic
Mirror stringFilter Id - Filter condition instance ID
- traffic
Mirror stringSession Id - Mirror session instance ID
- traffic
Mirror stringSession Name - Mirror session name
- traffic
Mirror string[]Source Ids - Mirror source instance list
- traffic
Mirror stringTarget Id - Mirror destination instance ID
- virtual
Network numberId - Mirror session VNI. Range: 1–16777215
- business_
status str - Session billing status. Normal: Billing in progress. - FinancialLocked: Locked due to overdue payment
- created_
time str - Creation time
- description str
- Mirror session instance description
- lock_
reason str - Lock reason
- network_
interface_ strid - Mirror source instance ID. Currently, only ECS primary and secondary network interfaces are supported
- packet_
length int - Mirror session MTU. Values exceeding this will be truncated. Range: 64–9600
- priority int
- Mirror session priority. Range: 1–32766. Priority values must be unique within the same account
- project_
name str - Name of the associated project
- status str
- Session status
-
Sequence[Traffic
Mirror Session Tag Args] - traffic_
mirror_ strfilter_ id - Filter condition instance ID
- traffic_
mirror_ strsession_ id - Mirror session instance ID
- traffic_
mirror_ strsession_ name - Mirror session name
- traffic_
mirror_ Sequence[str]source_ ids - Mirror source instance list
- traffic_
mirror_ strtarget_ id - Mirror destination instance ID
- virtual_
network_ intid - Mirror session VNI. Range: 1–16777215
- business
Status String - Session billing status. Normal: Billing in progress. - FinancialLocked: Locked due to overdue payment
- created
Time String - Creation time
- description String
- Mirror session instance description
- lock
Reason String - Lock reason
- network
Interface StringId - Mirror source instance ID. Currently, only ECS primary and secondary network interfaces are supported
- packet
Length Number - Mirror session MTU. Values exceeding this will be truncated. Range: 64–9600
- priority Number
- Mirror session priority. Range: 1–32766. Priority values must be unique within the same account
- project
Name String - Name of the associated project
- status String
- Session status
- List<Property Map>
- traffic
Mirror StringFilter Id - Filter condition instance ID
- traffic
Mirror StringSession Id - Mirror session instance ID
- traffic
Mirror StringSession Name - Mirror session name
- traffic
Mirror List<String>Source Ids - Mirror source instance list
- traffic
Mirror StringTarget Id - Mirror destination instance ID
- virtual
Network NumberId - Mirror session VNI. Range: 1–16777215
Supporting Types
TrafficMirrorSessionTag, TrafficMirrorSessionTagArgs
Import
$ pulumi import volcenginecc:vpc/trafficMirrorSession:TrafficMirrorSession example "traffic_mirror_session_id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcenginecc volcengine/pulumi-volcenginecc
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
volcengineccTerraform Provider.
published on Thursday, Apr 23, 2026 by Volcengine
