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

__all__ = [
    'GetMailAddressesResult',
    'AwaitableGetMailAddressesResult',
    'get_mail_addresses',
    'get_mail_addresses_output',
]

@pulumi.output_type
class GetMailAddressesResult:
    """
    A collection of values returned by getMailAddresses.
    """
    def __init__(__self__, addresses=None, id=None, ids=None, key_word=None, output_file=None, sendtype=None, status=None):
        if addresses and not isinstance(addresses, list):
            raise TypeError("Expected argument 'addresses' to be a list")
        pulumi.set(__self__, "addresses", addresses)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if ids and not isinstance(ids, list):
            raise TypeError("Expected argument 'ids' to be a list")
        pulumi.set(__self__, "ids", ids)
        if key_word and not isinstance(key_word, str):
            raise TypeError("Expected argument 'key_word' to be a str")
        pulumi.set(__self__, "key_word", key_word)
        if output_file and not isinstance(output_file, str):
            raise TypeError("Expected argument 'output_file' to be a str")
        pulumi.set(__self__, "output_file", output_file)
        if sendtype and not isinstance(sendtype, str):
            raise TypeError("Expected argument 'sendtype' to be a str")
        pulumi.set(__self__, "sendtype", sendtype)
        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 addresses(self) -> Sequence['outputs.GetMailAddressesAddressResult']:
        return pulumi.get(self, "addresses")

    @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 ids(self) -> Sequence[str]:
        return pulumi.get(self, "ids")

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

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

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

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


class AwaitableGetMailAddressesResult(GetMailAddressesResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetMailAddressesResult(
            addresses=self.addresses,
            id=self.id,
            ids=self.ids,
            key_word=self.key_word,
            output_file=self.output_file,
            sendtype=self.sendtype,
            status=self.status)


def get_mail_addresses(ids: Optional[Sequence[str]] = None,
                       key_word: Optional[str] = None,
                       output_file: Optional[str] = None,
                       sendtype: Optional[str] = None,
                       status: Optional[str] = None,
                       opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetMailAddressesResult:
    """
    This data source provides the Direct Mail Mail Addresses of the current Alibaba Cloud user.

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

    ## Example Usage

    Basic Usage

    ```python
    import pulumi
    import pulumi_alicloud as alicloud

    ids = alicloud.directmail.get_mail_addresses(ids=["example_id"])
    pulumi.export("directMailMailAddressId1", ids.addresses[0].id)
    ```


    :param Sequence[str] ids: A list of Mail Address IDs.
    :param str key_word: The key word about account email address.
    :param str output_file: File name where to save data source results (after running `pulumi preview`).
    :param str sendtype: Account type.
    :param str status: Account Status. Valid values: `0`, `1`. Freeze: 1, normal: 0.
    """
    __args__ = dict()
    __args__['ids'] = ids
    __args__['keyWord'] = key_word
    __args__['outputFile'] = output_file
    __args__['sendtype'] = sendtype
    __args__['status'] = status
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('alicloud:directmail/getMailAddresses:getMailAddresses', __args__, opts=opts, typ=GetMailAddressesResult).value

    return AwaitableGetMailAddressesResult(
        addresses=pulumi.get(__ret__, 'addresses'),
        id=pulumi.get(__ret__, 'id'),
        ids=pulumi.get(__ret__, 'ids'),
        key_word=pulumi.get(__ret__, 'key_word'),
        output_file=pulumi.get(__ret__, 'output_file'),
        sendtype=pulumi.get(__ret__, 'sendtype'),
        status=pulumi.get(__ret__, 'status'))


@_utilities.lift_output_func(get_mail_addresses)
def get_mail_addresses_output(ids: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
                              key_word: Optional[pulumi.Input[Optional[str]]] = None,
                              output_file: Optional[pulumi.Input[Optional[str]]] = None,
                              sendtype: Optional[pulumi.Input[Optional[str]]] = None,
                              status: Optional[pulumi.Input[Optional[str]]] = None,
                              opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetMailAddressesResult]:
    """
    This data source provides the Direct Mail Mail Addresses of the current Alibaba Cloud user.

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

    ## Example Usage

    Basic Usage

    ```python
    import pulumi
    import pulumi_alicloud as alicloud

    ids = alicloud.directmail.get_mail_addresses(ids=["example_id"])
    pulumi.export("directMailMailAddressId1", ids.addresses[0].id)
    ```


    :param Sequence[str] ids: A list of Mail Address IDs.
    :param str key_word: The key word about account email address.
    :param str output_file: File name where to save data source results (after running `pulumi preview`).
    :param str sendtype: Account type.
    :param str status: Account Status. Valid values: `0`, `1`. Freeze: 1, normal: 0.
    """
    ...
