# 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__ = [
    'GetApplicationResult',
    'AwaitableGetApplicationResult',
    'get_application',
    'get_application_output',
]

@pulumi.output_type
class GetApplicationResult:
    """
    A collection of values returned by getApplication.
    """
    def __init__(__self__, advanced_settings_json=None, arguments=None, auto_deploy=None, auto_preview=None, build_mode=None, buildpack_language=None, built_in_environment_variables=None, cpu=None, custom_domains=None, deployment_restrictions=None, deployment_stage_id=None, dockerfile_path=None, entrypoint=None, environment_id=None, environment_variable_aliases=None, environment_variable_overrides=None, environment_variables=None, external_host=None, git_repository=None, healthchecks=None, id=None, internal_host=None, max_running_instances=None, memory=None, min_running_instances=None, name=None, ports=None, secret_aliases=None, secret_overrides=None, secrets=None, storages=None):
        if advanced_settings_json and not isinstance(advanced_settings_json, str):
            raise TypeError("Expected argument 'advanced_settings_json' to be a str")
        pulumi.set(__self__, "advanced_settings_json", advanced_settings_json)
        if arguments and not isinstance(arguments, list):
            raise TypeError("Expected argument 'arguments' to be a list")
        pulumi.set(__self__, "arguments", arguments)
        if auto_deploy and not isinstance(auto_deploy, bool):
            raise TypeError("Expected argument 'auto_deploy' to be a bool")
        pulumi.set(__self__, "auto_deploy", auto_deploy)
        if auto_preview and not isinstance(auto_preview, bool):
            raise TypeError("Expected argument 'auto_preview' to be a bool")
        pulumi.set(__self__, "auto_preview", auto_preview)
        if build_mode and not isinstance(build_mode, str):
            raise TypeError("Expected argument 'build_mode' to be a str")
        pulumi.set(__self__, "build_mode", build_mode)
        if buildpack_language and not isinstance(buildpack_language, str):
            raise TypeError("Expected argument 'buildpack_language' to be a str")
        pulumi.set(__self__, "buildpack_language", buildpack_language)
        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 cpu and not isinstance(cpu, int):
            raise TypeError("Expected argument 'cpu' to be a int")
        pulumi.set(__self__, "cpu", cpu)
        if custom_domains and not isinstance(custom_domains, list):
            raise TypeError("Expected argument 'custom_domains' to be a list")
        pulumi.set(__self__, "custom_domains", custom_domains)
        if deployment_restrictions and not isinstance(deployment_restrictions, list):
            raise TypeError("Expected argument 'deployment_restrictions' to be a list")
        pulumi.set(__self__, "deployment_restrictions", deployment_restrictions)
        if deployment_stage_id and not isinstance(deployment_stage_id, str):
            raise TypeError("Expected argument 'deployment_stage_id' to be a str")
        pulumi.set(__self__, "deployment_stage_id", deployment_stage_id)
        if dockerfile_path and not isinstance(dockerfile_path, str):
            raise TypeError("Expected argument 'dockerfile_path' to be a str")
        pulumi.set(__self__, "dockerfile_path", dockerfile_path)
        if entrypoint and not isinstance(entrypoint, str):
            raise TypeError("Expected argument 'entrypoint' to be a str")
        pulumi.set(__self__, "entrypoint", entrypoint)
        if environment_id and not isinstance(environment_id, str):
            raise TypeError("Expected argument 'environment_id' to be a str")
        pulumi.set(__self__, "environment_id", environment_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 external_host and not isinstance(external_host, str):
            raise TypeError("Expected argument 'external_host' to be a str")
        pulumi.set(__self__, "external_host", external_host)
        if git_repository and not isinstance(git_repository, dict):
            raise TypeError("Expected argument 'git_repository' to be a dict")
        pulumi.set(__self__, "git_repository", git_repository)
        if healthchecks and not isinstance(healthchecks, dict):
            raise TypeError("Expected argument 'healthchecks' to be a dict")
        pulumi.set(__self__, "healthchecks", healthchecks)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if internal_host and not isinstance(internal_host, str):
            raise TypeError("Expected argument 'internal_host' to be a str")
        pulumi.set(__self__, "internal_host", internal_host)
        if max_running_instances and not isinstance(max_running_instances, int):
            raise TypeError("Expected argument 'max_running_instances' to be a int")
        pulumi.set(__self__, "max_running_instances", max_running_instances)
        if memory and not isinstance(memory, int):
            raise TypeError("Expected argument 'memory' to be a int")
        pulumi.set(__self__, "memory", memory)
        if min_running_instances and not isinstance(min_running_instances, int):
            raise TypeError("Expected argument 'min_running_instances' to be a int")
        pulumi.set(__self__, "min_running_instances", min_running_instances)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if ports and not isinstance(ports, list):
            raise TypeError("Expected argument 'ports' to be a list")
        pulumi.set(__self__, "ports", ports)
        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)
        if storages and not isinstance(storages, list):
            raise TypeError("Expected argument 'storages' to be a list")
        pulumi.set(__self__, "storages", storages)

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

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

    @property
    @pulumi.getter(name="autoDeploy")
    def auto_deploy(self) -> bool:
        return pulumi.get(self, "auto_deploy")

    @property
    @pulumi.getter(name="autoPreview")
    def auto_preview(self) -> bool:
        return pulumi.get(self, "auto_preview")

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    @property
    @pulumi.getter(name="gitRepository")
    def git_repository(self) -> 'outputs.GetApplicationGitRepositoryResult':
        return pulumi.get(self, "git_repository")

    @property
    @pulumi.getter
    def healthchecks(self) -> Optional['outputs.GetApplicationHealthchecksResult']:
        return pulumi.get(self, "healthchecks")

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

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

    @property
    @pulumi.getter(name="maxRunningInstances")
    def max_running_instances(self) -> int:
        return pulumi.get(self, "max_running_instances")

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

    @property
    @pulumi.getter(name="minRunningInstances")
    def min_running_instances(self) -> int:
        return pulumi.get(self, "min_running_instances")

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

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

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

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

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

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


