# 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__ = [
    'GetUsersResult',
    'AwaitableGetUsersResult',
    'get_users',
    'get_users_output',
]

@pulumi.output_type
class GetUsersResult:
    """
    A collection of values returned by getUsers.
    """
    def __init__(__self__, display_name=None, id=None, ids=None, instance_id=None, mobile=None, name_regex=None, names=None, output_file=None, source=None, source_user_id=None, status=None, user_name=None, users=None):
        if display_name and not isinstance(display_name, str):
            raise TypeError("Expected argument 'display_name' to be a str")
        pulumi.set(__self__, "display_name", display_name)
        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 instance_id and not isinstance(instance_id, str):
            raise TypeError("Expected argument 'instance_id' to be a str")
        pulumi.set(__self__, "instance_id", instance_id)
        if mobile and not isinstance(mobile, str):
            raise TypeError("Expected argument 'mobile' to be a str")
        pulumi.set(__self__, "mobile", mobile)
        if name_regex and not isinstance(name_regex, str):
            raise TypeError("Expected argument 'name_regex' to be a str")
        pulumi.set(__self__, "name_regex", name_regex)
        if names and not isinstance(names, list):
            raise TypeError("Expected argument 'names' to be a list")
        pulumi.set(__self__, "names", names)
        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 source and not isinstance(source, str):
            raise TypeError("Expected argument 'source' to be a str")
        pulumi.set(__self__, "source", source)
        if source_user_id and not isinstance(source_user_id, str):
            raise TypeError("Expected argument 'source_user_id' to be a str")
        pulumi.set(__self__, "source_user_id", source_user_id)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if user_name and not isinstance(user_name, str):
            raise TypeError("Expected argument 'user_name' to be a str")
        pulumi.set(__self__, "user_name", user_name)
        if users and not isinstance(users, list):
            raise TypeError("Expected argument 'users' to be a list")
        pulumi.set(__self__, "users", users)

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

    @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="instanceId")
    def instance_id(self) -> str:
        return pulumi.get(self, "instance_id")

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

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

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

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

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

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

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

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

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


