# 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__ = [
    'GetEndpointResult',
    'AwaitableGetEndpointResult',
    'get_endpoint',
    'get_endpoint_output',
]

@pulumi.output_type
class GetEndpointResult:
    """
    A collection of values returned by getEndpoint.
    """
    def __init__(__self__, account_id=None, azure_private_endpoint_info=None, create_time=None, display_name=None, endpoint_id=None, id=None, name=None, region=None, state=None, use_case=None):
        if account_id and not isinstance(account_id, str):
            raise TypeError("Expected argument 'account_id' to be a str")
        pulumi.set(__self__, "account_id", account_id)
        if azure_private_endpoint_info and not isinstance(azure_private_endpoint_info, dict):
            raise TypeError("Expected argument 'azure_private_endpoint_info' to be a dict")
        pulumi.set(__self__, "azure_private_endpoint_info", azure_private_endpoint_info)
        if create_time and not isinstance(create_time, str):
            raise TypeError("Expected argument 'create_time' to be a str")
        pulumi.set(__self__, "create_time", create_time)
        if display_name and not isinstance(display_name, str):
            raise TypeError("Expected argument 'display_name' to be a str")
        pulumi.set(__self__, "display_name", display_name)
        if endpoint_id and not isinstance(endpoint_id, str):
            raise TypeError("Expected argument 'endpoint_id' to be a str")
        pulumi.set(__self__, "endpoint_id", endpoint_id)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if region and not isinstance(region, str):
            raise TypeError("Expected argument 'region' to be a str")
        pulumi.set(__self__, "region", region)
        if state and not isinstance(state, str):
            raise TypeError("Expected argument 'state' to be a str")
        pulumi.set(__self__, "state", state)
        if use_case and not isinstance(use_case, str):
            raise TypeError("Expected argument 'use_case' to be a str")
        pulumi.set(__self__, "use_case", use_case)

    @_builtins.property
    @pulumi.getter(name="accountId")
    def account_id(self) -> _builtins.str:
        """
        (string) - The Databricks Account in which the endpoint object exists
        """
        return pulumi.get(self, "account_id")

    @_builtins.property
    @pulumi.getter(name="azurePrivateEndpointInfo")
    def azure_private_endpoint_info(self) -> 'outputs.GetEndpointAzurePrivateEndpointInfoResult':
        """
        (AzurePrivateEndpointInfo) - Info for an Azure private endpoint
        """
        return pulumi.get(self, "azure_private_endpoint_info")

    @_builtins.property
    @pulumi.getter(name="createTime")
    def create_time(self) -> _builtins.str:
        """
        (string) - The timestamp when the endpoint was created. The timestamp is in RFC 3339 format in UTC timezone
        """
        return pulumi.get(self, "create_time")

    @_builtins.property
    @pulumi.getter(name="displayName")
    def display_name(self) -> _builtins.str:
        """
        (string) - The human-readable display name of this endpoint.
        The input should conform to RFC-1034, which restricts to letters, numbers, and hyphens,
        with the first character a letter, the last a letter or a number, and a 63 character maximum
        """
        return pulumi.get(self, "display_name")

    @_builtins.property
    @pulumi.getter(name="endpointId")
    def endpoint_id(self) -> _builtins.str:
        """
        (string) - The unique identifier for this endpoint under the account. This field is a UUID generated by Databricks
        """
        return pulumi.get(self, "endpoint_id")

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

    @_builtins.property
    @pulumi.getter
    def name(self) -> _builtins.str:
        """
        (string) - The resource name of the endpoint, which uniquely identifies the endpoint
        """
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter
    def region(self) -> _builtins.str:
        """
        (string) - The cloud provider region where this endpoint is located
        """
        return pulumi.get(self, "region")

    @_builtins.property
    @pulumi.getter
    def state(self) -> _builtins.str:
        """
        (string) - The state of the endpoint. The endpoint can only be used if the state is `APPROVED`. Possible values are: `APPROVED`, `DISCONNECTED`, `FAILED`, `PENDING`
        """
        return pulumi.get(self, "state")

    @_builtins.property
    @pulumi.getter(name="useCase")
    def use_case(self) -> _builtins.str:
        """
        (string) - The use case that determines the type of network connectivity this endpoint provides.
        This field is automatically determined based on the endpoint configuration and cloud-specific settings. Possible values are: `SERVICE_DIRECT`
        """
        return pulumi.get(self, "use_case")


class AwaitableGetEndpointResult(GetEndpointResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetEndpointResult(
            account_id=self.account_id,
            azure_private_endpoint_info=self.azure_private_endpoint_info,
            create_time=self.create_time,
            display_name=self.display_name,
            endpoint_id=self.endpoint_id,
            id=self.id,
            name=self.name,
            region=self.region,
            state=self.state,
            use_case=self.use_case)


def get_endpoint(name: Optional[_builtins.str] = None,
                 opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetEndpointResult:
    """
    [![Public Beta](https://img.shields.io/badge/Release_Stage-Public_Beta-orange)](https://docs.databricks.com/aws/en/release-notes/release-types)

    Endpoint datasource retrieves information about a single network connectivity endpoint for private access to Databricks workspaces.

    > **Note** This resource can only be used with an account-level provider!

    ## Example Usage

    ### Example for Azure cloud
    This is an example for getting an endpoint in Azure cloud:


    :param _builtins.str name: The resource name of the endpoint, which uniquely identifies the endpoint
    """
    __args__ = dict()
    __args__['name'] = name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('databricks:index/getEndpoint:getEndpoint', __args__, opts=opts, typ=GetEndpointResult).value

    return AwaitableGetEndpointResult(
        account_id=pulumi.get(__ret__, 'account_id'),
        azure_private_endpoint_info=pulumi.get(__ret__, 'azure_private_endpoint_info'),
        create_time=pulumi.get(__ret__, 'create_time'),
        display_name=pulumi.get(__ret__, 'display_name'),
        endpoint_id=pulumi.get(__ret__, 'endpoint_id'),
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        region=pulumi.get(__ret__, 'region'),
        state=pulumi.get(__ret__, 'state'),
        use_case=pulumi.get(__ret__, 'use_case'))
def get_endpoint_output(name: Optional[pulumi.Input[_builtins.str]] = None,
                        opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetEndpointResult]:
    """
    [![Public Beta](https://img.shields.io/badge/Release_Stage-Public_Beta-orange)](https://docs.databricks.com/aws/en/release-notes/release-types)

    Endpoint datasource retrieves information about a single network connectivity endpoint for private access to Databricks workspaces.

    > **Note** This resource can only be used with an account-level provider!

    ## Example Usage

    ### Example for Azure cloud
    This is an example for getting an endpoint in Azure cloud:


    :param _builtins.str name: The resource name of the endpoint, which uniquely identifies the endpoint
    """
    __args__ = dict()
    __args__['name'] = name
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('databricks:index/getEndpoint:getEndpoint', __args__, opts=opts, typ=GetEndpointResult)
    return __ret__.apply(lambda __response__: GetEndpointResult(
        account_id=pulumi.get(__response__, 'account_id'),
        azure_private_endpoint_info=pulumi.get(__response__, 'azure_private_endpoint_info'),
        create_time=pulumi.get(__response__, 'create_time'),
        display_name=pulumi.get(__response__, 'display_name'),
        endpoint_id=pulumi.get(__response__, 'endpoint_id'),
        id=pulumi.get(__response__, 'id'),
        name=pulumi.get(__response__, 'name'),
        region=pulumi.get(__response__, 'region'),
        state=pulumi.get(__response__, 'state'),
        use_case=pulumi.get(__response__, 'use_case')))
