# 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__ = ['PostgresEndpointArgs', 'PostgresEndpoint']

@pulumi.input_type
class PostgresEndpointArgs:
    def __init__(__self__, *,
                 parent: pulumi.Input[_builtins.str],
                 endpoint_id: Optional[pulumi.Input[_builtins.str]] = None,
                 spec: Optional[pulumi.Input['PostgresEndpointSpecArgs']] = None):
        """
        The set of arguments for constructing a PostgresEndpoint resource.
        :param pulumi.Input[_builtins.str] parent: The branch containing this endpoint.
               Format: projects/{project_id}/branches/{branch_id}
        :param pulumi.Input[_builtins.str] endpoint_id: The ID to use for the Endpoint, which will become the final component of
               the endpoint's resource name.
               
               This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/
        :param pulumi.Input['PostgresEndpointSpecArgs'] spec: The desired state of an Endpoint
        """
        pulumi.set(__self__, "parent", parent)
        if endpoint_id is not None:
            pulumi.set(__self__, "endpoint_id", endpoint_id)
        if spec is not None:
            pulumi.set(__self__, "spec", spec)

    @_builtins.property
    @pulumi.getter
    def parent(self) -> pulumi.Input[_builtins.str]:
        """
        The branch containing this endpoint.
        Format: projects/{project_id}/branches/{branch_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(name="endpointId")
    def endpoint_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The ID to use for the Endpoint, which will become the final component of
        the endpoint's resource name.

        This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/
        """
        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 spec(self) -> Optional[pulumi.Input['PostgresEndpointSpecArgs']]:
        """
        The desired state of an Endpoint
        """
        return pulumi.get(self, "spec")

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


