# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
from . import outputs
from ._inputs import *

__all__ = [
    'GetEnvironmentResult',
    'AwaitableGetEnvironmentResult',
    'get_environment',
    'get_environment_output',
]

@pulumi.output_type
class GetEnvironmentResult:
    """
    A collection of values returned by getEnvironment.
    """
    def __init__(__self__, built_in_environment_variables=None, cluster_id=None, environment_variable_aliases=None, environment_variable_overrides=None, environment_variables=None, id=None, mode=None, name=None, project_id=None, secret_aliases=None, secret_overrides=None, secrets=None):
        if built_in_environment_variables and not isinstance(built_in_environment_variables, list):
            raise TypeError("Expected argument 'built_in_environment_variables' to be a list")
        pulumi.set(__self__, "built_in_environment_variables", built_in_environment_variables)
        if cluster_id and not isinstance(cluster_id, str):
            raise TypeError("Expected argument 'cluster_id' to be a str")
        pulumi.set(__self__, "cluster_id", cluster_id)
        if environment_variable_aliases and not isinstance(environment_variable_aliases, list):
            raise TypeError("Expected argument 'environment_variable_aliases' to be a list")
        pulumi.set(__self__, "environment_variable_aliases", environment_variable_aliases)
        if environment_variable_overrides and not isinstance(environment_variable_overrides, list):
            raise TypeError("Expected argument 'environment_variable_overrides' to be a list")
        pulumi.set(__self__, "environment_variable_overrides", environment_variable_overrides)
        if environment_variables and not isinstance(environment_variables, list):
            raise TypeError("Expected argument 'environment_variables' to be a list")
        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 mode and not isinstance(mode, str):
            raise TypeError("Expected argument 'mode' to be a str")
        pulumi.set(__self__, "mode", mode)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        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 secret_aliases and not isinstance(secret_aliases, list):
            raise TypeError("Expected argument 'secret_aliases' to be a list")
        pulumi.set(__self__, "secret_aliases", secret_aliases)
        if secret_overrides and not isinstance(secret_overrides, list):
            raise TypeError("Expected argument 'secret_overrides' to be a list")
        pulumi.set(__self__, "secret_overrides", secret_overrides)
        if secrets and not isinstance(secrets, list):
            raise TypeError("Expected argument 'secrets' to be a list")
        pulumi.set(__self__, "secrets", secrets)

    @property
    @pulumi.getter(name="builtInEnvironmentVariables")
    def built_in_environment_variables(self) -> Sequence['outputs.GetEnvironmentBuiltInEnvironmentVariableResult']:
        return pulumi.get(self, "built_in_environment_variables")

    @property
    @pulumi.getter(name="clusterId")
    def cluster_id(self) -> str:
        return pulumi.get(self, "cluster_id")

    @property
    @pulumi.getter(name="environmentVariableAliases")
    def environment_variable_aliases(self) -> Sequence['outputs.GetEnvironmentEnvironmentVariableAliasResult']:
        return pulumi.get(self, "environment_variable_aliases")

    @property
    @pulumi.getter(name="environmentVariableOverrides")
    def environment_variable_overrides(self) -> Sequence['outputs.GetEnvironmentEnvironmentVariableOverrideResult']:
        return pulumi.get(self, "environment_variable_overrides")

    @property
    @pulumi.getter(name="environmentVariables")
    def environment_variables(self) -> Sequence['outputs.GetEnvironmentEnvironmentVariableResult']:
        return pulumi.get(self, "environment_variables")

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

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

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

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

    @property
    @pulumi.getter(name="secretAliases")
    def secret_aliases(self) -> Sequence['outputs.GetEnvironmentSecretAliasResult']:
        return pulumi.get(self, "secret_aliases")

    @property
    @pulumi.getter(name="secretOverrides")
    def secret_overrides(self) -> Optional[Sequence['outputs.GetEnvironmentSecretOverrideResult']]:
        return pulumi.get(self, "secret_overrides")

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


