dbt Cloud v0.1.30 published on Thursday, Mar 20, 2025 by Pulumi
dbtcloud.getJobs
Explore with Pulumi AI
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)
public static Output<GetJobsResult> getJobs(GetJobsArgs args, InvokeOptions options)
fn::invoke:
  function: dbtcloud:index/getJobs:getJobs
  arguments:
    # arguments dictionaryThe following arguments are supported:
- EnvironmentId int
- The ID of the environment for which we want to retrieve the jobs (one of project_idorenvironment_idmust be set)
- ProjectId int
- The ID of the project for which we want to retrieve the jobs (one of project_idorenvironment_idmust be set)
- EnvironmentId int
- The ID of the environment for which we want to retrieve the jobs (one of project_idorenvironment_idmust be set)
- ProjectId int
- The ID of the project for which we want to retrieve the jobs (one of project_idorenvironment_idmust be set)
- environmentId Integer
- The ID of the environment for which we want to retrieve the jobs (one of project_idorenvironment_idmust be set)
- projectId Integer
- The ID of the project for which we want to retrieve the jobs (one of project_idorenvironment_idmust be set)
- environmentId number
- The ID of the environment for which we want to retrieve the jobs (one of project_idorenvironment_idmust be set)
- projectId number
- The ID of the project for which we want to retrieve the jobs (one of project_idorenvironment_idmust be set)
- environment_id int
- The ID of the environment for which we want to retrieve the jobs (one of project_idorenvironment_idmust be set)
- project_id int
- The ID of the project for which we want to retrieve the jobs (one of project_idorenvironment_idmust be set)
- environmentId Number
- The ID of the environment for which we want to retrieve the jobs (one of project_idorenvironment_idmust be set)
- projectId Number
- The ID of the project for which we want to retrieve the jobs (one of project_idorenvironment_idmust be set)
getJobs Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Jobs
List<Pulumi.Dbt Cloud. Outputs. Get Jobs Job> 
- Set of jobs with their details
- EnvironmentId int
- The ID of the environment for which we want to retrieve the jobs (one of project_idorenvironment_idmust be set)
- ProjectId int
- The ID of the project for which we want to retrieve the jobs (one of project_idorenvironment_idmust be set)
- Id string
- The provider-assigned unique ID for this managed resource.
- Jobs
[]GetJobs Job 
- Set of jobs with their details
- EnvironmentId int
- The ID of the environment for which we want to retrieve the jobs (one of project_idorenvironment_idmust be set)
- ProjectId int
- The ID of the project for which we want to retrieve the jobs (one of project_idorenvironment_idmust be set)
- id String
- The provider-assigned unique ID for this managed resource.
- jobs
List<GetJobs Job> 
- Set of jobs with their details
- environmentId Integer
- The ID of the environment for which we want to retrieve the jobs (one of project_idorenvironment_idmust be set)
- projectId Integer
- The ID of the project for which we want to retrieve the jobs (one of project_idorenvironment_idmust be set)
- id string
- The provider-assigned unique ID for this managed resource.
- jobs
GetJobs Job[] 
- Set of jobs with their details
- environmentId number
- The ID of the environment for which we want to retrieve the jobs (one of project_idorenvironment_idmust be set)
- projectId number
- The ID of the project for which we want to retrieve the jobs (one of project_idorenvironment_idmust be set)
- id str
- The provider-assigned unique ID for this managed resource.
- jobs
Sequence[GetJobs Job] 
- 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_idorenvironment_idmust be set)
- project_id int
- The ID of the project for which we want to retrieve the jobs (one of project_idorenvironment_idmust 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_idorenvironment_idmust be set)
- projectId Number
- The ID of the project for which we want to retrieve the jobs (one of project_idorenvironment_idmust be set)
Supporting Types
GetJobsJob  
- DbtVersion string
- The version of dbt used for the job. If not set, the environment version will be used.
- DeferringEnvironment intId 
- The ID of the environment this job defers to
- DeferringJob intDefinition Id 
- [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.Dbt Cloud. Inputs. Get Jobs Job Environment 
- 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.Dbt Cloud. Inputs. Get Jobs Job Execution 
- GenerateDocs bool
- Whether the job generate docs
- Id int
- The ID of the job
- JobCompletion Pulumi.Trigger Condition Dbt Cloud. Inputs. Get Jobs Job Job Completion Trigger Condition 
- 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
- RunCompare boolChanges 
- Whether the job should compare data changes introduced by the code change in the PR
- RunGenerate boolSources 
- Whether the job test source freshness
- Schedule
Pulumi.Dbt Cloud. Inputs. Get Jobs Job Schedule 
- Settings
Pulumi.Dbt Cloud. Inputs. Get Jobs Job Settings 
- Triggers
Pulumi.Dbt Cloud. Inputs. Get Jobs Job Triggers 
- TriggersOn boolDraft Pr 
- 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.
- DeferringEnvironment intId 
- The ID of the environment this job defers to
- DeferringJob intDefinition Id 
- [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
GetJobs Job Environment 
- 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
GetJobs Job Execution 
- GenerateDocs bool
- Whether the job generate docs
- Id int
- The ID of the job
- JobCompletion GetTrigger Condition Jobs Job Job Completion Trigger Condition 
- 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
- RunCompare boolChanges 
- Whether the job should compare data changes introduced by the code change in the PR
- RunGenerate boolSources 
- Whether the job test source freshness
- Schedule
GetJobs Job Schedule 
- Settings
GetJobs Job Settings 
- Triggers
GetJobs Job Triggers 
- TriggersOn boolDraft Pr 
- 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.
- deferringEnvironment IntegerId 
- The ID of the environment this job defers to
- deferringJob IntegerDefinition Id 
- [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
GetJobs Job Environment 
- 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
GetJobs Job Execution 
- generateDocs Boolean
- Whether the job generate docs
- id Integer
- The ID of the job
- jobCompletion GetTrigger Condition Jobs Job Job Completion Trigger Condition 
- 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
- runCompare BooleanChanges 
- Whether the job should compare data changes introduced by the code change in the PR
- runGenerate BooleanSources 
- Whether the job test source freshness
- schedule
GetJobs Job Schedule 
- settings
GetJobs Job Settings 
- triggers
GetJobs Job Triggers 
- triggersOn BooleanDraft Pr 
- 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.
- deferringEnvironment numberId 
- The ID of the environment this job defers to
- deferringJob numberDefinition Id 
- [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
GetJobs Job Environment 
- 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
GetJobs Job Execution 
- generateDocs boolean
- Whether the job generate docs
- id number
- The ID of the job
- jobCompletion GetTrigger Condition Jobs Job Job Completion Trigger Condition 
- 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
- runCompare booleanChanges 
- Whether the job should compare data changes introduced by the code change in the PR
- runGenerate booleanSources 
- Whether the job test source freshness
- schedule
GetJobs Job Schedule 
- settings
GetJobs Job Settings 
- triggers
GetJobs Job Triggers 
- triggersOn booleanDraft Pr 
- 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_ intid 
- The ID of the environment this job defers to
- deferring_job_ intdefinition_ id 
- [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
GetJobs Job Environment 
- 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
GetJobs Job Execution 
- generate_docs bool
- Whether the job generate docs
- id int
- The ID of the job
- job_completion_ Gettrigger_ condition Jobs Job Job Completion Trigger Condition 
- 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_compare_ boolchanges 
- Whether the job should compare data changes introduced by the code change in the PR
- run_generate_ boolsources 
- Whether the job test source freshness
- schedule
GetJobs Job Schedule 
- settings
GetJobs Job Settings 
- triggers
GetJobs Job Triggers 
- triggers_on_ booldraft_ pr 
- 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.
- deferringEnvironment NumberId 
- The ID of the environment this job defers to
- deferringJob NumberDefinition Id 
- [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
- jobCompletion Property MapTrigger Condition 
- 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
- runCompare BooleanChanges 
- Whether the job should compare data changes introduced by the code change in the PR
- runGenerate BooleanSources 
- Whether the job test source freshness
- schedule Property Map
- settings Property Map
- triggers Property Map
- triggersOn BooleanDraft Pr 
- 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       
- job_id int
- project_id int
- statuses Sequence[str]
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.namein the Jinja context
- Threads int
- Number of threads to run dbt with
- TargetName string
- Value for target.namein the Jinja context
- Threads int
- Number of threads to run dbt with
- targetName String
- Value for target.namein the Jinja context
- threads Integer
- Number of threads to run dbt with
- targetName string
- Value for target.namein the Jinja context
- threads number
- Number of threads to run dbt with
- target_name str
- Value for target.namein the Jinja context
- threads int
- Number of threads to run dbt with
- targetName String
- Value for target.namein the Jinja context
- threads Number
- Number of threads to run dbt with
GetJobsJobTriggers   
- GitProvider boolWebhook 
- 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
- GitProvider boolWebhook 
- 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
- gitProvider BooleanWebhook 
- 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
- gitProvider booleanWebhook 
- 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_ boolwebhook 
- 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
- gitProvider BooleanWebhook 
- 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 dbtcloudTerraform Provider.
