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

volcengine.vpc.getTrafficMirrorSessions

Explore with Pulumi AI

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

    Use this data source to query detailed information of traffic mirror sessions

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    
    const foo = volcengine.vpc.getTrafficMirrorSessions({
        trafficMirrorSessionIds: ["tms-mjpcyvp71r0g5smt1ayf****"],
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo = volcengine.vpc.get_traffic_mirror_sessions(traffic_mirror_session_ids=["tms-mjpcyvp71r0g5smt1ayf****"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vpc.GetTrafficMirrorSessions(ctx, &vpc.GetTrafficMirrorSessionsArgs{
    			TrafficMirrorSessionIds: []string{
    				"tms-mjpcyvp71r0g5smt1ayf****",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = Volcengine.Vpc.GetTrafficMirrorSessions.Invoke(new()
        {
            TrafficMirrorSessionIds = new[]
            {
                "tms-mjpcyvp71r0g5smt1ayf****",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.vpc.VpcFunctions;
    import com.pulumi.volcengine.vpc.inputs.GetTrafficMirrorSessionsArgs;
    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 foo = VpcFunctions.getTrafficMirrorSessions(GetTrafficMirrorSessionsArgs.builder()
                .trafficMirrorSessionIds("tms-mjpcyvp71r0g5smt1ayf****")
                .build());
    
        }
    }
    
    variables:
      foo:
        fn::invoke:
          Function: volcengine:vpc:getTrafficMirrorSessions
          Arguments:
            trafficMirrorSessionIds:
              - tms-mjpcyvp71r0g5smt1ayf****
    

    Using getTrafficMirrorSessions

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getTrafficMirrorSessions(args: GetTrafficMirrorSessionsArgs, opts?: InvokeOptions): Promise<GetTrafficMirrorSessionsResult>
    function getTrafficMirrorSessionsOutput(args: GetTrafficMirrorSessionsOutputArgs, opts?: InvokeOptions): Output<GetTrafficMirrorSessionsResult>
    def get_traffic_mirror_sessions(name_regex: Optional[str] = None,
                                    network_interface_id: Optional[str] = None,
                                    output_file: Optional[str] = None,
                                    packet_length: Optional[int] = None,
                                    priority: Optional[int] = None,
                                    project_name: Optional[str] = None,
                                    tags: Optional[Sequence[GetTrafficMirrorSessionsTag]] = None,
                                    traffic_mirror_filter_id: Optional[str] = None,
                                    traffic_mirror_session_ids: Optional[Sequence[str]] = None,
                                    traffic_mirror_session_names: Optional[Sequence[str]] = None,
                                    traffic_mirror_target_id: Optional[str] = None,
                                    virtual_network_id: Optional[int] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetTrafficMirrorSessionsResult
    def get_traffic_mirror_sessions_output(name_regex: Optional[pulumi.Input[str]] = None,
                                    network_interface_id: Optional[pulumi.Input[str]] = None,
                                    output_file: Optional[pulumi.Input[str]] = None,
                                    packet_length: Optional[pulumi.Input[int]] = None,
                                    priority: Optional[pulumi.Input[int]] = None,
                                    project_name: Optional[pulumi.Input[str]] = None,
                                    tags: Optional[pulumi.Input[Sequence[pulumi.Input[GetTrafficMirrorSessionsTagArgs]]]] = None,
                                    traffic_mirror_filter_id: Optional[pulumi.Input[str]] = None,
                                    traffic_mirror_session_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                    traffic_mirror_session_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                    traffic_mirror_target_id: Optional[pulumi.Input[str]] = None,
                                    virtual_network_id: Optional[pulumi.Input[int]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetTrafficMirrorSessionsResult]
    func GetTrafficMirrorSessions(ctx *Context, args *GetTrafficMirrorSessionsArgs, opts ...InvokeOption) (*GetTrafficMirrorSessionsResult, error)
    func GetTrafficMirrorSessionsOutput(ctx *Context, args *GetTrafficMirrorSessionsOutputArgs, opts ...InvokeOption) GetTrafficMirrorSessionsResultOutput

    > Note: This function is named GetTrafficMirrorSessions in the Go SDK.

    public static class GetTrafficMirrorSessions 
    {
        public static Task<GetTrafficMirrorSessionsResult> InvokeAsync(GetTrafficMirrorSessionsArgs args, InvokeOptions? opts = null)
        public static Output<GetTrafficMirrorSessionsResult> Invoke(GetTrafficMirrorSessionsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTrafficMirrorSessionsResult> getTrafficMirrorSessions(GetTrafficMirrorSessionsArgs args, InvokeOptions options)
    public static Output<GetTrafficMirrorSessionsResult> getTrafficMirrorSessions(GetTrafficMirrorSessionsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: volcengine:vpc/getTrafficMirrorSessions:getTrafficMirrorSessions
      arguments:
        # arguments dictionary

    The following arguments are supported:

    NameRegex string
    A Name Regex of Resource.
    NetworkInterfaceId string
    The ID of network interface.
    OutputFile string
    File name where to save data source results.
    PacketLength int
    The packet length of traffic mirror session.
    Priority int
    The priority of traffic mirror session.
    ProjectName string
    The project name of traffic mirror session.
    Tags List<GetTrafficMirrorSessionsTag>
    Tags.
    TrafficMirrorFilterId string
    The ID of traffic mirror filter.
    TrafficMirrorSessionIds List<string>
    A list of traffic mirror session IDs.
    TrafficMirrorSessionNames List<string>
    A list of traffic mirror session names.
    TrafficMirrorTargetId string
    The ID of traffic mirror target.
    VirtualNetworkId int
    The ID of virtual network.
    NameRegex string
    A Name Regex of Resource.
    NetworkInterfaceId string
    The ID of network interface.
    OutputFile string
    File name where to save data source results.
    PacketLength int
    The packet length of traffic mirror session.
    Priority int
    The priority of traffic mirror session.
    ProjectName string
    The project name of traffic mirror session.
    Tags []GetTrafficMirrorSessionsTag
    Tags.
    TrafficMirrorFilterId string
    The ID of traffic mirror filter.
    TrafficMirrorSessionIds []string
    A list of traffic mirror session IDs.
    TrafficMirrorSessionNames []string
    A list of traffic mirror session names.
    TrafficMirrorTargetId string
    The ID of traffic mirror target.
    VirtualNetworkId int
    The ID of virtual network.
    nameRegex String
    A Name Regex of Resource.
    networkInterfaceId String
    The ID of network interface.
    outputFile String
    File name where to save data source results.
    packetLength Integer
    The packet length of traffic mirror session.
    priority Integer
    The priority of traffic mirror session.
    projectName String
    The project name of traffic mirror session.
    tags List<GetTrafficMirrorSessionsTag>
    Tags.
    trafficMirrorFilterId String
    The ID of traffic mirror filter.
    trafficMirrorSessionIds List<String>
    A list of traffic mirror session IDs.
    trafficMirrorSessionNames List<String>
    A list of traffic mirror session names.
    trafficMirrorTargetId String
    The ID of traffic mirror target.
    virtualNetworkId Integer
    The ID of virtual network.
    nameRegex string
    A Name Regex of Resource.
    networkInterfaceId string
    The ID of network interface.
    outputFile string
    File name where to save data source results.
    packetLength number
    The packet length of traffic mirror session.
    priority number
    The priority of traffic mirror session.
    projectName string
    The project name of traffic mirror session.
    tags GetTrafficMirrorSessionsTag[]
    Tags.
    trafficMirrorFilterId string
    The ID of traffic mirror filter.
    trafficMirrorSessionIds string[]
    A list of traffic mirror session IDs.
    trafficMirrorSessionNames string[]
    A list of traffic mirror session names.
    trafficMirrorTargetId string
    The ID of traffic mirror target.
    virtualNetworkId number
    The ID of virtual network.
    name_regex str
    A Name Regex of Resource.
    network_interface_id str
    The ID of network interface.
    output_file str
    File name where to save data source results.
    packet_length int
    The packet length of traffic mirror session.
    priority int
    The priority of traffic mirror session.
    project_name str
    The project name of traffic mirror session.
    tags Sequence[GetTrafficMirrorSessionsTag]
    Tags.
    traffic_mirror_filter_id str
    The ID of traffic mirror filter.
    traffic_mirror_session_ids Sequence[str]
    A list of traffic mirror session IDs.
    traffic_mirror_session_names Sequence[str]
    A list of traffic mirror session names.
    traffic_mirror_target_id str
    The ID of traffic mirror target.
    virtual_network_id int
    The ID of virtual network.
    nameRegex String
    A Name Regex of Resource.
    networkInterfaceId String
    The ID of network interface.
    outputFile String
    File name where to save data source results.
    packetLength Number
    The packet length of traffic mirror session.
    priority Number
    The priority of traffic mirror session.
    projectName String
    The project name of traffic mirror session.
    tags List<Property Map>
    Tags.
    trafficMirrorFilterId String
    The ID of traffic mirror filter.
    trafficMirrorSessionIds List<String>
    A list of traffic mirror session IDs.
    trafficMirrorSessionNames List<String>
    A list of traffic mirror session names.
    trafficMirrorTargetId String
    The ID of traffic mirror target.
    virtualNetworkId Number
    The ID of virtual network.

    getTrafficMirrorSessions Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    TotalCount int
    The total count of query.
    TrafficMirrorSessions List<GetTrafficMirrorSessionsTrafficMirrorSession>
    The collection of query.
    NameRegex string
    NetworkInterfaceId string
    OutputFile string
    PacketLength int
    The packet length of traffic mirror session.
    Priority int
    The priority of traffic mirror session.
    ProjectName string
    The project name of traffic mirror session.
    Tags List<GetTrafficMirrorSessionsTag>
    Tags.
    TrafficMirrorFilterId string
    The ID of traffic mirror filter.
    TrafficMirrorSessionIds List<string>
    TrafficMirrorSessionNames List<string>
    TrafficMirrorTargetId string
    The ID of traffic mirror target.
    VirtualNetworkId int
    The ID of virtual network.
    Id string
    The provider-assigned unique ID for this managed resource.
    TotalCount int
    The total count of query.
    TrafficMirrorSessions []GetTrafficMirrorSessionsTrafficMirrorSession
    The collection of query.
    NameRegex string
    NetworkInterfaceId string
    OutputFile string
    PacketLength int
    The packet length of traffic mirror session.
    Priority int
    The priority of traffic mirror session.
    ProjectName string
    The project name of traffic mirror session.
    Tags []GetTrafficMirrorSessionsTag
    Tags.
    TrafficMirrorFilterId string
    The ID of traffic mirror filter.
    TrafficMirrorSessionIds []string
    TrafficMirrorSessionNames []string
    TrafficMirrorTargetId string
    The ID of traffic mirror target.
    VirtualNetworkId int
    The ID of virtual network.
    id String
    The provider-assigned unique ID for this managed resource.
    totalCount Integer
    The total count of query.
    trafficMirrorSessions List<GetTrafficMirrorSessionsTrafficMirrorSession>
    The collection of query.
    nameRegex String
    networkInterfaceId String
    outputFile String
    packetLength Integer
    The packet length of traffic mirror session.
    priority Integer
    The priority of traffic mirror session.
    projectName String
    The project name of traffic mirror session.
    tags List<GetTrafficMirrorSessionsTag>
    Tags.
    trafficMirrorFilterId String
    The ID of traffic mirror filter.
    trafficMirrorSessionIds List<String>
    trafficMirrorSessionNames List<String>
    trafficMirrorTargetId String
    The ID of traffic mirror target.
    virtualNetworkId Integer
    The ID of virtual network.
    id string
    The provider-assigned unique ID for this managed resource.
    totalCount number
    The total count of query.
    trafficMirrorSessions GetTrafficMirrorSessionsTrafficMirrorSession[]
    The collection of query.
    nameRegex string
    networkInterfaceId string
    outputFile string
    packetLength number
    The packet length of traffic mirror session.
    priority number
    The priority of traffic mirror session.
    projectName string
    The project name of traffic mirror session.
    tags GetTrafficMirrorSessionsTag[]
    Tags.
    trafficMirrorFilterId string
    The ID of traffic mirror filter.
    trafficMirrorSessionIds string[]
    trafficMirrorSessionNames string[]
    trafficMirrorTargetId string
    The ID of traffic mirror target.
    virtualNetworkId number
    The ID of virtual network.
    id str
    The provider-assigned unique ID for this managed resource.
    total_count int
    The total count of query.
    traffic_mirror_sessions Sequence[GetTrafficMirrorSessionsTrafficMirrorSession]
    The collection of query.
    name_regex str
    network_interface_id str
    output_file str
    packet_length int
    The packet length of traffic mirror session.
    priority int
    The priority of traffic mirror session.
    project_name str
    The project name of traffic mirror session.
    tags Sequence[GetTrafficMirrorSessionsTag]
    Tags.
    traffic_mirror_filter_id str
    The ID of traffic mirror filter.
    traffic_mirror_session_ids Sequence[str]
    traffic_mirror_session_names Sequence[str]
    traffic_mirror_target_id str
    The ID of traffic mirror target.
    virtual_network_id int
    The ID of virtual network.
    id String
    The provider-assigned unique ID for this managed resource.
    totalCount Number
    The total count of query.
    trafficMirrorSessions List<Property Map>
    The collection of query.
    nameRegex String
    networkInterfaceId String
    outputFile String
    packetLength Number
    The packet length of traffic mirror session.
    priority Number
    The priority of traffic mirror session.
    projectName String
    The project name of traffic mirror session.
    tags List<Property Map>
    Tags.
    trafficMirrorFilterId String
    The ID of traffic mirror filter.
    trafficMirrorSessionIds List<String>
    trafficMirrorSessionNames List<String>
    trafficMirrorTargetId String
    The ID of traffic mirror target.
    virtualNetworkId Number
    The ID of virtual network.

    Supporting Types

    GetTrafficMirrorSessionsTag

    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.

    GetTrafficMirrorSessionsTrafficMirrorSession

    BusinessStatus string
    The business status of traffic mirror session.
    CreatedAt string
    The create time of traffic mirror session.
    Description string
    The description of traffic mirror session.
    Id string
    The ID of traffic mirror session.
    LockReason string
    The lock reason of traffic mirror session.
    PacketLength int
    The packet length of traffic mirror session.
    Priority int
    The priority of traffic mirror session.
    ProjectName string
    The project name of traffic mirror session.
    Status string
    The status of traffic mirror session.
    Tags List<GetTrafficMirrorSessionsTrafficMirrorSessionTag>
    Tags.
    TrafficMirrorFilterId string
    The ID of traffic mirror filter.
    TrafficMirrorSessionId string
    The ID of traffic mirror session.
    TrafficMirrorSessionName string
    The name of traffic mirror session.
    TrafficMirrorSourceIds List<string>
    The IDs of traffic mirror source.
    TrafficMirrorTargetId string
    The ID of traffic mirror target.
    UpdatedAt string
    The update time of traffic mirror session.
    VirtualNetworkId int
    The ID of virtual network.
    BusinessStatus string
    The business status of traffic mirror session.
    CreatedAt string
    The create time of traffic mirror session.
    Description string
    The description of traffic mirror session.
    Id string
    The ID of traffic mirror session.
    LockReason string
    The lock reason of traffic mirror session.
    PacketLength int
    The packet length of traffic mirror session.
    Priority int
    The priority of traffic mirror session.
    ProjectName string
    The project name of traffic mirror session.
    Status string
    The status of traffic mirror session.
    Tags []GetTrafficMirrorSessionsTrafficMirrorSessionTag
    Tags.
    TrafficMirrorFilterId string
    The ID of traffic mirror filter.
    TrafficMirrorSessionId string
    The ID of traffic mirror session.
    TrafficMirrorSessionName string
    The name of traffic mirror session.
    TrafficMirrorSourceIds []string
    The IDs of traffic mirror source.
    TrafficMirrorTargetId string
    The ID of traffic mirror target.
    UpdatedAt string
    The update time of traffic mirror session.
    VirtualNetworkId int
    The ID of virtual network.
    businessStatus String
    The business status of traffic mirror session.
    createdAt String
    The create time of traffic mirror session.
    description String
    The description of traffic mirror session.
    id String
    The ID of traffic mirror session.
    lockReason String
    The lock reason of traffic mirror session.
    packetLength Integer
    The packet length of traffic mirror session.
    priority Integer
    The priority of traffic mirror session.
    projectName String
    The project name of traffic mirror session.
    status String
    The status of traffic mirror session.
    tags List<GetTrafficMirrorSessionsTrafficMirrorSessionTag>
    Tags.
    trafficMirrorFilterId String
    The ID of traffic mirror filter.
    trafficMirrorSessionId String
    The ID of traffic mirror session.
    trafficMirrorSessionName String
    The name of traffic mirror session.
    trafficMirrorSourceIds List<String>
    The IDs of traffic mirror source.
    trafficMirrorTargetId String
    The ID of traffic mirror target.
    updatedAt String
    The update time of traffic mirror session.
    virtualNetworkId Integer
    The ID of virtual network.
    businessStatus string
    The business status of traffic mirror session.
    createdAt string
    The create time of traffic mirror session.
    description string
    The description of traffic mirror session.
    id string
    The ID of traffic mirror session.
    lockReason string
    The lock reason of traffic mirror session.
    packetLength number
    The packet length of traffic mirror session.
    priority number
    The priority of traffic mirror session.
    projectName string
    The project name of traffic mirror session.
    status string
    The status of traffic mirror session.
    tags GetTrafficMirrorSessionsTrafficMirrorSessionTag[]
    Tags.
    trafficMirrorFilterId string
    The ID of traffic mirror filter.
    trafficMirrorSessionId string
    The ID of traffic mirror session.
    trafficMirrorSessionName string
    The name of traffic mirror session.
    trafficMirrorSourceIds string[]
    The IDs of traffic mirror source.
    trafficMirrorTargetId string
    The ID of traffic mirror target.
    updatedAt string
    The update time of traffic mirror session.
    virtualNetworkId number
    The ID of virtual network.
    business_status str
    The business status of traffic mirror session.
    created_at str
    The create time of traffic mirror session.
    description str
    The description of traffic mirror session.
    id str
    The ID of traffic mirror session.
    lock_reason str
    The lock reason of traffic mirror session.
    packet_length int
    The packet length of traffic mirror session.
    priority int
    The priority of traffic mirror session.
    project_name str
    The project name of traffic mirror session.
    status str
    The status of traffic mirror session.
    tags Sequence[GetTrafficMirrorSessionsTrafficMirrorSessionTag]
    Tags.
    traffic_mirror_filter_id str
    The ID of traffic mirror filter.
    traffic_mirror_session_id str
    The ID of traffic mirror session.
    traffic_mirror_session_name str
    The name of traffic mirror session.
    traffic_mirror_source_ids Sequence[str]
    The IDs of traffic mirror source.
    traffic_mirror_target_id str
    The ID of traffic mirror target.
    updated_at str
    The update time of traffic mirror session.
    virtual_network_id int
    The ID of virtual network.
    businessStatus String
    The business status of traffic mirror session.
    createdAt String
    The create time of traffic mirror session.
    description String
    The description of traffic mirror session.
    id String
    The ID of traffic mirror session.
    lockReason String
    The lock reason of traffic mirror session.
    packetLength Number
    The packet length of traffic mirror session.
    priority Number
    The priority of traffic mirror session.
    projectName String
    The project name of traffic mirror session.
    status String
    The status of traffic mirror session.
    tags List<Property Map>
    Tags.
    trafficMirrorFilterId String
    The ID of traffic mirror filter.
    trafficMirrorSessionId String
    The ID of traffic mirror session.
    trafficMirrorSessionName String
    The name of traffic mirror session.
    trafficMirrorSourceIds List<String>
    The IDs of traffic mirror source.
    trafficMirrorTargetId String
    The ID of traffic mirror target.
    updatedAt String
    The update time of traffic mirror session.
    virtualNetworkId Number
    The ID of virtual network.

    GetTrafficMirrorSessionsTrafficMirrorSessionTag

    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.

    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