# 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__ = ['UserArgs', 'User']

@pulumi.input_type
class UserArgs:
    def __init__(__self__, *,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 display_name: Optional[pulumi.Input[builtins.str]] = None,
                 email: Optional[pulumi.Input[builtins.str]] = None,
                 password: Optional[pulumi.Input[builtins.str]] = None,
                 password_reset_required: Optional[pulumi.Input[builtins.bool]] = None,
                 phone: Optional[pulumi.Input[builtins.str]] = None,
                 user_name: Optional[pulumi.Input[builtins.str]] = None):
        """
        The set of arguments for constructing a User resource.
        :param pulumi.Input[builtins.str] description: 用户描述。
        :param pulumi.Input[builtins.str] display_name: 用户显示名。
        :param pulumi.Input[builtins.str] email: 邮箱。
        :param pulumi.Input[builtins.str] password: 密码。密码长度8-32位字符,包含大写字母、小写字母、数字和物特殊符号至少3种。
        :param pulumi.Input[builtins.bool] password_reset_required: 首次登陆需不需要重置密码。
        :param pulumi.Input[builtins.str] phone: 手机号。
        :param pulumi.Input[builtins.str] user_name: 用户名。
        """
        if description is not None:
            pulumi.set(__self__, "description", description)
        if display_name is not None:
            pulumi.set(__self__, "display_name", display_name)
        if email is not None:
            pulumi.set(__self__, "email", email)
        if password is not None:
            pulumi.set(__self__, "password", password)
        if password_reset_required is not None:
            pulumi.set(__self__, "password_reset_required", password_reset_required)
        if phone is not None:
            pulumi.set(__self__, "phone", phone)
        if user_name is not None:
            pulumi.set(__self__, "user_name", user_name)

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

    @description.setter
    def description(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter(name="displayName")
    def display_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        用户显示名。
        """
        return pulumi.get(self, "display_name")

    @display_name.setter
    def display_name(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "display_name", value)

    @property
    @pulumi.getter
    def email(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        邮箱。
        """
        return pulumi.get(self, "email")

    @email.setter
    def email(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "email", value)

    @property
    @pulumi.getter
    def password(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        密码。密码长度8-32位字符,包含大写字母、小写字母、数字和物特殊符号至少3种。
        """
        return pulumi.get(self, "password")

    @password.setter
    def password(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "password", value)

    @property
    @pulumi.getter(name="passwordResetRequired")
    def password_reset_required(self) -> Optional[pulumi.Input[builtins.bool]]:
        """
        首次登陆需不需要重置密码。
        """
        return pulumi.get(self, "password_reset_required")

    @password_reset_required.setter
    def password_reset_required(self, value: Optional[pulumi.Input[builtins.bool]]):
        pulumi.set(self, "password_reset_required", value)

    @property
    @pulumi.getter
    def phone(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        手机号。
        """
        return pulumi.get(self, "phone")

    @phone.setter
    def phone(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "phone", value)

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

    @user_name.setter
    def user_name(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "user_name", value)


@pulumi.input_type
class _UserState:
    def __init__(__self__, *,
                 created_time: Optional[pulumi.Input[builtins.str]] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 display_name: Optional[pulumi.Input[builtins.str]] = None,
                 email: Optional[pulumi.Input[builtins.str]] = None,
                 identity_type: Optional[pulumi.Input[builtins.str]] = None,
                 password: Optional[pulumi.Input[builtins.str]] = None,
                 password_reset_required: Optional[pulumi.Input[builtins.bool]] = None,
                 phone: Optional[pulumi.Input[builtins.str]] = None,
                 source: Optional[pulumi.Input[builtins.str]] = None,
                 updated_time: Optional[pulumi.Input[builtins.str]] = None,
                 user_id: Optional[pulumi.Input[builtins.str]] = None,
                 user_name: Optional[pulumi.Input[builtins.str]] = None):
        """
        Input properties used for looking up and filtering User resources.
        :param pulumi.Input[builtins.str] created_time: 创建时间。
        :param pulumi.Input[builtins.str] description: 用户描述。
        :param pulumi.Input[builtins.str] display_name: 用户显示名。
        :param pulumi.Input[builtins.str] email: 邮箱。
        :param pulumi.Input[builtins.str] identity_type: 身份类型。
        :param pulumi.Input[builtins.str] password: 密码。密码长度8-32位字符,包含大写字母、小写字母、数字和物特殊符号至少3种。
        :param pulumi.Input[builtins.bool] password_reset_required: 首次登陆需不需要重置密码。
        :param pulumi.Input[builtins.str] phone: 手机号。
        :param pulumi.Input[builtins.str] source: 用户来源。
        :param pulumi.Input[builtins.str] updated_time: 更新时间。
        :param pulumi.Input[builtins.str] user_id: 用户id。
        :param pulumi.Input[builtins.str] user_name: 用户名。
        """
        if created_time is not None:
            pulumi.set(__self__, "created_time", created_time)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if display_name is not None:
            pulumi.set(__self__, "display_name", display_name)
        if email is not None:
            pulumi.set(__self__, "email", email)
        if identity_type is not None:
            pulumi.set(__self__, "identity_type", identity_type)
        if password is not None:
            pulumi.set(__self__, "password", password)
        if password_reset_required is not None:
            pulumi.set(__self__, "password_reset_required", password_reset_required)
        if phone is not None:
            pulumi.set(__self__, "phone", phone)
        if source is not None:
            pulumi.set(__self__, "source", source)
        if updated_time is not None:
            pulumi.set(__self__, "updated_time", updated_time)
        if user_id is not None:
            pulumi.set(__self__, "user_id", user_id)
        if user_name is not None:
            pulumi.set(__self__, "user_name", user_name)

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

    @created_time.setter
    def created_time(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "created_time", value)

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

    @description.setter
    def description(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter(name="displayName")
    def display_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        用户显示名。
        """
        return pulumi.get(self, "display_name")

    @display_name.setter
    def display_name(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "display_name", value)

    @property
    @pulumi.getter
    def email(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        邮箱。
        """
        return pulumi.get(self, "email")

    @email.setter
    def email(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "email", value)

    @property
    @pulumi.getter(name="identityType")
    def identity_type(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        身份类型。
        """
        return pulumi.get(self, "identity_type")

    @identity_type.setter
    def identity_type(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "identity_type", value)

    @property
    @pulumi.getter
    def password(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        密码。密码长度8-32位字符,包含大写字母、小写字母、数字和物特殊符号至少3种。
        """
        return pulumi.get(self, "password")

    @password.setter
    def password(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "password", value)

    @property
    @pulumi.getter(name="passwordResetRequired")
    def password_reset_required(self) -> Optional[pulumi.Input[builtins.bool]]:
        """
        首次登陆需不需要重置密码。
        """
        return pulumi.get(self, "password_reset_required")

    @password_reset_required.setter
    def password_reset_required(self, value: Optional[pulumi.Input[builtins.bool]]):
        pulumi.set(self, "password_reset_required", value)

    @property
    @pulumi.getter
    def phone(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        手机号。
        """
        return pulumi.get(self, "phone")

    @phone.setter
    def phone(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "phone", value)

    @property
    @pulumi.getter
    def source(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        用户来源。
        """
        return pulumi.get(self, "source")

    @source.setter
    def source(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "source", value)

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

    @updated_time.setter
    def updated_time(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "updated_time", value)

    @property
    @pulumi.getter(name="userId")
    def user_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        用户id。
        """
        return pulumi.get(self, "user_id")

    @user_id.setter
    def user_id(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "user_id", value)

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

    @user_name.setter
    def user_name(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "user_name", value)


@pulumi.type_token("bytepluscc:cloudidentity/user:User")
class User(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 display_name: Optional[pulumi.Input[builtins.str]] = None,
                 email: Optional[pulumi.Input[builtins.str]] = None,
                 password: Optional[pulumi.Input[builtins.str]] = None,
                 password_reset_required: Optional[pulumi.Input[builtins.bool]] = None,
                 phone: Optional[pulumi.Input[builtins.str]] = None,
                 user_name: Optional[pulumi.Input[builtins.str]] = None,
                 __props__=None):
        """
        云身份中心用户，与企业员工身份一一映射。云身份中心用户是一种身份类型，可与某个账号下的IAM用户身份进行唯一关联并单点登录。云身份中心提供企业员工身份全生命周期管理、权限管理能力，推荐您在本产品内统一管理员工身份。

        ## Example Usage

        ```python
        import pulumi
        import pulumi_bytepluscc as bytepluscc

        cloud_identity_user_demo = bytepluscc.cloudidentity.User("CloudIdentityUserDemo",
            user_name="CloudIdentityUserDemo",
            display_name="CloudIdentityUserDemo",
            description="CloudIdentityUserDemo description",
            email="xxx@163.com",
            phone="***********",
            password="********",
            password_reset_required=True)
        ```

        ## Import

        ```sh
        $ pulumi import bytepluscc:cloudidentity/user:User example "user_id"
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.str] description: 用户描述。
        :param pulumi.Input[builtins.str] display_name: 用户显示名。
        :param pulumi.Input[builtins.str] email: 邮箱。
        :param pulumi.Input[builtins.str] password: 密码。密码长度8-32位字符,包含大写字母、小写字母、数字和物特殊符号至少3种。
        :param pulumi.Input[builtins.bool] password_reset_required: 首次登陆需不需要重置密码。
        :param pulumi.Input[builtins.str] phone: 手机号。
        :param pulumi.Input[builtins.str] user_name: 用户名。
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: Optional[UserArgs] = None,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        云身份中心用户，与企业员工身份一一映射。云身份中心用户是一种身份类型，可与某个账号下的IAM用户身份进行唯一关联并单点登录。云身份中心提供企业员工身份全生命周期管理、权限管理能力，推荐您在本产品内统一管理员工身份。

        ## Example Usage

        ```python
        import pulumi
        import pulumi_bytepluscc as bytepluscc

        cloud_identity_user_demo = bytepluscc.cloudidentity.User("CloudIdentityUserDemo",
            user_name="CloudIdentityUserDemo",
            display_name="CloudIdentityUserDemo",
            description="CloudIdentityUserDemo description",
            email="xxx@163.com",
            phone="***********",
            password="********",
            password_reset_required=True)
        ```

        ## Import

        ```sh
        $ pulumi import bytepluscc:cloudidentity/user:User example "user_id"
        ```

        :param str resource_name: The name of the resource.
        :param UserArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(UserArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 display_name: Optional[pulumi.Input[builtins.str]] = None,
                 email: Optional[pulumi.Input[builtins.str]] = None,
                 password: Optional[pulumi.Input[builtins.str]] = None,
                 password_reset_required: Optional[pulumi.Input[builtins.bool]] = None,
                 phone: Optional[pulumi.Input[builtins.str]] = None,
                 user_name: Optional[pulumi.Input[builtins.str]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = UserArgs.__new__(UserArgs)

            __props__.__dict__["description"] = description
            __props__.__dict__["display_name"] = display_name
            __props__.__dict__["email"] = email
            __props__.__dict__["password"] = password
            __props__.__dict__["password_reset_required"] = password_reset_required
            __props__.__dict__["phone"] = phone
            __props__.__dict__["user_name"] = user_name
            __props__.__dict__["created_time"] = None
            __props__.__dict__["identity_type"] = None
            __props__.__dict__["source"] = None
            __props__.__dict__["updated_time"] = None
            __props__.__dict__["user_id"] = None
        super(User, __self__).__init__(
            'bytepluscc:cloudidentity/user:User',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            created_time: Optional[pulumi.Input[builtins.str]] = None,
            description: Optional[pulumi.Input[builtins.str]] = None,
            display_name: Optional[pulumi.Input[builtins.str]] = None,
            email: Optional[pulumi.Input[builtins.str]] = None,
            identity_type: Optional[pulumi.Input[builtins.str]] = None,
            password: Optional[pulumi.Input[builtins.str]] = None,
            password_reset_required: Optional[pulumi.Input[builtins.bool]] = None,
            phone: Optional[pulumi.Input[builtins.str]] = None,
            source: Optional[pulumi.Input[builtins.str]] = None,
            updated_time: Optional[pulumi.Input[builtins.str]] = None,
            user_id: Optional[pulumi.Input[builtins.str]] = None,
            user_name: Optional[pulumi.Input[builtins.str]] = None) -> 'User':
        """
        Get an existing User resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.str] created_time: 创建时间。
        :param pulumi.Input[builtins.str] description: 用户描述。
        :param pulumi.Input[builtins.str] display_name: 用户显示名。
        :param pulumi.Input[builtins.str] email: 邮箱。
        :param pulumi.Input[builtins.str] identity_type: 身份类型。
        :param pulumi.Input[builtins.str] password: 密码。密码长度8-32位字符,包含大写字母、小写字母、数字和物特殊符号至少3种。
        :param pulumi.Input[builtins.bool] password_reset_required: 首次登陆需不需要重置密码。
        :param pulumi.Input[builtins.str] phone: 手机号。
        :param pulumi.Input[builtins.str] source: 用户来源。
        :param pulumi.Input[builtins.str] updated_time: 更新时间。
        :param pulumi.Input[builtins.str] user_id: 用户id。
        :param pulumi.Input[builtins.str] user_name: 用户名。
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _UserState.__new__(_UserState)

        __props__.__dict__["created_time"] = created_time
        __props__.__dict__["description"] = description
        __props__.__dict__["display_name"] = display_name
        __props__.__dict__["email"] = email
        __props__.__dict__["identity_type"] = identity_type
        __props__.__dict__["password"] = password
        __props__.__dict__["password_reset_required"] = password_reset_required
        __props__.__dict__["phone"] = phone
        __props__.__dict__["source"] = source
        __props__.__dict__["updated_time"] = updated_time
        __props__.__dict__["user_id"] = user_id
        __props__.__dict__["user_name"] = user_name
        return User(resource_name, opts=opts, __props__=__props__)

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

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

    @property
    @pulumi.getter(name="displayName")
    def display_name(self) -> pulumi.Output[builtins.str]:
        """
        用户显示名。
        """
        return pulumi.get(self, "display_name")

    @property
    @pulumi.getter
    def email(self) -> pulumi.Output[builtins.str]:
        """
        邮箱。
        """
        return pulumi.get(self, "email")

    @property
    @pulumi.getter(name="identityType")
    def identity_type(self) -> pulumi.Output[builtins.str]:
        """
        身份类型。
        """
        return pulumi.get(self, "identity_type")

    @property
    @pulumi.getter
    def password(self) -> pulumi.Output[builtins.str]:
        """
        密码。密码长度8-32位字符,包含大写字母、小写字母、数字和物特殊符号至少3种。
        """
        return pulumi.get(self, "password")

    @property
    @pulumi.getter(name="passwordResetRequired")
    def password_reset_required(self) -> pulumi.Output[builtins.bool]:
        """
        首次登陆需不需要重置密码。
        """
        return pulumi.get(self, "password_reset_required")

    @property
    @pulumi.getter
    def phone(self) -> pulumi.Output[builtins.str]:
        """
        手机号。
        """
        return pulumi.get(self, "phone")

    @property
    @pulumi.getter
    def source(self) -> pulumi.Output[builtins.str]:
        """
        用户来源。
        """
        return pulumi.get(self, "source")

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

    @property
    @pulumi.getter(name="userId")
    def user_id(self) -> pulumi.Output[builtins.str]:
        """
        用户id。
        """
        return pulumi.get(self, "user_id")

    @property
    @pulumi.getter(name="userName")
    def user_name(self) -> pulumi.Output[builtins.str]:
        """
        用户名。
        """
        return pulumi.get(self, "user_name")