class AwaitableGetApplicationResult(GetApplicationResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetApplicationResult(
            advanced_settings_json=self.advanced_settings_json,
            arguments=self.arguments,
            auto_deploy=self.auto_deploy,
            auto_preview=self.auto_preview,
            build_mode=self.build_mode,
            buildpack_language=self.buildpack_language,
            built_in_environment_variables=self.built_in_environment_variables,
            cpu=self.cpu,
            custom_domains=self.custom_domains,
            deployment_restrictions=self.deployment_restrictions,
            deployment_stage_id=self.deployment_stage_id,
            dockerfile_path=self.dockerfile_path,
            entrypoint=self.entrypoint,
            environment_id=self.environment_id,
            environment_variable_aliases=self.environment_variable_aliases,
            environment_variable_overrides=self.environment_variable_overrides,
            environment_variables=self.environment_variables,
            external_host=self.external_host,
            git_repository=self.git_repository,
            healthchecks=self.healthchecks,
            id=self.id,
            internal_host=self.internal_host,
            max_running_instances=self.max_running_instances,
            memory=self.memory,
            min_running_instances=self.min_running_instances,
            name=self.name,
            ports=self.ports,
            secret_aliases=self.secret_aliases,
            secret_overrides=self.secret_overrides,
            secrets=self.secrets,
            storages=self.storages)


def get_application(advanced_settings_json: Optional[str] = None,
                    arguments: Optional[Sequence[str]] = None,
                    auto_deploy: Optional[bool] = None,
                    auto_preview: Optional[bool] = None,
                    buildpack_language: Optional[str] = None,
                    cpu: Optional[int] = None,
                    custom_domains: Optional[Sequence[pulumi.InputType['GetApplicationCustomDomainArgs']]] = None,
                    deployment_restrictions: Optional[Sequence[pulumi.InputType['GetApplicationDeploymentRestrictionArgs']]] = None,
                    deployment_stage_id: Optional[str] = None,
                    dockerfile_path: Optional[str] = None,
                    entrypoint: Optional[str] = None,
                    environment_variable_aliases: Optional[Sequence[pulumi.InputType['GetApplicationEnvironmentVariableAliasArgs']]] = None,
                    environment_variable_overrides: Optional[Sequence[pulumi.InputType['GetApplicationEnvironmentVariableOverrideArgs']]] = None,
                    environment_variables: Optional[Sequence[pulumi.InputType['GetApplicationEnvironmentVariableArgs']]] = None,
                    healthchecks: Optional[pulumi.InputType['GetApplicationHealthchecksArgs']] = None,
                    id: Optional[str] = None,
                    max_running_instances: Optional[int] = None,
                    memory: Optional[int] = None,
                    min_running_instances: Optional[int] = None,
                    secret_aliases: Optional[Sequence[pulumi.InputType['GetApplicationSecretAliasArgs']]] = None,
                    secret_overrides: Optional[Sequence[pulumi.InputType['GetApplicationSecretOverrideArgs']]] = None,
                    secrets: Optional[Sequence[pulumi.InputType['GetApplicationSecretArgs']]] = None,
                    storages: Optional[Sequence[pulumi.InputType['GetApplicationStorageArgs']]] = None,
                    opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetApplicationResult:
    """
    ## # Application (Data Source)

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

    ```python
    import pulumi
    import pulumi_qovery as qovery

    my_application = qovery.get_application(id="<application_id>")
    ```
    """
    __args__ = dict()
    __args__['advancedSettingsJson'] = advanced_settings_json
    __args__['arguments'] = arguments
    __args__['autoDeploy'] = auto_deploy
    __args__['autoPreview'] = auto_preview
    __args__['buildpackLanguage'] = buildpack_language
    __args__['cpu'] = cpu
    __args__['customDomains'] = custom_domains
    __args__['deploymentRestrictions'] = deployment_restrictions
    __args__['deploymentStageId'] = deployment_stage_id
    __args__['dockerfilePath'] = dockerfile_path
    __args__['entrypoint'] = entrypoint
    __args__['environmentVariableAliases'] = environment_variable_aliases
    __args__['environmentVariableOverrides'] = environment_variable_overrides
    __args__['environmentVariables'] = environment_variables
    __args__['healthchecks'] = healthchecks
    __args__['id'] = id
    __args__['maxRunningInstances'] = max_running_instances
    __args__['memory'] = memory
    __args__['minRunningInstances'] = min_running_instances
    __args__['secretAliases'] = secret_aliases
    __args__['secretOverrides'] = secret_overrides
    __args__['secrets'] = secrets
    __args__['storages'] = storages
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('qovery:index/getApplication:getApplication', __args__, opts=opts, typ=GetApplicationResult).value

    return AwaitableGetApplicationResult(
        advanced_settings_json=pulumi.get(__ret__, 'advanced_settings_json'),
        arguments=pulumi.get(__ret__, 'arguments'),
        auto_deploy=pulumi.get(__ret__, 'auto_deploy'),
        auto_preview=pulumi.get(__ret__, 'auto_preview'),
        build_mode=pulumi.get(__ret__, 'build_mode'),
        buildpack_language=pulumi.get(__ret__, 'buildpack_language'),
        built_in_environment_variables=pulumi.get(__ret__, 'built_in_environment_variables'),
        cpu=pulumi.get(__ret__, 'cpu'),
        custom_domains=pulumi.get(__ret__, 'custom_domains'),
        deployment_restrictions=pulumi.get(__ret__, 'deployment_restrictions'),
        deployment_stage_id=pulumi.get(__ret__, 'deployment_stage_id'),
        dockerfile_path=pulumi.get(__ret__, 'dockerfile_path'),
        entrypoint=pulumi.get(__ret__, 'entrypoint'),
        environment_id=pulumi.get(__ret__, 'environment_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'),
        external_host=pulumi.get(__ret__, 'external_host'),
        git_repository=pulumi.get(__ret__, 'git_repository'),
        healthchecks=pulumi.get(__ret__, 'healthchecks'),
        id=pulumi.get(__ret__, 'id'),
        internal_host=pulumi.get(__ret__, 'internal_host'),
        max_running_instances=pulumi.get(__ret__, 'max_running_instances'),
        memory=pulumi.get(__ret__, 'memory'),
        min_running_instances=pulumi.get(__ret__, 'min_running_instances'),
        name=pulumi.get(__ret__, 'name'),
        ports=pulumi.get(__ret__, 'ports'),
        secret_aliases=pulumi.get(__ret__, 'secret_aliases'),
        secret_overrides=pulumi.get(__ret__, 'secret_overrides'),
        secrets=pulumi.get(__ret__, 'secrets'),
        storages=pulumi.get(__ret__, 'storages'))


@_utilities.lift_output_func(get_application)
def get_application_output(advanced_settings_json: Optional[pulumi.Input[Optional[str]]] = None,
                           arguments: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
                           auto_deploy: Optional[pulumi.Input[Optional[bool]]] = None,
                           auto_preview: Optional[pulumi.Input[Optional[bool]]] = None,
                           buildpack_language: Optional[pulumi.Input[Optional[str]]] = None,
                           cpu: Optional[pulumi.Input[Optional[int]]] = None,
                           custom_domains: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetApplicationCustomDomainArgs']]]]] = None,
                           deployment_restrictions: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetApplicationDeploymentRestrictionArgs']]]]] = None,
                           deployment_stage_id: Optional[pulumi.Input[Optional[str]]] = None,
                           dockerfile_path: Optional[pulumi.Input[Optional[str]]] = None,
                           entrypoint: Optional[pulumi.Input[Optional[str]]] = None,
                           environment_variable_aliases: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetApplicationEnvironmentVariableAliasArgs']]]]] = None,
                           environment_variable_overrides: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetApplicationEnvironmentVariableOverrideArgs']]]]] = None,
                           environment_variables: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetApplicationEnvironmentVariableArgs']]]]] = None,
                           healthchecks: Optional[pulumi.Input[Optional[pulumi.InputType['GetApplicationHealthchecksArgs']]]] = None,
                           id: Optional[pulumi.Input[str]] = None,
                           max_running_instances: Optional[pulumi.Input[Optional[int]]] = None,
                           memory: Optional[pulumi.Input[Optional[int]]] = None,
                           min_running_instances: Optional[pulumi.Input[Optional[int]]] = None,
                           secret_aliases: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetApplicationSecretAliasArgs']]]]] = None,
                           secret_overrides: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetApplicationSecretOverrideArgs']]]]] = None,
                           secrets: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetApplicationSecretArgs']]]]] = None,
                           storages: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetApplicationStorageArgs']]]]] = None,
                           opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetApplicationResult]:
    """
    ## # Application (Data Source)

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

    ```python
    import pulumi
    import pulumi_qovery as qovery

    my_application = qovery.get_application(id="<application_id>")
    ```
    """
    ...
