# 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__ = ['TrafficMirrorFilterArgs', 'TrafficMirrorFilter']

@pulumi.input_type
class TrafficMirrorFilterArgs:
    def __init__(__self__, *,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 project_name: Optional[pulumi.Input[builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficMirrorFilterTagArgs']]]] = None,
                 traffic_mirror_filter_name: Optional[pulumi.Input[builtins.str]] = None):
        """
        The set of arguments for constructing a TrafficMirrorFilter resource.
        :param pulumi.Input[builtins.str] description: 筛选条件实例描述。
        :param pulumi.Input[builtins.str] project_name: 筛选条件所属项目的名称。
        :param pulumi.Input[builtins.str] traffic_mirror_filter_name: 筛选条件名称。
        """
        if description is not None:
            pulumi.set(__self__, "description", description)
        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_filter_name is not None:
            pulumi.set(__self__, "traffic_mirror_filter_name", traffic_mirror_filter_name)

    @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="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['TrafficMirrorFilterTagArgs']]]]:
        return pulumi.get(self, "tags")

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

    @property
    @pulumi.getter(name="trafficMirrorFilterName")
    def traffic_mirror_filter_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        筛选条件名称。
        """
        return pulumi.get(self, "traffic_mirror_filter_name")

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


@pulumi.input_type
class _TrafficMirrorFilterState:
    def __init__(__self__, *,
                 created_time: Optional[pulumi.Input[builtins.str]] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 egress_filter_rules: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficMirrorFilterEgressFilterRuleArgs']]]] = None,
                 ingress_filter_rules: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficMirrorFilterIngressFilterRuleArgs']]]] = None,
                 project_name: Optional[pulumi.Input[builtins.str]] = None,
                 status: Optional[pulumi.Input[builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficMirrorFilterTagArgs']]]] = None,
                 traffic_mirror_filter_id: Optional[pulumi.Input[builtins.str]] = None,
                 traffic_mirror_filter_name: Optional[pulumi.Input[builtins.str]] = None):
        """
        Input properties used for looking up and filtering TrafficMirrorFilter resources.
        :param pulumi.Input[builtins.str] created_time: 筛选条件的创建时间。
        :param pulumi.Input[builtins.str] description: 筛选条件实例描述。
        :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_filter_name: 筛选条件名称。
        """
        if created_time is not None:
            pulumi.set(__self__, "created_time", created_time)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if egress_filter_rules is not None:
            pulumi.set(__self__, "egress_filter_rules", egress_filter_rules)
        if ingress_filter_rules is not None:
            pulumi.set(__self__, "ingress_filter_rules", ingress_filter_rules)
        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_filter_name is not None:
            pulumi.set(__self__, "traffic_mirror_filter_name", traffic_mirror_filter_name)

    @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="egressFilterRules")
    def egress_filter_rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['TrafficMirrorFilterEgressFilterRuleArgs']]]]:
        return pulumi.get(self, "egress_filter_rules")

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

    @property
    @pulumi.getter(name="ingressFilterRules")
    def ingress_filter_rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['TrafficMirrorFilterIngressFilterRuleArgs']]]]:
        return pulumi.get(self, "ingress_filter_rules")

    @ingress_filter_rules.setter
    def ingress_filter_rules(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficMirrorFilterIngressFilterRuleArgs']]]]):
        pulumi.set(self, "ingress_filter_rules", 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['TrafficMirrorFilterTagArgs']]]]:
        return pulumi.get(self, "tags")

    @tags.setter
    def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficMirrorFilterTagArgs']]]]):
        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="trafficMirrorFilterName")
    def traffic_mirror_filter_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        筛选条件名称。
        """
        return pulumi.get(self, "traffic_mirror_filter_name")

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


@pulumi.type_token("bytepluscc:vpc/trafficMirrorFilter:TrafficMirrorFilter")
class TrafficMirrorFilter(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 project_name: Optional[pulumi.Input[builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['TrafficMirrorFilterTagArgs', 'TrafficMirrorFilterTagArgsDict']]]]] = None,
                 traffic_mirror_filter_name: Optional[pulumi.Input[builtins.str]] = None,
                 __props__=None):
        """
        通过流量镜像，您可以按自己设定的筛选条件复制网卡的流量，并将复制的流量私网转发到目标服务进行监控分析。

        ## Example Usage

        ```python
        import pulumi
        import pulumi_bytepluscc as bytepluscc

        v_pc_traffic_mirror_filter_demo = bytepluscc.vpc.TrafficMirrorFilter("VPCTrafficMirrorFilterDemo",
            description="ccapi-terraform-test",
            traffic_mirror_filter_name="test-vpc-traffic-mirror-filter-demo",
            project_name="default",
            tags=[{
                "key": "env",
                "value": "test",
            }])
        ```

        ## Import

        ```sh
        $ pulumi import bytepluscc:vpc/trafficMirrorFilter:TrafficMirrorFilter example "traffic_mirror_filter_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] project_name: 筛选条件所属项目的名称。
        :param pulumi.Input[builtins.str] traffic_mirror_filter_name: 筛选条件名称。
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: Optional[TrafficMirrorFilterArgs] = None,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        通过流量镜像，您可以按自己设定的筛选条件复制网卡的流量，并将复制的流量私网转发到目标服务进行监控分析。

        ## Example Usage

        ```python
        import pulumi
        import pulumi_bytepluscc as bytepluscc

        v_pc_traffic_mirror_filter_demo = bytepluscc.vpc.TrafficMirrorFilter("VPCTrafficMirrorFilterDemo",
            description="ccapi-terraform-test",
            traffic_mirror_filter_name="test-vpc-traffic-mirror-filter-demo",
            project_name="default",
            tags=[{
                "key": "env",
                "value": "test",
            }])
        ```

        ## Import

        ```sh
        $ pulumi import bytepluscc:vpc/trafficMirrorFilter:TrafficMirrorFilter example "traffic_mirror_filter_id"
        ```

        :param str resource_name: The name of the resource.
        :param TrafficMirrorFilterArgs 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(TrafficMirrorFilterArgs, 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,
                 project_name: Optional[pulumi.Input[builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['TrafficMirrorFilterTagArgs', 'TrafficMirrorFilterTagArgsDict']]]]] = None,
                 traffic_mirror_filter_name: Optional[pulumi.Input[builtins.str]] = 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__ = TrafficMirrorFilterArgs.__new__(TrafficMirrorFilterArgs)

            __props__.__dict__["description"] = description
            __props__.__dict__["project_name"] = project_name
            __props__.__dict__["tags"] = tags
            __props__.__dict__["traffic_mirror_filter_name"] = traffic_mirror_filter_name
            __props__.__dict__["created_time"] = None
            __props__.__dict__["egress_filter_rules"] = None
            __props__.__dict__["ingress_filter_rules"] = None
            __props__.__dict__["status"] = None
            __props__.__dict__["traffic_mirror_filter_id"] = None
        super(TrafficMirrorFilter, __self__).__init__(
            'bytepluscc:vpc/trafficMirrorFilter:TrafficMirrorFilter',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            created_time: Optional[pulumi.Input[builtins.str]] = None,
            description: Optional[pulumi.Input[builtins.str]] = None,
            egress_filter_rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['TrafficMirrorFilterEgressFilterRuleArgs', 'TrafficMirrorFilterEgressFilterRuleArgsDict']]]]] = None,
            ingress_filter_rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['TrafficMirrorFilterIngressFilterRuleArgs', 'TrafficMirrorFilterIngressFilterRuleArgsDict']]]]] = None,
            project_name: Optional[pulumi.Input[builtins.str]] = None,
            status: Optional[pulumi.Input[builtins.str]] = None,
            tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['TrafficMirrorFilterTagArgs', 'TrafficMirrorFilterTagArgsDict']]]]] = None,
            traffic_mirror_filter_id: Optional[pulumi.Input[builtins.str]] = None,
            traffic_mirror_filter_name: Optional[pulumi.Input[builtins.str]] = None) -> 'TrafficMirrorFilter':
        """
        Get an existing TrafficMirrorFilter 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] created_time: 筛选条件的创建时间。
        :param pulumi.Input[builtins.str] description: 筛选条件实例描述。
        :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_filter_name: 筛选条件名称。
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _TrafficMirrorFilterState.__new__(_TrafficMirrorFilterState)

        __props__.__dict__["created_time"] = created_time
        __props__.__dict__["description"] = description
        __props__.__dict__["egress_filter_rules"] = egress_filter_rules
        __props__.__dict__["ingress_filter_rules"] = ingress_filter_rules
        __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_filter_name"] = traffic_mirror_filter_name
        return TrafficMirrorFilter(resource_name, opts=opts, __props__=__props__)

    @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="egressFilterRules")
    def egress_filter_rules(self) -> pulumi.Output[Sequence['outputs.TrafficMirrorFilterEgressFilterRule']]:
        return pulumi.get(self, "egress_filter_rules")

    @property
    @pulumi.getter(name="ingressFilterRules")
    def ingress_filter_rules(self) -> pulumi.Output[Sequence['outputs.TrafficMirrorFilterIngressFilterRule']]:
        return pulumi.get(self, "ingress_filter_rules")

    @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.TrafficMirrorFilterTag']]:
        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="trafficMirrorFilterName")
    def traffic_mirror_filter_name(self) -> pulumi.Output[builtins.str]:
        """
        筛选条件名称。
        """
        return pulumi.get(self, "traffic_mirror_filter_name")

