# 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
from . import outputs

__all__ = [
    'GetUserResult',
    'AwaitableGetUserResult',
    'get_user',
    'get_user_output',
]

@pulumi.output_type
class GetUserResult:
    """
    A collection of values returned by getUser.
    """
    def __init__(__self__, access_keys=None, account_id=None, create_date=None, description=None, display_name=None, email=None, email_is_verify=None, groups=None, id=None, login_profile=None, mobile_phone=None, mobile_phone_is_verify=None, policies=None, security_config=None, tags=None, trn=None, update_date=None, user_id=None, user_name=None):
        if access_keys and not isinstance(access_keys, list):
            raise TypeError("Expected argument 'access_keys' to be a list")
        pulumi.set(__self__, "access_keys", access_keys)
        if account_id and not isinstance(account_id, float):
            raise TypeError("Expected argument 'account_id' to be a float")
        pulumi.set(__self__, "account_id", account_id)
        if create_date and not isinstance(create_date, str):
            raise TypeError("Expected argument 'create_date' to be a str")
        pulumi.set(__self__, "create_date", create_date)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        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 email and not isinstance(email, str):
            raise TypeError("Expected argument 'email' to be a str")
        pulumi.set(__self__, "email", email)
        if email_is_verify and not isinstance(email_is_verify, bool):
            raise TypeError("Expected argument 'email_is_verify' to be a bool")
        pulumi.set(__self__, "email_is_verify", email_is_verify)
        if groups and not isinstance(groups, list):
            raise TypeError("Expected argument 'groups' to be a list")
        pulumi.set(__self__, "groups", groups)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if login_profile and not isinstance(login_profile, dict):
            raise TypeError("Expected argument 'login_profile' to be a dict")
        pulumi.set(__self__, "login_profile", login_profile)
        if mobile_phone and not isinstance(mobile_phone, str):
            raise TypeError("Expected argument 'mobile_phone' to be a str")
        pulumi.set(__self__, "mobile_phone", mobile_phone)
        if mobile_phone_is_verify and not isinstance(mobile_phone_is_verify, bool):
            raise TypeError("Expected argument 'mobile_phone_is_verify' to be a bool")
        pulumi.set(__self__, "mobile_phone_is_verify", mobile_phone_is_verify)
        if policies and not isinstance(policies, list):
            raise TypeError("Expected argument 'policies' to be a list")
        pulumi.set(__self__, "policies", policies)
        if security_config and not isinstance(security_config, dict):
            raise TypeError("Expected argument 'security_config' to be a dict")
        pulumi.set(__self__, "security_config", security_config)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        if trn and not isinstance(trn, str):
            raise TypeError("Expected argument 'trn' to be a str")
        pulumi.set(__self__, "trn", trn)
        if update_date and not isinstance(update_date, str):
            raise TypeError("Expected argument 'update_date' to be a str")
        pulumi.set(__self__, "update_date", update_date)
        if user_id and not isinstance(user_id, int):
            raise TypeError("Expected argument 'user_id' to be a int")
        pulumi.set(__self__, "user_id", user_id)
        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="accessKeys")
    def access_keys(self) -> Sequence['outputs.GetUserAccessKeyResult']:
        """
        子用户的访问密钥。
        """
        return pulumi.get(self, "access_keys")

    @property
    @pulumi.getter(name="accountId")
    def account_id(self) -> builtins.float:
        """
        子用户归属的主账号。
        """
        return pulumi.get(self, "account_id")

    @property
    @pulumi.getter(name="createDate")
    def create_date(self) -> builtins.str:
        """
        子用户对应的创建时间。
        """
        return pulumi.get(self, "create_date")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        子用户对应的描述信息，长度不超过255。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="displayName")
    def display_name(self) -> builtins.str:
        """
        子用户对应的展示名称，用户显示名。长度1~128，仅支持中文、英文、数字、空格和.-_@符号。
        """
        return pulumi.get(self, "display_name")

    @property
    @pulumi.getter
    def email(self) -> builtins.str:
        """
        子用户对应的电子邮件地址。
        """
        return pulumi.get(self, "email")

    @property
    @pulumi.getter(name="emailIsVerify")
    def email_is_verify(self) -> builtins.bool:
        """
        子用户电子邮件地址是否已验证。true代表已验证，false代表未验证。
        """
        return pulumi.get(self, "email_is_verify")

    @property
    @pulumi.getter
    def groups(self) -> Sequence[builtins.str]:
        """
        子用户归属的用户组。
        """
        return pulumi.get(self, "groups")

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

    @property
    @pulumi.getter(name="loginProfile")
    def login_profile(self) -> 'outputs.GetUserLoginProfileResult':
        """
        子用户的登录配置。
        """
        return pulumi.get(self, "login_profile")

    @property
    @pulumi.getter(name="mobilePhone")
    def mobile_phone(self) -> builtins.str:
        """
        子用户对应的手机号。
        """
        return pulumi.get(self, "mobile_phone")

    @property
    @pulumi.getter(name="mobilePhoneIsVerify")
    def mobile_phone_is_verify(self) -> builtins.bool:
        """
        子用户手机号是否已验证。true代表已验证，false代表未验证。
        """
        return pulumi.get(self, "mobile_phone_is_verify")

    @property
    @pulumi.getter
    def policies(self) -> Sequence['outputs.GetUserPolicyResult']:
        """
        子用户对应的权限策略。
        """
        return pulumi.get(self, "policies")

    @property
    @pulumi.getter(name="securityConfig")
    def security_config(self) -> 'outputs.GetUserSecurityConfigResult':
        """
        子用户的操作保护配置。
        """
        return pulumi.get(self, "security_config")

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetUserTagResult']:
        """
        子用户对应的资源标签。
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter
    def trn(self) -> builtins.str:
        """
        子用户对应的Trn表达式。
        """
        return pulumi.get(self, "trn")

    @property
    @pulumi.getter(name="updateDate")
    def update_date(self) -> builtins.str:
        """
        子用户对应的更新时间。
        """
        return pulumi.get(self, "update_date")

    @property
    @pulumi.getter(name="userId")
    def user_id(self) -> builtins.int:
        """
        子用户的ID。
        """
        return pulumi.get(self, "user_id")

    @property
    @pulumi.getter(name="userName")
    def user_name(self) -> builtins.str:
        """
        子用户名称，用户名。长度1~64，支持英文、数字、下划线、和.-@符号。
        """
        return pulumi.get(self, "user_name")


class AwaitableGetUserResult(GetUserResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetUserResult(
            access_keys=self.access_keys,
            account_id=self.account_id,
            create_date=self.create_date,
            description=self.description,
            display_name=self.display_name,
            email=self.email,
            email_is_verify=self.email_is_verify,
            groups=self.groups,
            id=self.id,
            login_profile=self.login_profile,
            mobile_phone=self.mobile_phone,
            mobile_phone_is_verify=self.mobile_phone_is_verify,
            policies=self.policies,
            security_config=self.security_config,
            tags=self.tags,
            trn=self.trn,
            update_date=self.update_date,
            user_id=self.user_id,
            user_name=self.user_name)


def get_user(id: Optional[builtins.str] = None,
             opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetUserResult:
    """
    Data Source schema for Byteplus::IAM::User


    :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:iam/getUser:getUser', __args__, opts=opts, typ=GetUserResult).value

    return AwaitableGetUserResult(
        access_keys=pulumi.get(__ret__, 'access_keys'),
        account_id=pulumi.get(__ret__, 'account_id'),
        create_date=pulumi.get(__ret__, 'create_date'),
        description=pulumi.get(__ret__, 'description'),
        display_name=pulumi.get(__ret__, 'display_name'),
        email=pulumi.get(__ret__, 'email'),
        email_is_verify=pulumi.get(__ret__, 'email_is_verify'),
        groups=pulumi.get(__ret__, 'groups'),
        id=pulumi.get(__ret__, 'id'),
        login_profile=pulumi.get(__ret__, 'login_profile'),
        mobile_phone=pulumi.get(__ret__, 'mobile_phone'),
        mobile_phone_is_verify=pulumi.get(__ret__, 'mobile_phone_is_verify'),
        policies=pulumi.get(__ret__, 'policies'),
        security_config=pulumi.get(__ret__, 'security_config'),
        tags=pulumi.get(__ret__, 'tags'),
        trn=pulumi.get(__ret__, 'trn'),
        update_date=pulumi.get(__ret__, 'update_date'),
        user_id=pulumi.get(__ret__, 'user_id'),
        user_name=pulumi.get(__ret__, 'user_name'))
