# 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
import copy
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

__all__ = [
    'GetNamespaceResult',
    'AwaitableGetNamespaceResult',
    'get_namespace',
    'get_namespace_output',
]

@pulumi.output_type
class GetNamespaceResult:
    """
    A collection of values returned by getNamespace.
    """
    def __init__(__self__, activate_vpc_integration=None, description=None, destroy_registry=None, environment_variables=None, id=None, name=None, namespace_id=None, organization_id=None, project_id=None, region=None, registry_endpoint=None, registry_namespace_id=None, secret_environment_variables=None, tags=None):
        if activate_vpc_integration and not isinstance(activate_vpc_integration, bool):
            raise TypeError("Expected argument 'activate_vpc_integration' to be a bool")
        pulumi.set(__self__, "activate_vpc_integration", activate_vpc_integration)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if destroy_registry and not isinstance(destroy_registry, bool):
            raise TypeError("Expected argument 'destroy_registry' to be a bool")
        pulumi.set(__self__, "destroy_registry", destroy_registry)
        if environment_variables and not isinstance(environment_variables, dict):
            raise TypeError("Expected argument 'environment_variables' to be a dict")
        pulumi.set(__self__, "environment_variables", environment_variables)
        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 namespace_id and not isinstance(namespace_id, str):
            raise TypeError("Expected argument 'namespace_id' to be a str")
        pulumi.set(__self__, "namespace_id", namespace_id)
        if organization_id and not isinstance(organization_id, str):
            raise TypeError("Expected argument 'organization_id' to be a str")
        pulumi.set(__self__, "organization_id", organization_id)
        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 region and not isinstance(region, str):
            raise TypeError("Expected argument 'region' to be a str")
        pulumi.set(__self__, "region", region)
        if registry_endpoint and not isinstance(registry_endpoint, str):
            raise TypeError("Expected argument 'registry_endpoint' to be a str")
        pulumi.set(__self__, "registry_endpoint", registry_endpoint)
        if registry_namespace_id and not isinstance(registry_namespace_id, str):
            raise TypeError("Expected argument 'registry_namespace_id' to be a str")
        pulumi.set(__self__, "registry_namespace_id", registry_namespace_id)
        if secret_environment_variables and not isinstance(secret_environment_variables, dict):
            raise TypeError("Expected argument 'secret_environment_variables' to be a dict")
        pulumi.set(__self__, "secret_environment_variables", secret_environment_variables)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)

    @property
    @pulumi.getter(name="activateVpcIntegration")
    def activate_vpc_integration(self) -> builtins.bool:
        return pulumi.get(self, "activate_vpc_integration")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        The description of the namespace.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="destroyRegistry")
    def destroy_registry(self) -> builtins.bool:
        return pulumi.get(self, "destroy_registry")

    @property
    @pulumi.getter(name="environmentVariables")
    def environment_variables(self) -> Mapping[str, builtins.str]:
        """
        The environment variables of the namespace.
        """
        return pulumi.get(self, "environment_variables")

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

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

    @property
    @pulumi.getter(name="namespaceId")
    def namespace_id(self) -> Optional[builtins.str]:
        return pulumi.get(self, "namespace_id")

    @property
    @pulumi.getter(name="organizationId")
    def organization_id(self) -> builtins.str:
        """
        The unique identifier of the organization with which the namespace is associated.
        """
        return pulumi.get(self, "organization_id")

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

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

    @property
    @pulumi.getter(name="registryEndpoint")
    def registry_endpoint(self) -> builtins.str:
        """
        The registry endpoint of the namespace.
        """
        return pulumi.get(self, "registry_endpoint")

    @property
    @pulumi.getter(name="registryNamespaceId")
    def registry_namespace_id(self) -> builtins.str:
        """
        The unique identifier of the registry namespace of the Serverless Containers namespace.
        """
        return pulumi.get(self, "registry_namespace_id")

    @property
    @pulumi.getter(name="secretEnvironmentVariables")
    def secret_environment_variables(self) -> Mapping[str, builtins.str]:
        return pulumi.get(self, "secret_environment_variables")

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


