# 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__ = [
    'GetAccountResult',
    'AwaitableGetAccountResult',
    'get_account',
    'get_account_output',
]

@pulumi.output_type
class GetAccountResult:
    """
    A collection of values returned by getAccount.
    """
    def __init__(__self__, account_id=None, account_name=None, allow_console=None, allow_exit=None, created_time=None, delete_uk=None, deleted_time=None, description=None, iam_role=None, id=None, is_owner=None, join_type=None, main_name=None, member_account_id=None, org_id=None, org_type=None, org_unit_id=None, org_unit_name=None, org_verification_id=None, owner=None, password=None, secure_contact_info=None, show_name=None, tags=None, updated_time=None, verification_relation_id=None):
        if account_id and not isinstance(account_id, str):
            raise TypeError("Expected argument 'account_id' to be a str")
        pulumi.set(__self__, "account_id", account_id)
        if account_name and not isinstance(account_name, str):
            raise TypeError("Expected argument 'account_name' to be a str")
        pulumi.set(__self__, "account_name", account_name)
        if allow_console and not isinstance(allow_console, int):
            raise TypeError("Expected argument 'allow_console' to be a int")
        pulumi.set(__self__, "allow_console", allow_console)
        if allow_exit and not isinstance(allow_exit, int):
            raise TypeError("Expected argument 'allow_exit' to be a int")
        pulumi.set(__self__, "allow_exit", allow_exit)
        if created_time and not isinstance(created_time, str):
            raise TypeError("Expected argument 'created_time' to be a str")
        pulumi.set(__self__, "created_time", created_time)
        if delete_uk and not isinstance(delete_uk, str):
            raise TypeError("Expected argument 'delete_uk' to be a str")
        pulumi.set(__self__, "delete_uk", delete_uk)
        if deleted_time and not isinstance(deleted_time, str):
            raise TypeError("Expected argument 'deleted_time' to be a str")
        pulumi.set(__self__, "deleted_time", deleted_time)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if iam_role and not isinstance(iam_role, str):
            raise TypeError("Expected argument 'iam_role' to be a str")
        pulumi.set(__self__, "iam_role", iam_role)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if is_owner and not isinstance(is_owner, int):
            raise TypeError("Expected argument 'is_owner' to be a int")
        pulumi.set(__self__, "is_owner", is_owner)
        if join_type and not isinstance(join_type, int):
            raise TypeError("Expected argument 'join_type' to be a int")
        pulumi.set(__self__, "join_type", join_type)
        if main_name and not isinstance(main_name, str):
            raise TypeError("Expected argument 'main_name' to be a str")
        pulumi.set(__self__, "main_name", main_name)
        if member_account_id and not isinstance(member_account_id, str):
            raise TypeError("Expected argument 'member_account_id' to be a str")
        pulumi.set(__self__, "member_account_id", member_account_id)
        if org_id and not isinstance(org_id, str):
            raise TypeError("Expected argument 'org_id' to be a str")
        pulumi.set(__self__, "org_id", org_id)
        if org_type and not isinstance(org_type, int):
            raise TypeError("Expected argument 'org_type' to be a int")
        pulumi.set(__self__, "org_type", org_type)
        if org_unit_id and not isinstance(org_unit_id, str):
            raise TypeError("Expected argument 'org_unit_id' to be a str")
        pulumi.set(__self__, "org_unit_id", org_unit_id)
        if org_unit_name and not isinstance(org_unit_name, str):
            raise TypeError("Expected argument 'org_unit_name' to be a str")
        pulumi.set(__self__, "org_unit_name", org_unit_name)
        if org_verification_id and not isinstance(org_verification_id, str):
            raise TypeError("Expected argument 'org_verification_id' to be a str")
        pulumi.set(__self__, "org_verification_id", org_verification_id)
        if owner and not isinstance(owner, str):
            raise TypeError("Expected argument 'owner' to be a str")
        pulumi.set(__self__, "owner", owner)
        if password and not isinstance(password, str):
            raise TypeError("Expected argument 'password' to be a str")
        pulumi.set(__self__, "password", password)
        if secure_contact_info and not isinstance(secure_contact_info, dict):
            raise TypeError("Expected argument 'secure_contact_info' to be a dict")
        pulumi.set(__self__, "secure_contact_info", secure_contact_info)
        if show_name and not isinstance(show_name, str):
            raise TypeError("Expected argument 'show_name' to be a str")
        pulumi.set(__self__, "show_name", show_name)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        if updated_time and not isinstance(updated_time, str):
            raise TypeError("Expected argument 'updated_time' to be a str")
        pulumi.set(__self__, "updated_time", updated_time)
        if verification_relation_id and not isinstance(verification_relation_id, str):
            raise TypeError("Expected argument 'verification_relation_id' to be a str")
        pulumi.set(__self__, "verification_relation_id", verification_relation_id)

    @property
    @pulumi.getter(name="accountId")
    def account_id(self) -> builtins.str:
        """
        火山账号ID。
        """
        return pulumi.get(self, "account_id")

    @property
    @pulumi.getter(name="accountName")
    def account_name(self) -> builtins.str:
        """
        账户名称。5-20个字符。
        """
        return pulumi.get(self, "account_name")

    @property
    @pulumi.getter(name="allowConsole")
    def allow_console(self) -> builtins.int:
        """
        允许控制台访问，1: 允许，2: 不允许。
        """
        return pulumi.get(self, "allow_console")

    @property
    @pulumi.getter(name="allowExit")
    def allow_exit(self) -> builtins.int:
        """
        允许退出，1: 允许，2: 不允许。
        """
        return pulumi.get(self, "allow_exit")

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

    @property
    @pulumi.getter(name="deleteUk")
    def delete_uk(self) -> builtins.str:
        """
        删除标记。
        """
        return pulumi.get(self, "delete_uk")

    @property
    @pulumi.getter(name="deletedTime")
    def deleted_time(self) -> builtins.str:
        """
        删除时间。
        """
        return pulumi.get(self, "deleted_time")

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

    @property
    @pulumi.getter(name="iamRole")
    def iam_role(self) -> builtins.str:
        """
        IAM角色名称。
        """
        return pulumi.get(self, "iam_role")

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

    @property
    @pulumi.getter(name="isOwner")
    def is_owner(self) -> builtins.int:
        """
        是否是管理员，0.非管理员，1.管理员。
        """
        return pulumi.get(self, "is_owner")

    @property
    @pulumi.getter(name="joinType")
    def join_type(self) -> builtins.int:
        """
        加入类型，1: 创建，2: 邀请。
        """
        return pulumi.get(self, "join_type")

    @property
    @pulumi.getter(name="mainName")
    def main_name(self) -> builtins.str:
        """
        主体名称。
        """
        return pulumi.get(self, "main_name")

    @property
    @pulumi.getter(name="memberAccountId")
    def member_account_id(self) -> builtins.str:
        """
        组织成员账号ID。
        """
        return pulumi.get(self, "member_account_id")

    @property
    @pulumi.getter(name="orgId")
    def org_id(self) -> builtins.str:
        """
        组织ID。
        """
        return pulumi.get(self, "org_id")

    @property
    @pulumi.getter(name="orgType")
    def org_type(self) -> builtins.int:
        """
        组织类型，1.企业组织。
        """
        return pulumi.get(self, "org_type")

    @property
    @pulumi.getter(name="orgUnitId")
    def org_unit_id(self) -> builtins.str:
        """
        组织单元ID。传入 0 加入到 root 单元。
        """
        return pulumi.get(self, "org_unit_id")

    @property
    @pulumi.getter(name="orgUnitName")
    def org_unit_name(self) -> builtins.str:
        """
        组织单元名称。
        """
        return pulumi.get(self, "org_unit_name")

    @property
    @pulumi.getter(name="orgVerificationId")
    def org_verification_id(self) -> builtins.str:
        """
        认证主体ID。
        """
        return pulumi.get(self, "org_verification_id")

    @property
    @pulumi.getter
    def owner(self) -> builtins.str:
        """
        管理员ID。
        """
        return pulumi.get(self, "owner")

    @property
    @pulumi.getter
    def password(self) -> builtins.str:
        """
        账户密码。
        """
        return pulumi.get(self, "password")

    @property
    @pulumi.getter(name="secureContactInfo")
    def secure_contact_info(self) -> 'outputs.GetAccountSecureContactInfoResult':
        """
        安全联系信息。
        """
        return pulumi.get(self, "secure_contact_info")

    @property
    @pulumi.getter(name="showName")
    def show_name(self) -> builtins.str:
        """
        显示名称。
        """
        return pulumi.get(self, "show_name")

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetAccountTagResult']:
        """
        标签列表。
        """
        return pulumi.get(self, "tags")

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

    @property
    @pulumi.getter(name="verificationRelationId")
    def verification_relation_id(self) -> builtins.str:
        """
        被继承认证主体的账号ID，给非管理员认证主体创建账号时需要，账号需已加入企业组织。默认不传，则继承企业组织管理员的认证主体。
        """
        return pulumi.get(self, "verification_relation_id")


