# 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 warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities

__all__ = ['TrafficMirrorFilterArgs', 'TrafficMirrorFilter']

@pulumi.input_type
class TrafficMirrorFilterArgs:
    def __init__(__self__, *,
                 dry_run: Optional[pulumi.Input[bool]] = None,
                 traffic_mirror_filter_description: Optional[pulumi.Input[str]] = None,
                 traffic_mirror_filter_name: Optional[pulumi.Input[str]] = None):
        """
        The set of arguments for constructing a TrafficMirrorFilter resource.
        :param pulumi.Input[bool] dry_run: The dry run.
        :param pulumi.Input[str] traffic_mirror_filter_description: The description of the filter. The description must be `2` to `256` characters in length. It must start with a letter and cannot start with `http://` or `https://`.
        :param pulumi.Input[str] traffic_mirror_filter_name: The name of the filter. The name must be `2` to `128` characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). It must start with a letter and cannot start with `http://` or `https://`.
        """
        if dry_run is not None:
            pulumi.set(__self__, "dry_run", dry_run)
        if traffic_mirror_filter_description is not None:
            pulumi.set(__self__, "traffic_mirror_filter_description", traffic_mirror_filter_description)
        if traffic_mirror_filter_name is not None:
            pulumi.set(__self__, "traffic_mirror_filter_name", traffic_mirror_filter_name)

    @property
    @pulumi.getter(name="dryRun")
    def dry_run(self) -> Optional[pulumi.Input[bool]]:
        """
        The dry run.
        """
        return pulumi.get(self, "dry_run")

    @dry_run.setter
    def dry_run(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "dry_run", value)

    @property
    @pulumi.getter(name="trafficMirrorFilterDescription")
    def traffic_mirror_filter_description(self) -> Optional[pulumi.Input[str]]:
        """
        The description of the filter. The description must be `2` to `256` characters in length. It must start with a letter and cannot start with `http://` or `https://`.
        """
        return pulumi.get(self, "traffic_mirror_filter_description")

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

    @property
    @pulumi.getter(name="trafficMirrorFilterName")
    def traffic_mirror_filter_name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the filter. The name must be `2` to `128` characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). It must start with a letter and cannot start with `http://` or `https://`.
        """
        return pulumi.get(self, "traffic_mirror_filter_name")

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


@pulumi.input_type
class _TrafficMirrorFilterState:
    def __init__(__self__, *,
                 dry_run: Optional[pulumi.Input[bool]] = None,
                 status: Optional[pulumi.Input[str]] = None,
                 traffic_mirror_filter_description: Optional[pulumi.Input[str]] = None,
                 traffic_mirror_filter_name: Optional[pulumi.Input[str]] = None):
        """
        Input properties used for looking up and filtering TrafficMirrorFilter resources.
        :param pulumi.Input[bool] dry_run: The dry run.
        :param pulumi.Input[str] status: The state of the filter. Valid values:`Creating`, `Created`, `Modifying` and `Deleting`. `Creating`: The filter is being created. `Created`: The filter is created. `Modifying`: The filter is being modified. `Deleting`: The filter is being deleted.
        :param pulumi.Input[str] traffic_mirror_filter_description: The description of the filter. The description must be `2` to `256` characters in length. It must start with a letter and cannot start with `http://` or `https://`.
        :param pulumi.Input[str] traffic_mirror_filter_name: The name of the filter. The name must be `2` to `128` characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). It must start with a letter and cannot start with `http://` or `https://`.
        """
        if dry_run is not None:
            pulumi.set(__self__, "dry_run", dry_run)
        if status is not None:
            pulumi.set(__self__, "status", status)
        if traffic_mirror_filter_description is not None:
            pulumi.set(__self__, "traffic_mirror_filter_description", traffic_mirror_filter_description)
        if traffic_mirror_filter_name is not None:
            pulumi.set(__self__, "traffic_mirror_filter_name", traffic_mirror_filter_name)

    @property
    @pulumi.getter(name="dryRun")
    def dry_run(self) -> Optional[pulumi.Input[bool]]:
        """
        The dry run.
        """
        return pulumi.get(self, "dry_run")

    @dry_run.setter
    def dry_run(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "dry_run", value)

    @property
    @pulumi.getter
    def status(self) -> Optional[pulumi.Input[str]]:
        """
        The state of the filter. Valid values:`Creating`, `Created`, `Modifying` and `Deleting`. `Creating`: The filter is being created. `Created`: The filter is created. `Modifying`: The filter is being modified. `Deleting`: The filter is being deleted.
        """
        return pulumi.get(self, "status")

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

    @property
    @pulumi.getter(name="trafficMirrorFilterDescription")
    def traffic_mirror_filter_description(self) -> Optional[pulumi.Input[str]]:
        """
        The description of the filter. The description must be `2` to `256` characters in length. It must start with a letter and cannot start with `http://` or `https://`.
        """
        return pulumi.get(self, "traffic_mirror_filter_description")

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

    @property
    @pulumi.getter(name="trafficMirrorFilterName")
    def traffic_mirror_filter_name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the filter. The name must be `2` to `128` characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). It must start with a letter and cannot start with `http://` or `https://`.
        """
        return pulumi.get(self, "traffic_mirror_filter_name")

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


