# 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
from ._inputs import *

__all__ = ['EndpointArgs', 'Endpoint']

@pulumi.input_type
class EndpointArgs:
    def __init__(__self__, *,
                 display_name: pulumi.Input[_builtins.str],
                 parent: pulumi.Input[_builtins.str],
                 region: pulumi.Input[_builtins.str],
                 azure_private_endpoint_info: Optional[pulumi.Input['EndpointAzurePrivateEndpointInfoArgs']] = None):
        """
        The set of arguments for constructing a Endpoint resource.
        :param pulumi.Input[_builtins.str] display_name: 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
        :param pulumi.Input[_builtins.str] parent: The parent resource name of the account under which the endpoint is created.
               Format: `accounts/{account_id}`
        :param pulumi.Input[_builtins.str] region: The cloud provider region where this endpoint is located
        :param pulumi.Input['EndpointAzurePrivateEndpointInfoArgs'] azure_private_endpoint_info: Info for an Azure private endpoint
        """
        pulumi.set(__self__, "display_name", display_name)
        pulumi.set(__self__, "parent", parent)
        pulumi.set(__self__, "region", region)
        if azure_private_endpoint_info is not None:
            pulumi.set(__self__, "azure_private_endpoint_info", azure_private_endpoint_info)

    @_builtins.property
    @pulumi.getter(name="displayName")
    def display_name(self) -> pulumi.Input[_builtins.str]:
        """
        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")

    @display_name.setter
    def display_name(self, value: pulumi.Input[_builtins.str]):
        pulumi.set(self, "display_name", value)

    @_builtins.property
    @pulumi.getter
    def parent(self) -> pulumi.Input[_builtins.str]:
        """
        The parent resource name of the account under which the endpoint is created.
        Format: `accounts/{account_id}`
        """
        return pulumi.get(self, "parent")

    @parent.setter
    def parent(self, value: pulumi.Input[_builtins.str]):
        pulumi.set(self, "parent", value)

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

    @region.setter
    def region(self, value: pulumi.Input[_builtins.str]):
        pulumi.set(self, "region", value)

    @_builtins.property
    @pulumi.getter(name="azurePrivateEndpointInfo")
    def azure_private_endpoint_info(self) -> Optional[pulumi.Input['EndpointAzurePrivateEndpointInfoArgs']]:
        """
        Info for an Azure private endpoint
        """
        return pulumi.get(self, "azure_private_endpoint_info")

    @azure_private_endpoint_info.setter
    def azure_private_endpoint_info(self, value: Optional[pulumi.Input['EndpointAzurePrivateEndpointInfoArgs']]):
        pulumi.set(self, "azure_private_endpoint_info", value)


@pulumi.input_type
class _EndpointState:
    def __init__(__self__, *,
                 account_id: Optional[pulumi.Input[_builtins.str]] = None,
                 azure_private_endpoint_info: Optional[pulumi.Input['EndpointAzurePrivateEndpointInfoArgs']] = None,
                 create_time: Optional[pulumi.Input[_builtins.str]] = None,
                 display_name: Optional[pulumi.Input[_builtins.str]] = None,
                 endpoint_id: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 parent: Optional[pulumi.Input[_builtins.str]] = None,
                 region: Optional[pulumi.Input[_builtins.str]] = None,
                 state: Optional[pulumi.Input[_builtins.str]] = None,
                 use_case: Optional[pulumi.Input[_builtins.str]] = None):
        """
        Input properties used for looking up and filtering Endpoint resources.
        :param pulumi.Input[_builtins.str] account_id: (string) - The Databricks Account in which the endpoint object exists
        :param pulumi.Input['EndpointAzurePrivateEndpointInfoArgs'] azure_private_endpoint_info: Info for an Azure private endpoint
        :param pulumi.Input[_builtins.str] create_time: (string) - The timestamp when the endpoint was created. The timestamp is in RFC 3339 format in UTC timezone
        :param pulumi.Input[_builtins.str] display_name: 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
        :param pulumi.Input[_builtins.str] endpoint_id: (string) - The unique identifier for this endpoint under the account. This field is a UUID generated by Databricks
        :param pulumi.Input[_builtins.str] name: (string) - The resource name of the endpoint, which uniquely identifies the endpoint
        :param pulumi.Input[_builtins.str] parent: The parent resource name of the account under which the endpoint is created.
               Format: `accounts/{account_id}`
        :param pulumi.Input[_builtins.str] region: The cloud provider region where this endpoint is located
        :param pulumi.Input[_builtins.str] state: (string) - The state of the endpoint. The endpoint can only be used if the state is `APPROVED`. Possible values are: `APPROVED`, `DISCONNECTED`, `FAILED`, `PENDING`
        :param pulumi.Input[_builtins.str] use_case: (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`
        """
        if account_id is not None:
            pulumi.set(__self__, "account_id", account_id)
        if azure_private_endpoint_info is not None:
            pulumi.set(__self__, "azure_private_endpoint_info", azure_private_endpoint_info)
        if create_time is not None:
            pulumi.set(__self__, "create_time", create_time)
        if display_name is not None:
            pulumi.set(__self__, "display_name", display_name)
        if endpoint_id is not None:
            pulumi.set(__self__, "endpoint_id", endpoint_id)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if parent is not None:
            pulumi.set(__self__, "parent", parent)
        if region is not None:
            pulumi.set(__self__, "region", region)
        if state is not None:
            pulumi.set(__self__, "state", state)
        if use_case is not None:
            pulumi.set(__self__, "use_case", use_case)

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

    @account_id.setter
    def account_id(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "account_id", value)

    @_builtins.property
    @pulumi.getter(name="azurePrivateEndpointInfo")
    def azure_private_endpoint_info(self) -> Optional[pulumi.Input['EndpointAzurePrivateEndpointInfoArgs']]:
        """
        Info for an Azure private endpoint
        """
        return pulumi.get(self, "azure_private_endpoint_info")

    @azure_private_endpoint_info.setter
    def azure_private_endpoint_info(self, value: Optional[pulumi.Input['EndpointAzurePrivateEndpointInfoArgs']]):
        pulumi.set(self, "azure_private_endpoint_info", value)

    @_builtins.property
    @pulumi.getter(name="createTime")
    def create_time(self) -> Optional[pulumi.Input[_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")

    @create_time.setter
    def create_time(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "create_time", value)

    @_builtins.property
    @pulumi.getter(name="displayName")
    def display_name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        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")

    @display_name.setter
    def display_name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "display_name", value)

    @_builtins.property
    @pulumi.getter(name="endpointId")
    def endpoint_id(self) -> Optional[pulumi.Input[_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")

    @endpoint_id.setter
    def endpoint_id(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "endpoint_id", value)

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

    @name.setter
    def name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "name", value)

    @_builtins.property
    @pulumi.getter
    def parent(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The parent resource name of the account under which the endpoint is created.
        Format: `accounts/{account_id}`
        """
        return pulumi.get(self, "parent")

    @parent.setter
    def parent(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "parent", value)

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

    @region.setter
    def region(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "region", value)

    @_builtins.property
    @pulumi.getter
    def state(self) -> Optional[pulumi.Input[_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")

    @state.setter
    def state(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "state", value)

    @_builtins.property
    @pulumi.getter(name="useCase")
    def use_case(self) -> Optional[pulumi.Input[_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")

    @use_case.setter
    def use_case(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "use_case", value)


@pulumi.type_token("databricks:index/endpoint:Endpoint")
class Endpoint(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 azure_private_endpoint_info: Optional[pulumi.Input[Union['EndpointAzurePrivateEndpointInfoArgs', 'EndpointAzurePrivateEndpointInfoArgsDict']]] = None,
                 display_name: Optional[pulumi.Input[_builtins.str]] = None,
                 parent: Optional[pulumi.Input[_builtins.str]] = None,
                 region: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        """
        [![Public Beta](https://img.shields.io/badge/Release_Stage-Public_Beta-orange)](https://docs.databricks.com/aws/en/release-notes/release-types)

        Endpoint resource manages network connectivity endpoints 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 creating an endpoint in Azure cloud:
        ```python
        import pulumi
        import pulumi_databricks as databricks

        this = databricks.Endpoint("this",
            parent="accounts/123e4567-e89b-12d3-a456-426614174000",
            display_name="my-private-endpoint",
            region="westus",
            azure_private_endpoint_info={
                "private_endpoint_name": "my-pe",
                "private_endpoint_resource_guid": "12345678-1234-1234-1234-123456789abc",
            })
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[Union['EndpointAzurePrivateEndpointInfoArgs', 'EndpointAzurePrivateEndpointInfoArgsDict']] azure_private_endpoint_info: Info for an Azure private endpoint
        :param pulumi.Input[_builtins.str] display_name: 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
        :param pulumi.Input[_builtins.str] parent: The parent resource name of the account under which the endpoint is created.
               Format: `accounts/{account_id}`
        :param pulumi.Input[_builtins.str] region: The cloud provider region where this endpoint is located
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: EndpointArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        [![Public Beta](https://img.shields.io/badge/Release_Stage-Public_Beta-orange)](https://docs.databricks.com/aws/en/release-notes/release-types)

        Endpoint resource manages network connectivity endpoints 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 creating an endpoint in Azure cloud:
        ```python
        import pulumi
        import pulumi_databricks as databricks

        this = databricks.Endpoint("this",
            parent="accounts/123e4567-e89b-12d3-a456-426614174000",
            display_name="my-private-endpoint",
            region="westus",
            azure_private_endpoint_info={
                "private_endpoint_name": "my-pe",
                "private_endpoint_resource_guid": "12345678-1234-1234-1234-123456789abc",
            })
        ```

        :param str resource_name: The name of the resource.
        :param EndpointArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(EndpointArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 azure_private_endpoint_info: Optional[pulumi.Input[Union['EndpointAzurePrivateEndpointInfoArgs', 'EndpointAzurePrivateEndpointInfoArgsDict']]] = None,
                 display_name: Optional[pulumi.Input[_builtins.str]] = None,
                 parent: Optional[pulumi.Input[_builtins.str]] = None,
                 region: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = EndpointArgs.__new__(EndpointArgs)

            __props__.__dict__["azure_private_endpoint_info"] = azure_private_endpoint_info
            if display_name is None and not opts.urn:
                raise TypeError("Missing required property 'display_name'")
            __props__.__dict__["display_name"] = display_name
            if parent is None and not opts.urn:
                raise TypeError("Missing required property 'parent'")
            __props__.__dict__["parent"] = parent
            if region is None and not opts.urn:
                raise TypeError("Missing required property 'region'")
            __props__.__dict__["region"] = region
            __props__.__dict__["account_id"] = None
            __props__.__dict__["create_time"] = None
            __props__.__dict__["endpoint_id"] = None
            __props__.__dict__["name"] = None
            __props__.__dict__["state"] = None
            __props__.__dict__["use_case"] = None
        super(Endpoint, __self__).__init__(
            'databricks:index/endpoint:Endpoint',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            account_id: Optional[pulumi.Input[_builtins.str]] = None,
            azure_private_endpoint_info: Optional[pulumi.Input[Union['EndpointAzurePrivateEndpointInfoArgs', 'EndpointAzurePrivateEndpointInfoArgsDict']]] = None,
            create_time: Optional[pulumi.Input[_builtins.str]] = None,
            display_name: Optional[pulumi.Input[_builtins.str]] = None,
            endpoint_id: Optional[pulumi.Input[_builtins.str]] = None,
            name: Optional[pulumi.Input[_builtins.str]] = None,
            parent: Optional[pulumi.Input[_builtins.str]] = None,
            region: Optional[pulumi.Input[_builtins.str]] = None,
            state: Optional[pulumi.Input[_builtins.str]] = None,
            use_case: Optional[pulumi.Input[_builtins.str]] = None) -> 'Endpoint':
        """
        Get an existing Endpoint resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.str] account_id: (string) - The Databricks Account in which the endpoint object exists
        :param pulumi.Input[Union['EndpointAzurePrivateEndpointInfoArgs', 'EndpointAzurePrivateEndpointInfoArgsDict']] azure_private_endpoint_info: Info for an Azure private endpoint
        :param pulumi.Input[_builtins.str] create_time: (string) - The timestamp when the endpoint was created. The timestamp is in RFC 3339 format in UTC timezone
        :param pulumi.Input[_builtins.str] display_name: 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
        :param pulumi.Input[_builtins.str] endpoint_id: (string) - The unique identifier for this endpoint under the account. This field is a UUID generated by Databricks
        :param pulumi.Input[_builtins.str] name: (string) - The resource name of the endpoint, which uniquely identifies the endpoint
        :param pulumi.Input[_builtins.str] parent: The parent resource name of the account under which the endpoint is created.
               Format: `accounts/{account_id}`
        :param pulumi.Input[_builtins.str] region: The cloud provider region where this endpoint is located
        :param pulumi.Input[_builtins.str] state: (string) - The state of the endpoint. The endpoint can only be used if the state is `APPROVED`. Possible values are: `APPROVED`, `DISCONNECTED`, `FAILED`, `PENDING`
        :param pulumi.Input[_builtins.str] use_case: (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`
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _EndpointState.__new__(_EndpointState)

        __props__.__dict__["account_id"] = account_id
        __props__.__dict__["azure_private_endpoint_info"] = azure_private_endpoint_info
        __props__.__dict__["create_time"] = create_time
        __props__.__dict__["display_name"] = display_name
        __props__.__dict__["endpoint_id"] = endpoint_id
        __props__.__dict__["name"] = name
        __props__.__dict__["parent"] = parent
        __props__.__dict__["region"] = region
        __props__.__dict__["state"] = state
        __props__.__dict__["use_case"] = use_case
        return Endpoint(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter(name="accountId")
    def account_id(self) -> pulumi.Output[_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) -> pulumi.Output[Optional['outputs.EndpointAzurePrivateEndpointInfo']]:
        """
        Info for an Azure private endpoint
        """
        return pulumi.get(self, "azure_private_endpoint_info")

    @_builtins.property
    @pulumi.getter(name="createTime")
    def create_time(self) -> pulumi.Output[_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) -> pulumi.Output[_builtins.str]:
        """
        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) -> pulumi.Output[_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 name(self) -> pulumi.Output[_builtins.str]:
        """
        (string) - The resource name of the endpoint, which uniquely identifies the endpoint
        """
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter
    def parent(self) -> pulumi.Output[_builtins.str]:
        """
        The parent resource name of the account under which the endpoint is created.
        Format: `accounts/{account_id}`
        """
        return pulumi.get(self, "parent")

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

    @_builtins.property
    @pulumi.getter
    def state(self) -> pulumi.Output[_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) -> pulumi.Output[_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")

