# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins
import copy
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from .. import _utilities
from . import outputs
from ._inputs import *

__all__ = ['TrafficMirrorSessionArgs', 'TrafficMirrorSession']

@pulumi.input_type
class TrafficMirrorSessionArgs:
    def __init__(__self__, *,
                 network_interface_id: pulumi.Input[builtins.str],
                 priority: pulumi.Input[builtins.int],
                 traffic_mirror_filter_id: pulumi.Input[builtins.str],
                 traffic_mirror_target_id: pulumi.Input[builtins.str],
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 packet_length: Optional[pulumi.Input[builtins.int]] = None,
                 project_name: Optional[pulumi.Input[builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficMirrorSessionTagArgs']]]] = None,
                 traffic_mirror_session_name: Optional[pulumi.Input[builtins.str]] = None,
                 virtual_network_id: Optional[pulumi.Input[builtins.int]] = None):
        """
        The set of arguments for constructing a TrafficMirrorSession resource.
        :param pulumi.Input[builtins.str] network_interface_id: 镜像源实例ID，当前只支持ECS的主网卡和辅助网卡。
        :param pulumi.Input[builtins.int] priority: 镜像会话优先级，取值范围1 ～ 32766，同一账户下镜像会话优先级不能重复。
        :param pulumi.Input[builtins.str] traffic_mirror_filter_id: 筛选条件实例ID。
        :param pulumi.Input[builtins.str] traffic_mirror_target_id: 镜像目的实例ID。
        :param pulumi.Input[builtins.str] description: 镜像会话实例描述。
        :param pulumi.Input[builtins.int] packet_length: 镜像会话MTU，超过被截断，取值范围：64～9600。
        :param pulumi.Input[builtins.str] project_name: 所属项目的名称
        :param pulumi.Input[builtins.str] traffic_mirror_session_name: 镜像会话名称。
        :param pulumi.Input[builtins.int] virtual_network_id: 镜像会话VNI，取值范围1 ～ 16777215。
        """
        pulumi.set(__self__, "network_interface_id", network_interface_id)
        pulumi.set(__self__, "priority", priority)
        pulumi.set(__self__, "traffic_mirror_filter_id", traffic_mirror_filter_id)
        pulumi.set(__self__, "traffic_mirror_target_id", traffic_mirror_target_id)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if packet_length is not None:
            pulumi.set(__self__, "packet_length", packet_length)
        if project_name is not None:
            pulumi.set(__self__, "project_name", project_name)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if traffic_mirror_session_name is not None:
            pulumi.set(__self__, "traffic_mirror_session_name", traffic_mirror_session_name)
        if virtual_network_id is not None:
            pulumi.set(__self__, "virtual_network_id", virtual_network_id)

    @property
    @pulumi.getter(name="networkInterfaceId")
    def network_interface_id(self) -> pulumi.Input[builtins.str]:
        """
        镜像源实例ID，当前只支持ECS的主网卡和辅助网卡。
        """
        return pulumi.get(self, "network_interface_id")

    @network_interface_id.setter
    def network_interface_id(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "network_interface_id", value)

    @property
    @pulumi.getter
    def priority(self) -> pulumi.Input[builtins.int]:
        """
        镜像会话优先级，取值范围1 ～ 32766，同一账户下镜像会话优先级不能重复。
        """
        return pulumi.get(self, "priority")

    @priority.setter
    def priority(self, value: pulumi.Input[builtins.int]):
        pulumi.set(self, "priority", value)

    @property
    @pulumi.getter(name="trafficMirrorFilterId")
    def traffic_mirror_filter_id(self) -> pulumi.Input[builtins.str]:
        """
        筛选条件实例ID。
        """
        return pulumi.get(self, "traffic_mirror_filter_id")

    @traffic_mirror_filter_id.setter
    def traffic_mirror_filter_id(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "traffic_mirror_filter_id", value)

    @property
    @pulumi.getter(name="trafficMirrorTargetId")
    def traffic_mirror_target_id(self) -> pulumi.Input[builtins.str]:
        """
        镜像目的实例ID。
        """
        return pulumi.get(self, "traffic_mirror_target_id")

    @traffic_mirror_target_id.setter
    def traffic_mirror_target_id(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "traffic_mirror_target_id", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        镜像会话实例描述。
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter(name="packetLength")
    def packet_length(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        镜像会话MTU，超过被截断，取值范围：64～9600。
        """
        return pulumi.get(self, "packet_length")

    @packet_length.setter
    def packet_length(self, value: Optional[pulumi.Input[builtins.int]]):
        pulumi.set(self, "packet_length", value)

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        所属项目的名称
        """
        return pulumi.get(self, "project_name")

    @project_name.setter
    def project_name(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "project_name", value)

    @property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['TrafficMirrorSessionTagArgs']]]]:
        return pulumi.get(self, "tags")

    @tags.setter
    def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficMirrorSessionTagArgs']]]]):
        pulumi.set(self, "tags", value)

    @property
    @pulumi.getter(name="trafficMirrorSessionName")
    def traffic_mirror_session_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        镜像会话名称。
        """
        return pulumi.get(self, "traffic_mirror_session_name")

    @traffic_mirror_session_name.setter
    def traffic_mirror_session_name(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "traffic_mirror_session_name", value)

    @property
    @pulumi.getter(name="virtualNetworkId")
    def virtual_network_id(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        镜像会话VNI，取值范围1 ～ 16777215。
        """
        return pulumi.get(self, "virtual_network_id")

    @virtual_network_id.setter
    def virtual_network_id(self, value: Optional[pulumi.Input[builtins.int]]):
        pulumi.set(self, "virtual_network_id", value)


@pulumi.input_type
class _TrafficMirrorSessionState:
    def __init__(__self__, *,
                 business_status: Optional[pulumi.Input[builtins.str]] = None,
                 created_time: Optional[pulumi.Input[builtins.str]] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 lock_reason: Optional[pulumi.Input[builtins.str]] = None,
                 network_interface_id: Optional[pulumi.Input[builtins.str]] = None,
                 packet_length: Optional[pulumi.Input[builtins.int]] = None,
                 priority: Optional[pulumi.Input[builtins.int]] = None,
                 project_name: Optional[pulumi.Input[builtins.str]] = None,
                 status: Optional[pulumi.Input[builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficMirrorSessionTagArgs']]]] = None,
                 traffic_mirror_filter_id: Optional[pulumi.Input[builtins.str]] = None,
                 traffic_mirror_session_id: Optional[pulumi.Input[builtins.str]] = None,
                 traffic_mirror_session_name: Optional[pulumi.Input[builtins.str]] = None,
                 traffic_mirror_source_ids: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
                 traffic_mirror_target_id: Optional[pulumi.Input[builtins.str]] = None,
                 virtual_network_id: Optional[pulumi.Input[builtins.int]] = None):
        """
        Input properties used for looking up and filtering TrafficMirrorSession resources.
        :param pulumi.Input[builtins.str] business_status: 会话计费状态。Normal：正常计费中。  - FinancialLocked：欠费锁定。
        :param pulumi.Input[builtins.str] created_time: 创建时间。
        :param pulumi.Input[builtins.str] description: 镜像会话实例描述。
        :param pulumi.Input[builtins.str] lock_reason: 锁定原因。
        :param pulumi.Input[builtins.str] network_interface_id: 镜像源实例ID，当前只支持ECS的主网卡和辅助网卡。
        :param pulumi.Input[builtins.int] packet_length: 镜像会话MTU，超过被截断，取值范围：64～9600。
        :param pulumi.Input[builtins.int] priority: 镜像会话优先级，取值范围1 ～ 32766，同一账户下镜像会话优先级不能重复。
        :param pulumi.Input[builtins.str] project_name: 所属项目的名称
        :param pulumi.Input[builtins.str] status: 会话状态。
        :param pulumi.Input[builtins.str] traffic_mirror_filter_id: 筛选条件实例ID。
        :param pulumi.Input[builtins.str] traffic_mirror_session_id: 镜像会话实例ID。
        :param pulumi.Input[builtins.str] traffic_mirror_session_name: 镜像会话名称。
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] traffic_mirror_source_ids: 镜像源实例列表。
        :param pulumi.Input[builtins.str] traffic_mirror_target_id: 镜像目的实例ID。
        :param pulumi.Input[builtins.int] virtual_network_id: 镜像会话VNI，取值范围1 ～ 16777215。
        """
        if business_status is not None:
            pulumi.set(__self__, "business_status", business_status)
        if created_time is not None:
            pulumi.set(__self__, "created_time", created_time)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if lock_reason is not None:
            pulumi.set(__self__, "lock_reason", lock_reason)
        if network_interface_id is not None:
            pulumi.set(__self__, "network_interface_id", network_interface_id)
        if packet_length is not None:
            pulumi.set(__self__, "packet_length", packet_length)
        if priority is not None:
            pulumi.set(__self__, "priority", priority)
        if project_name is not None:
            pulumi.set(__self__, "project_name", project_name)
        if status is not None:
            pulumi.set(__self__, "status", status)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if traffic_mirror_filter_id is not None:
            pulumi.set(__self__, "traffic_mirror_filter_id", traffic_mirror_filter_id)
        if traffic_mirror_session_id is not None:
            pulumi.set(__self__, "traffic_mirror_session_id", traffic_mirror_session_id)
        if traffic_mirror_session_name is not None:
            pulumi.set(__self__, "traffic_mirror_session_name", traffic_mirror_session_name)
        if traffic_mirror_source_ids is not None:
            pulumi.set(__self__, "traffic_mirror_source_ids", traffic_mirror_source_ids)
        if traffic_mirror_target_id is not None:
            pulumi.set(__self__, "traffic_mirror_target_id", traffic_mirror_target_id)
        if virtual_network_id is not None:
            pulumi.set(__self__, "virtual_network_id", virtual_network_id)

    @property
    @pulumi.getter(name="businessStatus")
    def business_status(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        会话计费状态。Normal：正常计费中。  - FinancialLocked：欠费锁定。
        """
        return pulumi.get(self, "business_status")

    @business_status.setter
    def business_status(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "business_status", value)

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        创建时间。
        """
        return pulumi.get(self, "created_time")

    @created_time.setter
    def created_time(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "created_time", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        镜像会话实例描述。
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter(name="lockReason")
    def lock_reason(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        锁定原因。
        """
        return pulumi.get(self, "lock_reason")

    @lock_reason.setter
    def lock_reason(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "lock_reason", value)

    @property
    @pulumi.getter(name="networkInterfaceId")
    def network_interface_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        镜像源实例ID，当前只支持ECS的主网卡和辅助网卡。
        """
        return pulumi.get(self, "network_interface_id")

    @network_interface_id.setter
    def network_interface_id(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "network_interface_id", value)

    @property
    @pulumi.getter(name="packetLength")
    def packet_length(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        镜像会话MTU，超过被截断，取值范围：64～9600。
        """
        return pulumi.get(self, "packet_length")

    @packet_length.setter
    def packet_length(self, value: Optional[pulumi.Input[builtins.int]]):
        pulumi.set(self, "packet_length", value)

    @property
    @pulumi.getter
    def priority(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        镜像会话优先级，取值范围1 ～ 32766，同一账户下镜像会话优先级不能重复。
        """
        return pulumi.get(self, "priority")

    @priority.setter
    def priority(self, value: Optional[pulumi.Input[builtins.int]]):
        pulumi.set(self, "priority", value)

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        所属项目的名称
        """
        return pulumi.get(self, "project_name")

    @project_name.setter
    def project_name(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "project_name", value)

    @property
    @pulumi.getter
    def status(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        会话状态。
        """
        return pulumi.get(self, "status")

    @status.setter
    def status(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "status", value)

    @property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['TrafficMirrorSessionTagArgs']]]]:
        return pulumi.get(self, "tags")

    @tags.setter
    def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficMirrorSessionTagArgs']]]]):
        pulumi.set(self, "tags", value)

    @property
    @pulumi.getter(name="trafficMirrorFilterId")
    def traffic_mirror_filter_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        筛选条件实例ID。
        """
        return pulumi.get(self, "traffic_mirror_filter_id")

    @traffic_mirror_filter_id.setter
    def traffic_mirror_filter_id(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "traffic_mirror_filter_id", value)

    @property
    @pulumi.getter(name="trafficMirrorSessionId")
    def traffic_mirror_session_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        镜像会话实例ID。
        """
        return pulumi.get(self, "traffic_mirror_session_id")

    @traffic_mirror_session_id.setter
    def traffic_mirror_session_id(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "traffic_mirror_session_id", value)

    @property
    @pulumi.getter(name="trafficMirrorSessionName")
    def traffic_mirror_session_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        镜像会话名称。
        """
        return pulumi.get(self, "traffic_mirror_session_name")

    @traffic_mirror_session_name.setter
    def traffic_mirror_session_name(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "traffic_mirror_session_name", value)

    @property
    @pulumi.getter(name="trafficMirrorSourceIds")
    def traffic_mirror_source_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]:
        """
        镜像源实例列表。
        """
        return pulumi.get(self, "traffic_mirror_source_ids")

    @traffic_mirror_source_ids.setter
    def traffic_mirror_source_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]):
        pulumi.set(self, "traffic_mirror_source_ids", value)

    @property
    @pulumi.getter(name="trafficMirrorTargetId")
    def traffic_mirror_target_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        镜像目的实例ID。
        """
        return pulumi.get(self, "traffic_mirror_target_id")

    @traffic_mirror_target_id.setter
    def traffic_mirror_target_id(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "traffic_mirror_target_id", value)

    @property
    @pulumi.getter(name="virtualNetworkId")
    def virtual_network_id(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        镜像会话VNI，取值范围1 ～ 16777215。
        """
        return pulumi.get(self, "virtual_network_id")

    @virtual_network_id.setter
    def virtual_network_id(self, value: Optional[pulumi.Input[builtins.int]]):
        pulumi.set(self, "virtual_network_id", value)


@pulumi.type_token("bytepluscc:vpc/trafficMirrorSession:TrafficMirrorSession")
class TrafficMirrorSession(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 network_interface_id: Optional[pulumi.Input[builtins.str]] = None,
                 packet_length: Optional[pulumi.Input[builtins.int]] = None,
                 priority: Optional[pulumi.Input[builtins.int]] = None,
                 project_name: Optional[pulumi.Input[builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['TrafficMirrorSessionTagArgs', 'TrafficMirrorSessionTagArgsDict']]]]] = None,
                 traffic_mirror_filter_id: Optional[pulumi.Input[builtins.str]] = None,
                 traffic_mirror_session_name: Optional[pulumi.Input[builtins.str]] = None,
                 traffic_mirror_target_id: Optional[pulumi.Input[builtins.str]] = None,
                 virtual_network_id: Optional[pulumi.Input[builtins.int]] = None,
                 __props__=None):
        """
        镜像会话关联镜像源、镜像目的、筛选条件，使从镜像源复制的流量私网转发到镜像目的，是流量镜像的载体。

        ## Example Usage

        ```python
        import pulumi
        import pulumi_bytepluscc as bytepluscc

        v_pc_traffic_mirror_session_demo = bytepluscc.vpc.TrafficMirrorSession("VPCTrafficMirrorSessionDemo",
            description="test-description",
            network_interface_id="eni-1a1s0wz7xkm4g8nvexxxxx",
            packet_length=64,
            priority=12,
            project_name="default",
            tags=[{
                "key": "env",
                "value": "test",
            }],
            traffic_mirror_filter_id="tmf-bu54sj0bl2bk5h0xxxxx",
            traffic_mirror_session_name="test-1",
            traffic_mirror_target_id="tmt-ij32u0acvta874o8ctxxxxx",
            virtual_network_id=13)
        ```

        ## Import

        ```sh
        $ pulumi import bytepluscc:vpc/trafficMirrorSession:TrafficMirrorSession example "traffic_mirror_session_id"
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.str] description: 镜像会话实例描述。
        :param pulumi.Input[builtins.str] network_interface_id: 镜像源实例ID，当前只支持ECS的主网卡和辅助网卡。
        :param pulumi.Input[builtins.int] packet_length: 镜像会话MTU，超过被截断，取值范围：64～9600。
        :param pulumi.Input[builtins.int] priority: 镜像会话优先级，取值范围1 ～ 32766，同一账户下镜像会话优先级不能重复。
        :param pulumi.Input[builtins.str] project_name: 所属项目的名称
        :param pulumi.Input[builtins.str] traffic_mirror_filter_id: 筛选条件实例ID。
        :param pulumi.Input[builtins.str] traffic_mirror_session_name: 镜像会话名称。
        :param pulumi.Input[builtins.str] traffic_mirror_target_id: 镜像目的实例ID。
        :param pulumi.Input[builtins.int] virtual_network_id: 镜像会话VNI，取值范围1 ～ 16777215。
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: TrafficMirrorSessionArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        镜像会话关联镜像源、镜像目的、筛选条件，使从镜像源复制的流量私网转发到镜像目的，是流量镜像的载体。

        ## Example Usage

        ```python
        import pulumi
        import pulumi_bytepluscc as bytepluscc

        v_pc_traffic_mirror_session_demo = bytepluscc.vpc.TrafficMirrorSession("VPCTrafficMirrorSessionDemo",
            description="test-description",
            network_interface_id="eni-1a1s0wz7xkm4g8nvexxxxx",
            packet_length=64,
            priority=12,
            project_name="default",
            tags=[{
                "key": "env",
                "value": "test",
            }],
            traffic_mirror_filter_id="tmf-bu54sj0bl2bk5h0xxxxx",
            traffic_mirror_session_name="test-1",
            traffic_mirror_target_id="tmt-ij32u0acvta874o8ctxxxxx",
            virtual_network_id=13)
        ```

        ## Import

        ```sh
        $ pulumi import bytepluscc:vpc/trafficMirrorSession:TrafficMirrorSession example "traffic_mirror_session_id"
        ```

        :param str resource_name: The name of the resource.
        :param TrafficMirrorSessionArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(TrafficMirrorSessionArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 network_interface_id: Optional[pulumi.Input[builtins.str]] = None,
                 packet_length: Optional[pulumi.Input[builtins.int]] = None,
                 priority: Optional[pulumi.Input[builtins.int]] = None,
                 project_name: Optional[pulumi.Input[builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['TrafficMirrorSessionTagArgs', 'TrafficMirrorSessionTagArgsDict']]]]] = None,
                 traffic_mirror_filter_id: Optional[pulumi.Input[builtins.str]] = None,
                 traffic_mirror_session_name: Optional[pulumi.Input[builtins.str]] = None,
                 traffic_mirror_target_id: Optional[pulumi.Input[builtins.str]] = None,
                 virtual_network_id: Optional[pulumi.Input[builtins.int]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = TrafficMirrorSessionArgs.__new__(TrafficMirrorSessionArgs)

            __props__.__dict__["description"] = description
            if network_interface_id is None and not opts.urn:
                raise TypeError("Missing required property 'network_interface_id'")
            __props__.__dict__["network_interface_id"] = network_interface_id
            __props__.__dict__["packet_length"] = packet_length
            if priority is None and not opts.urn:
                raise TypeError("Missing required property 'priority'")
            __props__.__dict__["priority"] = priority
            __props__.__dict__["project_name"] = project_name
            __props__.__dict__["tags"] = tags
            if traffic_mirror_filter_id is None and not opts.urn:
                raise TypeError("Missing required property 'traffic_mirror_filter_id'")
            __props__.__dict__["traffic_mirror_filter_id"] = traffic_mirror_filter_id
            __props__.__dict__["traffic_mirror_session_name"] = traffic_mirror_session_name
            if traffic_mirror_target_id is None and not opts.urn:
                raise TypeError("Missing required property 'traffic_mirror_target_id'")
            __props__.__dict__["traffic_mirror_target_id"] = traffic_mirror_target_id
            __props__.__dict__["virtual_network_id"] = virtual_network_id
            __props__.__dict__["business_status"] = None
            __props__.__dict__["created_time"] = None
            __props__.__dict__["lock_reason"] = None
            __props__.__dict__["status"] = None
            __props__.__dict__["traffic_mirror_session_id"] = None
            __props__.__dict__["traffic_mirror_source_ids"] = None
        super(TrafficMirrorSession, __self__).__init__(
            'bytepluscc:vpc/trafficMirrorSession:TrafficMirrorSession',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            business_status: Optional[pulumi.Input[builtins.str]] = None,
            created_time: Optional[pulumi.Input[builtins.str]] = None,
            description: Optional[pulumi.Input[builtins.str]] = None,
            lock_reason: Optional[pulumi.Input[builtins.str]] = None,
            network_interface_id: Optional[pulumi.Input[builtins.str]] = None,
            packet_length: Optional[pulumi.Input[builtins.int]] = None,
            priority: Optional[pulumi.Input[builtins.int]] = None,
            project_name: Optional[pulumi.Input[builtins.str]] = None,
            status: Optional[pulumi.Input[builtins.str]] = None,
            tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['TrafficMirrorSessionTagArgs', 'TrafficMirrorSessionTagArgsDict']]]]] = None,
            traffic_mirror_filter_id: Optional[pulumi.Input[builtins.str]] = None,
            traffic_mirror_session_id: Optional[pulumi.Input[builtins.str]] = None,
            traffic_mirror_session_name: Optional[pulumi.Input[builtins.str]] = None,
            traffic_mirror_source_ids: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
            traffic_mirror_target_id: Optional[pulumi.Input[builtins.str]] = None,
            virtual_network_id: Optional[pulumi.Input[builtins.int]] = None) -> 'TrafficMirrorSession':
        """
        Get an existing TrafficMirrorSession resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.str] business_status: 会话计费状态。Normal：正常计费中。  - FinancialLocked：欠费锁定。
        :param pulumi.Input[builtins.str] created_time: 创建时间。
        :param pulumi.Input[builtins.str] description: 镜像会话实例描述。
        :param pulumi.Input[builtins.str] lock_reason: 锁定原因。
        :param pulumi.Input[builtins.str] network_interface_id: 镜像源实例ID，当前只支持ECS的主网卡和辅助网卡。
        :param pulumi.Input[builtins.int] packet_length: 镜像会话MTU，超过被截断，取值范围：64～9600。
        :param pulumi.Input[builtins.int] priority: 镜像会话优先级，取值范围1 ～ 32766，同一账户下镜像会话优先级不能重复。
        :param pulumi.Input[builtins.str] project_name: 所属项目的名称
        :param pulumi.Input[builtins.str] status: 会话状态。
        :param pulumi.Input[builtins.str] traffic_mirror_filter_id: 筛选条件实例ID。
        :param pulumi.Input[builtins.str] traffic_mirror_session_id: 镜像会话实例ID。
        :param pulumi.Input[builtins.str] traffic_mirror_session_name: 镜像会话名称。
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] traffic_mirror_source_ids: 镜像源实例列表。
        :param pulumi.Input[builtins.str] traffic_mirror_target_id: 镜像目的实例ID。
        :param pulumi.Input[builtins.int] virtual_network_id: 镜像会话VNI，取值范围1 ～ 16777215。
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _TrafficMirrorSessionState.__new__(_TrafficMirrorSessionState)

        __props__.__dict__["business_status"] = business_status
        __props__.__dict__["created_time"] = created_time
        __props__.__dict__["description"] = description
        __props__.__dict__["lock_reason"] = lock_reason
        __props__.__dict__["network_interface_id"] = network_interface_id
        __props__.__dict__["packet_length"] = packet_length
        __props__.__dict__["priority"] = priority
        __props__.__dict__["project_name"] = project_name
        __props__.__dict__["status"] = status
        __props__.__dict__["tags"] = tags
        __props__.__dict__["traffic_mirror_filter_id"] = traffic_mirror_filter_id
        __props__.__dict__["traffic_mirror_session_id"] = traffic_mirror_session_id
        __props__.__dict__["traffic_mirror_session_name"] = traffic_mirror_session_name
        __props__.__dict__["traffic_mirror_source_ids"] = traffic_mirror_source_ids
        __props__.__dict__["traffic_mirror_target_id"] = traffic_mirror_target_id
        __props__.__dict__["virtual_network_id"] = virtual_network_id
        return TrafficMirrorSession(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="businessStatus")
    def business_status(self) -> pulumi.Output[builtins.str]:
        """
        会话计费状态。Normal：正常计费中。  - FinancialLocked：欠费锁定。
        """
        return pulumi.get(self, "business_status")

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> pulumi.Output[builtins.str]:
        """
        创建时间。
        """
        return pulumi.get(self, "created_time")

    @property
    @pulumi.getter
    def description(self) -> pulumi.Output[builtins.str]:
        """
        镜像会话实例描述。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="lockReason")
    def lock_reason(self) -> pulumi.Output[builtins.str]:
        """
        锁定原因。
        """
        return pulumi.get(self, "lock_reason")

    @property
    @pulumi.getter(name="networkInterfaceId")
    def network_interface_id(self) -> pulumi.Output[builtins.str]:
        """
        镜像源实例ID，当前只支持ECS的主网卡和辅助网卡。
        """
        return pulumi.get(self, "network_interface_id")

    @property
    @pulumi.getter(name="packetLength")
    def packet_length(self) -> pulumi.Output[builtins.int]:
        """
        镜像会话MTU，超过被截断，取值范围：64～9600。
        """
        return pulumi.get(self, "packet_length")

    @property
    @pulumi.getter
    def priority(self) -> pulumi.Output[builtins.int]:
        """
        镜像会话优先级，取值范围1 ～ 32766，同一账户下镜像会话优先级不能重复。
        """
        return pulumi.get(self, "priority")

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> pulumi.Output[builtins.str]:
        """
        所属项目的名称
        """
        return pulumi.get(self, "project_name")

    @property
    @pulumi.getter
    def status(self) -> pulumi.Output[builtins.str]:
        """
        会话状态。
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter
    def tags(self) -> pulumi.Output[Sequence['outputs.TrafficMirrorSessionTag']]:
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter(name="trafficMirrorFilterId")
    def traffic_mirror_filter_id(self) -> pulumi.Output[builtins.str]:
        """
        筛选条件实例ID。
        """
        return pulumi.get(self, "traffic_mirror_filter_id")

    @property
    @pulumi.getter(name="trafficMirrorSessionId")
    def traffic_mirror_session_id(self) -> pulumi.Output[builtins.str]:
        """
        镜像会话实例ID。
        """
        return pulumi.get(self, "traffic_mirror_session_id")

    @property
    @pulumi.getter(name="trafficMirrorSessionName")
    def traffic_mirror_session_name(self) -> pulumi.Output[builtins.str]:
        """
        镜像会话名称。
        """
        return pulumi.get(self, "traffic_mirror_session_name")

    @property
    @pulumi.getter(name="trafficMirrorSourceIds")
    def traffic_mirror_source_ids(self) -> pulumi.Output[Sequence[builtins.str]]:
        """
        镜像源实例列表。
        """
        return pulumi.get(self, "traffic_mirror_source_ids")

    @property
    @pulumi.getter(name="trafficMirrorTargetId")
    def traffic_mirror_target_id(self) -> pulumi.Output[builtins.str]:
        """
        镜像目的实例ID。
        """
        return pulumi.get(self, "traffic_mirror_target_id")

    @property
    @pulumi.getter(name="virtualNetworkId")
    def virtual_network_id(self) -> pulumi.Output[builtins.int]:
        """
        镜像会话VNI，取值范围1 ～ 16777215。
        """
        return pulumi.get(self, "virtual_network_id")

