# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** 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__ = [
    'GetIdentityUserResult',
    'AwaitableGetIdentityUserResult',
    'get_identity_user',
    'get_identity_user_output',
]

@pulumi.output_type
class GetIdentityUserResult:
    """
    A collection of values returned by getIdentityUser.
    """
    def __init__(__self__, user_urn=None, creation=None, description=None, email=None, group=None, id=None, last_update=None, login=None, password_last_update=None, status=None, user=None):
        if user_urn and not isinstance(user_urn, str):
            raise TypeError("Expected argument 'user_urn' to be a str")
        pulumi.set(__self__, "user_urn", user_urn)
        if creation and not isinstance(creation, str):
            raise TypeError("Expected argument 'creation' to be a str")
        pulumi.set(__self__, "creation", creation)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if email and not isinstance(email, str):
            raise TypeError("Expected argument 'email' to be a str")
        pulumi.set(__self__, "email", email)
        if group and not isinstance(group, str):
            raise TypeError("Expected argument 'group' to be a str")
        pulumi.set(__self__, "group", group)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if last_update and not isinstance(last_update, str):
            raise TypeError("Expected argument 'last_update' to be a str")
        pulumi.set(__self__, "last_update", last_update)
        if login and not isinstance(login, str):
            raise TypeError("Expected argument 'login' to be a str")
        pulumi.set(__self__, "login", login)
        if password_last_update and not isinstance(password_last_update, str):
            raise TypeError("Expected argument 'password_last_update' to be a str")
        pulumi.set(__self__, "password_last_update", password_last_update)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if user and not isinstance(user, str):
            raise TypeError("Expected argument 'user' to be a str")
        pulumi.set(__self__, "user", user)

    @property
    @pulumi.getter(name="UserURN")
    def user_urn(self) -> builtins.str:
        """
        User's identity URN.
        """
        return pulumi.get(self, "user_urn")

    @property
    @pulumi.getter
    def creation(self) -> builtins.str:
        """
        Creation date of this user.
        """
        return pulumi.get(self, "creation")

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

    @property
    @pulumi.getter
    def email(self) -> builtins.str:
        """
        User's email.
        """
        return pulumi.get(self, "email")

    @property
    @pulumi.getter
    def group(self) -> builtins.str:
        """
        User's group.
        """
        return pulumi.get(self, "group")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="lastUpdate")
    def last_update(self) -> builtins.str:
        """
        Last update of this user.
        """
        return pulumi.get(self, "last_update")

    @property
    @pulumi.getter
    def login(self) -> builtins.str:
        """
        User's login suffix.
        """
        return pulumi.get(self, "login")

    @property
    @pulumi.getter(name="passwordLastUpdate")
    def password_last_update(self) -> builtins.str:
        """
        When the user changed his password for the last time.
        """
        return pulumi.get(self, "password_last_update")

    @property
    @pulumi.getter
    def status(self) -> builtins.str:
        """
        Current user's status.
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter
    def user(self) -> builtins.str:
        return pulumi.get(self, "user")


class AwaitableGetIdentityUserResult(GetIdentityUserResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetIdentityUserResult(
            user_urn=self.user_urn,
            creation=self.creation,
            description=self.description,
            email=self.email,
            group=self.group,
            id=self.id,
            last_update=self.last_update,
            login=self.login,
            password_last_update=self.password_last_update,
            status=self.status,
            user=self.user)


def get_identity_user(user: Optional[builtins.str] = None,
                      opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetIdentityUserResult:
    """
    Use this data source to retrieve information about an identity user.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_ovh as ovh

    my_user = ovh.Me.get_identity_user(user="my_user_login")
    ```


    :param builtins.str user: User's login.
    """
    __args__ = dict()
    __args__['user'] = user
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('ovh:Me/getIdentityUser:getIdentityUser', __args__, opts=opts, typ=GetIdentityUserResult).value

    return AwaitableGetIdentityUserResult(
        user_urn=pulumi.get(__ret__, 'user_urn'),
        creation=pulumi.get(__ret__, 'creation'),
        description=pulumi.get(__ret__, 'description'),
        email=pulumi.get(__ret__, 'email'),
        group=pulumi.get(__ret__, 'group'),
        id=pulumi.get(__ret__, 'id'),
        last_update=pulumi.get(__ret__, 'last_update'),
        login=pulumi.get(__ret__, 'login'),
        password_last_update=pulumi.get(__ret__, 'password_last_update'),
        status=pulumi.get(__ret__, 'status'),
        user=pulumi.get(__ret__, 'user'))
def get_identity_user_output(user: Optional[pulumi.Input[builtins.str]] = None,
                             opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetIdentityUserResult]:
    """
    Use this data source to retrieve information about an identity user.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_ovh as ovh

    my_user = ovh.Me.get_identity_user(user="my_user_login")
    ```


    :param builtins.str user: User's login.
    """
    __args__ = dict()
    __args__['user'] = user
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('ovh:Me/getIdentityUser:getIdentityUser', __args__, opts=opts, typ=GetIdentityUserResult)
    return __ret__.apply(lambda __response__: GetIdentityUserResult(
        user_urn=pulumi.get(__response__, 'user_urn'),
        creation=pulumi.get(__response__, 'creation'),
        description=pulumi.get(__response__, 'description'),
        email=pulumi.get(__response__, 'email'),
        group=pulumi.get(__response__, 'group'),
        id=pulumi.get(__response__, 'id'),
        last_update=pulumi.get(__response__, 'last_update'),
        login=pulumi.get(__response__, 'login'),
        password_last_update=pulumi.get(__response__, 'password_last_update'),
        status=pulumi.get(__response__, 'status'),
        user=pulumi.get(__response__, 'user')))
