# 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__ = [
    'GetTrafficMirrorServiceResult',
    'AwaitableGetTrafficMirrorServiceResult',
    'get_traffic_mirror_service',
    'get_traffic_mirror_service_output',
]

@pulumi.output_type
class GetTrafficMirrorServiceResult:
    """
    A collection of values returned by getTrafficMirrorService.
    """
    def __init__(__self__, enable=None, id=None, status=None):
        if enable and not isinstance(enable, str):
            raise TypeError("Expected argument 'enable' to be a str")
        pulumi.set(__self__, "enable", enable)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)

    @property
    @pulumi.getter
    def enable(self) -> Optional[str]:
        return pulumi.get(self, "enable")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def status(self) -> str:
        """
        The current service enable status.
        """
        return pulumi.get(self, "status")


class AwaitableGetTrafficMirrorServiceResult(GetTrafficMirrorServiceResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetTrafficMirrorServiceResult(
            enable=self.enable,
            id=self.id,
            status=self.status)


def get_traffic_mirror_service(enable: Optional[str] = None,
                               opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetTrafficMirrorServiceResult:
    """
    Using this data source can open VPC Traffic Mirror service automatically. If the service has been opened, it will return opened.

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

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

    ## Example Usage

    ```python
    import pulumi
    import pulumi_alicloud as alicloud

    open = alicloud.vpc.get_traffic_mirror_service(enable="On")
    ```


    :param str enable: Setting the value to `On` to enable the service. If has been enabled, return the result. Valid values: `On` or `Off`. Default to `Off`.
    """
    __args__ = dict()
    __args__['enable'] = enable
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('alicloud:vpc/getTrafficMirrorService:getTrafficMirrorService', __args__, opts=opts, typ=GetTrafficMirrorServiceResult).value

    return AwaitableGetTrafficMirrorServiceResult(
        enable=__ret__.enable,
        id=__ret__.id,
        status=__ret__.status)


@_utilities.lift_output_func(get_traffic_mirror_service)
def get_traffic_mirror_service_output(enable: Optional[pulumi.Input[Optional[str]]] = None,
                                      opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetTrafficMirrorServiceResult]:
    """
    Using this data source can open VPC Traffic Mirror service automatically. If the service has been opened, it will return opened.

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

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

    ## Example Usage

    ```python
    import pulumi
    import pulumi_alicloud as alicloud

    open = alicloud.vpc.get_traffic_mirror_service(enable="On")
    ```


    :param str enable: Setting the value to `On` to enable the service. If has been enabled, return the result. Valid values: `On` or `Off`. Default to `Off`.
    """
    ...
