Class

com.hashicorp.nomad.scalasdk

ScalaJobsApi

Related Doc: package scalasdk

Permalink

class ScalaJobsApi extends AnyRef

API for managing and querying jobs, exposing the functionality of the /v1/jobs and /v1/job endpoints of the Nomad HTTP API.

See also

Job Specification for documentation about the Job structure.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ScalaJobsApi
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ScalaJobsApi(jobsApi: JobsApi)

    Permalink

    jobsApi

    the underlying API from the Java SDK

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def allocations(jobId: String, options: Option[ScalaQueryOptions[Seq[AllocationListStub]]] = None): ServerQueryResponse[Seq[AllocationListStub]]

    Permalink

    Lists the allocations belonging to a job in the active region.

    Lists the allocations belonging to a job in the active region.

    jobId

    the ID of the job to list allocations for

    options

    options controlling how the request is performed

    See also

    GET /v1/job/<ID>/allocations

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def deregister(jobId: String, purge: Boolean = false, options: Option[WriteOptions] = None): EvaluationResponse

    Permalink

    Deregisters a job in the active region, and stops all allocations that are part of it.

    Deregisters a job in the active region, and stops all allocations that are part of it.

    jobId

    the ID of the job to deregister

    purge

    If true, the job is deregistered and purged from the system versus still being queryable and eventually GC'ed from the system. Most callers should not specify purge.

    options

    options controlling how the request is performed

    See also

    DELETE /v1/job/<ID>

  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def evaluations(jobId: String, options: Option[ScalaQueryOptions[Seq[Evaluation]]] = None): ServerQueryResponse[Seq[Evaluation]]

    Permalink

    Lists the evaluations belonging to a job in the active region.

    Lists the evaluations belonging to a job in the active region.

    jobId

    the ID of the job to list evaluations for

    options

    options controlling how the request is performed

    See also

    GET /v1/job/<ID>/evaluations

  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def forceEvaluate(jobId: String, options: Option[WriteOptions] = None): EvaluationResponse

    Permalink

    Creates a new evaluation for a job in the active region.

    Creates a new evaluation for a job in the active region.

    This can be used to force run the scheduling logic if necessary.

    jobId

    the ID of the job to evaluate

    options

    options controlling how the request is performed

    See also

    PUT /v1/job/<ID>/evaluate

  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  15. def info(jobId: String, options: Option[ScalaQueryOptions[Job]] = None): ServerQueryResponse[Job]

    Permalink

    Queries a job in the active region.

    Queries a job in the active region.

    jobId

    the ID of the job to query

    options

    options controlling how the request is performed

    See also

    GET /v1/job/{ID}

  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. def latestDeployment(jobId: String, options: Option[ScalaQueryOptions[Deployment]] = None): ServerQueryResponse[Deployment]

    Permalink

    Gets the latest deployment belonging to a job.

    Gets the latest deployment belonging to a job.

    jobId

    the ID of the job

    options

    options controlling how the request is performed

    See also

    GET /v1/job/<ID>/deployment

  18. def list(jobIdPrefix: Option[String] = None, options: Option[ScalaQueryOptions[Seq[JobListStub]]] = None): ServerQueryResponse[Seq[JobListStub]]

    Permalink

    Lists jobs in the active region.

    Lists jobs in the active region.

    jobIdPrefix

    an even-length prefix that, if given, restricts the results to only jobs having an ID with this prefix

    options

    options controlling how the request is performed

    See also

    GET /v1/jobs

  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. def periodicForce(jobId: String, options: Option[WriteOptions] = None): EvaluationResponse

    Permalink

    Forces a new instance of a periodic job in the active region.

    Forces a new instance of a periodic job in the active region.

    A new instance will be created even if it violates the job's prohibit_overlap settings. As such, this should be only used to immediately run a periodic job.

    jobId

    the ID of the job to force a run of

    options

    options controlling how the request is performed

    See also

    PUT /v1/job/{ID}/periodic/force

  23. def plan(job: Job, diff: Boolean, options: Option[WriteOptions] = None): ServerResponse[JobPlanResponse]

    Permalink

    Invokes a dry-run of the scheduler for a job in the active region.

    Invokes a dry-run of the scheduler for a job in the active region.

    Can be used together with the modifyIndex parameter of register to inspect what will happen before registering a job.

    job

    detailed specification of the job to plan for

    diff

    indicates whether a diff between the current and submitted versions of the job should be included in the response.

    options

    options controlling how the request is performed

    See also

    PUT /v1/job/{ID}/periodic/force

    Modifying a Job

  24. def register(job: Job, modifyIndex: Option[BigInteger] = None, options: Option[WriteOptions] = None): EvaluationResponse

    Permalink

    Registers or updates a job in the active region.

    Registers or updates a job in the active region.

    job

    detailed specification of the job to register

    modifyIndex

    when specified, the registration is only performed if the job's modify index matches. This can be used to make sure the job hasn't changed since getting a plan.

    options

    options controlling how the request is performed

    See also

    PUT /v1/jobs

  25. def revert(jobId: String, version: BigInteger, priorVersion: Option[BigInteger] = None, options: Option[WriteOptions] = None): EvaluationResponse

    Permalink

    Reverts to a prior version of a job.

    Reverts to a prior version of a job.

    jobId

    ID of the job

    version

    the version to revert to

    priorVersion

    when set, the job is only reverted if the job's current version matches this prior version

    options

    options controlling how the request is performed

    See also

    PUT /v1/job/{ID}/revert

  26. def stable(jobId: String, version: BigInteger, stable: Boolean, options: Option[WriteOptions] = None): EvaluationResponse

    Permalink

    Marks a version of a job as stable or unstable.

    Marks a version of a job as stable or unstable.

    jobId

    ID of the job

    version

    the job version to affect

    stable

    whether the job is stable or unstable

    options

    options controlling how the request is performed

    See also

    PUT /v1/job/{ID}/stable

  27. def summary(jobId: String, options: Option[ScalaQueryOptions[JobSummary]] = None): ServerQueryResponse[JobSummary]

    Permalink

    Queries the summary of a job in the active region.

    Queries the summary of a job in the active region.

    jobId

    ID of the job to get a summary for

    options

    options controlling how the request is performed

    See also

    GET /v1/job/{ID}/summary

  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  29. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  30. def validate(job: Job, options: Option[WriteOptions] = None): ServerResponse[JobValidateResponse]

    Permalink

    Validates a job.

    Validates a job.

    job

    the job to validate

    options

    options controlling how the request is performed

    See also

    PUT /v1/validate/job

  31. def versions(jobId: String, diffs: Boolean = false, options: Option[ScalaQueryOptions[JobVersionsResponseData]] = None): ServerQueryResponse[JobVersionsResponseData]

    Permalink

    Lists the versions of a job.

    Lists the versions of a job.

    jobId

    ID of the job

    diffs

    when true, diffs are returned in addition the the job versions

    options

    options controlling how the request is performed

    See also

    GET /v1/job/{ID}/versions

  32. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped