# 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__ = [
    'GetJobResult',
    'AwaitableGetJobResult',
    'get_job',
    'get_job_output',
]

@pulumi.output_type
class GetJobResult:
    """
    A collection of values returned by getJob.
    """
    def __init__(__self__, advanced_settings_json=None, auto_deploy=None, auto_preview=None, built_in_environment_variables=None, cpu=None, deployment_restrictions=None, deployment_stage_id=None, environment_id=None, environment_variable_aliases=None, environment_variable_overrides=None, environment_variables=None, external_host=None, healthchecks=None, id=None, internal_host=None, max_duration_seconds=None, max_nb_restart=None, memory=None, name=None, port=None, schedule=None, secret_aliases=None, secret_overrides=None, secrets=None, source=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 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 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 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 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 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_duration_seconds and not isinstance(max_duration_seconds, int):
            raise TypeError("Expected argument 'max_duration_seconds' to be a int")
        pulumi.set(__self__, "max_duration_seconds", max_duration_seconds)
        if max_nb_restart and not isinstance(max_nb_restart, int):
            raise TypeError("Expected argument 'max_nb_restart' to be a int")
        pulumi.set(__self__, "max_nb_restart", max_nb_restart)
        if memory and not isinstance(memory, int):
            raise TypeError("Expected argument 'memory' to be a int")
        pulumi.set(__self__, "memory", memory)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if port and not isinstance(port, int):
            raise TypeError("Expected argument 'port' to be a int")
        pulumi.set(__self__, "port", port)
        if schedule and not isinstance(schedule, dict):
            raise TypeError("Expected argument 'schedule' to be a dict")
        pulumi.set(__self__, "schedule", schedule)
        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 source and not isinstance(source, dict):
            raise TypeError("Expected argument 'source' to be a dict")
        pulumi.set(__self__, "source", source)

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

    @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="builtInEnvironmentVariables")
    def built_in_environment_variables(self) -> Sequence['outputs.GetJobBuiltInEnvironmentVariableResult']:
        return pulumi.get(self, "built_in_environment_variables")

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

    @property
    @pulumi.getter(name="deploymentRestrictions")
    def deployment_restrictions(self) -> Optional[Sequence['outputs.GetJobDeploymentRestrictionResult']]:
        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="environmentId")
    def environment_id(self) -> str:
        return pulumi.get(self, "environment_id")

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

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

    @property
    @pulumi.getter(name="environmentVariables")
    def environment_variables(self) -> Optional[Sequence['outputs.GetJobEnvironmentVariableResult']]:
        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
    def healthchecks(self) -> Optional['outputs.GetJobHealthchecksResult']:
        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="maxDurationSeconds")
    def max_duration_seconds(self) -> int:
        return pulumi.get(self, "max_duration_seconds")

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

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

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

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

    @property
    @pulumi.getter
    def schedule(self) -> 'outputs.GetJobScheduleResult':
        return pulumi.get(self, "schedule")

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

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

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

    @property
    @pulumi.getter
    def source(self) -> 'outputs.GetJobSourceResult':
        return pulumi.get(self, "source")


