Viewing docs for Nomad v2.5.5
published on Thursday, Feb 26, 2026 by Pulumi
published on Thursday, Feb 26, 2026 by Pulumi
Viewing docs for Nomad v2.5.5
published on Thursday, Feb 26, 2026 by Pulumi
published on Thursday, Feb 26, 2026 by Pulumi
Get information on a job ID. The aim of this datasource is to enable you to act on various settings and states of a particular job.
An error is triggered if zero or more than one result is returned by the query.
Example Usage
Get the data about a snapshot:
import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";
const example = nomad.getJob({
jobId: "example",
namespace: "dev",
});
import pulumi
import pulumi_nomad as nomad
example = nomad.get_job(job_id="example",
namespace="dev")
package main
import (
"github.com/pulumi/pulumi-nomad/sdk/v2/go/nomad"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := nomad.LookupJob(ctx, &nomad.LookupJobArgs{
JobId: "example",
Namespace: pulumi.StringRef("dev"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nomad = Pulumi.Nomad;
return await Deployment.RunAsync(() =>
{
var example = Nomad.GetJob.Invoke(new()
{
JobId = "example",
Namespace = "dev",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nomad.NomadFunctions;
import com.pulumi.nomad.inputs.GetJobArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = NomadFunctions.getJob(GetJobArgs.builder()
.jobId("example")
.namespace("dev")
.build());
}
}
variables:
example:
fn::invoke:
function: nomad:getJob
arguments:
jobId: example
namespace: dev
Using getJob
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 getJob(args: GetJobArgs, opts?: InvokeOptions): Promise<GetJobResult>
function getJobOutput(args: GetJobOutputArgs, opts?: InvokeOptions): Output<GetJobResult>def get_job(job_id: Optional[str] = None,
namespace: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetJobResult
def get_job_output(job_id: Optional[pulumi.Input[str]] = None,
namespace: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetJobResult]func LookupJob(ctx *Context, args *LookupJobArgs, opts ...InvokeOption) (*LookupJobResult, error)
func LookupJobOutput(ctx *Context, args *LookupJobOutputArgs, opts ...InvokeOption) LookupJobResultOutput> Note: This function is named LookupJob in the Go SDK.
public static class GetJob
{
public static Task<GetJobResult> InvokeAsync(GetJobArgs args, InvokeOptions? opts = null)
public static Output<GetJobResult> Invoke(GetJobInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetJobResult> getJob(GetJobArgs args, InvokeOptions options)
public static Output<GetJobResult> getJob(GetJobArgs args, InvokeOptions options)
fn::invoke:
function: nomad:index/getJob:getJob
arguments:
# arguments dictionaryThe following arguments are supported:
getJob Result
The following output properties are available:
- All
At boolOnce (boolean)If the scheduler can make partial placements on oversubscribed nodes.- Constraints
List<Get
Job Constraint> - Create
Index int (integer)Creation Index.- Datacenters List<string>
(list of strings)Datacenters allowed to run the specified job.- Id string
- The provider-assigned unique ID for this managed resource.
- Job
Id string - Job
Modify intIndex (integer)Job modify index (used for version verification).- Modify
Index int (integer)Modification Index.- Name string
(string)Name of the job.- Parent
Id string (string)Job's parent ID.- Periodic
Configs List<GetJob Periodic Config> (list of maps)Job's periodic configuration (time based scheduling).- Priority int
(integer)Used for the prioritization of scheduling and resource access.- Region string
(string)Region where the Nomad cluster resides.- Stable bool
(boolean)Job stability status.- Status string
(string)Execution status of the specified job.- Status
Description string (string)Status description of the specified job.- Stop bool
(boolean)Job enabled status.- Submit
Time int (integer)Job submission date.- Task
Groups List<GetJob Task Group> (list of maps)A list of of the job's task groups.- Type string
(string)Scheduler type used during job creation.- Version int
(integer)Version of the specified job.- Namespace string
- All
At boolOnce (boolean)If the scheduler can make partial placements on oversubscribed nodes.- Constraints
[]Get
Job Constraint - Create
Index int (integer)Creation Index.- Datacenters []string
(list of strings)Datacenters allowed to run the specified job.- Id string
- The provider-assigned unique ID for this managed resource.
- Job
Id string - Job
Modify intIndex (integer)Job modify index (used for version verification).- Modify
Index int (integer)Modification Index.- Name string
(string)Name of the job.- Parent
Id string (string)Job's parent ID.- Periodic
Configs []GetJob Periodic Config (list of maps)Job's periodic configuration (time based scheduling).- Priority int
(integer)Used for the prioritization of scheduling and resource access.- Region string
(string)Region where the Nomad cluster resides.- Stable bool
(boolean)Job stability status.- Status string
(string)Execution status of the specified job.- Status
Description string (string)Status description of the specified job.- Stop bool
(boolean)Job enabled status.- Submit
Time int (integer)Job submission date.- Task
Groups []GetJob Task Group (list of maps)A list of of the job's task groups.- Type string
(string)Scheduler type used during job creation.- Version int
(integer)Version of the specified job.- Namespace string
- all
At BooleanOnce (boolean)If the scheduler can make partial placements on oversubscribed nodes.- constraints
List<Get
Job Constraint> - create
Index Integer (integer)Creation Index.- datacenters List<String>
(list of strings)Datacenters allowed to run the specified job.- id String
- The provider-assigned unique ID for this managed resource.
- job
Id String - job
Modify IntegerIndex (integer)Job modify index (used for version verification).- modify
Index Integer (integer)Modification Index.- name String
(string)Name of the job.- parent
Id String (string)Job's parent ID.- periodic
Configs List<GetJob Periodic Config> (list of maps)Job's periodic configuration (time based scheduling).- priority Integer
(integer)Used for the prioritization of scheduling and resource access.- region String
(string)Region where the Nomad cluster resides.- stable Boolean
(boolean)Job stability status.- status String
(string)Execution status of the specified job.- status
Description String (string)Status description of the specified job.- stop Boolean
(boolean)Job enabled status.- submit
Time Integer (integer)Job submission date.- task
Groups List<GetJob Task Group> (list of maps)A list of of the job's task groups.- type String
(string)Scheduler type used during job creation.- version Integer
(integer)Version of the specified job.- namespace String
- all
At booleanOnce (boolean)If the scheduler can make partial placements on oversubscribed nodes.- constraints
Get
Job Constraint[] - create
Index number (integer)Creation Index.- datacenters string[]
(list of strings)Datacenters allowed to run the specified job.- id string
- The provider-assigned unique ID for this managed resource.
- job
Id string - job
Modify numberIndex (integer)Job modify index (used for version verification).- modify
Index number (integer)Modification Index.- name string
(string)Name of the job.- parent
Id string (string)Job's parent ID.- periodic
Configs GetJob Periodic Config[] (list of maps)Job's periodic configuration (time based scheduling).- priority number
(integer)Used for the prioritization of scheduling and resource access.- region string
(string)Region where the Nomad cluster resides.- stable boolean
(boolean)Job stability status.- status string
(string)Execution status of the specified job.- status
Description string (string)Status description of the specified job.- stop boolean
(boolean)Job enabled status.- submit
Time number (integer)Job submission date.- task
Groups GetJob Task Group[] (list of maps)A list of of the job's task groups.- type string
(string)Scheduler type used during job creation.- version number
(integer)Version of the specified job.- namespace string
- all_
at_ boolonce (boolean)If the scheduler can make partial placements on oversubscribed nodes.- constraints
Sequence[Get
Job Constraint] - create_
index int (integer)Creation Index.- datacenters Sequence[str]
(list of strings)Datacenters allowed to run the specified job.- id str
- The provider-assigned unique ID for this managed resource.
- job_
id str - job_
modify_ intindex (integer)Job modify index (used for version verification).- modify_
index int (integer)Modification Index.- name str
(string)Name of the job.- parent_
id str (string)Job's parent ID.- periodic_
configs Sequence[GetJob Periodic Config] (list of maps)Job's periodic configuration (time based scheduling).- priority int
(integer)Used for the prioritization of scheduling and resource access.- region str
(string)Region where the Nomad cluster resides.- stable bool
(boolean)Job stability status.- status str
(string)Execution status of the specified job.- status_
description str (string)Status description of the specified job.- stop bool
(boolean)Job enabled status.- submit_
time int (integer)Job submission date.- task_
groups Sequence[GetJob Task Group] (list of maps)A list of of the job's task groups.- type str
(string)Scheduler type used during job creation.- version int
(integer)Version of the specified job.- namespace str
- all
At BooleanOnce (boolean)If the scheduler can make partial placements on oversubscribed nodes.- constraints List<Property Map>
- create
Index Number (integer)Creation Index.- datacenters List<String>
(list of strings)Datacenters allowed to run the specified job.- id String
- The provider-assigned unique ID for this managed resource.
- job
Id String - job
Modify NumberIndex (integer)Job modify index (used for version verification).- modify
Index Number (integer)Modification Index.- name String
(string)Name of the job.- parent
Id String (string)Job's parent ID.- periodic
Configs List<Property Map> (list of maps)Job's periodic configuration (time based scheduling).- priority Number
(integer)Used for the prioritization of scheduling and resource access.- region String
(string)Region where the Nomad cluster resides.- stable Boolean
(boolean)Job stability status.- status String
(string)Execution status of the specified job.- status
Description String (string)Status description of the specified job.- stop Boolean
(boolean)Job enabled status.- submit
Time Number (integer)Job submission date.- task
Groups List<Property Map> (list of maps)A list of of the job's task groups.- type String
(string)Scheduler type used during job creation.- version Number
(integer)Version of the specified job.- namespace String
Supporting Types
GetJobConstraint
GetJobPeriodicConfig
- Enabled bool
(boolean)If periodic scheduling is enabled for the specified job.- Prohibit
Overlap bool (boolean)If the specified job should wait until previous instances of the job have completed.- Spec string
(string)- Spec
Type string (string)- Timezone string
(string)Time zone to evaluate the next launch interval against.
- Enabled bool
(boolean)If periodic scheduling is enabled for the specified job.- Prohibit
Overlap bool (boolean)If the specified job should wait until previous instances of the job have completed.- Spec string
(string)- Spec
Type string (string)- Timezone string
(string)Time zone to evaluate the next launch interval against.
- enabled Boolean
(boolean)If periodic scheduling is enabled for the specified job.- prohibit
Overlap Boolean (boolean)If the specified job should wait until previous instances of the job have completed.- spec String
(string)- spec
Type String (string)- timezone String
(string)Time zone to evaluate the next launch interval against.
- enabled boolean
(boolean)If periodic scheduling is enabled for the specified job.- prohibit
Overlap boolean (boolean)If the specified job should wait until previous instances of the job have completed.- spec string
(string)- spec
Type string (string)- timezone string
(string)Time zone to evaluate the next launch interval against.
- enabled bool
(boolean)If periodic scheduling is enabled for the specified job.- prohibit_
overlap bool (boolean)If the specified job should wait until previous instances of the job have completed.- spec str
(string)- spec_
type str (string)- timezone str
(string)Time zone to evaluate the next launch interval against.
- enabled Boolean
(boolean)If periodic scheduling is enabled for the specified job.- prohibit
Overlap Boolean (boolean)If the specified job should wait until previous instances of the job have completed.- spec String
(string)- spec
Type String (string)- timezone String
(string)Time zone to evaluate the next launch interval against.
GetJobTaskGroup
- Count int
- Meta Dictionary<string, string>
- Name string
(string)Name of the job.- Tasks
List<Get
Job Task Group Task> - Volumes
List<Get
Job Task Group Volume>
- Count int
- Meta map[string]string
- Name string
(string)Name of the job.- Tasks
[]Get
Job Task Group Task - Volumes
[]Get
Job Task Group Volume
- count Integer
- meta Map<String,String>
- name String
(string)Name of the job.- tasks
List<Get
Job Task Group Task> - volumes
List<Get
Job Task Group Volume>
- count number
- meta {[key: string]: string}
- name string
(string)Name of the job.- tasks
Get
Job Task Group Task[] - volumes
Get
Job Task Group Volume[]
- count int
- meta Mapping[str, str]
- name str
(string)Name of the job.- tasks
Sequence[Get
Job Task Group Task] - volumes
Sequence[Get
Job Task Group Volume]
- count Number
- meta Map<String>
- name String
(string)Name of the job.- tasks List<Property Map>
- volumes List<Property Map>
GetJobTaskGroupTask
- Driver string
- Meta Dictionary<string, string>
- Name string
(string)Name of the job.- Volume
Mounts List<GetJob Task Group Task Volume Mount>
- Driver string
- Meta map[string]string
- Name string
(string)Name of the job.- Volume
Mounts []GetJob Task Group Task Volume Mount
- driver String
- meta Map<String,String>
- name String
(string)Name of the job.- volume
Mounts List<GetJob Task Group Task Volume Mount>
- driver string
- meta {[key: string]: string}
- name string
(string)Name of the job.- volume
Mounts GetJob Task Group Task Volume Mount[]
- driver str
- meta Mapping[str, str]
- name str
(string)Name of the job.- volume_
mounts Sequence[GetJob Task Group Task Volume Mount]
- driver String
- meta Map<String>
- name String
(string)Name of the job.- volume
Mounts List<Property Map>
GetJobTaskGroupTaskVolumeMount
- Destination string
- Read
Only bool - Volume string
- Destination string
- Read
Only bool - Volume string
- destination String
- read
Only Boolean - volume String
- destination string
- read
Only boolean - volume string
- destination str
- read_
only bool - volume str
- destination String
- read
Only Boolean - volume String
GetJobTaskGroupVolume
Package Details
- Repository
- HashiCorp Nomad pulumi/pulumi-nomad
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
nomadTerraform Provider.
Viewing docs for Nomad v2.5.5
published on Thursday, Feb 26, 2026 by Pulumi
published on Thursday, Feb 26, 2026 by Pulumi