class AwaitableGetAccountResult(GetAccountResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetAccountResult(
            account_id=self.account_id,
            account_name=self.account_name,
            allow_console=self.allow_console,
            allow_exit=self.allow_exit,
            created_time=self.created_time,
            delete_uk=self.delete_uk,
            deleted_time=self.deleted_time,
            description=self.description,
            iam_role=self.iam_role,
            id=self.id,
            is_owner=self.is_owner,
            join_type=self.join_type,
            main_name=self.main_name,
            member_account_id=self.member_account_id,
            org_id=self.org_id,
            org_type=self.org_type,
            org_unit_id=self.org_unit_id,
            org_unit_name=self.org_unit_name,
            org_verification_id=self.org_verification_id,
            owner=self.owner,
            password=self.password,
            secure_contact_info=self.secure_contact_info,
            show_name=self.show_name,
            tags=self.tags,
            updated_time=self.updated_time,
            verification_relation_id=self.verification_relation_id)


def get_account(id: Optional[builtins.str] = None,
                opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAccountResult:
    """
    Data Source schema for Byteplus::Organization::Account


    :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:organization/getAccount:getAccount', __args__, opts=opts, typ=GetAccountResult).value

    return AwaitableGetAccountResult(
        account_id=pulumi.get(__ret__, 'account_id'),
        account_name=pulumi.get(__ret__, 'account_name'),
        allow_console=pulumi.get(__ret__, 'allow_console'),
        allow_exit=pulumi.get(__ret__, 'allow_exit'),
        created_time=pulumi.get(__ret__, 'created_time'),
        delete_uk=pulumi.get(__ret__, 'delete_uk'),
        deleted_time=pulumi.get(__ret__, 'deleted_time'),
        description=pulumi.get(__ret__, 'description'),
        iam_role=pulumi.get(__ret__, 'iam_role'),
        id=pulumi.get(__ret__, 'id'),
        is_owner=pulumi.get(__ret__, 'is_owner'),
        join_type=pulumi.get(__ret__, 'join_type'),
        main_name=pulumi.get(__ret__, 'main_name'),
        member_account_id=pulumi.get(__ret__, 'member_account_id'),
        org_id=pulumi.get(__ret__, 'org_id'),
        org_type=pulumi.get(__ret__, 'org_type'),
        org_unit_id=pulumi.get(__ret__, 'org_unit_id'),
        org_unit_name=pulumi.get(__ret__, 'org_unit_name'),
        org_verification_id=pulumi.get(__ret__, 'org_verification_id'),
        owner=pulumi.get(__ret__, 'owner'),
        password=pulumi.get(__ret__, 'password'),
        secure_contact_info=pulumi.get(__ret__, 'secure_contact_info'),
        show_name=pulumi.get(__ret__, 'show_name'),
        tags=pulumi.get(__ret__, 'tags'),
        updated_time=pulumi.get(__ret__, 'updated_time'),
        verification_relation_id=pulumi.get(__ret__, 'verification_relation_id'))
def get_account_output(id: Optional[pulumi.Input[builtins.str]] = None,
                       opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAccountResult]:
    """
    Data Source schema for Byteplus::Organization::Account


    :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:organization/getAccount:getAccount', __args__, opts=opts, typ=GetAccountResult)
    return __ret__.apply(lambda __response__: GetAccountResult(
        account_id=pulumi.get(__response__, 'account_id'),
        account_name=pulumi.get(__response__, 'account_name'),
        allow_console=pulumi.get(__response__, 'allow_console'),
        allow_exit=pulumi.get(__response__, 'allow_exit'),
        created_time=pulumi.get(__response__, 'created_time'),
        delete_uk=pulumi.get(__response__, 'delete_uk'),
        deleted_time=pulumi.get(__response__, 'deleted_time'),
        description=pulumi.get(__response__, 'description'),
        iam_role=pulumi.get(__response__, 'iam_role'),
        id=pulumi.get(__response__, 'id'),
        is_owner=pulumi.get(__response__, 'is_owner'),
        join_type=pulumi.get(__response__, 'join_type'),
        main_name=pulumi.get(__response__, 'main_name'),
        member_account_id=pulumi.get(__response__, 'member_account_id'),
        org_id=pulumi.get(__response__, 'org_id'),
        org_type=pulumi.get(__response__, 'org_type'),
        org_unit_id=pulumi.get(__response__, 'org_unit_id'),
        org_unit_name=pulumi.get(__response__, 'org_unit_name'),
        org_verification_id=pulumi.get(__response__, 'org_verification_id'),
        owner=pulumi.get(__response__, 'owner'),
        password=pulumi.get(__response__, 'password'),
        secure_contact_info=pulumi.get(__response__, 'secure_contact_info'),
        show_name=pulumi.get(__response__, 'show_name'),
        tags=pulumi.get(__response__, 'tags'),
        updated_time=pulumi.get(__response__, 'updated_time'),
        verification_relation_id=pulumi.get(__response__, 'verification_relation_id')))
