# 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

__all__ = [
    'GetAuthBackendsResult',
    'AwaitableGetAuthBackendsResult',
    'get_auth_backends',
    'get_auth_backends_output',
]

@pulumi.output_type
class GetAuthBackendsResult:
    """
    A collection of values returned by getAuthBackends.
    """
    def __init__(__self__, accessors=None, id=None, namespace=None, paths=None, type=None):
        if accessors and not isinstance(accessors, list):
            raise TypeError("Expected argument 'accessors' to be a list")
        pulumi.set(__self__, "accessors", accessors)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if namespace and not isinstance(namespace, str):
            raise TypeError("Expected argument 'namespace' to be a str")
        pulumi.set(__self__, "namespace", namespace)
        if paths and not isinstance(paths, list):
            raise TypeError("Expected argument 'paths' to be a list")
        pulumi.set(__self__, "paths", paths)
        if type and not isinstance(type, str):
            raise TypeError("Expected argument 'type' to be a str")
        pulumi.set(__self__, "type", type)

    @property
    @pulumi.getter
    def accessors(self) -> Sequence[str]:
        """
        The accessor IDs for the auth methods.
        """
        return pulumi.get(self, "accessors")

    @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 namespace(self) -> Optional[str]:
        return pulumi.get(self, "namespace")

    @property
    @pulumi.getter
    def paths(self) -> Sequence[str]:
        """
        List of auth backend mount points.
        """
        return pulumi.get(self, "paths")

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


class AwaitableGetAuthBackendsResult(GetAuthBackendsResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetAuthBackendsResult(
            accessors=self.accessors,
            id=self.id,
            namespace=self.namespace,
            paths=self.paths,
            type=self.type)


def get_auth_backends(namespace: Optional[str] = None,
                      type: Optional[str] = None,
                      opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAuthBackendsResult:
    """
    Use this data source to access information about an existing resource.

    :param str namespace: The namespace of the target resource.
           The value should not contain leading or trailing forward slashes.
           The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault#namespace).
           *Available only for Vault Enterprise*.
    :param str type: The name of the auth method type. Allows filtering of backends returned by type.
    """
    __args__ = dict()
    __args__['namespace'] = namespace
    __args__['type'] = type
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('vault:index/getAuthBackends:getAuthBackends', __args__, opts=opts, typ=GetAuthBackendsResult).value

    return AwaitableGetAuthBackendsResult(
        accessors=pulumi.get(__ret__, 'accessors'),
        id=pulumi.get(__ret__, 'id'),
        namespace=pulumi.get(__ret__, 'namespace'),
        paths=pulumi.get(__ret__, 'paths'),
        type=pulumi.get(__ret__, 'type'))


@_utilities.lift_output_func(get_auth_backends)
def get_auth_backends_output(namespace: Optional[pulumi.Input[Optional[str]]] = None,
                             type: Optional[pulumi.Input[Optional[str]]] = None,
                             opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetAuthBackendsResult]:
    """
    Use this data source to access information about an existing resource.

    :param str namespace: The namespace of the target resource.
           The value should not contain leading or trailing forward slashes.
           The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault#namespace).
           *Available only for Vault Enterprise*.
    :param str type: The name of the auth method type. Allows filtering of backends returned by type.
    """
    ...
