1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. vpc
  5. getTrafficMirrorSessions
Alibaba Cloud v3.59.0 published on Friday, Jul 12, 2024 by Pulumi

alicloud.vpc.getTrafficMirrorSessions

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.59.0 published on Friday, Jul 12, 2024 by Pulumi

    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);
    
    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)
    
    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
    	})
    }
    
    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),
        };
    });
    
    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()));
        }
    }
    
    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}
    

    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(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]
    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:vpc/getTrafficMirrorSessions:getTrafficMirrorSessions
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Enabled bool
    Specifies whether to enable traffic mirror sessions. default to false.
    Ids List<string>
    A list of Traffic Mirror Session IDs.
    NameRegex 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 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 string
    The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
    TrafficMirrorFilterId string
    The ID of the filter.
    TrafficMirrorSessionName 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 string
    The ID of the mirror source. You can specify only an elastic network interface (ENI) as the mirror source.
    TrafficMirrorTargetId 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 bool
    Specifies whether to enable traffic mirror sessions. default to false.
    Ids []string
    A list of Traffic Mirror Session IDs.
    NameRegex 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 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 string
    The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
    TrafficMirrorFilterId string
    The ID of the filter.
    TrafficMirrorSessionName 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 string
    The ID of the mirror source. You can specify only an elastic network interface (ENI) as the mirror source.
    TrafficMirrorTargetId 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 Boolean
    Specifies whether to enable traffic mirror sessions. default to false.
    ids List<String>
    A list of Traffic Mirror Session IDs.
    nameRegex 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 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 String
    The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
    trafficMirrorFilterId String
    The ID of the filter.
    trafficMirrorSessionName 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 String
    The ID of the mirror source. You can specify only an elastic network interface (ENI) as the mirror source.
    trafficMirrorTargetId 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 boolean
    Specifies whether to enable traffic mirror sessions. default to false.
    ids string[]
    A list of Traffic Mirror Session IDs.
    nameRegex 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 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 string
    The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
    trafficMirrorFilterId string
    The ID of the filter.
    trafficMirrorSessionName 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 string
    The ID of the mirror source. You can specify only an elastic network interface (ENI) as the mirror source.
    trafficMirrorTargetId 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 bool
    Specifies whether to enable traffic mirror sessions. default to false.
    ids Sequence[str]
    A list of Traffic Mirror Session IDs.
    name_regex 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 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 str
    The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
    traffic_mirror_filter_id str
    The ID of the filter.
    traffic_mirror_session_name 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 str
    The ID of the mirror source. You can specify only an elastic network interface (ENI) as the mirror source.
    traffic_mirror_target_id 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 Boolean
    Specifies whether to enable traffic mirror sessions. default to false.
    ids List<String>
    A list of Traffic Mirror Session IDs.
    nameRegex 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 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 String
    The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
    trafficMirrorFilterId String
    The ID of the filter.
    trafficMirrorSessionName 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 String
    The ID of the mirror source. You can specify only an elastic network interface (ENI) as the mirror source.
    trafficMirrorTargetId 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 bool
    Indicates whether traffic mirror sessions are enabled. default to false.
    Id string
    The ID of the Traffic Mirror Session.
    PacketLength int
    The maximum transmission unit (MTU).
    Priority int
    The priority of the traffic mirror session. A smaller value indicates a higher priority.
    Status string
    The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
    TrafficMirrorFilterId string
    The ID of the filter.
    TrafficMirrorSessionBusinessStatus string
    The state of the traffic mirror session. Valid values: Normal or FinancialLocked. Normal: working as expected. FinancialLocked: locked due to overdue payments.
    TrafficMirrorSessionDescription string
    The description of the traffic mirror session.
    TrafficMirrorSessionId string
    The first ID of the resource.
    TrafficMirrorSessionName string
    The name of the traffic mirror session.
    TrafficMirrorSourceIds List<string>
    The ID of the mirror source.
    TrafficMirrorTargetId 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 string
    The type of the mirror destination. Valid values: NetworkInterface or SLB. NetworkInterface: an ENI. SLB: an internal-facing SLB instance
    VirtualNetworkId int
    You can specify VNIs to distinguish different mirrored traffic.
    Enabled bool
    Indicates whether traffic mirror sessions are enabled. default to false.
    Id string
    The ID of the Traffic Mirror Session.
    PacketLength int
    The maximum transmission unit (MTU).
    Priority int
    The priority of the traffic mirror session. A smaller value indicates a higher priority.
    Status string
    The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
    TrafficMirrorFilterId string
    The ID of the filter.
    TrafficMirrorSessionBusinessStatus string
    The state of the traffic mirror session. Valid values: Normal or FinancialLocked. Normal: working as expected. FinancialLocked: locked due to overdue payments.
    TrafficMirrorSessionDescription string
    The description of the traffic mirror session.
    TrafficMirrorSessionId string
    The first ID of the resource.
    TrafficMirrorSessionName string
    The name of the traffic mirror session.
    TrafficMirrorSourceIds []string
    The ID of the mirror source.
    TrafficMirrorTargetId 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 string
    The type of the mirror destination. Valid values: NetworkInterface or SLB. NetworkInterface: an ENI. SLB: an internal-facing SLB instance
    VirtualNetworkId int
    You can specify VNIs to distinguish different mirrored traffic.
    enabled Boolean
    Indicates whether traffic mirror sessions are enabled. default to false.
    id String
    The ID of the Traffic Mirror Session.
    packetLength Integer
    The maximum transmission unit (MTU).
    priority Integer
    The priority of the traffic mirror session. A smaller value indicates a higher priority.
    status String
    The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
    trafficMirrorFilterId String
    The ID of the filter.
    trafficMirrorSessionBusinessStatus String
    The state of the traffic mirror session. Valid values: Normal or FinancialLocked. Normal: working as expected. FinancialLocked: locked due to overdue payments.
    trafficMirrorSessionDescription String
    The description of the traffic mirror session.
    trafficMirrorSessionId String
    The first ID of the resource.
    trafficMirrorSessionName String
    The name of the traffic mirror session.
    trafficMirrorSourceIds List<String>
    The ID of the mirror source.
    trafficMirrorTargetId 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 String
    The type of the mirror destination. Valid values: NetworkInterface or SLB. NetworkInterface: an ENI. SLB: an internal-facing SLB instance
    virtualNetworkId Integer
    You can specify VNIs to distinguish different mirrored traffic.
    enabled boolean
    Indicates whether traffic mirror sessions are enabled. default to false.
    id string
    The ID of the Traffic Mirror Session.
    packetLength number
    The maximum transmission unit (MTU).
    priority number
    The priority of the traffic mirror session. A smaller value indicates a higher priority.
    status string
    The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
    trafficMirrorFilterId string
    The ID of the filter.
    trafficMirrorSessionBusinessStatus string
    The state of the traffic mirror session. Valid values: Normal or FinancialLocked. Normal: working as expected. FinancialLocked: locked due to overdue payments.
    trafficMirrorSessionDescription string
    The description of the traffic mirror session.
    trafficMirrorSessionId string
    The first ID of the resource.
    trafficMirrorSessionName string
    The name of the traffic mirror session.
    trafficMirrorSourceIds string[]
    The ID of the mirror source.
    trafficMirrorTargetId 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 string
    The type of the mirror destination. Valid values: NetworkInterface or SLB. NetworkInterface: an ENI. SLB: an internal-facing SLB instance
    virtualNetworkId number
    You can specify VNIs to distinguish different mirrored traffic.
    enabled bool
    Indicates whether traffic mirror sessions are enabled. default to false.
    id str
    The ID of the Traffic Mirror Session.
    packet_length int
    The maximum transmission unit (MTU).
    priority int
    The priority of the traffic mirror session. A smaller value indicates a higher priority.
    status str
    The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
    traffic_mirror_filter_id str
    The ID of the filter.
    traffic_mirror_session_business_status 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 str
    The description of the traffic mirror session.
    traffic_mirror_session_id str
    The first ID of the resource.
    traffic_mirror_session_name str
    The name of the traffic mirror session.
    traffic_mirror_source_ids Sequence[str]
    The ID of the mirror source.
    traffic_mirror_target_id 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 str
    The type of the mirror destination. Valid values: NetworkInterface or SLB. NetworkInterface: an ENI. SLB: an internal-facing SLB instance
    virtual_network_id int
    You can specify VNIs to distinguish different mirrored traffic.
    enabled Boolean
    Indicates whether traffic mirror sessions are enabled. default to false.
    id String
    The ID of the Traffic Mirror Session.
    packetLength Number
    The maximum transmission unit (MTU).
    priority Number
    The priority of the traffic mirror session. A smaller value indicates a higher priority.
    status String
    The state of the traffic mirror session. Valid values: Creating, Created, Modifying and Deleting.
    trafficMirrorFilterId String
    The ID of the filter.
    trafficMirrorSessionBusinessStatus String
    The state of the traffic mirror session. Valid values: Normal or FinancialLocked. Normal: working as expected. FinancialLocked: locked due to overdue payments.
    trafficMirrorSessionDescription String
    The description of the traffic mirror session.
    trafficMirrorSessionId String
    The first ID of the resource.
    trafficMirrorSessionName String
    The name of the traffic mirror session.
    trafficMirrorSourceIds List<String>
    The ID of the mirror source.
    trafficMirrorTargetId 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 String
    The type of the mirror destination. Valid values: NetworkInterface or SLB. NetworkInterface: an ENI. SLB: an internal-facing SLB instance
    virtualNetworkId 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.
    alicloud logo
    Alibaba Cloud v3.59.0 published on Friday, Jul 12, 2024 by Pulumi