def get_user_output(id: Optional[pulumi.Input[builtins.str]] = None,
                    opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetUserResult]:
    """
    Data Source schema for Byteplus::IAM::User


    :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:iam/getUser:getUser', __args__, opts=opts, typ=GetUserResult)
    return __ret__.apply(lambda __response__: GetUserResult(
        access_keys=pulumi.get(__response__, 'access_keys'),
        account_id=pulumi.get(__response__, 'account_id'),
        create_date=pulumi.get(__response__, 'create_date'),
        description=pulumi.get(__response__, 'description'),
        display_name=pulumi.get(__response__, 'display_name'),
        email=pulumi.get(__response__, 'email'),
        email_is_verify=pulumi.get(__response__, 'email_is_verify'),
        groups=pulumi.get(__response__, 'groups'),
        id=pulumi.get(__response__, 'id'),
        login_profile=pulumi.get(__response__, 'login_profile'),
        mobile_phone=pulumi.get(__response__, 'mobile_phone'),
        mobile_phone_is_verify=pulumi.get(__response__, 'mobile_phone_is_verify'),
        policies=pulumi.get(__response__, 'policies'),
        security_config=pulumi.get(__response__, 'security_config'),
        tags=pulumi.get(__response__, 'tags'),
        trn=pulumi.get(__response__, 'trn'),
        update_date=pulumi.get(__response__, 'update_date'),
        user_id=pulumi.get(__response__, 'user_id'),
        user_name=pulumi.get(__response__, 'user_name')))
