NomadClient.Api.Jobs (nomad_client v0.13.1)

API calls for all endpoints tagged Jobs.

Link to this section Summary

Functions

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :idempotency_token (String.t): Can be used to ensure operations are only run once.
    • :purge (boolean()): Boolean flag indicating whether to purge allocations of the job after deleting.
    • :global (boolean()): Boolean flag indicating whether the operation should apply to all instances of the job globally.

Returns

  • {:ok, NomadClient.Model.JobDeregisterResponse.t} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :index (integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.
    • :wait (String.t): Provided with IndexParam to wait for change.
    • :stale (String.t): If present, results will include stale reads.
    • :prefix (String.t): Constrains results to jobs that start with the defined prefix
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :per_page (integer()): Maximum number of results to return.
    • :next_token (String.t): Indicates where to start paging for queries that support pagination.

Returns

  • {:ok, NomadClient.Model.Job.t} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :index (integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.
    • :wait (String.t): Provided with IndexParam to wait for change.
    • :stale (String.t): If present, results will include stale reads.
    • :prefix (String.t): Constrains results to jobs that start with the defined prefix
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :per_page (integer()): Maximum number of results to return.
    • :next_token (String.t): Indicates where to start paging for queries that support pagination.
    • :all (boolean()): Specifies whether the list of allocations should include allocations from a previously registered job with the same ID. This is possible if the job is deregistered and reregistered.

Returns

  • {:ok, [%AllocationListStub{}, ...]} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :index (integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.
    • :wait (String.t): Provided with IndexParam to wait for change.
    • :stale (String.t): If present, results will include stale reads.
    • :prefix (String.t): Constrains results to jobs that start with the defined prefix
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :per_page (integer()): Maximum number of results to return.
    • :next_token (String.t): Indicates where to start paging for queries that support pagination.

Returns

  • {:ok, NomadClient.Model.Deployment.t} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :index (integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.
    • :wait (String.t): Provided with IndexParam to wait for change.
    • :stale (String.t): If present, results will include stale reads.
    • :prefix (String.t): Constrains results to jobs that start with the defined prefix
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :per_page (integer()): Maximum number of results to return.
    • :next_token (String.t): Indicates where to start paging for queries that support pagination.
    • :all (integer()): Flag indicating whether to constrain by job creation index or not.

Returns

  • {:ok, [%Deployment{}, ...]} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :index (integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.
    • :wait (String.t): Provided with IndexParam to wait for change.
    • :stale (String.t): If present, results will include stale reads.
    • :prefix (String.t): Constrains results to jobs that start with the defined prefix
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :per_page (integer()): Maximum number of results to return.
    • :next_token (String.t): Indicates where to start paging for queries that support pagination.

Returns

  • {:ok, [%Evaluation{}, ...]} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :index (integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.
    • :wait (String.t): Provided with IndexParam to wait for change.
    • :stale (String.t): If present, results will include stale reads.
    • :prefix (String.t): Constrains results to jobs that start with the defined prefix
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :per_page (integer()): Maximum number of results to return.
    • :next_token (String.t): Indicates where to start paging for queries that support pagination.

Returns

  • {:ok, NomadClient.Model.JobScaleStatusResponse.t} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :index (integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.
    • :wait (String.t): Provided with IndexParam to wait for change.
    • :stale (String.t): If present, results will include stale reads.
    • :prefix (String.t): Constrains results to jobs that start with the defined prefix
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :per_page (integer()): Maximum number of results to return.
    • :next_token (String.t): Indicates where to start paging for queries that support pagination.

Returns

  • {:ok, NomadClient.Model.JobSummary.t} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :index (integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.
    • :wait (String.t): Provided with IndexParam to wait for change.
    • :stale (String.t): If present, results will include stale reads.
    • :prefix (String.t): Constrains results to jobs that start with the defined prefix
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :per_page (integer()): Maximum number of results to return.
    • :next_token (String.t): Indicates where to start paging for queries that support pagination.
    • :diffs (boolean()): Boolean flag indicating whether to compute job diffs.

Returns

  • {:ok, NomadClient.Model.JobVersionsResponse.t} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (NomadClient.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :index (integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.
    • :wait (String.t): Provided with IndexParam to wait for change.
    • :stale (String.t): If present, results will include stale reads.
    • :prefix (String.t): Constrains results to jobs that start with the defined prefix
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :per_page (integer()): Maximum number of results to return.
    • :next_token (String.t): Indicates where to start paging for queries that support pagination.

Returns

  • {:ok, [%JobListStub{}, ...]} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • job_register_request (JobRegisterRequest):
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :idempotency_token (String.t): Can be used to ensure operations are only run once.

Returns

  • {:ok, NomadClient.Model.JobRegisterResponse.t} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • job_dispatch_request (JobDispatchRequest):
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :idempotency_token (String.t): Can be used to ensure operations are only run once.

Returns

  • {:ok, NomadClient.Model.JobDispatchResponse.t} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • job_evaluate_request (JobEvaluateRequest):
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :idempotency_token (String.t): Can be used to ensure operations are only run once.

Returns

  • {:ok, NomadClient.Model.JobRegisterResponse.t} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (NomadClient.Connection): Connection to server
  • jobs_parse_request (JobsParseRequest):
  • opts (keyword): Optional parameters

Returns

  • {:ok, NomadClient.Model.Job.t} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :idempotency_token (String.t): Can be used to ensure operations are only run once.

Returns

  • {:ok, NomadClient.Model.PeriodicForceResponse.t} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • job_plan_request (JobPlanRequest):
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :idempotency_token (String.t): Can be used to ensure operations are only run once.

Returns

  • {:ok, NomadClient.Model.JobPlanResponse.t} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • job_revert_request (JobRevertRequest):
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :idempotency_token (String.t): Can be used to ensure operations are only run once.

Returns

  • {:ok, NomadClient.Model.JobRegisterResponse.t} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • scaling_request (ScalingRequest):
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :idempotency_token (String.t): Can be used to ensure operations are only run once.

Returns

  • {:ok, NomadClient.Model.JobRegisterResponse.t} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • job_stability_request (JobStabilityRequest):
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :idempotency_token (String.t): Can be used to ensure operations are only run once.

Returns

  • {:ok, NomadClient.Model.JobStabilityResponse.t} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_validate_request (JobValidateRequest):
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :idempotency_token (String.t): Can be used to ensure operations are only run once.

Returns

  • {:ok, NomadClient.Model.JobValidateResponse.t} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_register_request (JobRegisterRequest):
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :idempotency_token (String.t): Can be used to ensure operations are only run once.

Returns

  • {:ok, NomadClient.Model.JobRegisterResponse.t} on success
  • {:error, Tesla.Env.t} on failure

Link to this section Functions

Link to this function

delete_job(connection, job_name, opts \\ [])

@spec delete_job(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil}
  | {:ok, NomadClient.Model.JobDeregisterResponse.t()}
  | {:error, Tesla.Env.t()}

parameters

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :idempotency_token (String.t): Can be used to ensure operations are only run once.
    • :purge (boolean()): Boolean flag indicating whether to purge allocations of the job after deleting.
    • :global (boolean()): Boolean flag indicating whether the operation should apply to all instances of the job globally.

returns

Returns

  • {:ok, NomadClient.Model.JobDeregisterResponse.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

get_job(connection, job_name, opts \\ [])

@spec get_job(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil} | {:ok, NomadClient.Model.Job.t()} | {:error, Tesla.Env.t()}

parameters

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :index (integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.
    • :wait (String.t): Provided with IndexParam to wait for change.
    • :stale (String.t): If present, results will include stale reads.
    • :prefix (String.t): Constrains results to jobs that start with the defined prefix
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :per_page (integer()): Maximum number of results to return.
    • :next_token (String.t): Indicates where to start paging for queries that support pagination.

returns

Returns

  • {:ok, NomadClient.Model.Job.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

get_job_allocations(connection, job_name, opts \\ [])

@spec get_job_allocations(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil}
  | {:ok, [NomadClient.Model.AllocationListStub.t()]}
  | {:error, Tesla.Env.t()}

parameters

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :index (integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.
    • :wait (String.t): Provided with IndexParam to wait for change.
    • :stale (String.t): If present, results will include stale reads.
    • :prefix (String.t): Constrains results to jobs that start with the defined prefix
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :per_page (integer()): Maximum number of results to return.
    • :next_token (String.t): Indicates where to start paging for queries that support pagination.
    • :all (boolean()): Specifies whether the list of allocations should include allocations from a previously registered job with the same ID. This is possible if the job is deregistered and reregistered.

returns

Returns

  • {:ok, [%AllocationListStub{}, ...]} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

get_job_deployment(connection, job_name, opts \\ [])

@spec get_job_deployment(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil} | {:ok, NomadClient.Model.Deployment.t()} | {:error, Tesla.Env.t()}

parameters

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :index (integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.
    • :wait (String.t): Provided with IndexParam to wait for change.
    • :stale (String.t): If present, results will include stale reads.
    • :prefix (String.t): Constrains results to jobs that start with the defined prefix
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :per_page (integer()): Maximum number of results to return.
    • :next_token (String.t): Indicates where to start paging for queries that support pagination.

returns

Returns

  • {:ok, NomadClient.Model.Deployment.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

get_job_deployments(connection, job_name, opts \\ [])

@spec get_job_deployments(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil}
  | {:ok, [NomadClient.Model.Deployment.t()]}
  | {:error, Tesla.Env.t()}

parameters

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :index (integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.
    • :wait (String.t): Provided with IndexParam to wait for change.
    • :stale (String.t): If present, results will include stale reads.
    • :prefix (String.t): Constrains results to jobs that start with the defined prefix
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :per_page (integer()): Maximum number of results to return.
    • :next_token (String.t): Indicates where to start paging for queries that support pagination.
    • :all (integer()): Flag indicating whether to constrain by job creation index or not.

returns

Returns

  • {:ok, [%Deployment{}, ...]} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

get_job_evaluations(connection, job_name, opts \\ [])

@spec get_job_evaluations(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil}
  | {:ok, [NomadClient.Model.Evaluation.t()]}
  | {:error, Tesla.Env.t()}

parameters

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :index (integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.
    • :wait (String.t): Provided with IndexParam to wait for change.
    • :stale (String.t): If present, results will include stale reads.
    • :prefix (String.t): Constrains results to jobs that start with the defined prefix
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :per_page (integer()): Maximum number of results to return.
    • :next_token (String.t): Indicates where to start paging for queries that support pagination.

returns

Returns

  • {:ok, [%Evaluation{}, ...]} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

get_job_scale_status(connection, job_name, opts \\ [])

@spec get_job_scale_status(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil}
  | {:ok, NomadClient.Model.JobScaleStatusResponse.t()}
  | {:error, Tesla.Env.t()}

parameters

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :index (integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.
    • :wait (String.t): Provided with IndexParam to wait for change.
    • :stale (String.t): If present, results will include stale reads.
    • :prefix (String.t): Constrains results to jobs that start with the defined prefix
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :per_page (integer()): Maximum number of results to return.
    • :next_token (String.t): Indicates where to start paging for queries that support pagination.

returns

Returns

  • {:ok, NomadClient.Model.JobScaleStatusResponse.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

get_job_summary(connection, job_name, opts \\ [])

@spec get_job_summary(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil} | {:ok, NomadClient.Model.JobSummary.t()} | {:error, Tesla.Env.t()}

parameters

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :index (integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.
    • :wait (String.t): Provided with IndexParam to wait for change.
    • :stale (String.t): If present, results will include stale reads.
    • :prefix (String.t): Constrains results to jobs that start with the defined prefix
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :per_page (integer()): Maximum number of results to return.
    • :next_token (String.t): Indicates where to start paging for queries that support pagination.

returns

Returns

  • {:ok, NomadClient.Model.JobSummary.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

get_job_versions(connection, job_name, opts \\ [])

@spec get_job_versions(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil}
  | {:ok, NomadClient.Model.JobVersionsResponse.t()}
  | {:error, Tesla.Env.t()}

parameters

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :index (integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.
    • :wait (String.t): Provided with IndexParam to wait for change.
    • :stale (String.t): If present, results will include stale reads.
    • :prefix (String.t): Constrains results to jobs that start with the defined prefix
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :per_page (integer()): Maximum number of results to return.
    • :next_token (String.t): Indicates where to start paging for queries that support pagination.
    • :diffs (boolean()): Boolean flag indicating whether to compute job diffs.

returns

Returns

  • {:ok, NomadClient.Model.JobVersionsResponse.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

get_jobs(connection, opts \\ [])

@spec get_jobs(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, nil}
  | {:ok, [NomadClient.Model.JobListStub.t()]}
  | {:error, Tesla.Env.t()}

parameters

Parameters

  • connection (NomadClient.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :index (integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.
    • :wait (String.t): Provided with IndexParam to wait for change.
    • :stale (String.t): If present, results will include stale reads.
    • :prefix (String.t): Constrains results to jobs that start with the defined prefix
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :per_page (integer()): Maximum number of results to return.
    • :next_token (String.t): Indicates where to start paging for queries that support pagination.

returns

Returns

  • {:ok, [%JobListStub{}, ...]} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

post_job(connection, job_name, job_register_request, opts \\ [])

parameters

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • job_register_request (JobRegisterRequest):
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :idempotency_token (String.t): Can be used to ensure operations are only run once.

returns

Returns

  • {:ok, NomadClient.Model.JobRegisterResponse.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

post_job_dispatch(connection, job_name, job_dispatch_request, opts \\ [])

@spec post_job_dispatch(
  Tesla.Env.client(),
  String.t(),
  NomadClient.Model.JobDispatchRequest.t(),
  keyword()
) ::
  {:ok, nil}
  | {:ok, NomadClient.Model.JobDispatchResponse.t()}
  | {:error, Tesla.Env.t()}

parameters

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • job_dispatch_request (JobDispatchRequest):
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :idempotency_token (String.t): Can be used to ensure operations are only run once.

returns

Returns

  • {:ok, NomadClient.Model.JobDispatchResponse.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

post_job_evaluate(connection, job_name, job_evaluate_request, opts \\ [])

@spec post_job_evaluate(
  Tesla.Env.client(),
  String.t(),
  NomadClient.Model.JobEvaluateRequest.t(),
  keyword()
) ::
  {:ok, nil}
  | {:ok, NomadClient.Model.JobRegisterResponse.t()}
  | {:error, Tesla.Env.t()}

parameters

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • job_evaluate_request (JobEvaluateRequest):
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :idempotency_token (String.t): Can be used to ensure operations are only run once.

returns

Returns

  • {:ok, NomadClient.Model.JobRegisterResponse.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

post_job_parse(connection, jobs_parse_request, opts \\ [])

@spec post_job_parse(
  Tesla.Env.client(),
  NomadClient.Model.JobsParseRequest.t(),
  keyword()
) ::
  {:ok, nil} | {:ok, NomadClient.Model.Job.t()} | {:error, Tesla.Env.t()}

parameters

Parameters

  • connection (NomadClient.Connection): Connection to server
  • jobs_parse_request (JobsParseRequest):
  • opts (keyword): Optional parameters

returns

Returns

  • {:ok, NomadClient.Model.Job.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

post_job_periodic_force(connection, job_name, opts \\ [])

@spec post_job_periodic_force(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil}
  | {:ok, NomadClient.Model.PeriodicForceResponse.t()}
  | {:error, Tesla.Env.t()}

parameters

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :idempotency_token (String.t): Can be used to ensure operations are only run once.

returns

Returns

  • {:ok, NomadClient.Model.PeriodicForceResponse.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

post_job_plan(connection, job_name, job_plan_request, opts \\ [])

@spec post_job_plan(
  Tesla.Env.client(),
  String.t(),
  NomadClient.Model.JobPlanRequest.t(),
  keyword()
) ::
  {:ok, nil}
  | {:ok, NomadClient.Model.JobPlanResponse.t()}
  | {:error, Tesla.Env.t()}

parameters

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • job_plan_request (JobPlanRequest):
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :idempotency_token (String.t): Can be used to ensure operations are only run once.

returns

Returns

  • {:ok, NomadClient.Model.JobPlanResponse.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

post_job_revert(connection, job_name, job_revert_request, opts \\ [])

@spec post_job_revert(
  Tesla.Env.client(),
  String.t(),
  NomadClient.Model.JobRevertRequest.t(),
  keyword()
) ::
  {:ok, nil}
  | {:ok, NomadClient.Model.JobRegisterResponse.t()}
  | {:error, Tesla.Env.t()}

parameters

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • job_revert_request (JobRevertRequest):
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :idempotency_token (String.t): Can be used to ensure operations are only run once.

returns

Returns

  • {:ok, NomadClient.Model.JobRegisterResponse.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

post_job_scaling_request(connection, job_name, scaling_request, opts \\ [])

@spec post_job_scaling_request(
  Tesla.Env.client(),
  String.t(),
  NomadClient.Model.ScalingRequest.t(),
  keyword()
) ::
  {:ok, nil}
  | {:ok, NomadClient.Model.JobRegisterResponse.t()}
  | {:error, Tesla.Env.t()}

parameters

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • scaling_request (ScalingRequest):
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :idempotency_token (String.t): Can be used to ensure operations are only run once.

returns

Returns

  • {:ok, NomadClient.Model.JobRegisterResponse.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

post_job_stability(connection, job_name, job_stability_request, opts \\ [])

@spec post_job_stability(
  Tesla.Env.client(),
  String.t(),
  NomadClient.Model.JobStabilityRequest.t(),
  keyword()
) ::
  {:ok, nil}
  | {:ok, NomadClient.Model.JobStabilityResponse.t()}
  | {:error, Tesla.Env.t()}

parameters

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_name (String.t): The job identifier.
  • job_stability_request (JobStabilityRequest):
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :idempotency_token (String.t): Can be used to ensure operations are only run once.

returns

Returns

  • {:ok, NomadClient.Model.JobStabilityResponse.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

post_job_validate_request(connection, job_validate_request, opts \\ [])

@spec post_job_validate_request(
  Tesla.Env.client(),
  NomadClient.Model.JobValidateRequest.t(),
  keyword()
) ::
  {:ok, NomadClient.Model.JobValidateResponse.t()}
  | {:ok, nil}
  | {:error, Tesla.Env.t()}

parameters

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_validate_request (JobValidateRequest):
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :idempotency_token (String.t): Can be used to ensure operations are only run once.

returns

Returns

  • {:ok, NomadClient.Model.JobValidateResponse.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

register_job(connection, job_register_request, opts \\ [])

@spec register_job(
  Tesla.Env.client(),
  NomadClient.Model.JobRegisterRequest.t(),
  keyword()
) ::
  {:ok, nil}
  | {:ok, NomadClient.Model.JobRegisterResponse.t()}
  | {:error, Tesla.Env.t()}

parameters

Parameters

  • connection (NomadClient.Connection): Connection to server
  • job_register_request (JobRegisterRequest):
  • opts (keyword): Optional parameters
    • :region (String.t): Filters results based on the specified region.
    • :namespace (String.t): Filters results based on the specified namespace.
    • :x_nomad_token (String.t): A Nomad ACL token.
    • :idempotency_token (String.t): Can be used to ensure operations are only run once.

returns

Returns

  • {:ok, NomadClient.Model.JobRegisterResponse.t} on success
  • {:error, Tesla.Env.t} on failure