@pulumi.input_type
class _PostgresEndpointState:
    def __init__(__self__, *,
                 create_time: 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,
                 spec: Optional[pulumi.Input['PostgresEndpointSpecArgs']] = None,
                 status: Optional[pulumi.Input['PostgresEndpointStatusArgs']] = None,
                 uid: Optional[pulumi.Input[_builtins.str]] = None,
                 update_time: Optional[pulumi.Input[_builtins.str]] = None):
        """
        Input properties used for looking up and filtering PostgresEndpoint resources.
        :param pulumi.Input[_builtins.str] create_time: (string) - A timestamp indicating when the compute endpoint was created
        :param pulumi.Input[_builtins.str] endpoint_id: The ID to use for the Endpoint, which will become the final component of
               the endpoint's resource name.
               
               This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/
        :param pulumi.Input[_builtins.str] name: (string) - The resource name of the endpoint.
               Format: projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id}
        :param pulumi.Input[_builtins.str] parent: The branch containing this endpoint.
               Format: projects/{project_id}/branches/{branch_id}
        :param pulumi.Input['PostgresEndpointSpecArgs'] spec: The desired state of an Endpoint
        :param pulumi.Input['PostgresEndpointStatusArgs'] status: (EndpointStatus) - The current status of an Endpoint
        :param pulumi.Input[_builtins.str] uid: (string) - System generated unique ID for the endpoint
        :param pulumi.Input[_builtins.str] update_time: (string) - A timestamp indicating when the compute endpoint was last updated
        """
        if create_time is not None:
            pulumi.set(__self__, "create_time", create_time)
        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 spec is not None:
            pulumi.set(__self__, "spec", spec)
        if status is not None:
            pulumi.set(__self__, "status", status)
        if uid is not None:
            pulumi.set(__self__, "uid", uid)
        if update_time is not None:
            pulumi.set(__self__, "update_time", update_time)

    @_builtins.property
    @pulumi.getter(name="createTime")
    def create_time(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        (string) - A timestamp indicating when the compute endpoint was created
        """
        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="endpointId")
    def endpoint_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The ID to use for the Endpoint, which will become the final component of
        the endpoint's resource name.

        This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/
        """
        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.
        Format: projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id}
        """
        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 branch containing this endpoint.
        Format: projects/{project_id}/branches/{branch_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 spec(self) -> Optional[pulumi.Input['PostgresEndpointSpecArgs']]:
        """
        The desired state of an Endpoint
        """
        return pulumi.get(self, "spec")

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

    @_builtins.property
    @pulumi.getter
    def status(self) -> Optional[pulumi.Input['PostgresEndpointStatusArgs']]:
        """
        (EndpointStatus) - The current status of an Endpoint
        """
        return pulumi.get(self, "status")

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

    @_builtins.property
    @pulumi.getter
    def uid(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        (string) - System generated unique ID for the endpoint
        """
        return pulumi.get(self, "uid")

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

    @_builtins.property
    @pulumi.getter(name="updateTime")
    def update_time(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        (string) - A timestamp indicating when the compute endpoint was last updated
        """
        return pulumi.get(self, "update_time")

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


@pulumi.type_token("databricks:index/postgresEndpoint:PostgresEndpoint")
class PostgresEndpoint(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 endpoint_id: Optional[pulumi.Input[_builtins.str]] = None,
                 parent: Optional[pulumi.Input[_builtins.str]] = None,
                 spec: Optional[pulumi.Input[Union['PostgresEndpointSpecArgs', 'PostgresEndpointSpecArgsDict']]] = None,
                 __props__=None):
        """
        [![Private Preview](https://img.shields.io/badge/Release_Stage-Private_Preview-blueviolet)](https://docs.databricks.com/aws/en/release-notes/release-types)

        ## Import

        As of Pulumi v1.5, resources can be imported through configuration.

        hcl

        import {

          id = "name"

          to = databricks_postgres_endpoint.this

        }

        If you are using an older version of Pulumi, import the resource using the `pulumi import` command as follows:

        ```sh
        $ pulumi import databricks:index/postgresEndpoint:PostgresEndpoint this "name"
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.str] endpoint_id: The ID to use for the Endpoint, which will become the final component of
               the endpoint's resource name.
               
               This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/
        :param pulumi.Input[_builtins.str] parent: The branch containing this endpoint.
               Format: projects/{project_id}/branches/{branch_id}
        :param pulumi.Input[Union['PostgresEndpointSpecArgs', 'PostgresEndpointSpecArgsDict']] spec: The desired state of an Endpoint
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: PostgresEndpointArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        [![Private Preview](https://img.shields.io/badge/Release_Stage-Private_Preview-blueviolet)](https://docs.databricks.com/aws/en/release-notes/release-types)

        ## Import

        As of Pulumi v1.5, resources can be imported through configuration.

        hcl

        import {

          id = "name"

          to = databricks_postgres_endpoint.this

        }

        If you are using an older version of Pulumi, import the resource using the `pulumi import` command as follows:

        ```sh
        $ pulumi import databricks:index/postgresEndpoint:PostgresEndpoint this "name"
        ```

        :param str resource_name: The name of the resource.
        :param PostgresEndpointArgs 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(PostgresEndpointArgs, 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,
                 endpoint_id: Optional[pulumi.Input[_builtins.str]] = None,
                 parent: Optional[pulumi.Input[_builtins.str]] = None,
                 spec: Optional[pulumi.Input[Union['PostgresEndpointSpecArgs', 'PostgresEndpointSpecArgsDict']]] = 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__ = PostgresEndpointArgs.__new__(PostgresEndpointArgs)

            __props__.__dict__["endpoint_id"] = endpoint_id
            if parent is None and not opts.urn:
                raise TypeError("Missing required property 'parent'")
            __props__.__dict__["parent"] = parent
            __props__.__dict__["spec"] = spec
            __props__.__dict__["create_time"] = None
            __props__.__dict__["name"] = None
            __props__.__dict__["status"] = None
            __props__.__dict__["uid"] = None
            __props__.__dict__["update_time"] = None
        super(PostgresEndpoint, __self__).__init__(
            'databricks:index/postgresEndpoint:PostgresEndpoint',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            create_time: 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,
            spec: Optional[pulumi.Input[Union['PostgresEndpointSpecArgs', 'PostgresEndpointSpecArgsDict']]] = None,
            status: Optional[pulumi.Input[Union['PostgresEndpointStatusArgs', 'PostgresEndpointStatusArgsDict']]] = None,
            uid: Optional[pulumi.Input[_builtins.str]] = None,
            update_time: Optional[pulumi.Input[_builtins.str]] = None) -> 'PostgresEndpoint':
        """
        Get an existing PostgresEndpoint 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] create_time: (string) - A timestamp indicating when the compute endpoint was created
        :param pulumi.Input[_builtins.str] endpoint_id: The ID to use for the Endpoint, which will become the final component of
               the endpoint's resource name.
               
               This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/
        :param pulumi.Input[_builtins.str] name: (string) - The resource name of the endpoint.
               Format: projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id}
        :param pulumi.Input[_builtins.str] parent: The branch containing this endpoint.
               Format: projects/{project_id}/branches/{branch_id}
        :param pulumi.Input[Union['PostgresEndpointSpecArgs', 'PostgresEndpointSpecArgsDict']] spec: The desired state of an Endpoint
        :param pulumi.Input[Union['PostgresEndpointStatusArgs', 'PostgresEndpointStatusArgsDict']] status: (EndpointStatus) - The current status of an Endpoint
        :param pulumi.Input[_builtins.str] uid: (string) - System generated unique ID for the endpoint
        :param pulumi.Input[_builtins.str] update_time: (string) - A timestamp indicating when the compute endpoint was last updated
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _PostgresEndpointState.__new__(_PostgresEndpointState)

        __props__.__dict__["create_time"] = create_time
        __props__.__dict__["endpoint_id"] = endpoint_id
        __props__.__dict__["name"] = name
        __props__.__dict__["parent"] = parent
        __props__.__dict__["spec"] = spec
        __props__.__dict__["status"] = status
        __props__.__dict__["uid"] = uid
        __props__.__dict__["update_time"] = update_time
        return PostgresEndpoint(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter(name="createTime")
    def create_time(self) -> pulumi.Output[_builtins.str]:
        """
        (string) - A timestamp indicating when the compute endpoint was created
        """
        return pulumi.get(self, "create_time")

    @_builtins.property
    @pulumi.getter(name="endpointId")
    def endpoint_id(self) -> pulumi.Output[_builtins.str]:
        """
        The ID to use for the Endpoint, which will become the final component of
        the endpoint's resource name.

        This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/
        """
        return pulumi.get(self, "endpoint_id")

    @_builtins.property
    @pulumi.getter
    def name(self) -> pulumi.Output[_builtins.str]:
        """
        (string) - The resource name of the endpoint.
        Format: projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id}
        """
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter
    def parent(self) -> pulumi.Output[_builtins.str]:
        """
        The branch containing this endpoint.
        Format: projects/{project_id}/branches/{branch_id}
        """
        return pulumi.get(self, "parent")

    @_builtins.property
    @pulumi.getter
    def spec(self) -> pulumi.Output['outputs.PostgresEndpointSpec']:
        """
        The desired state of an Endpoint
        """
        return pulumi.get(self, "spec")

    @_builtins.property
    @pulumi.getter
    def status(self) -> pulumi.Output['outputs.PostgresEndpointStatus']:
        """
        (EndpointStatus) - The current status of an Endpoint
        """
        return pulumi.get(self, "status")

    @_builtins.property
    @pulumi.getter
    def uid(self) -> pulumi.Output[_builtins.str]:
        """
        (string) - System generated unique ID for the endpoint
        """
        return pulumi.get(self, "uid")

    @_builtins.property
    @pulumi.getter(name="updateTime")
    def update_time(self) -> pulumi.Output[_builtins.str]:
        """
        (string) - A timestamp indicating when the compute endpoint was last updated
        """
        return pulumi.get(self, "update_time")

