# 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

__all__ = [
    'GetClusterUserResult',
    'AwaitableGetClusterUserResult',
    'get_cluster_user',
    'get_cluster_user_output',
]

@pulumi.output_type
class GetClusterUserResult:
    """
    A collection of values returned by getClusterUser.
    """
    def __init__(__self__, cluster_id=None, created_time=None, creator_name=None, description=None, id=None, old_password=None, password=None, updated_time=None, user_group_names=None, user_name=None):
        if cluster_id and not isinstance(cluster_id, str):
            raise TypeError("Expected argument 'cluster_id' to be a str")
        pulumi.set(__self__, "cluster_id", cluster_id)
        if created_time and not isinstance(created_time, int):
            raise TypeError("Expected argument 'created_time' to be a int")
        pulumi.set(__self__, "created_time", created_time)
        if creator_name and not isinstance(creator_name, str):
            raise TypeError("Expected argument 'creator_name' to be a str")
        pulumi.set(__self__, "creator_name", creator_name)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if old_password and not isinstance(old_password, str):
            raise TypeError("Expected argument 'old_password' to be a str")
        pulumi.set(__self__, "old_password", old_password)
        if password and not isinstance(password, str):
            raise TypeError("Expected argument 'password' to be a str")
        pulumi.set(__self__, "password", password)
        if updated_time and not isinstance(updated_time, int):
            raise TypeError("Expected argument 'updated_time' to be a int")
        pulumi.set(__self__, "updated_time", updated_time)
        if user_group_names and not isinstance(user_group_names, list):
            raise TypeError("Expected argument 'user_group_names' to be a list")
        pulumi.set(__self__, "user_group_names", user_group_names)
        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)

    @property
    @pulumi.getter(name="clusterId")
    def cluster_id(self) -> builtins.str:
        """
        集群ID。
        """
        return pulumi.get(self, "cluster_id")

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> builtins.int:
        """
        创建时间。
        """
        return pulumi.get(self, "created_time")

    @property
    @pulumi.getter(name="creatorName")
    def creator_name(self) -> builtins.str:
        """
        创建者用户名。
        """
        return pulumi.get(self, "creator_name")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        用户组描述。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        Uniquely identifies the resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="oldPassword")
    def old_password(self) -> builtins.str:
        """
        旧的用户的登录密码。修改密码时必填。
        """
        return pulumi.get(self, "old_password")

    @property
    @pulumi.getter
    def password(self) -> builtins.str:
        """
        新的用户的登录密码。密码的长度需在8-20个字符之间，支持数字，字母，-，_ 且 至少包含1个数字和1个字母。
        """
        return pulumi.get(self, "password")

    @property
    @pulumi.getter(name="updatedTime")
    def updated_time(self) -> builtins.int:
        """
        更新时间。
        """
        return pulumi.get(self, "updated_time")

    @property
    @pulumi.getter(name="userGroupNames")
    def user_group_names(self) -> Sequence[builtins.str]:
        """
        所属用户组名称。
        """
        return pulumi.get(self, "user_group_names")

    @property
    @pulumi.getter(name="userName")
    def user_name(self) -> builtins.str:
        """
        集群用户名。仅支持小写字母。
        """
        return pulumi.get(self, "user_name")


class AwaitableGetClusterUserResult(GetClusterUserResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetClusterUserResult(
            cluster_id=self.cluster_id,
            created_time=self.created_time,
            creator_name=self.creator_name,
            description=self.description,
            id=self.id,
            old_password=self.old_password,
            password=self.password,
            updated_time=self.updated_time,
            user_group_names=self.user_group_names,
            user_name=self.user_name)


def get_cluster_user(id: Optional[builtins.str] = None,
                     opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetClusterUserResult:
    """
    Data Source schema for Byteplus::EMR::ClusterUser


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('bytepluscc:emr/getClusterUser:getClusterUser', __args__, opts=opts, typ=GetClusterUserResult).value

    return AwaitableGetClusterUserResult(
        cluster_id=pulumi.get(__ret__, 'cluster_id'),
        created_time=pulumi.get(__ret__, 'created_time'),
        creator_name=pulumi.get(__ret__, 'creator_name'),
        description=pulumi.get(__ret__, 'description'),
        id=pulumi.get(__ret__, 'id'),
        old_password=pulumi.get(__ret__, 'old_password'),
        password=pulumi.get(__ret__, 'password'),
        updated_time=pulumi.get(__ret__, 'updated_time'),
        user_group_names=pulumi.get(__ret__, 'user_group_names'),
        user_name=pulumi.get(__ret__, 'user_name'))
def get_cluster_user_output(id: Optional[pulumi.Input[builtins.str]] = None,
                            opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetClusterUserResult]:
    """
    Data Source schema for Byteplus::EMR::ClusterUser


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('bytepluscc:emr/getClusterUser:getClusterUser', __args__, opts=opts, typ=GetClusterUserResult)
    return __ret__.apply(lambda __response__: GetClusterUserResult(
        cluster_id=pulumi.get(__response__, 'cluster_id'),
        created_time=pulumi.get(__response__, 'created_time'),
        creator_name=pulumi.get(__response__, 'creator_name'),
        description=pulumi.get(__response__, 'description'),
        id=pulumi.get(__response__, 'id'),
        old_password=pulumi.get(__response__, 'old_password'),
        password=pulumi.get(__response__, 'password'),
        updated_time=pulumi.get(__response__, 'updated_time'),
        user_group_names=pulumi.get(__response__, 'user_group_names'),
        user_name=pulumi.get(__response__, 'user_name')))
