# 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

__all__ = [
    'GetManagedDatabasesUserSystemPrivilegeResult',
    'AwaitableGetManagedDatabasesUserSystemPrivilegeResult',
    'get_managed_databases_user_system_privilege',
    'get_managed_databases_user_system_privilege_output',
]

@pulumi.output_type
class GetManagedDatabasesUserSystemPrivilegeResult:
    """
    A collection of values returned by getManagedDatabasesUserSystemPrivilege.
    """
    def __init__(__self__, id=None, items=None, managed_database_id=None, name=None, user_name=None):
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if items and not isinstance(items, list):
            raise TypeError("Expected argument 'items' to be a list")
        pulumi.set(__self__, "items", items)
        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 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 id(self) -> str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def items(self) -> Sequence['outputs.GetManagedDatabasesUserSystemPrivilegeItemResult']:
        """
        An array of system privileges.
        """
        return pulumi.get(self, "items")

    @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 system privilege.
        """
        return pulumi.get(self, "name")

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


class AwaitableGetManagedDatabasesUserSystemPrivilegeResult(GetManagedDatabasesUserSystemPrivilegeResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetManagedDatabasesUserSystemPrivilegeResult(
            id=self.id,
            items=self.items,
            managed_database_id=self.managed_database_id,
            name=self.name,
            user_name=self.user_name)


def get_managed_databases_user_system_privilege(managed_database_id: Optional[str] = None,
                                                name: Optional[str] = None,
                                                user_name: Optional[str] = None,
                                                opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetManagedDatabasesUserSystemPrivilegeResult:
    """
    This data source provides details about a specific Managed Databases User System Privilege resource in Oracle Cloud Infrastructure Database Management service.

    Gets the list of system privileges granted to a specific user.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_managed_databases_user_system_privilege = oci.DatabaseManagement.get_managed_databases_user_system_privilege(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__['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/getManagedDatabasesUserSystemPrivilege:getManagedDatabasesUserSystemPrivilege', __args__, opts=opts, typ=GetManagedDatabasesUserSystemPrivilegeResult).value

    return AwaitableGetManagedDatabasesUserSystemPrivilegeResult(
        id=__ret__.id,
        items=__ret__.items,
        managed_database_id=__ret__.managed_database_id,
        name=__ret__.name,
        user_name=__ret__.user_name)


@_utilities.lift_output_func(get_managed_databases_user_system_privilege)
def get_managed_databases_user_system_privilege_output(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[GetManagedDatabasesUserSystemPrivilegeResult]:
    """
    This data source provides details about a specific Managed Databases User System Privilege resource in Oracle Cloud Infrastructure Database Management service.

    Gets the list of system privileges granted to a specific user.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_managed_databases_user_system_privilege = oci.DatabaseManagement.get_managed_databases_user_system_privilege(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.
    """
    ...