class TrafficMirrorFilter(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 dry_run: Optional[pulumi.Input[bool]] = None,
                 traffic_mirror_filter_description: Optional[pulumi.Input[str]] = None,
                 traffic_mirror_filter_name: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        Provides a VPC Traffic Mirror Filter resource.

        For information about VPC Traffic Mirror Filter and how to use it, see [What is Traffic Mirror Filter](https://www.alibabacloud.com/help/doc-detail/207513.htm).

        > **NOTE:** Available in v1.140.0+.

        ## Example Usage

        Basic Usage

        ```python
        import pulumi
        import pulumi_alicloud as alicloud

        example = alicloud.vpc.TrafficMirrorFilter("example", traffic_mirror_filter_name="example_value")
        ```

        ## Import

        VPC Traffic Mirror Filter can be imported using the id, e.g.

        ```sh
         $ pulumi import alicloud:vpc/trafficMirrorFilter:TrafficMirrorFilter example <id>
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[bool] dry_run: The dry run.
        :param pulumi.Input[str] traffic_mirror_filter_description: The description of the filter. The description must be `2` to `256` characters in length. It must start with a letter and cannot start with `http://` or `https://`.
        :param pulumi.Input[str] traffic_mirror_filter_name: The name of the filter. The name must be `2` to `128` characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). It must start with a letter and cannot start with `http://` or `https://`.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: Optional[TrafficMirrorFilterArgs] = None,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Provides a VPC Traffic Mirror Filter resource.

        For information about VPC Traffic Mirror Filter and how to use it, see [What is Traffic Mirror Filter](https://www.alibabacloud.com/help/doc-detail/207513.htm).

        > **NOTE:** Available in v1.140.0+.

        ## Example Usage

        Basic Usage

        ```python
        import pulumi
        import pulumi_alicloud as alicloud

        example = alicloud.vpc.TrafficMirrorFilter("example", traffic_mirror_filter_name="example_value")
        ```

        ## Import

        VPC Traffic Mirror Filter can be imported using the id, e.g.

        ```sh
         $ pulumi import alicloud:vpc/trafficMirrorFilter:TrafficMirrorFilter example <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,
                 dry_run: Optional[pulumi.Input[bool]] = None,
                 traffic_mirror_filter_description: Optional[pulumi.Input[str]] = None,
                 traffic_mirror_filter_name: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        if opts is None:
            opts = pulumi.ResourceOptions()
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.version is None:
            opts.version = _utilities.get_version()
        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__["dry_run"] = dry_run
            __props__.__dict__["traffic_mirror_filter_description"] = traffic_mirror_filter_description
            __props__.__dict__["traffic_mirror_filter_name"] = traffic_mirror_filter_name
            __props__.__dict__["status"] = None
        super(TrafficMirrorFilter, __self__).__init__(
            'alicloud:vpc/trafficMirrorFilter:TrafficMirrorFilter',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            dry_run: Optional[pulumi.Input[bool]] = None,
            status: Optional[pulumi.Input[str]] = None,
            traffic_mirror_filter_description: Optional[pulumi.Input[str]] = None,
            traffic_mirror_filter_name: Optional[pulumi.Input[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[bool] dry_run: The dry run.
        :param pulumi.Input[str] status: The state of the filter. Valid values:`Creating`, `Created`, `Modifying` and `Deleting`. `Creating`: The filter is being created. `Created`: The filter is created. `Modifying`: The filter is being modified. `Deleting`: The filter is being deleted.
        :param pulumi.Input[str] traffic_mirror_filter_description: The description of the filter. The description must be `2` to `256` characters in length. It must start with a letter and cannot start with `http://` or `https://`.
        :param pulumi.Input[str] traffic_mirror_filter_name: The name of the filter. The name must be `2` to `128` characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). It must start with a letter and cannot start with `http://` or `https://`.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _TrafficMirrorFilterState.__new__(_TrafficMirrorFilterState)

        __props__.__dict__["dry_run"] = dry_run
        __props__.__dict__["status"] = status
        __props__.__dict__["traffic_mirror_filter_description"] = traffic_mirror_filter_description
        __props__.__dict__["traffic_mirror_filter_name"] = traffic_mirror_filter_name
        return TrafficMirrorFilter(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="dryRun")
    def dry_run(self) -> pulumi.Output[Optional[bool]]:
        """
        The dry run.
        """
        return pulumi.get(self, "dry_run")

    @property
    @pulumi.getter
    def status(self) -> pulumi.Output[str]:
        """
        The state of the filter. Valid values:`Creating`, `Created`, `Modifying` and `Deleting`. `Creating`: The filter is being created. `Created`: The filter is created. `Modifying`: The filter is being modified. `Deleting`: The filter is being deleted.
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter(name="trafficMirrorFilterDescription")
    def traffic_mirror_filter_description(self) -> pulumi.Output[Optional[str]]:
        """
        The description of the filter. The description must be `2` to `256` characters in length. It must start with a letter and cannot start with `http://` or `https://`.
        """
        return pulumi.get(self, "traffic_mirror_filter_description")

    @property
    @pulumi.getter(name="trafficMirrorFilterName")
    def traffic_mirror_filter_name(self) -> pulumi.Output[Optional[str]]:
        """
        The name of the filter. The name must be `2` to `128` characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). It must start with a letter and cannot start with `http://` or `https://`.
        """
        return pulumi.get(self, "traffic_mirror_filter_name")