class AwaitableGetJobResult(GetJobResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetJobResult(
            advanced_settings_json=self.advanced_settings_json,
            auto_deploy=self.auto_deploy,
            auto_preview=self.auto_preview,
            built_in_environment_variables=self.built_in_environment_variables,
            cpu=self.cpu,
            deployment_restrictions=self.deployment_restrictions,
            deployment_stage_id=self.deployment_stage_id,
            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,
            healthchecks=self.healthchecks,
            id=self.id,
            internal_host=self.internal_host,
            max_duration_seconds=self.max_duration_seconds,
            max_nb_restart=self.max_nb_restart,
            memory=self.memory,
            name=self.name,
            port=self.port,
            schedule=self.schedule,
            secret_aliases=self.secret_aliases,
            secret_overrides=self.secret_overrides,
            secrets=self.secrets,
            source=self.source)


def get_job(advanced_settings_json: Optional[str] = None,
            auto_deploy: Optional[bool] = None,
            auto_preview: Optional[bool] = None,
            cpu: Optional[int] = None,
            deployment_restrictions: Optional[Sequence[pulumi.InputType['GetJobDeploymentRestrictionArgs']]] = None,
            deployment_stage_id: Optional[str] = None,
            environment_variable_aliases: Optional[Sequence[pulumi.InputType['GetJobEnvironmentVariableAliasArgs']]] = None,
            environment_variable_overrides: Optional[Sequence[pulumi.InputType['GetJobEnvironmentVariableOverrideArgs']]] = None,
            environment_variables: Optional[Sequence[pulumi.InputType['GetJobEnvironmentVariableArgs']]] = None,
            healthchecks: Optional[pulumi.InputType['GetJobHealthchecksArgs']] = None,
            id: Optional[str] = None,
            max_duration_seconds: Optional[int] = None,
            max_nb_restart: Optional[int] = None,
            memory: Optional[int] = None,
            port: Optional[int] = None,
            secret_aliases: Optional[Sequence[pulumi.InputType['GetJobSecretAliasArgs']]] = None,
            secret_overrides: Optional[Sequence[pulumi.InputType['GetJobSecretOverrideArgs']]] = None,
            secrets: Optional[Sequence[pulumi.InputType['GetJobSecretArgs']]] = None,
            source: Optional[pulumi.InputType['GetJobSourceArgs']] = None,
            opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetJobResult:
    """
    ## # Job (Data Source)

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

    ```python
    import pulumi
    import pulumi_qovery as qovery

    my_job = qovery.get_job(id="<job_id>")
    ```
    """
    __args__ = dict()
    __args__['advancedSettingsJson'] = advanced_settings_json
    __args__['autoDeploy'] = auto_deploy
    __args__['autoPreview'] = auto_preview
    __args__['cpu'] = cpu
    __args__['deploymentRestrictions'] = deployment_restrictions
    __args__['deploymentStageId'] = deployment_stage_id
    __args__['environmentVariableAliases'] = environment_variable_aliases
    __args__['environmentVariableOverrides'] = environment_variable_overrides
    __args__['environmentVariables'] = environment_variables
    __args__['healthchecks'] = healthchecks
    __args__['id'] = id
    __args__['maxDurationSeconds'] = max_duration_seconds
    __args__['maxNbRestart'] = max_nb_restart
    __args__['memory'] = memory
    __args__['port'] = port
    __args__['secretAliases'] = secret_aliases
    __args__['secretOverrides'] = secret_overrides
    __args__['secrets'] = secrets
    __args__['source'] = source
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('qovery:index/getJob:getJob', __args__, opts=opts, typ=GetJobResult).value

    return AwaitableGetJobResult(
        advanced_settings_json=pulumi.get(__ret__, 'advanced_settings_json'),
        auto_deploy=pulumi.get(__ret__, 'auto_deploy'),
        auto_preview=pulumi.get(__ret__, 'auto_preview'),
        built_in_environment_variables=pulumi.get(__ret__, 'built_in_environment_variables'),
        cpu=pulumi.get(__ret__, 'cpu'),
        deployment_restrictions=pulumi.get(__ret__, 'deployment_restrictions'),
        deployment_stage_id=pulumi.get(__ret__, 'deployment_stage_id'),
        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'),
        healthchecks=pulumi.get(__ret__, 'healthchecks'),
        id=pulumi.get(__ret__, 'id'),
        internal_host=pulumi.get(__ret__, 'internal_host'),
        max_duration_seconds=pulumi.get(__ret__, 'max_duration_seconds'),
        max_nb_restart=pulumi.get(__ret__, 'max_nb_restart'),
        memory=pulumi.get(__ret__, 'memory'),
        name=pulumi.get(__ret__, 'name'),
        port=pulumi.get(__ret__, 'port'),
        schedule=pulumi.get(__ret__, 'schedule'),
        secret_aliases=pulumi.get(__ret__, 'secret_aliases'),
        secret_overrides=pulumi.get(__ret__, 'secret_overrides'),
        secrets=pulumi.get(__ret__, 'secrets'),
        source=pulumi.get(__ret__, 'source'))


@_utilities.lift_output_func(get_job)
def get_job_output(advanced_settings_json: Optional[pulumi.Input[Optional[str]]] = None,
                   auto_deploy: Optional[pulumi.Input[Optional[bool]]] = None,
                   auto_preview: Optional[pulumi.Input[Optional[bool]]] = None,
                   cpu: Optional[pulumi.Input[Optional[int]]] = None,
                   deployment_restrictions: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetJobDeploymentRestrictionArgs']]]]] = None,
                   deployment_stage_id: Optional[pulumi.Input[Optional[str]]] = None,
                   environment_variable_aliases: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetJobEnvironmentVariableAliasArgs']]]]] = None,
                   environment_variable_overrides: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetJobEnvironmentVariableOverrideArgs']]]]] = None,
                   environment_variables: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetJobEnvironmentVariableArgs']]]]] = None,
                   healthchecks: Optional[pulumi.Input[Optional[pulumi.InputType['GetJobHealthchecksArgs']]]] = None,
                   id: Optional[pulumi.Input[str]] = None,
                   max_duration_seconds: Optional[pulumi.Input[Optional[int]]] = None,
                   max_nb_restart: Optional[pulumi.Input[Optional[int]]] = None,
                   memory: Optional[pulumi.Input[Optional[int]]] = None,
                   port: Optional[pulumi.Input[Optional[int]]] = None,
                   secret_aliases: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetJobSecretAliasArgs']]]]] = None,
                   secret_overrides: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetJobSecretOverrideArgs']]]]] = None,
                   secrets: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetJobSecretArgs']]]]] = None,
                   source: Optional[pulumi.Input[Optional[pulumi.InputType['GetJobSourceArgs']]]] = None,
                   opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetJobResult]:
    """
    ## # Job (Data Source)

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

    ```python
    import pulumi
    import pulumi_qovery as qovery

    my_job = qovery.get_job(id="<job_id>")
    ```
    """
    ...
