# 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 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__ = [
    'GetOrganizationUserResult',
    'AwaitableGetOrganizationUserResult',
    'get_organization_user',
    'get_organization_user_output',
]

@pulumi.output_type
class GetOrganizationUserResult:
    """
    A collection of values returned by getOrganizationUser.
    """
    def __init__(__self__, create_time=None, id=None, organization_id=None, user_email=None, user_id=None):
        if create_time and not isinstance(create_time, str):
            raise TypeError("Expected argument 'create_time' to be a str")
        pulumi.set(__self__, "create_time", create_time)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if organization_id and not isinstance(organization_id, str):
            raise TypeError("Expected argument 'organization_id' to be a str")
        pulumi.set(__self__, "organization_id", organization_id)
        if user_email and not isinstance(user_email, str):
            raise TypeError("Expected argument 'user_email' to be a str")
        pulumi.set(__self__, "user_email", user_email)
        if user_id and not isinstance(user_id, str):
            raise TypeError("Expected argument 'user_id' to be a str")
        pulumi.set(__self__, "user_id", user_id)

    @property
    @pulumi.getter(name="createTime")
    def create_time(self) -> str:
        """
        Time of creation
        """
        return pulumi.get(self, "create_time")

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

    @property
    @pulumi.getter(name="organizationId")
    def organization_id(self) -> str:
        """
        The unique organization ID.
        """
        return pulumi.get(self, "organization_id")

    @property
    @pulumi.getter(name="userEmail")
    def user_email(self) -> Optional[str]:
        """
        This is a user email address
        """
        return pulumi.get(self, "user_email")

    @property
    @pulumi.getter(name="userId")
    def user_id(self) -> Optional[str]:
        """
        The unique organization user ID
        """
        return pulumi.get(self, "user_id")


class AwaitableGetOrganizationUserResult(GetOrganizationUserResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetOrganizationUserResult(
            create_time=self.create_time,
            id=self.id,
            organization_id=self.organization_id,
            user_email=self.user_email,
            user_id=self.user_id)


def get_organization_user(organization_id: Optional[str] = None,
                          user_email: Optional[str] = None,
                          user_id: Optional[str] = None,
                          opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetOrganizationUserResult:
    """
    Use this data source to access information about an existing resource.

    :param str organization_id: The unique organization ID.
    :param str user_email: This is a user email address
    :param str user_id: The unique organization user ID
    """
    __args__ = dict()
    __args__['organizationId'] = organization_id
    __args__['userEmail'] = user_email
    __args__['userId'] = user_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('aiven:index/getOrganizationUser:getOrganizationUser', __args__, opts=opts, typ=GetOrganizationUserResult).value

    return AwaitableGetOrganizationUserResult(
        create_time=pulumi.get(__ret__, 'create_time'),
        id=pulumi.get(__ret__, 'id'),
        organization_id=pulumi.get(__ret__, 'organization_id'),
        user_email=pulumi.get(__ret__, 'user_email'),
        user_id=pulumi.get(__ret__, 'user_id'))
def get_organization_user_output(organization_id: Optional[pulumi.Input[str]] = None,
                                 user_email: Optional[pulumi.Input[Optional[str]]] = None,
                                 user_id: Optional[pulumi.Input[Optional[str]]] = None,
                                 opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetOrganizationUserResult]:
    """
    Use this data source to access information about an existing resource.

    :param str organization_id: The unique organization ID.
    :param str user_email: This is a user email address
    :param str user_id: The unique organization user ID
    """
    __args__ = dict()
    __args__['organizationId'] = organization_id
    __args__['userEmail'] = user_email
    __args__['userId'] = user_id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('aiven:index/getOrganizationUser:getOrganizationUser', __args__, opts=opts, typ=GetOrganizationUserResult)
    return __ret__.apply(lambda __response__: GetOrganizationUserResult(
        create_time=pulumi.get(__response__, 'create_time'),
        id=pulumi.get(__response__, 'id'),
        organization_id=pulumi.get(__response__, 'organization_id'),
        user_email=pulumi.get(__response__, 'user_email'),
        user_id=pulumi.get(__response__, 'user_id')))
