HashiCorp Nomad

Pulumi Official
Package maintained by Pulumi
v0.2.1 published on Tuesday, Dec 7, 2021 by Pulumi

getJob

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

using Pulumi;
using Nomad = Pulumi.Nomad;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Nomad.GetJob.InvokeAsync(new Nomad.GetJobArgs
        {
            JobId = "example",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-nomad/sdk/go/nomad"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := nomad.LookupJob(ctx, &GetJobArgs{
			JobId: "example",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_nomad as nomad

example = nomad.get_job(job_id="example")
import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";

const example = pulumi.output(nomad.getJob({
    jobId: "example",
}));

Coming soon!

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)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: nomad:index/getJob:getJob
  Arguments:
    # Arguments dictionary

The following arguments are supported:

JobId string
Namespace string
JobId string
Namespace string
jobId String
namespace String
jobId string
namespace string
jobId String
namespace String

getJob Result

The following output properties are available:

AllAtOnce bool
Constraints List<GetJobConstraint>
CreateIndex int
Datacenters List<string>
Id string

The provider-assigned unique ID for this managed resource.

JobId string
JobModifyIndex int
ModifyIndex int
Name string
ParentId string
PeriodicConfigs List<GetJobPeriodicConfig>
Priority int
Region string
Stable bool
Status string
StatusDescription string
Stop bool
SubmitTime int
TaskGroups List<GetJobTaskGroup>
Type string
Version int
Namespace string
AllAtOnce bool
Constraints []GetJobConstraint
CreateIndex int
Datacenters []string
Id string

The provider-assigned unique ID for this managed resource.

JobId string
JobModifyIndex int
ModifyIndex int
Name string
ParentId string
PeriodicConfigs []GetJobPeriodicConfig
Priority int
Region string
Stable bool
Status string
StatusDescription string
Stop bool
SubmitTime int
TaskGroups []GetJobTaskGroup
Type string
Version int
Namespace string
allAtOnce Boolean
constraints List<GetJobConstraint>
createIndex Integer
datacenters List<String>
id String

The provider-assigned unique ID for this managed resource.

jobId String
jobModifyIndex Integer
modifyIndex Integer
name String
parentId String
periodicConfigs List<GetJobPeriodicConfig>
priority Integer
region String
stable Boolean
status String
statusDescription String
stop Boolean
submitTime Integer
taskGroups List<GetJobTaskGroup>
type String
version Integer
namespace String
allAtOnce boolean
constraints GetJobConstraint[]
createIndex number
datacenters string[]
id string

The provider-assigned unique ID for this managed resource.

jobId string
jobModifyIndex number
modifyIndex number
name string
parentId string
periodicConfigs GetJobPeriodicConfig[]
priority number
region string
stable boolean
status string
statusDescription string
stop boolean
submitTime number
taskGroups GetJobTaskGroup[]
type string
version number
namespace string
allAtOnce Boolean
constraints List<Property Map>
createIndex Number
datacenters List<String>
id String

The provider-assigned unique ID for this managed resource.

jobId String
jobModifyIndex Number
modifyIndex Number
name String
parentId String
periodicConfigs List<Property Map>
priority Number
region String
stable Boolean
status String
statusDescription String
stop Boolean
submitTime Number
taskGroups List<Property Map>
type String
version Number
namespace String

Supporting Types

GetJobConstraint

Ltarget string
Operand string
Rtarget string
Ltarget string
Operand string
Rtarget string
ltarget String
operand String
rtarget String
ltarget string
operand string
rtarget string
ltarget String
operand String
rtarget String

GetJobPeriodicConfig

Enabled bool
ProhibitOverlap bool
Spec string
SpecType string
Timezone string
Enabled bool
ProhibitOverlap bool
Spec string
SpecType string
Timezone string
enabled Boolean
prohibitOverlap Boolean
spec String
specType String
timezone String
enabled boolean
prohibitOverlap boolean
spec string
specType string
timezone string
enabled Boolean
prohibitOverlap Boolean
spec String
specType String
timezone String

GetJobTaskGroup

GetJobTaskGroupTask

Driver string
Meta Dictionary<string, object>
Name string
VolumeMounts List<GetJobTaskGroupTaskVolumeMount>

GetJobTaskGroupTaskVolumeMount

Destination string
ReadOnly bool
Volume string
Destination string
ReadOnly bool
Volume string
destination String
readOnly Boolean
volume String
destination string
readOnly boolean
volume string
destination String
readOnly Boolean
volume String

GetJobTaskGroupVolume

Name string
ReadOnly bool
Source string
Type string
Name string
ReadOnly bool
Source string
Type string
name String
readOnly Boolean
source String
type String
name string
readOnly boolean
source string
type string
name str
read_only bool
source str
type str
name String
readOnly Boolean
source String
type String

Package Details

Repository
https://github.com/pulumi/pulumi-nomad
License
Apache-2.0
Notes

This Pulumi package is based on the nomad Terraform Provider.