class AwaitableGetEnvironmentResult(GetEnvironmentResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetEnvironmentResult(
            built_in_environment_variables=self.built_in_environment_variables,
            cluster_id=self.cluster_id,
            environment_variable_aliases=self.environment_variable_aliases,
            environment_variable_overrides=self.environment_variable_overrides,
            environment_variables=self.environment_variables,
            id=self.id,
            mode=self.mode,
            name=self.name,
            project_id=self.project_id,
            secret_aliases=self.secret_aliases,
            secret_overrides=self.secret_overrides,
            secrets=self.secrets)


def get_environment(environment_variable_aliases: Optional[Sequence[pulumi.InputType['GetEnvironmentEnvironmentVariableAliasArgs']]] = None,
                    environment_variable_overrides: Optional[Sequence[pulumi.InputType['GetEnvironmentEnvironmentVariableOverrideArgs']]] = None,
                    environment_variables: Optional[Sequence[pulumi.InputType['GetEnvironmentEnvironmentVariableArgs']]] = None,
                    id: Optional[str] = None,
                    mode: Optional[str] = None,
                    secret_aliases: Optional[Sequence[pulumi.InputType['GetEnvironmentSecretAliasArgs']]] = None,
                    secret_overrides: Optional[Sequence[pulumi.InputType['GetEnvironmentSecretOverrideArgs']]] = None,
                    secrets: Optional[Sequence[pulumi.InputType['GetEnvironmentSecretArgs']]] = None,
                    opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetEnvironmentResult:
    """
    ## # Environment (Data Source)

    Provides a Qovery environment resource. This can be used to create and manage Qovery environments.
    ## Example Usage

    ```python
    import pulumi
    import pulumi_qovery as qovery

    my_environment = qovery.get_environment(id="<environment_id>")
    ```
    """
    __args__ = dict()
    __args__['environmentVariableAliases'] = environment_variable_aliases
    __args__['environmentVariableOverrides'] = environment_variable_overrides
    __args__['environmentVariables'] = environment_variables
    __args__['id'] = id
    __args__['mode'] = mode
    __args__['secretAliases'] = secret_aliases
    __args__['secretOverrides'] = secret_overrides
    __args__['secrets'] = secrets
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('qovery:index/getEnvironment:getEnvironment', __args__, opts=opts, typ=GetEnvironmentResult).value

    return AwaitableGetEnvironmentResult(
        built_in_environment_variables=pulumi.get(__ret__, 'built_in_environment_variables'),
        cluster_id=pulumi.get(__ret__, 'cluster_id'),
        environment_variable_aliases=pulumi.get(__ret__, 'environment_variable_aliases'),
        environment_variable_overrides=pulumi.get(__ret__, 'environment_variable_overrides'),
        environment_variables=pulumi.get(__ret__, 'environment_variables'),
        id=pulumi.get(__ret__, 'id'),
        mode=pulumi.get(__ret__, 'mode'),
        name=pulumi.get(__ret__, 'name'),
        project_id=pulumi.get(__ret__, 'project_id'),
        secret_aliases=pulumi.get(__ret__, 'secret_aliases'),
        secret_overrides=pulumi.get(__ret__, 'secret_overrides'),
        secrets=pulumi.get(__ret__, 'secrets'))


@_utilities.lift_output_func(get_environment)
def get_environment_output(environment_variable_aliases: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetEnvironmentEnvironmentVariableAliasArgs']]]]] = None,
                           environment_variable_overrides: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetEnvironmentEnvironmentVariableOverrideArgs']]]]] = None,
                           environment_variables: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetEnvironmentEnvironmentVariableArgs']]]]] = None,
                           id: Optional[pulumi.Input[str]] = None,
                           mode: Optional[pulumi.Input[Optional[str]]] = None,
                           secret_aliases: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetEnvironmentSecretAliasArgs']]]]] = None,
                           secret_overrides: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetEnvironmentSecretOverrideArgs']]]]] = None,
                           secrets: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetEnvironmentSecretArgs']]]]] = None,
                           opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetEnvironmentResult]:
    """
    ## # Environment (Data Source)

    Provides a Qovery environment resource. This can be used to create and manage Qovery environments.
    ## Example Usage

    ```python
    import pulumi
    import pulumi_qovery as qovery

    my_environment = qovery.get_environment(id="<environment_id>")
    ```
    """
    ...
