# 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__ = [
    'GetPostgresProjectResult',
    'AwaitableGetPostgresProjectResult',
    'get_postgres_project',
    'get_postgres_project_output',
]

@pulumi.output_type
class GetPostgresProjectResult:
    """
    A collection of values returned by getPostgresProject.
    """
    def __init__(__self__, create_time=None, id=None, initial_endpoint_spec=None, name=None, provider_config=None, spec=None, status=None, uid=None, update_time=None):
        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 id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if initial_endpoint_spec and not isinstance(initial_endpoint_spec, dict):
            raise TypeError("Expected argument 'initial_endpoint_spec' to be a dict")
        pulumi.set(__self__, "initial_endpoint_spec", initial_endpoint_spec)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if provider_config and not isinstance(provider_config, dict):
            raise TypeError("Expected argument 'provider_config' to be a dict")
        pulumi.set(__self__, "provider_config", provider_config)
        if spec and not isinstance(spec, dict):
            raise TypeError("Expected argument 'spec' to be a dict")
        pulumi.set(__self__, "spec", spec)
        if status and not isinstance(status, dict):
            raise TypeError("Expected argument 'status' to be a dict")
        pulumi.set(__self__, "status", status)
        if uid and not isinstance(uid, str):
            raise TypeError("Expected argument 'uid' to be a str")
        pulumi.set(__self__, "uid", uid)
        if update_time and not isinstance(update_time, str):
            raise TypeError("Expected argument 'update_time' to be a str")
        pulumi.set(__self__, "update_time", update_time)

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

    @_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(name="initialEndpointSpec")
    def initial_endpoint_spec(self) -> 'outputs.GetPostgresProjectInitialEndpointSpecResult':
        """
        (InitialEndpointSpec) - Configuration settings for the initial Read/Write endpoint created inside the default branch for a newly
        created project. If omitted, the initial endpoint created will have default settings, without high availability
        configured. This field does not apply to any endpoints created after project creation. Use
        spec.default_endpoint_settings to configure default settings for endpoints created after project creation
        """
        return pulumi.get(self, "initial_endpoint_spec")

    @_builtins.property
    @pulumi.getter
    def name(self) -> _builtins.str:
        """
        (string) - Output only. The full resource path of the project.
        Format: projects/{project_id}
        """
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter(name="providerConfig")
    def provider_config(self) -> Optional['outputs.GetPostgresProjectProviderConfigResult']:
        return pulumi.get(self, "provider_config")

    @_builtins.property
    @pulumi.getter
    def spec(self) -> 'outputs.GetPostgresProjectSpecResult':
        """
        (ProjectSpec) - The spec contains the project configuration, including display_name, pg_version (Postgres version), history_retention_duration, and default_endpoint_settings
        """
        return pulumi.get(self, "spec")

    @_builtins.property
    @pulumi.getter
    def status(self) -> 'outputs.GetPostgresProjectStatusResult':
        """
        (ProjectStatus) - The current status of a Project
        """
        return pulumi.get(self, "status")

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

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


class AwaitableGetPostgresProjectResult(GetPostgresProjectResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetPostgresProjectResult(
            create_time=self.create_time,
            id=self.id,
            initial_endpoint_spec=self.initial_endpoint_spec,
            name=self.name,
            provider_config=self.provider_config,
            spec=self.spec,
            status=self.status,
            uid=self.uid,
            update_time=self.update_time)


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

    This data source retrieves a single Postgres project.

    ## Example Usage

    ### Retrieve Project by Name

    ```python
    import pulumi
    import pulumi_databricks as databricks

    this = databricks.get_postgres_project(name="projects/my-project")
    pulumi.export("projectPgVersion", this.status.pg_version)
    pulumi.export("projectDisplayName", this.status.display_name)
    pulumi.export("projectHistoryRetention", this.status.history_retention_duration)
    ```


    :param _builtins.str name: Output only. The full resource path of the project.
           Format: projects/{project_id}
    :param Union['GetPostgresProjectProviderConfigArgs', 'GetPostgresProjectProviderConfigArgsDict'] provider_config: Configure the provider for management through account provider.
    """
    __args__ = dict()
    __args__['name'] = name
    __args__['providerConfig'] = provider_config
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('databricks:index/getPostgresProject:getPostgresProject', __args__, opts=opts, typ=GetPostgresProjectResult).value

    return AwaitableGetPostgresProjectResult(
        create_time=pulumi.get(__ret__, 'create_time'),
        id=pulumi.get(__ret__, 'id'),
        initial_endpoint_spec=pulumi.get(__ret__, 'initial_endpoint_spec'),
        name=pulumi.get(__ret__, 'name'),
        provider_config=pulumi.get(__ret__, 'provider_config'),
        spec=pulumi.get(__ret__, 'spec'),
        status=pulumi.get(__ret__, 'status'),
        uid=pulumi.get(__ret__, 'uid'),
        update_time=pulumi.get(__ret__, 'update_time'))
def get_postgres_project_output(name: Optional[pulumi.Input[_builtins.str]] = None,
                                provider_config: Optional[pulumi.Input[Optional[Union['GetPostgresProjectProviderConfigArgs', 'GetPostgresProjectProviderConfigArgsDict']]]] = None,
                                opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPostgresProjectResult]:
    """
    [![Public Beta](https://img.shields.io/badge/Release_Stage-Public_Beta-orange)](https://docs.databricks.com/aws/en/release-notes/release-types)

    This data source retrieves a single Postgres project.

    ## Example Usage

    ### Retrieve Project by Name

    ```python
    import pulumi
    import pulumi_databricks as databricks

    this = databricks.get_postgres_project(name="projects/my-project")
    pulumi.export("projectPgVersion", this.status.pg_version)
    pulumi.export("projectDisplayName", this.status.display_name)
    pulumi.export("projectHistoryRetention", this.status.history_retention_duration)
    ```


    :param _builtins.str name: Output only. The full resource path of the project.
           Format: projects/{project_id}
    :param Union['GetPostgresProjectProviderConfigArgs', 'GetPostgresProjectProviderConfigArgsDict'] provider_config: Configure the provider for management through account provider.
    """
    __args__ = dict()
    __args__['name'] = name
    __args__['providerConfig'] = provider_config
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('databricks:index/getPostgresProject:getPostgresProject', __args__, opts=opts, typ=GetPostgresProjectResult)
    return __ret__.apply(lambda __response__: GetPostgresProjectResult(
        create_time=pulumi.get(__response__, 'create_time'),
        id=pulumi.get(__response__, 'id'),
        initial_endpoint_spec=pulumi.get(__response__, 'initial_endpoint_spec'),
        name=pulumi.get(__response__, 'name'),
        provider_config=pulumi.get(__response__, 'provider_config'),
        spec=pulumi.get(__response__, 'spec'),
        status=pulumi.get(__response__, 'status'),
        uid=pulumi.get(__response__, 'uid'),
        update_time=pulumi.get(__response__, 'update_time')))
