# 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__ = [
    'GetTargetDatabaseRoleResult',
    'AwaitableGetTargetDatabaseRoleResult',
    'get_target_database_role',
    'get_target_database_role_output',
]

@pulumi.output_type
class GetTargetDatabaseRoleResult:
    """
    A collection of values returned by getTargetDatabaseRole.
    """
    def __init__(__self__, authentication_type=None, filters=None, id=None, is_oracle_maintained=None, role_name_contains=None, role_names=None, roles=None, target_database_id=None):
        if authentication_type and not isinstance(authentication_type, str):
            raise TypeError("Expected argument 'authentication_type' to be a str")
        pulumi.set(__self__, "authentication_type", authentication_type)
        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 is_oracle_maintained and not isinstance(is_oracle_maintained, bool):
            raise TypeError("Expected argument 'is_oracle_maintained' to be a bool")
        pulumi.set(__self__, "is_oracle_maintained", is_oracle_maintained)
        if role_name_contains and not isinstance(role_name_contains, str):
            raise TypeError("Expected argument 'role_name_contains' to be a str")
        pulumi.set(__self__, "role_name_contains", role_name_contains)
        if role_names and not isinstance(role_names, list):
            raise TypeError("Expected argument 'role_names' to be a list")
        pulumi.set(__self__, "role_names", role_names)
        if roles and not isinstance(roles, list):
            raise TypeError("Expected argument 'roles' to be a list")
        pulumi.set(__self__, "roles", roles)
        if target_database_id and not isinstance(target_database_id, str):
            raise TypeError("Expected argument 'target_database_id' to be a str")
        pulumi.set(__self__, "target_database_id", target_database_id)

    @property
    @pulumi.getter(name="authenticationType")
    def authentication_type(self) -> Optional[str]:
        return pulumi.get(self, "authentication_type")

    @property
    @pulumi.getter
    def filters(self) -> Optional[Sequence['outputs.GetTargetDatabaseRoleFilterResult']]:
        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="isOracleMaintained")
    def is_oracle_maintained(self) -> Optional[bool]:
        return pulumi.get(self, "is_oracle_maintained")

    @property
    @pulumi.getter(name="roleNameContains")
    def role_name_contains(self) -> Optional[str]:
        return pulumi.get(self, "role_name_contains")

    @property
    @pulumi.getter(name="roleNames")
    def role_names(self) -> Optional[Sequence[str]]:
        return pulumi.get(self, "role_names")

    @property
    @pulumi.getter
    def roles(self) -> Sequence['outputs.GetTargetDatabaseRoleRoleResult']:
        return pulumi.get(self, "roles")

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


class AwaitableGetTargetDatabaseRoleResult(GetTargetDatabaseRoleResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetTargetDatabaseRoleResult(
            authentication_type=self.authentication_type,
            filters=self.filters,
            id=self.id,
            is_oracle_maintained=self.is_oracle_maintained,
            role_name_contains=self.role_name_contains,
            role_names=self.role_names,
            roles=self.roles,
            target_database_id=self.target_database_id)


def get_target_database_role(authentication_type: Optional[str] = None,
                             filters: Optional[Sequence[pulumi.InputType['GetTargetDatabaseRoleFilterArgs']]] = None,
                             is_oracle_maintained: Optional[bool] = None,
                             role_name_contains: Optional[str] = None,
                             role_names: Optional[Sequence[str]] = None,
                             target_database_id: Optional[str] = None,
                             opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetTargetDatabaseRoleResult:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['authenticationType'] = authentication_type
    __args__['filters'] = filters
    __args__['isOracleMaintained'] = is_oracle_maintained
    __args__['roleNameContains'] = role_name_contains
    __args__['roleNames'] = role_names
    __args__['targetDatabaseId'] = target_database_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('oci:DataSafe/getTargetDatabaseRole:getTargetDatabaseRole', __args__, opts=opts, typ=GetTargetDatabaseRoleResult).value

    return AwaitableGetTargetDatabaseRoleResult(
        authentication_type=__ret__.authentication_type,
        filters=__ret__.filters,
        id=__ret__.id,
        is_oracle_maintained=__ret__.is_oracle_maintained,
        role_name_contains=__ret__.role_name_contains,
        role_names=__ret__.role_names,
        roles=__ret__.roles,
        target_database_id=__ret__.target_database_id)


@_utilities.lift_output_func(get_target_database_role)
def get_target_database_role_output(authentication_type: Optional[pulumi.Input[Optional[str]]] = None,
                                    filters: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetTargetDatabaseRoleFilterArgs']]]]] = None,
                                    is_oracle_maintained: Optional[pulumi.Input[Optional[bool]]] = None,
                                    role_name_contains: Optional[pulumi.Input[Optional[str]]] = None,
                                    role_names: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
                                    target_database_id: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetTargetDatabaseRoleResult]:
    """
    Use this data source to access information about an existing resource.
    """
    ...
