# 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 pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._inputs import *

__all__ = [
    'GetManagedDatabaseUserProxiedForUsersResult',
    'AwaitableGetManagedDatabaseUserProxiedForUsersResult',
    'get_managed_database_user_proxied_for_users',
    'get_managed_database_user_proxied_for_users_output',
]

@pulumi.output_type
class GetManagedDatabaseUserProxiedForUsersResult:
    """
    A collection of values returned by getManagedDatabaseUserProxiedForUsers.
    """
    def __init__(__self__, filters=None, id=None, managed_database_id=None, name=None, proxied_for_user_collections=None, user_name=None):
        if filters and not isinstance(filters, list):
            raise TypeError("Expected argument 'filters' to be a list")
        pulumi.set(__self__, "filters", filters)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if managed_database_id and not isinstance(managed_database_id, str):
            raise TypeError("Expected argument 'managed_database_id' to be a str")
        pulumi.set(__self__, "managed_database_id", managed_database_id)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if proxied_for_user_collections and not isinstance(proxied_for_user_collections, list):
            raise TypeError("Expected argument 'proxied_for_user_collections' to be a list")
        pulumi.set(__self__, "proxied_for_user_collections", proxied_for_user_collections)
        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
    def filters(self) -> Optional[Sequence['outputs.GetManagedDatabaseUserProxiedForUsersFilterResult']]:
        return pulumi.get(self, "filters")

    @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="managedDatabaseId")
    def managed_database_id(self) -> str:
        return pulumi.get(self, "managed_database_id")

    @property
    @pulumi.getter
    def name(self) -> Optional[str]:
        """
        The name of a proxy user or the name of the client user.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="proxiedForUserCollections")
    def proxied_for_user_collections(self) -> Sequence['outputs.GetManagedDatabaseUserProxiedForUsersProxiedForUserCollectionResult']:
        """
        The list of proxied_for_user_collection.
        """
        return pulumi.get(self, "proxied_for_user_collections")

    @property
    @pulumi.getter(name="userName")
    def user_name(self) -> str:
        return pulumi.get(self, "user_name")


class AwaitableGetManagedDatabaseUserProxiedForUsersResult(GetManagedDatabaseUserProxiedForUsersResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetManagedDatabaseUserProxiedForUsersResult(
            filters=self.filters,
            id=self.id,
            managed_database_id=self.managed_database_id,
            name=self.name,
            proxied_for_user_collections=self.proxied_for_user_collections,
            user_name=self.user_name)


def get_managed_database_user_proxied_for_users(filters: Optional[Sequence[pulumi.InputType['GetManagedDatabaseUserProxiedForUsersFilterArgs']]] = None,
                                                managed_database_id: Optional[str] = None,
                                                name: Optional[str] = None,
                                                user_name: Optional[str] = None,
                                                opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetManagedDatabaseUserProxiedForUsersResult:
    """
    This data source provides the list of Managed Database User Proxied For Users in Oracle Cloud Infrastructure Database Management service.

    Gets the list of users on whose behalf the current user acts as proxy.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_managed_database_user_proxied_for_users = oci.DatabaseManagement.get_managed_database_user_proxied_for_users(managed_database_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        user_name=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        name=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str managed_database_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Managed Database.
    :param str name: A filter to return only resources that match the entire name.
    :param str user_name: The name of the user whose details are to be viewed.
    """
    __args__ = dict()
    __args__['filters'] = filters
    __args__['managedDatabaseId'] = managed_database_id
    __args__['name'] = name
    __args__['userName'] = user_name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('oci:DatabaseManagement/getManagedDatabaseUserProxiedForUsers:getManagedDatabaseUserProxiedForUsers', __args__, opts=opts, typ=GetManagedDatabaseUserProxiedForUsersResult).value

    return AwaitableGetManagedDatabaseUserProxiedForUsersResult(
        filters=__ret__.filters,
        id=__ret__.id,
        managed_database_id=__ret__.managed_database_id,
        name=__ret__.name,
        proxied_for_user_collections=__ret__.proxied_for_user_collections,
        user_name=__ret__.user_name)


@_utilities.lift_output_func(get_managed_database_user_proxied_for_users)
def get_managed_database_user_proxied_for_users_output(filters: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetManagedDatabaseUserProxiedForUsersFilterArgs']]]]] = None,
                                                       managed_database_id: Optional[pulumi.Input[str]] = None,
                                                       name: Optional[pulumi.Input[Optional[str]]] = None,
                                                       user_name: Optional[pulumi.Input[str]] = None,
                                                       opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetManagedDatabaseUserProxiedForUsersResult]:
    """
    This data source provides the list of Managed Database User Proxied For Users in Oracle Cloud Infrastructure Database Management service.

    Gets the list of users on whose behalf the current user acts as proxy.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_managed_database_user_proxied_for_users = oci.DatabaseManagement.get_managed_database_user_proxied_for_users(managed_database_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        user_name=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        name=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str managed_database_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Managed Database.
    :param str name: A filter to return only resources that match the entire name.
    :param str user_name: The name of the user whose details are to be viewed.
    """
    ...