class AwaitableGetUsersResult(GetUsersResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetUsersResult(
            display_name=self.display_name,
            id=self.id,
            ids=self.ids,
            instance_id=self.instance_id,
            mobile=self.mobile,
            name_regex=self.name_regex,
            names=self.names,
            output_file=self.output_file,
            source=self.source,
            source_user_id=self.source_user_id,
            status=self.status,
            user_name=self.user_name,
            users=self.users)


def get_users(display_name: Optional[str] = None,
              ids: Optional[Sequence[str]] = None,
              instance_id: Optional[str] = None,
              mobile: Optional[str] = None,
              name_regex: Optional[str] = None,
              output_file: Optional[str] = None,
              source: Optional[str] = None,
              source_user_id: Optional[str] = None,
              status: Optional[str] = None,
              user_name: Optional[str] = None,
              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetUsersResult:
    """
    This data source provides the Bastionhost Users of the current Alibaba Cloud user.

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

    ## Example Usage

    Basic Usage

    ```python
    import pulumi
    import pulumi_alicloud as alicloud

    ids = alicloud.bastionhost.get_users(instance_id="example_value",
        ids=[
            "1",
            "10",
        ])
    pulumi.export("bastionhostUserId1", ids.users[0].id)
    name_regex = alicloud.bastionhost.get_users(instance_id="example_value",
        name_regex="^my-User")
    pulumi.export("bastionhostUserId2", name_regex.users[0].id)
    ```


    :param str display_name: Specify the New Created the User's Display Name. Supports up to 128 Characters.
    :param Sequence[str] ids: A list of User IDs.
    :param str instance_id: You Want to Query the User the Bastion Host ID of.
    :param str mobile: Specify the New of the User That Created a Different Mobile Phone Number from Your.
    :param str name_regex: A regex string to filter results by User name.
    :param str output_file: File name where to save data source results (after running `pulumi preview`).
    :param str source: Specify the New of the User That Created the Source. Valid Values: Local: Local User RAM: Ram User.
    :param str source_user_id: Specify the Newly Created User Is Uniquely Identified. Indicates That the Parameter Is a Bastion Host Corresponding to the User with the Ram User's Unique Identifier. The Newly Created User Source Grant Permission to a RAM User (That Is, Source Used as a Ram), this Parameter Is Required. You Can Call Access Control of Listusers Interface from the Return Data Userid to Obtain the Parameters.
    :param str status: The status of the resource.
    :param str user_name: Specify the New User Name. This Parameter Is Only by Letters, Lowercase Letters, Numbers, and Underscores (_), Supports up to 128 Characters.
    """
    __args__ = dict()
    __args__['displayName'] = display_name
    __args__['ids'] = ids
    __args__['instanceId'] = instance_id
    __args__['mobile'] = mobile
    __args__['nameRegex'] = name_regex
    __args__['outputFile'] = output_file
    __args__['source'] = source
    __args__['sourceUserId'] = source_user_id
    __args__['status'] = status
    __args__['userName'] = user_name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('alicloud:bastionhost/getUsers:getUsers', __args__, opts=opts, typ=GetUsersResult).value

    return AwaitableGetUsersResult(
        display_name=pulumi.get(__ret__, 'display_name'),
        id=pulumi.get(__ret__, 'id'),
        ids=pulumi.get(__ret__, 'ids'),
        instance_id=pulumi.get(__ret__, 'instance_id'),
        mobile=pulumi.get(__ret__, 'mobile'),
        name_regex=pulumi.get(__ret__, 'name_regex'),
        names=pulumi.get(__ret__, 'names'),
        output_file=pulumi.get(__ret__, 'output_file'),
        source=pulumi.get(__ret__, 'source'),
        source_user_id=pulumi.get(__ret__, 'source_user_id'),
        status=pulumi.get(__ret__, 'status'),
        user_name=pulumi.get(__ret__, 'user_name'),
        users=pulumi.get(__ret__, 'users'))


@_utilities.lift_output_func(get_users)
def get_users_output(display_name: Optional[pulumi.Input[Optional[str]]] = None,
                     ids: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
                     instance_id: Optional[pulumi.Input[str]] = None,
                     mobile: Optional[pulumi.Input[Optional[str]]] = None,
                     name_regex: Optional[pulumi.Input[Optional[str]]] = None,
                     output_file: Optional[pulumi.Input[Optional[str]]] = None,
                     source: Optional[pulumi.Input[Optional[str]]] = None,
                     source_user_id: Optional[pulumi.Input[Optional[str]]] = None,
                     status: Optional[pulumi.Input[Optional[str]]] = None,
                     user_name: Optional[pulumi.Input[Optional[str]]] = None,
                     opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetUsersResult]:
    """
    This data source provides the Bastionhost Users of the current Alibaba Cloud user.

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

    ## Example Usage

    Basic Usage

    ```python
    import pulumi
    import pulumi_alicloud as alicloud

    ids = alicloud.bastionhost.get_users(instance_id="example_value",
        ids=[
            "1",
            "10",
        ])
    pulumi.export("bastionhostUserId1", ids.users[0].id)
    name_regex = alicloud.bastionhost.get_users(instance_id="example_value",
        name_regex="^my-User")
    pulumi.export("bastionhostUserId2", name_regex.users[0].id)
    ```


    :param str display_name: Specify the New Created the User's Display Name. Supports up to 128 Characters.
    :param Sequence[str] ids: A list of User IDs.
    :param str instance_id: You Want to Query the User the Bastion Host ID of.
    :param str mobile: Specify the New of the User That Created a Different Mobile Phone Number from Your.
    :param str name_regex: A regex string to filter results by User name.
    :param str output_file: File name where to save data source results (after running `pulumi preview`).
    :param str source: Specify the New of the User That Created the Source. Valid Values: Local: Local User RAM: Ram User.
    :param str source_user_id: Specify the Newly Created User Is Uniquely Identified. Indicates That the Parameter Is a Bastion Host Corresponding to the User with the Ram User's Unique Identifier. The Newly Created User Source Grant Permission to a RAM User (That Is, Source Used as a Ram), this Parameter Is Required. You Can Call Access Control of Listusers Interface from the Return Data Userid to Obtain the Parameters.
    :param str status: The status of the resource.
    :param str user_name: Specify the New User Name. This Parameter Is Only by Letters, Lowercase Letters, Numbers, and Underscores (_), Supports up to 128 Characters.
    """
    ...
