1. Packages
  2. Dbtcloud Provider
  3. API Docs
  4. getJobs
dbt Cloud v0.1.20 published on Friday, Sep 27, 2024 by Pulumi

dbtcloud.getJobs

Explore with Pulumi AI

dbtcloud logo
dbt Cloud v0.1.20 published on Friday, Sep 27, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dbtcloud from "@pulumi/dbtcloud";
    
    // we can search all jobs by project
    const testAllJobsInProject = dbtcloud.getJobs({
        projectId: 1234,
    });
    // or by environment
    const testAllJobsInEnvironment = dbtcloud.getJobs({
        environmentId: 1234,
    });
    const myJobsProd = testAllJobsInProject.then(testAllJobsInProject => .filter(job => job.environment?.deploymentType == "production").map(job => (job)));
    
    import pulumi
    import pulumi_dbtcloud as dbtcloud
    
    # we can search all jobs by project
    test_all_jobs_in_project = dbtcloud.get_jobs(project_id=1234)
    # or by environment
    test_all_jobs_in_environment = dbtcloud.get_jobs(environment_id=1234)
    my_jobs_prod = [job for job in test_all_jobs_in_project.jobs if job.environment.deployment_type == "production"]
    
    Coming soon!
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DbtCloud = Pulumi.DbtCloud;
    
    return await Deployment.RunAsync(() => 
    {
        // we can search all jobs by project
        var testAllJobsInProject = DbtCloud.GetJobs.Invoke(new()
        {
            ProjectId = 1234,
        });
    
        // or by environment
        var testAllJobsInEnvironment = DbtCloud.GetJobs.Invoke(new()
        {
            EnvironmentId = 1234,
        });
    
        var myJobsProd = .Where(job => job.Environment?.DeploymentType == "production").Select(job => 
        {
            return job;
        }).ToList();
    
    });
    
    Coming soon!
    
    Coming soon!
    

    Using getJobs

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getJobs(args: GetJobsArgs, opts?: InvokeOptions): Promise<GetJobsResult>
    function getJobsOutput(args: GetJobsOutputArgs, opts?: InvokeOptions): Output<GetJobsResult>
    def get_jobs(environment_id: Optional[int] = None,
                 project_id: Optional[int] = None,
                 opts: Optional[InvokeOptions] = None) -> GetJobsResult
    def get_jobs_output(environment_id: Optional[pulumi.Input[int]] = None,
                 project_id: Optional[pulumi.Input[int]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetJobsResult]
    func GetJobs(ctx *Context, args *GetJobsArgs, opts ...InvokeOption) (*GetJobsResult, error)
    func GetJobsOutput(ctx *Context, args *GetJobsOutputArgs, opts ...InvokeOption) GetJobsResultOutput

    > Note: This function is named GetJobs in the Go SDK.

    public static class GetJobs 
    {
        public static Task<GetJobsResult> InvokeAsync(GetJobsArgs args, InvokeOptions? opts = null)
        public static Output<GetJobsResult> Invoke(GetJobsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetJobsResult> getJobs(GetJobsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: dbtcloud:index/getJobs:getJobs
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EnvironmentId int
    The ID of the environment for which we want to retrieve the jobs (one of project_id or environment_id must be set)
    ProjectId int
    The ID of the project for which we want to retrieve the jobs (one of project_id or environment_id must be set)
    EnvironmentId int
    The ID of the environment for which we want to retrieve the jobs (one of project_id or environment_id must be set)
    ProjectId int
    The ID of the project for which we want to retrieve the jobs (one of project_id or environment_id must be set)
    environmentId Integer
    The ID of the environment for which we want to retrieve the jobs (one of project_id or environment_id must be set)
    projectId Integer
    The ID of the project for which we want to retrieve the jobs (one of project_id or environment_id must be set)
    environmentId number
    The ID of the environment for which we want to retrieve the jobs (one of project_id or environment_id must be set)
    projectId number
    The ID of the project for which we want to retrieve the jobs (one of project_id or environment_id must be set)
    environment_id int
    The ID of the environment for which we want to retrieve the jobs (one of project_id or environment_id must be set)
    project_id int
    The ID of the project for which we want to retrieve the jobs (one of project_id or environment_id must be set)
    environmentId Number
    The ID of the environment for which we want to retrieve the jobs (one of project_id or environment_id must be set)
    projectId Number
    The ID of the project for which we want to retrieve the jobs (one of project_id or environment_id must be set)

    getJobs Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Jobs List<Pulumi.DbtCloud.Outputs.GetJobsJob>
    Set of jobs with their details
    EnvironmentId int
    The ID of the environment for which we want to retrieve the jobs (one of project_id or environment_id must be set)
    ProjectId int
    The ID of the project for which we want to retrieve the jobs (one of project_id or environment_id must be set)
    Id string
    The provider-assigned unique ID for this managed resource.
    Jobs []GetJobsJob
    Set of jobs with their details
    EnvironmentId int
    The ID of the environment for which we want to retrieve the jobs (one of project_id or environment_id must be set)
    ProjectId int
    The ID of the project for which we want to retrieve the jobs (one of project_id or environment_id must be set)
    id String
    The provider-assigned unique ID for this managed resource.
    jobs List<GetJobsJob>
    Set of jobs with their details
    environmentId Integer
    The ID of the environment for which we want to retrieve the jobs (one of project_id or environment_id must be set)
    projectId Integer
    The ID of the project for which we want to retrieve the jobs (one of project_id or environment_id must be set)
    id string
    The provider-assigned unique ID for this managed resource.
    jobs GetJobsJob[]
    Set of jobs with their details
    environmentId number
    The ID of the environment for which we want to retrieve the jobs (one of project_id or environment_id must be set)
    projectId number
    The ID of the project for which we want to retrieve the jobs (one of project_id or environment_id must be set)
    id str
    The provider-assigned unique ID for this managed resource.
    jobs Sequence[GetJobsJob]
    Set of jobs with their details
    environment_id int
    The ID of the environment for which we want to retrieve the jobs (one of project_id or environment_id must be set)
    project_id int
    The ID of the project for which we want to retrieve the jobs (one of project_id or environment_id must be set)
    id String
    The provider-assigned unique ID for this managed resource.
    jobs List<Property Map>
    Set of jobs with their details
    environmentId Number
    The ID of the environment for which we want to retrieve the jobs (one of project_id or environment_id must be set)
    projectId Number
    The ID of the project for which we want to retrieve the jobs (one of project_id or environment_id must be set)

    Supporting Types

    GetJobsJob

    DbtVersion string
    The version of dbt used for the job. If not set, the environment version will be used.
    DeferringEnvironmentId int
    The ID of the environment this job defers to
    DeferringJobDefinitionId int
    [Deprecated - deferral is now set at the environment level] The ID of the job definition this job defers to
    Description string
    The description of the job
    Environment Pulumi.DbtCloud.Inputs.GetJobsJobEnvironment
    Details of the environment the job is running in
    EnvironmentId int
    The ID of environment
    ExecuteSteps List<string>
    The list of steps to run in the job
    Execution Pulumi.DbtCloud.Inputs.GetJobsJobExecution
    GenerateDocs bool
    Whether the job generate docs
    Id int
    The ID of the job
    JobCompletionTriggerCondition Pulumi.DbtCloud.Inputs.GetJobsJobJobCompletionTriggerCondition
    Whether the job is triggered by the completion of another job
    JobType string
    The type of job (e.g. CI, scheduled)
    Name string
    The name of the job
    ProjectId int
    The ID of the project
    RunGenerateSources bool
    Whether the job test source freshness
    Schedule Pulumi.DbtCloud.Inputs.GetJobsJobSchedule
    Settings Pulumi.DbtCloud.Inputs.GetJobsJobSettings
    Triggers Pulumi.DbtCloud.Inputs.GetJobsJobTriggers
    TriggersOnDraftPr bool
    Whether the CI job should be automatically triggered on draft PRs
    DbtVersion string
    The version of dbt used for the job. If not set, the environment version will be used.
    DeferringEnvironmentId int
    The ID of the environment this job defers to
    DeferringJobDefinitionId int
    [Deprecated - deferral is now set at the environment level] The ID of the job definition this job defers to
    Description string
    The description of the job
    Environment GetJobsJobEnvironment
    Details of the environment the job is running in
    EnvironmentId int
    The ID of environment
    ExecuteSteps []string
    The list of steps to run in the job
    Execution GetJobsJobExecution
    GenerateDocs bool
    Whether the job generate docs
    Id int
    The ID of the job
    JobCompletionTriggerCondition GetJobsJobJobCompletionTriggerCondition
    Whether the job is triggered by the completion of another job
    JobType string
    The type of job (e.g. CI, scheduled)
    Name string
    The name of the job
    ProjectId int
    The ID of the project
    RunGenerateSources bool
    Whether the job test source freshness
    Schedule GetJobsJobSchedule
    Settings GetJobsJobSettings
    Triggers GetJobsJobTriggers
    TriggersOnDraftPr bool
    Whether the CI job should be automatically triggered on draft PRs
    dbtVersion String
    The version of dbt used for the job. If not set, the environment version will be used.
    deferringEnvironmentId Integer
    The ID of the environment this job defers to
    deferringJobDefinitionId Integer
    [Deprecated - deferral is now set at the environment level] The ID of the job definition this job defers to
    description String
    The description of the job
    environment GetJobsJobEnvironment
    Details of the environment the job is running in
    environmentId Integer
    The ID of environment
    executeSteps List<String>
    The list of steps to run in the job
    execution GetJobsJobExecution
    generateDocs Boolean
    Whether the job generate docs
    id Integer
    The ID of the job
    jobCompletionTriggerCondition GetJobsJobJobCompletionTriggerCondition
    Whether the job is triggered by the completion of another job
    jobType String
    The type of job (e.g. CI, scheduled)
    name String
    The name of the job
    projectId Integer
    The ID of the project
    runGenerateSources Boolean
    Whether the job test source freshness
    schedule GetJobsJobSchedule
    settings GetJobsJobSettings
    triggers GetJobsJobTriggers
    triggersOnDraftPr Boolean
    Whether the CI job should be automatically triggered on draft PRs
    dbtVersion string
    The version of dbt used for the job. If not set, the environment version will be used.
    deferringEnvironmentId number
    The ID of the environment this job defers to
    deferringJobDefinitionId number
    [Deprecated - deferral is now set at the environment level] The ID of the job definition this job defers to
    description string
    The description of the job
    environment GetJobsJobEnvironment
    Details of the environment the job is running in
    environmentId number
    The ID of environment
    executeSteps string[]
    The list of steps to run in the job
    execution GetJobsJobExecution
    generateDocs boolean
    Whether the job generate docs
    id number
    The ID of the job
    jobCompletionTriggerCondition GetJobsJobJobCompletionTriggerCondition
    Whether the job is triggered by the completion of another job
    jobType string
    The type of job (e.g. CI, scheduled)
    name string
    The name of the job
    projectId number
    The ID of the project
    runGenerateSources boolean
    Whether the job test source freshness
    schedule GetJobsJobSchedule
    settings GetJobsJobSettings
    triggers GetJobsJobTriggers
    triggersOnDraftPr boolean
    Whether the CI job should be automatically triggered on draft PRs
    dbt_version str
    The version of dbt used for the job. If not set, the environment version will be used.
    deferring_environment_id int
    The ID of the environment this job defers to
    deferring_job_definition_id int
    [Deprecated - deferral is now set at the environment level] The ID of the job definition this job defers to
    description str
    The description of the job
    environment GetJobsJobEnvironment
    Details of the environment the job is running in
    environment_id int
    The ID of environment
    execute_steps Sequence[str]
    The list of steps to run in the job
    execution GetJobsJobExecution
    generate_docs bool
    Whether the job generate docs
    id int
    The ID of the job
    job_completion_trigger_condition GetJobsJobJobCompletionTriggerCondition
    Whether the job is triggered by the completion of another job
    job_type str
    The type of job (e.g. CI, scheduled)
    name str
    The name of the job
    project_id int
    The ID of the project
    run_generate_sources bool
    Whether the job test source freshness
    schedule GetJobsJobSchedule
    settings GetJobsJobSettings
    triggers GetJobsJobTriggers
    triggers_on_draft_pr bool
    Whether the CI job should be automatically triggered on draft PRs
    dbtVersion String
    The version of dbt used for the job. If not set, the environment version will be used.
    deferringEnvironmentId Number
    The ID of the environment this job defers to
    deferringJobDefinitionId Number
    [Deprecated - deferral is now set at the environment level] The ID of the job definition this job defers to
    description String
    The description of the job
    environment Property Map
    Details of the environment the job is running in
    environmentId Number
    The ID of environment
    executeSteps List<String>
    The list of steps to run in the job
    execution Property Map
    generateDocs Boolean
    Whether the job generate docs
    id Number
    The ID of the job
    jobCompletionTriggerCondition Property Map
    Whether the job is triggered by the completion of another job
    jobType String
    The type of job (e.g. CI, scheduled)
    name String
    The name of the job
    projectId Number
    The ID of the project
    runGenerateSources Boolean
    Whether the job test source freshness
    schedule Property Map
    settings Property Map
    triggers Property Map
    triggersOnDraftPr Boolean
    Whether the CI job should be automatically triggered on draft PRs

    GetJobsJobEnvironment

    DeploymentType string
    Type of deployment environment: staging, production
    Id int
    ID of the environment
    Name string
    Name of the environment
    ProjectId int
    Type string
    Environment type: development or deployment
    DeploymentType string
    Type of deployment environment: staging, production
    Id int
    ID of the environment
    Name string
    Name of the environment
    ProjectId int
    Type string
    Environment type: development or deployment
    deploymentType String
    Type of deployment environment: staging, production
    id Integer
    ID of the environment
    name String
    Name of the environment
    projectId Integer
    type String
    Environment type: development or deployment
    deploymentType string
    Type of deployment environment: staging, production
    id number
    ID of the environment
    name string
    Name of the environment
    projectId number
    type string
    Environment type: development or deployment
    deployment_type str
    Type of deployment environment: staging, production
    id int
    ID of the environment
    name str
    Name of the environment
    project_id int
    type str
    Environment type: development or deployment
    deploymentType String
    Type of deployment environment: staging, production
    id Number
    ID of the environment
    name String
    Name of the environment
    projectId Number
    type String
    Environment type: development or deployment

    GetJobsJobExecution

    TimeoutSeconds int
    The number of seconds before the job times out
    TimeoutSeconds int
    The number of seconds before the job times out
    timeoutSeconds Integer
    The number of seconds before the job times out
    timeoutSeconds number
    The number of seconds before the job times out
    timeout_seconds int
    The number of seconds before the job times out
    timeoutSeconds Number
    The number of seconds before the job times out

    GetJobsJobJobCompletionTriggerCondition

    GetJobsJobJobCompletionTriggerConditionCondition

    JobId int
    ProjectId int
    Statuses List<string>
    JobId int
    ProjectId int
    Statuses []string
    jobId Integer
    projectId Integer
    statuses List<String>
    jobId number
    projectId number
    statuses string[]
    job_id int
    project_id int
    statuses Sequence[str]
    jobId Number
    projectId Number
    statuses List<String>

    GetJobsJobSchedule

    Cron string
    The cron schedule for the job. Only used if triggers.schedule is true
    Cron string
    The cron schedule for the job. Only used if triggers.schedule is true
    cron String
    The cron schedule for the job. Only used if triggers.schedule is true
    cron string
    The cron schedule for the job. Only used if triggers.schedule is true
    cron str
    The cron schedule for the job. Only used if triggers.schedule is true
    cron String
    The cron schedule for the job. Only used if triggers.schedule is true

    GetJobsJobSettings

    TargetName string
    Value for target.name in the Jinja context
    Threads int
    Number of threads to run dbt with
    TargetName string
    Value for target.name in the Jinja context
    Threads int
    Number of threads to run dbt with
    targetName String
    Value for target.name in the Jinja context
    threads Integer
    Number of threads to run dbt with
    targetName string
    Value for target.name in the Jinja context
    threads number
    Number of threads to run dbt with
    target_name str
    Value for target.name in the Jinja context
    threads int
    Number of threads to run dbt with
    targetName String
    Value for target.name in the Jinja context
    threads Number
    Number of threads to run dbt with

    GetJobsJobTriggers

    GitProviderWebhook bool
    Whether the job runs automatically on PR creation
    GithubWebhook bool
    Whether the job runs automatically on PR creation
    OnMerge bool
    Whether the job runs automatically once a PR is merged
    Schedule bool
    Whether the job runs on a schedule
    GitProviderWebhook bool
    Whether the job runs automatically on PR creation
    GithubWebhook bool
    Whether the job runs automatically on PR creation
    OnMerge bool
    Whether the job runs automatically once a PR is merged
    Schedule bool
    Whether the job runs on a schedule
    gitProviderWebhook Boolean
    Whether the job runs automatically on PR creation
    githubWebhook Boolean
    Whether the job runs automatically on PR creation
    onMerge Boolean
    Whether the job runs automatically once a PR is merged
    schedule Boolean
    Whether the job runs on a schedule
    gitProviderWebhook boolean
    Whether the job runs automatically on PR creation
    githubWebhook boolean
    Whether the job runs automatically on PR creation
    onMerge boolean
    Whether the job runs automatically once a PR is merged
    schedule boolean
    Whether the job runs on a schedule
    git_provider_webhook bool
    Whether the job runs automatically on PR creation
    github_webhook bool
    Whether the job runs automatically on PR creation
    on_merge bool
    Whether the job runs automatically once a PR is merged
    schedule bool
    Whether the job runs on a schedule
    gitProviderWebhook Boolean
    Whether the job runs automatically on PR creation
    githubWebhook Boolean
    Whether the job runs automatically on PR creation
    onMerge Boolean
    Whether the job runs automatically once a PR is merged
    schedule Boolean
    Whether the job runs on a schedule

    Package Details

    Repository
    dbtcloud pulumi/pulumi-dbtcloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the dbtcloud Terraform Provider.
    dbtcloud logo
    dbt Cloud v0.1.20 published on Friday, Sep 27, 2024 by Pulumi