nomad-client

Crates.io docs.rs License

Nomad OpenApi specification

Overview

This API client was generated by the OpenAPI Generator project.

Installation

Put the package under your project folder and add the following to Cargo.toml under [dependencies]:

nomad-client = "0.0.5"

Documentation for API Endpoints

All URIs are relative to http://localhost:4646/v1

Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- AgentApi | forceleave | post /agent/force-leave | Forces a member of the gossip pool from the \"failed\" state into the \"left\" state. *AgentApi* | gethealth | get /agent/health | Performs a basic healthcheck AgentApi | getmembers | get /agent/members | Queries for the known peers in the gossip pool *AgentApi* | getself | get /agent/self | Queries for information about the agent we are connected to AgentApi | getservers | get /agent/servers | Queries an agent in client mode for its list of known servers *AgentApi* | join | post /agent/join | Causes the agent to join a cluster by joining the gossip pool at one of the given addresses *AgentApi* | streamlogs | get /agent/monitor | Streams logs from a specific Nomad server node AgentApi | updateservers | post /agent/servers | Updates the list of known servers to the given addresses, replacing all previous addresses *AllocationsApi* | getallocation | get /allocation/{allocid} | reads information about a specific allocation *AllocationsApi* | getallocations | get /allocations | query for and interact with allocations AllocationsApi | restartallocation | post /allocation/{allocid}/restart | restarts an allocation or task in-place AllocationsApi | signalallocation | post /allocation/{allocid}/signal | sends a signal to an allocation or task AllocationsApi | stopallocation | post /allocation/{allocid}/stop | stops and reschedules a specific allocation ClientApi | garbagecollectallocation | get /client/allocation/{allocid}/gc | forces a garbage collection of a particular, stopped allocation on a node *ClientApi* | garbagecollectallocation0 | get /client/gc | forces a garbage collection of all stopped allocations on a node ClientApi | getclientallocationstats | get /client/allocation/{allocid}/stats | query the actual resources consumed by an allocation ClientApi | getclientfile | get /client/fs/cat/{allocid} | reads the contents of a file in an allocation directory *ClientApi* | getclientfileatoffest | get /client/fs/readat/{allocid} | reads the contents of a file in an allocation directory at a particular offset and limit ClientApi | getclientstats | get /client/stats | queries the actual resources consumed on a node. The API endpoint is hosted by the Nomad client and requests have to be made to the nomad client whose resource usage metrics are of interest ClientApi | listclientfiles | get /client/fs/ls/{allocid} | lists files in an allocation directory *ClientApi* | statclientfile | get /client/fs/stat/{allocid} | stats a file in an allocation ClientApi | streamclientfile | get /client/fs/stream/{allocid} | streams the contents of a file in an allocation directory *ClientApi* | streamclientlogs | get /client/fs/logs/{allocid} | streams a task's stderr/stdout logs DeploymentsApi | faildeployment | post /deployment/fail/{deploymentid} | mark a deployment as failed. This should be done to force the scheduler to stop creating allocations as part of the deployment or to cause a rollback to a previous job version. This endpoint only triggers a rollback if the most recent stable version of the job has a different specification than the job being reverted DeploymentsApi | getallocationsfordeployment | get /deployment/allocations/{deploymentid} | lists the allocations created or modified for the given deployment DeploymentsApi | getdeployment | get /deployment/{deploymentid} | reads information about a specific deployment by ID DeploymentsApi | getdeployments | get /deployments | lists all deployments *DeploymentsApi* | pausedeployment | post /deployment/pause/{deploymentid} | pause or unpause a deployment. This is done to pause a rolling upgrade or resume it *DeploymentsApi* | promotedeployment | post /deployment/promote/{deploymentid} | promote task groups that have canaries for a deployment. This should be done when the placed canaries are healthy and the rolling upgrade of the remaining allocations should begin *DeploymentsApi* | setallocationhealthindeployment | post /deployment/allocation-health/{deploymentid} | set the health of an allocation that is in the deployment manually EvaluationsApi | getallocationsforevaluation | get /evaluation/{evalid}/allocations | lists the allocations created or modified for the given evaluation EvaluationsApi | getevaluation | get /evaluation/{evalid} | reads information about a specific evaluation by ID EvaluationsApi | getevaluations | get /evaluations | lists all evaluations *JobsApi* | dispatchjob | post /job/{jobid}/dispatch | dispatches a new instance of a parameterized job *JobsApi* | evaluatejob | post /job/{jobid}/evaluate | creates a new evaluation for the given job. This can be used to force run the scheduling logic if necessary *JobsApi* | forcenewperiodicinstance | post /job/{jobid}/periodic/force | forces a new instance of the periodic job. A new instance will be created even if it violates the job's prohibitoverlap settings. As such, this should be only used to immediately run a periodic job JobsApi | getjob | get /job/{jobid} | reads information about a single job for its specification and status JobsApi | getjoballocations | get /job/{jobid}/allocations | reads information about a single job's allocations *JobsApi* | getjobdeployments | get /job/{jobid}/deployments | lists a single job's deployments JobsApi | getjobevaluations | get /job/{jobid}/evaluations | reads information about a single job's evaluations *JobsApi* | getjoblatestdeployment | get /job/{jobid}/deployment | get a single job's most recent deployment *JobsApi* | getjobscalestatus | get /job/{jobid}/scale | reads scale information about a job *JobsApi* | getjobsummary | get /job/{jobid}/summary | reads summary information about a job JobsApi | getjobversions | get /job/{jobid}/versions | reads information about all versions of a job *JobsApi* | getjobs | get /jobs | lists all known jobs in the system registered with Nomad JobsApi | parsejobhcl | post /jobs/parse | parse a HCL jobspec and produce the equivalent JSON encoded job JobsApi | planjob | post /job/{jobid}/plan | invokes a dry-run of the scheduler for the job JobsApi | registerjob | post /jobs | creates (aka \"registers\") a new job in the system *JobsApi* | revertjob | post /job/{jobid}/revert | reverts the job to an older version *JobsApi* | scaletaskgroup | post /job/{jobid}/scale | performs a scaling action against a job. Currently, this endpoint supports scaling the count for a task group JobsApi | setjobstability | post /job/{jobid}/stable | sets the job's stability *JobsApi* | stopjob | delete /job/{jobid} | deregisters a job, and stops all allocations part of it *JobsApi* | updatejob | post /job/{jobid} | registers a new job or updates an existing job *JobsApi* | validatejob | post /validate/job | validate object structs, fields, and types NodesApi | evaluatenode | post /node/{nodeid}/evaluate | creates a new evaluation for the given node. This can be used to force a run of the scheduling logic NodesApi | getallocationsfornode | get /node/{nodeid}/allocations | lists all of the allocations for the given node NodesApi | getnode | get /node/{nodeid} | queries the status of a client node NodesApi | getnodes | get /nodes | lists all nodes registered with Nomad *NodesApi* | search | post /search | returns matches for a given prefix and context, where a context can be jobs, allocations, evaluations, nodes, or deployments *NodesApi* | updatedrainmodefornode | post /node/{nodeid}/drain | toggles the drain mode of the node NodesApi | updatenodeeligibility | post /node/{nodeid}/eligibility | toggles the scheduling eligibility of the node *RegionsApi* | getregions | get /regions | list all known regions StatusApi | getleader | get /status/leader | returns the address of the current leader in the region *StatusApi* | getpeers | get /status/peers | returns the set of raft peers in the region SystemApi | forcegc | put /system/gc | initializes a garbage collection of jobs, evaluations, allocations, and nodes. This is an asynchronous operation *SystemApi* | reconcilesummary | put /system/reconcile/summaries | reconciles the summaries of all registered jobs VolumesApi | deregistervolume | delete /volume/csi/{volumeid} | deregisters an external volume with Nomad. It is an error to deregister a volume that is in use VolumesApi | getvolume | get /volume/csi/{volumeid} | reads information about a specific volume VolumesApi | getvolumes | get /volumes | lists all volumes *VolumesApi* | registervolume | put /volume/csi/{volume_id} | registers an external volume with Nomad. It is an error to register an existing volume

Documentation For Models