1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. vpc
  5. getTrafficMirrorSessions
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.vpc.getTrafficMirrorSessions

Explore with Pulumi AI

This data source provides the Vpc Traffic Mirror Sessions of the current Alibaba Cloud user.

NOTE: Available in v1.142.0+.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.vpc.getTrafficMirrorSessions({
    ids: ["example_id"],
});
export const vpcTrafficMirrorSessionId1 = ids.then(ids => ids.sessions?.[0]?.id);
const nameRegex = alicloud.vpc.getTrafficMirrorSessions({
    nameRegex: "^my-TrafficMirrorSession",
});
export const vpcTrafficMirrorSessionId2 = nameRegex.then(nameRegex => nameRegex.sessions?.[0]?.id);
const enabled = alicloud.vpc.getTrafficMirrorSessions({
    ids: ["example_id"],
    enabled: false,
});
export const vpcTrafficMirrorSessionId3 = enabled.then(enabled => enabled.sessions?.[0]?.id);
const priority = alicloud.vpc.getTrafficMirrorSessions({
    ids: ["example_id"],
    priority: 1,
});
export const vpcTrafficMirrorSessionId4 = priority.then(priority => priority.sessions?.[0]?.id);
const filterId = alicloud.vpc.getTrafficMirrorSessions({
    ids: ["example_id"],
    trafficMirrorFilterId: "example_value",
});
export const vpcTrafficMirrorSessionId5 = filterId.then(filterId => filterId.sessions?.[0]?.id);
const sessionName = alicloud.vpc.getTrafficMirrorSessions({
    ids: ["example_id"],
    trafficMirrorSessionName: "example_value",
});
export const vpcTrafficMirrorSessionId6 = sessionName.then(sessionName => sessionName.sessions?.[0]?.id);
const sourceId = alicloud.vpc.getTrafficMirrorSessions({
    ids: ["example_id"],
    trafficMirrorSourceId: "example_value",
});
export const vpcTrafficMirrorSessionId7 = sourceId.then(sourceId => sourceId.sessions?.[0]?.id);
const targetId = alicloud.vpc.getTrafficMirrorSessions({
    ids: ["example_id"],
    trafficMirrorTargetId: "example_value",
});
export const vpcTrafficMirrorSessionId8 = targetId.then(targetId => targetId.sessions?.[0]?.id);
const status = alicloud.vpc.getTrafficMirrorSessions({
    ids: ["example_id"],
    status: "Created",
});
export const vpcTrafficMirrorSessionId9 = status.then(status => status.sessions?.[0]?.id);
Copy
import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.vpc.get_traffic_mirror_sessions(ids=["example_id"])
pulumi.export("vpcTrafficMirrorSessionId1", ids.sessions[0].id)
name_regex = alicloud.vpc.get_traffic_mirror_sessions(name_regex="^my-TrafficMirrorSession")
pulumi.export("vpcTrafficMirrorSessionId2", name_regex.sessions[0].id)
enabled = alicloud.vpc.get_traffic_mirror_sessions(ids=["example_id"],
    enabled=False)
pulumi.export("vpcTrafficMirrorSessionId3", enabled.sessions[0].id)
priority = alicloud.vpc.get_traffic_mirror_sessions(ids=["example_id"],
    priority=1)
pulumi.export("vpcTrafficMirrorSessionId4", priority.sessions[0].id)
filter_id = alicloud.vpc.get_traffic_mirror_sessions(ids=["example_id"],
    traffic_mirror_filter_id="example_value")
pulumi.export("vpcTrafficMirrorSessionId5", filter_id.sessions[0].id)
session_name = alicloud.vpc.get_traffic_mirror_sessions(ids=["example_id"],
    traffic_mirror_session_name="example_value")
pulumi.export("vpcTrafficMirrorSessionId6", session_name.sessions[0].id)
source_id = alicloud.vpc.get_traffic_mirror_sessions(ids=["example_id"],
    traffic_mirror_source_id="example_value")
pulumi.export("vpcTrafficMirrorSessionId7", source_id.sessions[0].id)
target_id = alicloud.vpc.get_traffic_mirror_sessions(ids=["example_id"],
    traffic_mirror_target_id="example_value")
pulumi.export("vpcTrafficMirrorSessionId8", target_id.sessions[0].id)
status = alicloud.vpc.get_traffic_mirror_sessions(ids=["example_id"],
    status="Created")