class AwaitableGetNamespaceResult(GetNamespaceResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetNamespaceResult(
            activate_vpc_integration=self.activate_vpc_integration,
            description=self.description,
            destroy_registry=self.destroy_registry,
            environment_variables=self.environment_variables,
            id=self.id,
            name=self.name,
            namespace_id=self.namespace_id,
            organization_id=self.organization_id,
            project_id=self.project_id,
            region=self.region,
            registry_endpoint=self.registry_endpoint,
            registry_namespace_id=self.registry_namespace_id,
            secret_environment_variables=self.secret_environment_variables,
            tags=self.tags)


def get_namespace(name: Optional[builtins.str] = None,
                  namespace_id: Optional[builtins.str] = None,
                  project_id: Optional[builtins.str] = None,
                  region: Optional[builtins.str] = None,
                  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetNamespaceResult:
    """
    The `containers.Namespace` data source is used to retrieve information about a Serverless Containers namespace.

    Refer to the Serverless Containers [product documentation](https://www.scaleway.com/en/docs/serverless/containers/) and [API documentation](https://www.scaleway.com/en/developers/api/serverless-containers/) for more information.

    ## Retrieve a Serverless Containers namespace

    The following commands allow you to:

    - retrieve a namespace by its name
    - retrieve a namespace by its ID

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Get info by namespace name
    by_name = scaleway.containers.get_namespace(name="my-namespace-name")
    # Get info by namespace ID
    by_id = scaleway.containers.get_namespace(namespace_id="11111111-1111-1111-1111-111111111111")
    ```


    :param builtins.str name: The name of the namespace. Only one of `name` and `namespace_id` should be specified.
    :param builtins.str namespace_id: The unique identifier of the namespace. Only one of `name` and `namespace_id` should be specified.
    :param builtins.str project_id: `project_id`) The unique identifier of the project with which the namespace is associated.
    :param builtins.str region: `region`) The region in which the namespace exists.
    """
    __args__ = dict()
    __args__['name'] = name
    __args__['namespaceId'] = namespace_id
    __args__['projectId'] = project_id
    __args__['region'] = region
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('scaleway:containers/getNamespace:getNamespace', __args__, opts=opts, typ=GetNamespaceResult).value

    return AwaitableGetNamespaceResult(
        activate_vpc_integration=pulumi.get(__ret__, 'activate_vpc_integration'),
        description=pulumi.get(__ret__, 'description'),
        destroy_registry=pulumi.get(__ret__, 'destroy_registry'),
        environment_variables=pulumi.get(__ret__, 'environment_variables'),
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        namespace_id=pulumi.get(__ret__, 'namespace_id'),
        organization_id=pulumi.get(__ret__, 'organization_id'),
        project_id=pulumi.get(__ret__, 'project_id'),
        region=pulumi.get(__ret__, 'region'),
        registry_endpoint=pulumi.get(__ret__, 'registry_endpoint'),
        registry_namespace_id=pulumi.get(__ret__, 'registry_namespace_id'),
        secret_environment_variables=pulumi.get(__ret__, 'secret_environment_variables'),
        tags=pulumi.get(__ret__, 'tags'))
def get_namespace_output(name: Optional[pulumi.Input[Optional[builtins.str]]] = None,
                         namespace_id: 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[GetNamespaceResult]:
    """
    The `containers.Namespace` data source is used to retrieve information about a Serverless Containers namespace.

    Refer to the Serverless Containers [product documentation](https://www.scaleway.com/en/docs/serverless/containers/) and [API documentation](https://www.scaleway.com/en/developers/api/serverless-containers/) for more information.

    ## Retrieve a Serverless Containers namespace

    The following commands allow you to:

    - retrieve a namespace by its name
    - retrieve a namespace by its ID

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Get info by namespace name
    by_name = scaleway.containers.get_namespace(name="my-namespace-name")
    # Get info by namespace ID
    by_id = scaleway.containers.get_namespace(namespace_id="11111111-1111-1111-1111-111111111111")
    ```


    :param builtins.str name: The name of the namespace. Only one of `name` and `namespace_id` should be specified.
    :param builtins.str namespace_id: The unique identifier of the namespace. Only one of `name` and `namespace_id` should be specified.
    :param builtins.str project_id: `project_id`) The unique identifier of the project with which the namespace is associated.
    :param builtins.str region: `region`) The region in which the namespace exists.
    """
    __args__ = dict()
    __args__['name'] = name
    __args__['namespaceId'] = namespace_id
    __args__['projectId'] = project_id
    __args__['region'] = region
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('scaleway:containers/getNamespace:getNamespace', __args__, opts=opts, typ=GetNamespaceResult)
    return __ret__.apply(lambda __response__: GetNamespaceResult(
        activate_vpc_integration=pulumi.get(__response__, 'activate_vpc_integration'),
        description=pulumi.get(__response__, 'description'),
        destroy_registry=pulumi.get(__response__, 'destroy_registry'),
        environment_variables=pulumi.get(__response__, 'environment_variables'),
        id=pulumi.get(__response__, 'id'),
        name=pulumi.get(__response__, 'name'),
        namespace_id=pulumi.get(__response__, 'namespace_id'),
        organization_id=pulumi.get(__response__, 'organization_id'),
        project_id=pulumi.get(__response__, 'project_id'),
        region=pulumi.get(__response__, 'region'),
        registry_endpoint=pulumi.get(__response__, 'registry_endpoint'),
        registry_namespace_id=pulumi.get(__response__, 'registry_namespace_id'),
        secret_environment_variables=pulumi.get(__response__, 'secret_environment_variables'),
        tags=pulumi.get(__response__, 'tags')))
