# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
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
from . import outputs

__all__ = [
    'GetExternalMetadatasResult',
    'AwaitableGetExternalMetadatasResult',
    'get_external_metadatas',
    'get_external_metadatas_output',
]

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

    @_builtins.property
    @pulumi.getter(name="externalMetadatas")
    def external_metadatas(self) -> Sequence['outputs.GetExternalMetadatasExternalMetadataResult']:
        return pulumi.get(self, "external_metadatas")

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


class AwaitableGetExternalMetadatasResult(GetExternalMetadatasResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetExternalMetadatasResult(
            external_metadatas=self.external_metadatas,
            id=self.id)


def get_external_metadatas(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetExternalMetadatasResult:
    """
    This data source can be used to fetch the list of external metadata objects.

    > **Note** This resource can only be used with an workspace-level provider!
    """
    __args__ = dict()
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('databricks:index/getExternalMetadatas:getExternalMetadatas', __args__, opts=opts, typ=GetExternalMetadatasResult).value

    return AwaitableGetExternalMetadatasResult(
        external_metadatas=pulumi.get(__ret__, 'external_metadatas'),
        id=pulumi.get(__ret__, 'id'))
def get_external_metadatas_output(opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetExternalMetadatasResult]:
    """
    This data source can be used to fetch the list of external metadata objects.

    > **Note** This resource can only be used with an workspace-level provider!
    """
    __args__ = dict()
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('databricks:index/getExternalMetadatas:getExternalMetadatas', __args__, opts=opts, typ=GetExternalMetadatasResult)
    return __ret__.apply(lambda __response__: GetExternalMetadatasResult(
        external_metadatas=pulumi.get(__response__, 'external_metadatas'),
        id=pulumi.get(__response__, 'id')))