pulumi.export("vpcTrafficMirrorSessionId9", status.sessions[0].id)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ids, err := vpc.GetTrafficMirrorSessions(ctx, &vpc.GetTrafficMirrorSessionsArgs{
			Ids: []string{
				"example_id",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("vpcTrafficMirrorSessionId1", ids.Sessions[0].Id)
		nameRegex, err := vpc.GetTrafficMirrorSessions(ctx, &vpc.GetTrafficMirrorSessionsArgs{
			NameRegex: pulumi.StringRef("^my-TrafficMirrorSession"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("vpcTrafficMirrorSessionId2", nameRegex.Sessions[0].Id)
		enabled, err := vpc.GetTrafficMirrorSessions(ctx, &vpc.GetTrafficMirrorSessionsArgs{
			Ids: []string{
				"example_id",
			},
			Enabled: pulumi.BoolRef(false),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("vpcTrafficMirrorSessionId3", enabled.Sessions[0].Id)
		priority, err := vpc.GetTrafficMirrorSessions(ctx, &vpc.GetTrafficMirrorSessionsArgs{
			Ids: []string{
				"example_id",
			},
			Priority: pulumi.IntRef(1),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("vpcTrafficMirrorSessionId4", priority.Sessions[0].Id)
		filterId, err := vpc.GetTrafficMirrorSessions(ctx, &vpc.GetTrafficMirrorSessionsArgs{
			Ids: []string{
				"example_id",
			},
			TrafficMirrorFilterId: pulumi.StringRef("example_value"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("vpcTrafficMirrorSessionId5", filterId.Sessions[0].Id)
		sessionName, err := vpc.GetTrafficMirrorSessions(ctx, &vpc.GetTrafficMirrorSessionsArgs{
			Ids: []string{
				"example_id",
			},
			TrafficMirrorSessionName: pulumi.StringRef("example_value"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("vpcTrafficMirrorSessionId6", sessionName.Sessions[0].Id)
		sourceId, err := vpc.GetTrafficMirrorSessions(ctx, &vpc.GetTrafficMirrorSessionsArgs{
			Ids: []string{
				"example_id",
			},
			TrafficMirrorSourceId: pulumi.StringRef("example_value"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("vpcTrafficMirrorSessionId7", sourceId.Sessions[0].Id)
		targetId, err := vpc.GetTrafficMirrorSessions(ctx, &vpc.GetTrafficMirrorSessionsArgs{
			Ids: []string{
				"example_id",
			},
			TrafficMirrorTargetId: pulumi.StringRef("example_value"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("vpcTrafficMirrorSessionId8", targetId.Sessions[0].Id)
		status, err := vpc.GetTrafficMirrorSessions(ctx, &vpc.GetTrafficMirrorSessionsArgs{
			Ids: []string{
				"example_id",
			},
			Status: pulumi.StringRef("Created"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("vpcTrafficMirrorSessionId9", status.Sessions[0].Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.Vpc.GetTrafficMirrorSessions.Invoke(new()
    {
        Ids = new[]
        {
            "example_id",
        },
    });

    var nameRegex = AliCloud.Vpc.GetTrafficMirrorSessions.Invoke(new()
    {
        NameRegex = "^my-TrafficMirrorSession",
    });

    var enabled = AliCloud.Vpc.GetTrafficMirrorSessions.Invoke(new()
    {
        Ids = new[]
        {
            "example_id",
        },
        Enabled = false,
    });

    var priority = AliCloud.Vpc.GetTrafficMirrorSessions.Invoke(new()
    {
        Ids = new[]
        {
            "example_id",
        },
        Priority = 1,
    });

    var filterId = AliCloud.Vpc.GetTrafficMirrorSessions.Invoke(new()
    {
        Ids = new[]
        {
            "example_id",
        },
        TrafficMirrorFilterId = "example_value",
    });

    var sessionName = AliCloud.Vpc.GetTrafficMirrorSessions.Invoke(new()
    {
        Ids = new[]
        {
            "example_id",
        },
        TrafficMirrorSessionName = "example_value",
    });

    var sourceId = AliCloud.Vpc.GetTrafficMirrorSessions.Invoke(new()
    {
        Ids = new[]
        {
            "example_id",
        },
        TrafficMirrorSourceId = "example_value",
    });

    var targetId = AliCloud.Vpc.GetTrafficMirrorSessions.Invoke(new()
    {
        Ids = new[]
        {
            "example_id",
        },
        TrafficMirrorTargetId = "example_value",
    });

    var status = AliCloud.Vpc.GetTrafficMirrorSessions.Invoke(new()
    {
        Ids = new[]
        {
            "example_id",
        },
        Status = "Created",
    });

    return new Dictionary<string, object?>
    {
        ["vpcTrafficMirrorSessionId1"] = ids.Apply(getTrafficMirrorSessionsResult => getTrafficMirrorSessionsResult.Sessions[0]?.Id),
        ["vpcTrafficMirrorSessionId2"] = nameRegex.Apply(getTrafficMirrorSessionsResult => getTrafficMirrorSessionsResult.Sessions[0]?.Id),
        ["vpcTrafficMirrorSessionId3"] = enabled.Apply(getTrafficMirrorSessionsResult => getTrafficMirrorSessionsResult.Sessions[0]?.Id),
        ["vpcTrafficMirrorSessionId4"] = priority.Apply(getTrafficMirrorSessionsResult => getTrafficMirrorSessionsResult.Sessions[0]?.Id),
        ["vpcTrafficMirrorSessionId5"] = filterId.Apply(getTrafficMirrorSessionsResult => getTrafficMirrorSessionsResult.Sessions[0]?.Id),
        ["vpcTrafficMirrorSessionId6"] = sessionName.Apply(getTrafficMirrorSessionsResult => getTrafficMirrorSessionsResult.Sessions[0]?.Id),
        ["vpcTrafficMirrorSessionId7"] = sourceId.Apply(getTrafficMirrorSessionsResult => getTrafficMirrorSessionsResult.Sessions[0]?.Id),
        ["vpcTrafficMirrorSessionId8"] = targetId.Apply(getTrafficMirrorSessionsResult => getTrafficMirrorSessionsResult.Sessions[0]?.Id),
        ["vpcTrafficMirrorSessionId9"] = status.Apply(getTrafficMirrorSessionsResult => getTrafficMirrorSessionsResult.Sessions[0]?.Id),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.vpc.VpcFunctions;
import com.pulumi.alicloud.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 ids = VpcFunctions.getTrafficMirrorSessions(GetTrafficMirrorSessionsArgs.builder()
            .ids("example_id")
            .build());

        ctx.export("vpcTrafficMirrorSessionId1", ids.applyValue(getTrafficMirrorSessionsResult -> getTrafficMirrorSessionsResult.sessions()[0].id()));
        final var nameRegex = VpcFunctions.getTrafficMirrorSessions(GetTrafficMirrorSessionsArgs.builder()
            .nameRegex("^my-TrafficMirrorSession")
            .build());

        ctx.export("vpcTrafficMirrorSessionId2", nameRegex.applyValue(getTrafficMirrorSessionsResult -> getTrafficMirrorSessionsResult.sessions()[0].id()));
        final var enabled = VpcFunctions.getTrafficMirrorSessions(GetTrafficMirrorSessionsArgs.builder()
            .ids("example_id")
            .enabled("false")
            .build());

        ctx.export("vpcTrafficMirrorSessionId3", enabled.applyValue(getTrafficMirrorSessionsResult -> getTrafficMirrorSessionsResult.sessions()[0].id()));
        final var priority = VpcFunctions.getTrafficMirrorSessions(GetTrafficMirrorSessionsArgs.builder()
            .ids("example_id")
            .priority("1")
            .build());

        ctx.export("vpcTrafficMirrorSessionId4", priority.applyValue(getTrafficMirrorSessionsResult -> getTrafficMirrorSessionsResult.sessions()[0].id()));
        final var filterId = VpcFunctions.getTrafficMirrorSessions(GetTrafficMirrorSessionsArgs.builder()
            .ids("example_id")
            .trafficMirrorFilterId("example_value")
            .build());

        ctx.export("vpcTrafficMirrorSessionId5", filterId.applyValue(getTrafficMirrorSessionsResult -> getTrafficMirrorSessionsResult.sessions()[0].id()));
        final var sessionName = VpcFunctions.getTrafficMirrorSessions(GetTrafficMirrorSessionsArgs.builder()
            .ids("example_id")
            .trafficMirrorSessionName("example_value")
            .build());

        ctx.export("vpcTrafficMirrorSessionId6", sessionName.applyValue(getTrafficMirrorSessionsResult -> getTrafficMirrorSessionsResult.sessions()[0].id()));
        final var sourceId = VpcFunctions.getTrafficMirrorSessions(GetTrafficMirrorSessionsArgs.builder()
            .ids("example_id")
            .trafficMirrorSourceId("example_value")
            .build());

        ctx.export("vpcTrafficMirrorSessionId7", sourceId.applyValue(getTrafficMirrorSessionsResult -> getTrafficMirrorSessionsResult.sessions()[0].id()));
        final var targetId = VpcFunctions.getTrafficMirrorSessions(GetTrafficMirrorSessionsArgs.builder()
            .ids("example_id")
            .trafficMirrorTargetId("example_value")
            .build());

        ctx.export("vpcTrafficMirrorSessionId8", targetId.applyValue(getTrafficMirrorSessionsResult -> getTrafficMirrorSessionsResult.sessions()[0].id()));
        final var status = VpcFunctions.getTrafficMirrorSessions(GetTrafficMirrorSessionsArgs.builder()
            .ids("example_id")
            .status("Created")
            .build());

        ctx.export("vpcTrafficMirrorSessionId9", status.applyValue(getTrafficMirrorSessionsResult -> getTrafficMirrorSessionsResult.sessions()[0].id()));
    }
}
Copy
variables:
  ids:
    fn::invoke:
      function: alicloud:vpc:getTrafficMirrorSessions
      arguments:
        ids:
          - example_id
  nameRegex:
    fn::invoke:
      function: alicloud:vpc:getTrafficMirrorSessions
      arguments:
        nameRegex: ^my-TrafficMirrorSession
  enabled:
    fn::invoke:
      function: alicloud:vpc:getTrafficMirrorSessions
      arguments:
        ids:
          - example_id
        enabled: 'false'
  priority:
    fn::invoke:
      function: alicloud:vpc:getTrafficMirrorSessions
      arguments:
        ids:
          - example_id
        priority: '1'
  filterId:
    fn::invoke:
      function: alicloud:vpc:getTrafficMirrorSessions
      arguments:
        ids:
          - example_id
        trafficMirrorFilterId: example_value
  sessionName:
    fn::invoke:
      function: alicloud:vpc:getTrafficMirrorSessions
      arguments:
        ids:
          - example_id
        trafficMirrorSessionName: example_value
  sourceId:
    fn::invoke:
      function: alicloud:vpc:getTrafficMirrorSessions
      arguments:
        ids:
          - example_id
        trafficMirrorSourceId: example_value
  targetId:
    fn::invoke:
      function: alicloud:vpc:getTrafficMirrorSessions
      arguments:
        ids:
          - example_id
        trafficMirrorTargetId: example_value
  status:
    fn::invoke:
      function: alicloud:vpc:getTrafficMirrorSessions
      arguments:
        ids:
          - example_id
        status: Created
outputs:
  vpcTrafficMirrorSessionId1: ${ids.sessions[0].id}
  vpcTrafficMirrorSessionId2: ${nameRegex.sessions[0].id}
  vpcTrafficMirrorSessionId3: ${enabled.sessions[0].id}
  vpcTrafficMirrorSessionId4: ${priority.sessions[0].id}
  vpcTrafficMirrorSessionId5: ${filterId.sessions[0].id}
  vpcTrafficMirrorSessionId6: ${sessionName.sessions[0].id}
  vpcTrafficMirrorSessionId7: ${sourceId.sessions[0].id}
  vpcTrafficMirrorSessionId8: ${targetId.sessions[0].id}
  vpcTrafficMirrorSessionId9: ${status.sessions[0].id}
Copy

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>
Copy
def get_traffic_mirror_sessions(enabled: Optional[bool] = None,
                                ids: Optional[Sequence[str]] = None,
                                name_regex: Optional[str] = None,
                                output_file: Optional[str] = None,
                                priority: Optional[int] = None,
                                status: Optional[str] = None,
                                traffic_mirror_filter_id: Optional[str] = None,
                                traffic_mirror_session_name: Optional[str] = None,
                                traffic_mirror_source_id: Optional[str] = None,
                                traffic_mirror_target_id: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetTrafficMirrorSessionsResult
def get_traffic_mirror_sessions_output(enabled: Optional[pulumi.Input[bool]] = None,
                                ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                name_regex: Optional[pulumi.Input[str]] = None,
                                output_file: Optional[pulumi.Input[str]] = None,
                                priority: Optional[pulumi.Input[int]] = None,
                                status: Optional[pulumi.Input[str]] = None,
                                traffic_mirror_filter_id: Optional[pulumi.Input[str]] = None,
                                traffic_mirror_session_name: Optional[pulumi.Input[str]] = None,
                                traffic_mirror_source_id: Optional[pulumi.Input[str]] = None,
                                traffic_mirror_target_id: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetTrafficMirrorSessionsResult]
Copy
func GetTrafficMirrorSessions(ctx *Context, args *GetTrafficMirrorSessionsArgs, opts ...InvokeOption) (*GetTrafficMirrorSessionsResult, error)
func GetTrafficMirrorSessionsOutput(ctx *Context, args *GetTrafficMirrorSessionsOutputArgs, opts ...InvokeOption) GetTrafficMirrorSessionsResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetTrafficMirrorSessionsResult> getTrafficMirrorSessions(GetTrafficMirrorSessionsArgs args, InvokeOptions options)
public static Output<GetTrafficMirrorSessionsResult> getTrafficMirrorSessions(GetTrafficMirrorSessionsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:vpc/getTrafficMirrorSessions:getTrafficMirrorSessions
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Enabled Changes to this property will trigger replacement. bool
Specifies whether to enable traffic mirror sessions. default to false.
Ids Changes to this property will trigger replacement. List<string>
A list of Traffic Mirror Session IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Traffic Mirror Session name.
OutputFile string
File name where to save data source results (after running pulumi preview).
Priority Changes to this property will trigger replacement. int
The priority of the traffic mirror session. Valid values: 1 to 32766. A smaller value indicates a higher priority. You cannot specify the same priority for traffic mirror sessions that are created in the same region with the same Alibaba Cloud account.
Status Changes to this property will trigger replacement. string
The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
TrafficMirrorFilterId Changes to this property will trigger replacement. string
The ID of the filter.
TrafficMirrorSessionName Changes to this property will trigger replacement. string
The name of the traffic mirror session. The name must be 2 to 128 characters in length and can contain digits, underscores (_), and hyphens (-). It must start with a letter.
TrafficMirrorSourceId Changes to this property will trigger replacement. string
The ID of the mirror source. You can specify only an elastic network interface (ENI) as the mirror source.
TrafficMirrorTargetId Changes to this property will trigger replacement. string
The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.
Enabled Changes to this property will trigger replacement. bool
Specifies whether to enable traffic mirror sessions. default to false.
Ids Changes to this property will trigger replacement. []string
A list of Traffic Mirror Session IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Traffic Mirror Session name.
OutputFile string
File name where to save data source results (after running pulumi preview).
Priority Changes to this property will trigger replacement. int
The priority of the traffic mirror session. Valid values: 1 to 32766. A smaller value indicates a higher priority. You cannot specify the same priority for traffic mirror sessions that are created in the same region with the same Alibaba Cloud account.
Status Changes to this property will trigger replacement. string
The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
TrafficMirrorFilterId Changes to this property will trigger replacement. string
The ID of the filter.
TrafficMirrorSessionName Changes to this property will trigger replacement. string
The name of the traffic mirror session. The name must be 2 to 128 characters in length and can contain digits, underscores (_), and hyphens (-). It must start with a letter.
TrafficMirrorSourceId Changes to this property will trigger replacement. string
The ID of the mirror source. You can specify only an elastic network interface (ENI) as the mirror source.
TrafficMirrorTargetId Changes to this property will trigger replacement. string
The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.
enabled Changes to this property will trigger replacement. Boolean
Specifies whether to enable traffic mirror sessions. default to false.
ids Changes to this property will trigger replacement. List<String>
A list of Traffic Mirror Session IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Traffic Mirror Session name.
outputFile String
File name where to save data source results (after running pulumi preview).
priority Changes to this property will trigger replacement. Integer
The priority of the traffic mirror session. Valid values: 1 to 32766. A smaller value indicates a higher priority. You cannot specify the same priority for traffic mirror sessions that are created in the same region with the same Alibaba Cloud account.
status Changes to this property will trigger replacement. String
The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
trafficMirrorFilterId Changes to this property will trigger replacement. String
The ID of the filter.
trafficMirrorSessionName Changes to this property will trigger replacement. String
The name of the traffic mirror session. The name must be 2 to 128 characters in length and can contain digits, underscores (_), and hyphens (-). It must start with a letter.
trafficMirrorSourceId Changes to this property will trigger replacement. String
The ID of the mirror source. You can specify only an elastic network interface (ENI) as the mirror source.
trafficMirrorTargetId Changes to this property will trigger replacement. String
The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.
enabled Changes to this property will trigger replacement. boolean
Specifies whether to enable traffic mirror sessions. default to false.
ids Changes to this property will trigger replacement. string[]
A list of Traffic Mirror Session IDs.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Traffic Mirror Session name.
outputFile string
File name where to save data source results (after running pulumi preview).
priority Changes to this property will trigger replacement. number
The priority of the traffic mirror session. Valid values: 1 to 32766. A smaller value indicates a higher priority. You cannot specify the same priority for traffic mirror sessions that are created in the same region with the same Alibaba Cloud account.
status Changes to this property will trigger replacement. string
The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
trafficMirrorFilterId Changes to this property will trigger replacement. string
The ID of the filter.
trafficMirrorSessionName Changes to this property will trigger replacement. string
The name of the traffic mirror session. The name must be 2 to 128 characters in length and can contain digits, underscores (_), and hyphens (-). It must start with a letter.
trafficMirrorSourceId Changes to this property will trigger replacement. string
The ID of the mirror source. You can specify only an elastic network interface (ENI) as the mirror source.
trafficMirrorTargetId Changes to this property will trigger replacement. string
The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.
enabled Changes to this property will trigger replacement. bool
Specifies whether to enable traffic mirror sessions. default to false.
ids Changes to this property will trigger replacement. Sequence[str]
A list of Traffic Mirror Session IDs.
name_regex Changes to this property will trigger replacement. str
A regex string to filter results by Traffic Mirror Session name.
output_file str
File name where to save data source results (after running pulumi preview).
priority Changes to this property will trigger replacement. int
The priority of the traffic mirror session. Valid values: 1 to 32766. A smaller value indicates a higher priority. You cannot specify the same priority for traffic mirror sessions that are created in the same region with the same Alibaba Cloud account.
status Changes to this property will trigger replacement. str
The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
traffic_mirror_filter_id Changes to this property will trigger replacement. str
The ID of the filter.
traffic_mirror_session_name Changes to this property will trigger replacement. str
The name of the traffic mirror session. The name must be 2 to 128 characters in length and can contain digits, underscores (_), and hyphens (-). It must start with a letter.
traffic_mirror_source_id Changes to this property will trigger replacement. str
The ID of the mirror source. You can specify only an elastic network interface (ENI) as the mirror source.
traffic_mirror_target_id Changes to this property will trigger replacement. str
The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.
enabled Changes to this property will trigger replacement. Boolean
Specifies whether to enable traffic mirror sessions. default to false.
ids Changes to this property will trigger replacement. List<String>
A list of Traffic Mirror Session IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Traffic Mirror Session name.
outputFile String
File name where to save data source results (after running pulumi preview).
priority Changes to this property will trigger replacement. Number
The priority of the traffic mirror session. Valid values: 1 to 32766. A smaller value indicates a higher priority. You cannot specify the same priority for traffic mirror sessions that are created in the same region with the same Alibaba Cloud account.
status Changes to this property will trigger replacement. String
The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
trafficMirrorFilterId Changes to this property will trigger replacement. String
The ID of the filter.
trafficMirrorSessionName Changes to this property will trigger replacement. String
The name of the traffic mirror session. The name must be 2 to 128 characters in length and can contain digits, underscores (_), and hyphens (-). It must start with a letter.
trafficMirrorSourceId Changes to this property will trigger replacement. String
The ID of the mirror source. You can specify only an elastic network interface (ENI) as the mirror source.
trafficMirrorTargetId Changes to this property will trigger replacement. String
The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.

getTrafficMirrorSessions Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
Names List<string>
Sessions List<Pulumi.AliCloud.Vpc.Outputs.GetTrafficMirrorSessionsSession>
Enabled bool
NameRegex string
OutputFile string
Priority int
Status string
TrafficMirrorFilterId string
TrafficMirrorSessionName string
TrafficMirrorSourceId string
TrafficMirrorTargetId string
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
Names []string
Sessions []GetTrafficMirrorSessionsSession
Enabled bool
NameRegex string
OutputFile string
Priority int
Status string
TrafficMirrorFilterId string
TrafficMirrorSessionName string
TrafficMirrorSourceId string
TrafficMirrorTargetId string
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
sessions List<GetTrafficMirrorSessionsSession>
enabled Boolean
nameRegex String
outputFile String
priority Integer
status String
trafficMirrorFilterId String
trafficMirrorSessionName String
trafficMirrorSourceId String
trafficMirrorTargetId String
id string
The provider-assigned unique ID for this managed resource.
ids string[]
names string[]
sessions GetTrafficMirrorSessionsSession[]
enabled boolean
nameRegex string
outputFile string
priority number
status string
trafficMirrorFilterId string
trafficMirrorSessionName string
trafficMirrorSourceId string
trafficMirrorTargetId string
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
sessions List<Property Map>
enabled Boolean
nameRegex String
outputFile String
priority Number
status String
trafficMirrorFilterId String
trafficMirrorSessionName String
trafficMirrorSourceId String
trafficMirrorTargetId String

Supporting Types

GetTrafficMirrorSessionsSession

Enabled This property is required. bool
Indicates whether traffic mirror sessions are enabled. default to false.
Id This property is required. string
The ID of the Traffic Mirror Session.
PacketLength This property is required. int
The maximum transmission unit (MTU).
Priority This property is required. int
The priority of the traffic mirror session. A smaller value indicates a higher priority.
Status This property is required. string
The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
TrafficMirrorFilterId This property is required. string
The ID of the filter.
TrafficMirrorSessionBusinessStatus This property is required. string
The state of the traffic mirror session. Valid values: Normal or FinancialLocked. Normal: working as expected. FinancialLocked: locked due to overdue payments.
TrafficMirrorSessionDescription This property is required. string
The description of the traffic mirror session.
TrafficMirrorSessionId This property is required. string
The first ID of the resource.
TrafficMirrorSessionName This property is required. string
The name of the traffic mirror session.
TrafficMirrorSourceIds This property is required. List<string>
The ID of the mirror source.
TrafficMirrorTargetId This property is required. string
The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.
TrafficMirrorTargetType This property is required. string
The type of the mirror destination. Valid values: NetworkInterface or SLB. NetworkInterface: an ENI. SLB: an internal-facing SLB instance
VirtualNetworkId This property is required. int
You can specify VNIs to distinguish different mirrored traffic.
Enabled This property is required. bool
Indicates whether traffic mirror sessions are enabled. default to false.
Id This property is required. string
The ID of the Traffic Mirror Session.
PacketLength This property is required. int
The maximum transmission unit (MTU).
Priority This property is required. int
The priority of the traffic mirror session. A smaller value indicates a higher priority.
Status This property is required. string
The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
TrafficMirrorFilterId This property is required. string
The ID of the filter.
TrafficMirrorSessionBusinessStatus This property is required. string
The state of the traffic mirror session. Valid values: Normal or FinancialLocked. Normal: working as expected. FinancialLocked: locked due to overdue payments.
TrafficMirrorSessionDescription This property is required. string
The description of the traffic mirror session.
TrafficMirrorSessionId This property is required. string
The first ID of the resource.
TrafficMirrorSessionName This property is required. string
The name of the traffic mirror session.
TrafficMirrorSourceIds This property is required. []string
The ID of the mirror source.
TrafficMirrorTargetId This property is required. string
The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.
TrafficMirrorTargetType This property is required. string
The type of the mirror destination. Valid values: NetworkInterface or SLB. NetworkInterface: an ENI. SLB: an internal-facing SLB instance
VirtualNetworkId This property is required. int
You can specify VNIs to distinguish different mirrored traffic.
enabled This property is required. Boolean
Indicates whether traffic mirror sessions are enabled. default to false.
id This property is required. String
The ID of the Traffic Mirror Session.
packetLength This property is required. Integer
The maximum transmission unit (MTU).
priority This property is required. Integer
The priority of the traffic mirror session. A smaller value indicates a higher priority.
status This property is required. String
The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
trafficMirrorFilterId This property is required. String
The ID of the filter.
trafficMirrorSessionBusinessStatus This property is required. String
The state of the traffic mirror session. Valid values: Normal or FinancialLocked. Normal: working as expected. FinancialLocked: locked due to overdue payments.
trafficMirrorSessionDescription This property is required. String
The description of the traffic mirror session.
trafficMirrorSessionId This property is required. String
The first ID of the resource.
trafficMirrorSessionName This property is required. String
The name of the traffic mirror session.
trafficMirrorSourceIds This property is required. List<String>
The ID of the mirror source.
trafficMirrorTargetId This property is required. String
The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.
trafficMirrorTargetType This property is required. String
The type of the mirror destination. Valid values: NetworkInterface or SLB. NetworkInterface: an ENI. SLB: an internal-facing SLB instance
virtualNetworkId This property is required. Integer
You can specify VNIs to distinguish different mirrored traffic.
enabled This property is required. boolean
Indicates whether traffic mirror sessions are enabled. default to false.
id This property is required. string
The ID of the Traffic Mirror Session.
packetLength This property is required. number
The maximum transmission unit (MTU).
priority This property is required. number
The priority of the traffic mirror session. A smaller value indicates a higher priority.
status This property is required. string
The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
trafficMirrorFilterId This property is required. string
The ID of the filter.
trafficMirrorSessionBusinessStatus This property is required. string
The state of the traffic mirror session. Valid values: Normal or FinancialLocked. Normal: working as expected. FinancialLocked: locked due to overdue payments.
trafficMirrorSessionDescription This property is required. string
The description of the traffic mirror session.
trafficMirrorSessionId This property is required. string
The first ID of the resource.
trafficMirrorSessionName This property is required. string
The name of the traffic mirror session.
trafficMirrorSourceIds This property is required. string[]
The ID of the mirror source.
trafficMirrorTargetId This property is required. string
The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.
trafficMirrorTargetType This property is required. string
The type of the mirror destination. Valid values: NetworkInterface or SLB. NetworkInterface: an ENI. SLB: an internal-facing SLB instance
virtualNetworkId This property is required. number
You can specify VNIs to distinguish different mirrored traffic.
enabled This property is required. bool
Indicates whether traffic mirror sessions are enabled. default to false.
id This property is required. str
The ID of the Traffic Mirror Session.
packet_length This property is required. int
The maximum transmission unit (MTU).
priority This property is required. int
The priority of the traffic mirror session. A smaller value indicates a higher priority.
status This property is required. str
The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
traffic_mirror_filter_id This property is required. str
The ID of the filter.
traffic_mirror_session_business_status This property is required. str
The state of the traffic mirror session. Valid values: Normal or FinancialLocked. Normal: working as expected. FinancialLocked: locked due to overdue payments.
traffic_mirror_session_description This property is required. str
The description of the traffic mirror session.
traffic_mirror_session_id This property is required. str
The first ID of the resource.
traffic_mirror_session_name This property is required. str
The name of the traffic mirror session.
traffic_mirror_source_ids This property is required. Sequence[str]
The ID of the mirror source.
traffic_mirror_target_id This property is required. str
The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.
traffic_mirror_target_type This property is required. str
The type of the mirror destination. Valid values: NetworkInterface or SLB. NetworkInterface: an ENI. SLB: an internal-facing SLB instance
virtual_network_id This property is required. int
You can specify VNIs to distinguish different mirrored traffic.
enabled This property is required. Boolean
Indicates whether traffic mirror sessions are enabled. default to false.
id This property is required. String
The ID of the Traffic Mirror Session.
packetLength This property is required. Number
The maximum transmission unit (MTU).
priority This property is required. Number
The priority of the traffic mirror session. A smaller value indicates a higher priority.
status This property is required. String
The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
trafficMirrorFilterId This property is required. String
The ID of the filter.
trafficMirrorSessionBusinessStatus This property is required. String
The state of the traffic mirror session. Valid values: Normal or FinancialLocked. Normal: working as expected. FinancialLocked: locked due to overdue payments.
trafficMirrorSessionDescription This property is required. String
The description of the traffic mirror session.
trafficMirrorSessionId This property is required. String
The first ID of the resource.
trafficMirrorSessionName This property is required. String
The name of the traffic mirror session.
trafficMirrorSourceIds This property is required. List<String>
The ID of the mirror source.
trafficMirrorTargetId This property is required. String
The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.
trafficMirrorTargetType This property is required. String
The type of the mirror destination. Valid values: NetworkInterface or SLB. NetworkInterface: an ENI. SLB: an internal-facing SLB instance
virtualNetworkId This property is required. Number
You can specify VNIs to distinguish different mirrored traffic.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.