# 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__ = [
    'GetDeploymentResult',
    'AwaitableGetDeploymentResult',
    'get_deployment',
    'get_deployment_output',
]

@pulumi.output_type
class GetDeploymentResult:
    """
    A collection of values returned by getDeployment.
    """
    def __init__(__self__, created_at=None, deployment_id=None, endpoints=None, id=None, name=None, node_amount=None, node_type=None, password=None, private_networks=None, project_id=None, public_dashboard_url=None, region=None, status=None, tags=None, updated_at=None, user_name=None, version=None, volumes=None):
        if created_at and not isinstance(created_at, str):
            raise TypeError("Expected argument 'created_at' to be a str")
        pulumi.set(__self__, "created_at", created_at)
        if deployment_id and not isinstance(deployment_id, str):
            raise TypeError("Expected argument 'deployment_id' to be a str")
        pulumi.set(__self__, "deployment_id", deployment_id)
        if endpoints and not isinstance(endpoints, list):
            raise TypeError("Expected argument 'endpoints' to be a list")
        pulumi.set(__self__, "endpoints", endpoints)
        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 node_amount and not isinstance(node_amount, int):
            raise TypeError("Expected argument 'node_amount' to be a int")
        pulumi.set(__self__, "node_amount", node_amount)
        if node_type and not isinstance(node_type, str):
            raise TypeError("Expected argument 'node_type' to be a str")
        pulumi.set(__self__, "node_type", node_type)
        if password and not isinstance(password, str):
            raise TypeError("Expected argument 'password' to be a str")
        pulumi.set(__self__, "password", password)
        if private_networks and not isinstance(private_networks, list):
            raise TypeError("Expected argument 'private_networks' to be a list")
        pulumi.set(__self__, "private_networks", private_networks)
        if project_id and not isinstance(project_id, str):
            raise TypeError("Expected argument 'project_id' to be a str")
        pulumi.set(__self__, "project_id", project_id)
        if public_dashboard_url and not isinstance(public_dashboard_url, str):
            raise TypeError("Expected argument 'public_dashboard_url' to be a str")
        pulumi.set(__self__, "public_dashboard_url", public_dashboard_url)
        if region and not isinstance(region, str):
            raise TypeError("Expected argument 'region' to be a str")
        pulumi.set(__self__, "region", region)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        if updated_at and not isinstance(updated_at, str):
            raise TypeError("Expected argument 'updated_at' to be a str")
        pulumi.set(__self__, "updated_at", updated_at)
        if user_name and not isinstance(user_name, str):
            raise TypeError("Expected argument 'user_name' to be a str")
        pulumi.set(__self__, "user_name", user_name)
        if version and not isinstance(version, str):
            raise TypeError("Expected argument 'version' to be a str")
        pulumi.set(__self__, "version", version)
        if volumes and not isinstance(volumes, list):
            raise TypeError("Expected argument 'volumes' to be a list")
        pulumi.set(__self__, "volumes", volumes)

    @_builtins.property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> _builtins.str:
        return pulumi.get(self, "created_at")

    @_builtins.property
    @pulumi.getter(name="deploymentId")
    def deployment_id(self) -> Optional[_builtins.str]:
        return pulumi.get(self, "deployment_id")

    @_builtins.property
    @pulumi.getter
    def endpoints(self) -> Sequence['outputs.GetDeploymentEndpointResult']:
        return pulumi.get(self, "endpoints")

    @_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) -> Optional[_builtins.str]:
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter(name="nodeAmount")
    def node_amount(self) -> _builtins.int:
        return pulumi.get(self, "node_amount")

    @_builtins.property
    @pulumi.getter(name="nodeType")
    def node_type(self) -> _builtins.str:
        return pulumi.get(self, "node_type")

    @_builtins.property
    @pulumi.getter
    def password(self) -> _builtins.str:
        return pulumi.get(self, "password")

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

    @_builtins.property
    @pulumi.getter(name="projectId")
    def project_id(self) -> Optional[_builtins.str]:
        return pulumi.get(self, "project_id")

    @_builtins.property
    @pulumi.getter(name="publicDashboardUrl")
    def public_dashboard_url(self) -> _builtins.str:
        return pulumi.get(self, "public_dashboard_url")

    @_builtins.property
    @pulumi.getter
    def region(self) -> Optional[_builtins.str]:
        return pulumi.get(self, "region")

    @_builtins.property
    @pulumi.getter
    def status(self) -> _builtins.str:
        return pulumi.get(self, "status")

    @_builtins.property
    @pulumi.getter
    def tags(self) -> Sequence[_builtins.str]:
        return pulumi.get(self, "tags")

    @_builtins.property
    @pulumi.getter(name="updatedAt")
    def updated_at(self) -> _builtins.str:
        return pulumi.get(self, "updated_at")

    @_builtins.property
    @pulumi.getter(name="userName")
    def user_name(self) -> _builtins.str:
        return pulumi.get(self, "user_name")

    @_builtins.property
    @pulumi.getter
    def version(self) -> _builtins.str:
        return pulumi.get(self, "version")

    @_builtins.property
    @pulumi.getter
    def volumes(self) -> Sequence['outputs.GetDeploymentVolumeResult']:
        return pulumi.get(self, "volumes")


class AwaitableGetDeploymentResult(GetDeploymentResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetDeploymentResult(
            created_at=self.created_at,
            deployment_id=self.deployment_id,
            endpoints=self.endpoints,
            id=self.id,
            name=self.name,
            node_amount=self.node_amount,
            node_type=self.node_type,
            password=self.password,
            private_networks=self.private_networks,
            project_id=self.project_id,
            public_dashboard_url=self.public_dashboard_url,
            region=self.region,
            status=self.status,
            tags=self.tags,
            updated_at=self.updated_at,
            user_name=self.user_name,
            version=self.version,
            volumes=self.volumes)


def get_deployment(deployment_id: Optional[_builtins.str] = None,
                   name: Optional[_builtins.str] = None,
                   project_id: Optional[_builtins.str] = None,
                   region: Optional[_builtins.str] = None,
                   opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDeploymentResult:
    """
    Gets information about an OpenSearch deployment.

    For more information refer to the [product documentation](https://www.scaleway.com/en/docs/opensearch/).

    ## Example Usage

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Get info by name
    by_name = scaleway.opensearch.get_deployment(name="my-opensearch-cluster")
    # Get info by deployment ID
    by_id = scaleway.opensearch.get_deployment(deployment_id="11111111-1111-1111-1111-111111111111")
    ```


    :param _builtins.str deployment_id: The ID of the OpenSearch deployment. Only one of `name` and `deployment_id` should be specified.
    :param _builtins.str name: The name of the OpenSearch deployment. Only one of `name` and `deployment_id` should be specified.
    :param _builtins.str project_id: The ID of the project the OpenSearch deployment is associated with.
    :param _builtins.str region: `region`) The region in which the deployment exists.
    """
    __args__ = dict()
    __args__['deploymentId'] = deployment_id
    __args__['name'] = name
    __args__['projectId'] = project_id
    __args__['region'] = region
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('scaleway:opensearch/getDeployment:getDeployment', __args__, opts=opts, typ=GetDeploymentResult).value

    return AwaitableGetDeploymentResult(
        created_at=pulumi.get(__ret__, 'created_at'),
        deployment_id=pulumi.get(__ret__, 'deployment_id'),
        endpoints=pulumi.get(__ret__, 'endpoints'),
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        node_amount=pulumi.get(__ret__, 'node_amount'),
        node_type=pulumi.get(__ret__, 'node_type'),
        password=pulumi.get(__ret__, 'password'),
        private_networks=pulumi.get(__ret__, 'private_networks'),
        project_id=pulumi.get(__ret__, 'project_id'),
        public_dashboard_url=pulumi.get(__ret__, 'public_dashboard_url'),
        region=pulumi.get(__ret__, 'region'),
        status=pulumi.get(__ret__, 'status'),
        tags=pulumi.get(__ret__, 'tags'),
        updated_at=pulumi.get(__ret__, 'updated_at'),
        user_name=pulumi.get(__ret__, 'user_name'),
        version=pulumi.get(__ret__, 'version'),
        volumes=pulumi.get(__ret__, 'volumes'))
def get_deployment_output(deployment_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                          name: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                          project_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                          region: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                          opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetDeploymentResult]:
    """
    Gets information about an OpenSearch deployment.

    For more information refer to the [product documentation](https://www.scaleway.com/en/docs/opensearch/).

    ## Example Usage

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Get info by name
    by_name = scaleway.opensearch.get_deployment(name="my-opensearch-cluster")
    # Get info by deployment ID
    by_id = scaleway.opensearch.get_deployment(deployment_id="11111111-1111-1111-1111-111111111111")
    ```


    :param _builtins.str deployment_id: The ID of the OpenSearch deployment. Only one of `name` and `deployment_id` should be specified.
    :param _builtins.str name: The name of the OpenSearch deployment. Only one of `name` and `deployment_id` should be specified.
    :param _builtins.str project_id: The ID of the project the OpenSearch deployment is associated with.
    :param _builtins.str region: `region`) The region in which the deployment exists.
    """
    __args__ = dict()
    __args__['deploymentId'] = deployment_id
    __args__['name'] = name
    __args__['projectId'] = project_id
    __args__['region'] = region
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('scaleway:opensearch/getDeployment:getDeployment', __args__, opts=opts, typ=GetDeploymentResult)
    return __ret__.apply(lambda __response__: GetDeploymentResult(
        created_at=pulumi.get(__response__, 'created_at'),
        deployment_id=pulumi.get(__response__, 'deployment_id'),
        endpoints=pulumi.get(__response__, 'endpoints'),
        id=pulumi.get(__response__, 'id'),
        name=pulumi.get(__response__, 'name'),
        node_amount=pulumi.get(__response__, 'node_amount'),
        node_type=pulumi.get(__response__, 'node_type'),
        password=pulumi.get(__response__, 'password'),
        private_networks=pulumi.get(__response__, 'private_networks'),
        project_id=pulumi.get(__response__, 'project_id'),
        public_dashboard_url=pulumi.get(__response__, 'public_dashboard_url'),
        region=pulumi.get(__response__, 'region'),
        status=pulumi.get(__response__, 'status'),
        tags=pulumi.get(__response__, 'tags'),
        updated_at=pulumi.get(__response__, 'updated_at'),
        user_name=pulumi.get(__response__, 'user_name'),
        version=pulumi.get(__response__, 'version'),
        volumes=pulumi.get(__response__, 'volumes')))
