# nomad-client
[![Crates.io](https://img.shields.io/crates/v/nomad-client?style=flat-square)](https://crates.io/crates/nomad-client)
[![docs.rs](https://img.shields.io/docsrs/nomad-client?style=flat-square)](https://docs.rs/nomad-client)
![License](https://img.shields.io/crates/l/nomad-client?style=flat-square)
Nomad OpenApi specification
## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
- API version: 0.11.0
- Package version: 0.0.1
- Build package: org.openapitools.codegen.languages.RustClientCodegen
## Installation
Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`:
```
nomad-client = "0.0.1"
```
## Documentation for API Endpoints
All URIs are relative to *http://localhost:4646/v1*
*AgentApi* | [**force_leave**](docs/AgentApi.md#force_leave) | **post** /agent/force-leave | Forces a member of the gossip pool from the \"failed\" state into the \"left\" state.
*AgentApi* | [**get_health**](docs/AgentApi.md#get_health) | **get** /agent/health | Performs a basic healthcheck
*AgentApi* | [**get_members**](docs/AgentApi.md#get_members) | **get** /agent/members | Queries for the known peers in the gossip pool
*AgentApi* | [**get_self**](docs/AgentApi.md#get_self) | **get** /agent/self | Queries for information about the agent we are connected to
*AgentApi* | [**get_servers**](docs/AgentApi.md#get_servers) | **get** /agent/servers | Queries an agent in client mode for its list of known servers
*AgentApi* | [**join**](docs/AgentApi.md#join) | **post** /agent/join | Causes the agent to join a cluster by joining the gossip pool at one of the given addresses
*AgentApi* | [**stream_logs**](docs/AgentApi.md#stream_logs) | **get** /agent/monitor | Streams logs from a specific Nomad server node
*AgentApi* | [**update_servers**](docs/AgentApi.md#update_servers) | **post** /agent/servers | Updates the list of known servers to the given addresses, replacing all previous addresses
*AllocationsApi* | [**get_allocation**](docs/AllocationsApi.md#get_allocation) | **get** /allocation/{alloc_id} | reads information about a specific allocation
*AllocationsApi* | [**get_allocations**](docs/AllocationsApi.md#get_allocations) | **get** /allocations | query for and interact with allocations
*AllocationsApi* | [**restart_allocation**](docs/AllocationsApi.md#restart_allocation) | **post** /allocation/{alloc_id}/restart | restarts an allocation or task in-place
*AllocationsApi* | [**signal_allocation**](docs/AllocationsApi.md#signal_allocation) | **post** /allocation/{alloc_id}/signal | sends a signal to an allocation or task
*AllocationsApi* | [**stop_allocation**](docs/AllocationsApi.md#stop_allocation) | **post** /allocation/{alloc_id}/stop | stops and reschedules a specific allocation
*ClientApi* | [**garbage_collect_allocation**](docs/ClientApi.md#garbage_collect_allocation) | **get** /client/allocation/{alloc_id}/gc | forces a garbage collection of a particular, stopped allocation on a node
*ClientApi* | [**garbage_collect_allocation_0**](docs/ClientApi.md#garbage_collect_allocation_0) | **get** /client/gc | forces a garbage collection of all stopped allocations on a node
*ClientApi* | [**get_client_allocation_stats**](docs/ClientApi.md#get_client_allocation_stats) | **get** /client/allocation/{alloc_id}/stats | query the actual resources consumed by an allocation
*ClientApi* | [**get_client_file**](docs/ClientApi.md#get_client_file) | **get** /client/fs/cat/{alloc_id} | reads the contents of a file in an allocation directory
*ClientApi* | [**get_client_file_at_offest**](docs/ClientApi.md#get_client_file_at_offest) | **get** /client/fs/readat/{alloc_id} | reads the contents of a file in an allocation directory at a particular offset and limit
*ClientApi* | [**get_client_stats**](docs/ClientApi.md#get_client_stats) | **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* | [**list_client_files**](docs/ClientApi.md#list_client_files) | **get** /client/fs/ls/{alloc_id} | lists files in an allocation directory
*ClientApi* | [**stat_client_file**](docs/ClientApi.md#stat_client_file) | **get** /client/fs/stat/{alloc_id} | stats a file in an allocation
*ClientApi* | [**stream_client_file**](docs/ClientApi.md#stream_client_file) | **get** /client/fs/stream/{alloc_id} | streams the contents of a file in an allocation directory
*ClientApi* | [**stream_client_logs**](docs/ClientApi.md#stream_client_logs) | **get** /client/fs/logs/{alloc_id} | streams a task's stderr/stdout logs
*DeploymentsApi* | [**fail_deployment**](docs/DeploymentsApi.md#fail_deployment) | **post** /deployment/fail/{deployment_id} | 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* | [**get_allocations_for_deployment**](docs/DeploymentsApi.md#get_allocations_for_deployment) | **get** /deployment/allocations/{deployment_id} | lists the allocations created or modified for the given deployment
*DeploymentsApi* | [**get_deployment**](docs/DeploymentsApi.md#get_deployment) | **get** /deployment/{deployment_id} | reads information about a specific deployment by ID
*DeploymentsApi* | [**get_deployments**](docs/DeploymentsApi.md#get_deployments) | **get** /deployments | lists all deployments
*DeploymentsApi* | [**pause_deployment**](docs/DeploymentsApi.md#pause_deployment) | **post** /deployment/pause/{deployment_id} | pause or unpause a deployment. This is done to pause a rolling upgrade or resume it
*DeploymentsApi* | [**promote_deployment**](docs/DeploymentsApi.md#promote_deployment) | **post** /deployment/promote/{deployment_id} | 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* | [**set_allocation_health_in_deployment**](docs/DeploymentsApi.md#set_allocation_health_in_deployment) | **post** /deployment/allocation-health/{deployment_id} | set the health of an allocation that is in the deployment manually
*EvaluationsApi* | [**get_allocations_for_evaluation**](docs/EvaluationsApi.md#get_allocations_for_evaluation) | **get** /evaluation/{eval_id}/allocations | lists the allocations created or modified for the given evaluation
*EvaluationsApi* | [**get_evaluation**](docs/EvaluationsApi.md#get_evaluation) | **get** /evaluation/{eval_id} | reads information about a specific evaluation by ID
*EvaluationsApi* | [**get_evaluations**](docs/EvaluationsApi.md#get_evaluations) | **get** /evaluations | lists all evaluations
*JobsApi* | [**dispatch_job**](docs/JobsApi.md#dispatch_job) | **post** /job/{job_id}/dispatch | dispatches a new instance of a parameterized job
*JobsApi* | [**evaluate_job**](docs/JobsApi.md#evaluate_job) | **post** /job/{job_id}/evaluate | creates a new evaluation for the given job. This can be used to force run the scheduling logic if necessary
*JobsApi* | [**force_new_periodic_instance**](docs/JobsApi.md#force_new_periodic_instance) | **post** /job/{job_id}/periodic/force | forces a new instance of the periodic job. 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
*JobsApi* | [**get_job**](docs/JobsApi.md#get_job) | **get** /job/{job_id} | reads information about a single job for its specification and status
*JobsApi* | [**get_job_allocations**](docs/JobsApi.md#get_job_allocations) | **get** /job/{job_id}/allocations | reads information about a single job's allocations
*JobsApi* | [**get_job_deployments**](docs/JobsApi.md#get_job_deployments) | **get** /job/{job_id}/deployments | lists a single job's deployments
*JobsApi* | [**get_job_evaluations**](docs/JobsApi.md#get_job_evaluations) | **get** /job/{job_id}/evaluations | reads information about a single job's evaluations
*JobsApi* | [**get_job_latest_deployment**](docs/JobsApi.md#get_job_latest_deployment) | **get** /job/{job_id}/deployment | get a single job's most recent deployment
*JobsApi* | [**get_job_scale_status**](docs/JobsApi.md#get_job_scale_status) | **get** /job/{job_id}/scale | reads scale information about a job
*JobsApi* | [**get_job_summary**](docs/JobsApi.md#get_job_summary) | **get** /job/{job_id}/summary | reads summary information about a job
*JobsApi* | [**get_job_versions**](docs/JobsApi.md#get_job_versions) | **get** /job/{job_id}/versions | reads information about all versions of a job
*JobsApi* | [**get_jobs**](docs/JobsApi.md#get_jobs) | **get** /jobs | lists all known jobs in the system registered with Nomad
*JobsApi* | [**parse_job_hcl**](docs/JobsApi.md#parse_job_hcl) | **post** /jobs/parse | parse a HCL jobspec and produce the equivalent JSON encoded job
*JobsApi* | [**plan_job**](docs/JobsApi.md#plan_job) | **post** /job/{job_id}/plan | invokes a dry-run of the scheduler for the job
*JobsApi* | [**register_job**](docs/JobsApi.md#register_job) | **post** /jobs | creates (aka \"registers\") a new job in the system
*JobsApi* | [**revert_job**](docs/JobsApi.md#revert_job) | **post** /job/{job_id}/revert | reverts the job to an older version
*JobsApi* | [**scale_task_group**](docs/JobsApi.md#scale_task_group) | **post** /job/{job_id}/scale | performs a scaling action against a job. Currently, this endpoint supports scaling the count for a task group
*JobsApi* | [**set_job_stability**](docs/JobsApi.md#set_job_stability) | **post** /job/{job_id}/stable | sets the job's stability
*JobsApi* | [**stop_job**](docs/JobsApi.md#stop_job) | **delete** /job/{job_id} | deregisters a job, and stops all allocations part of it
*JobsApi* | [**update_job**](docs/JobsApi.md#update_job) | **post** /job/{job_id} | registers a new job or updates an existing job
*JobsApi* | [**validate_job**](docs/JobsApi.md#validate_job) | **post** /validate/job | validate object structs, fields, and types
*NodesApi* | [**evaluate_node**](docs/NodesApi.md#evaluate_node) | **post** /node/{node_id}/evaluate | creates a new evaluation for the given node. This can be used to force a run of the scheduling logic
*NodesApi* | [**get_allocations_for_node**](docs/NodesApi.md#get_allocations_for_node) | **get** /node/{node_id}/allocations | lists all of the allocations for the given node
*NodesApi* | [**get_node**](docs/NodesApi.md#get_node) | **get** /node/{node_id} | queries the status of a client node
*NodesApi* | [**get_nodes**](docs/NodesApi.md#get_nodes) | **get** /nodes | lists all nodes registered with Nomad
*NodesApi* | [**search**](docs/NodesApi.md#search) | **post** /search | returns matches for a given prefix and context, where a context can be jobs, allocations, evaluations, nodes, or deployments
*NodesApi* | [**update_drain_mode_for_node**](docs/NodesApi.md#update_drain_mode_for_node) | **post** /node/{node_id}/drain | toggles the drain mode of the node
*NodesApi* | [**update_node_eligibility**](docs/NodesApi.md#update_node_eligibility) | **post** /node/{node_id}/eligibility | toggles the scheduling eligibility of the node
*RegionsApi* | [**get_regions**](docs/RegionsApi.md#get_regions) | **get** /regions | list all known regions
*StatusApi* | [**get_leader**](docs/StatusApi.md#get_leader) | **get** /status/leader | returns the address of the current leader in the region
*StatusApi* | [**get_peers**](docs/StatusApi.md#get_peers) | **get** /status/peers | returns the set of raft peers in the region
*SystemApi* | [**force_gc**](docs/SystemApi.md#force_gc) | **put** /system/gc | initializes a garbage collection of jobs, evaluations, allocations, and nodes. This is an asynchronous operation
*SystemApi* | [**reconcile_summary**](docs/SystemApi.md#reconcile_summary) | **put** /system/reconcile/summaries | reconciles the summaries of all registered jobs
*VolumesApi* | [**deregister_volume**](docs/VolumesApi.md#deregister_volume) | **delete** /volume/csi/{volume_id} | deregisters an external volume with Nomad. It is an error to deregister a volume that is in use
*VolumesApi* | [**get_volume**](docs/VolumesApi.md#get_volume) | **get** /volume/csi/{volume_id} | reads information about a specific volume
*VolumesApi* | [**get_volumes**](docs/VolumesApi.md#get_volumes) | **get** /volumes | lists all volumes
*VolumesApi* | [**register_volume**](docs/VolumesApi.md#register_volume) | **put** /volume/csi/{volume_id} | registers an external volume with Nomad. It is an error to register an existing volume
## Documentation For Models
- [AclPolicy](docs/AclPolicy.md)
- [AclPolicyListStub](docs/AclPolicyListStub.md)
- [AclToken](docs/AclToken.md)
- [AclTokenListStub](docs/AclTokenListStub.md)
- [Affinity](docs/Affinity.md)
- [AgentHealth](docs/AgentHealth.md)
- [AgentHealthResponse](docs/AgentHealthResponse.md)
- [AgentMember](docs/AgentMember.md)
- [AgentSelf](docs/AgentSelf.md)
- [AllocDeploymentStatus](docs/AllocDeploymentStatus.md)
- [AllocFileInfo](docs/AllocFileInfo.md)
- [AllocResourceUsage](docs/AllocResourceUsage.md)
- [AllocSignalRequest](docs/AllocSignalRequest.md)
- [AllocStopResponse](docs/AllocStopResponse.md)
- [AllocatedCpuResources](docs/AllocatedCpuResources.md)
- [AllocatedMemoryResources](docs/AllocatedMemoryResources.md)
- [AllocatedResources](docs/AllocatedResources.md)
- [AllocatedSharedResources](docs/AllocatedSharedResources.md)
- [AllocatedTaskResources](docs/AllocatedTaskResources.md)
- [Allocation](docs/Allocation.md)
- [AllocationListStub](docs/AllocationListStub.md)
- [AllocationMetric](docs/AllocationMetric.md)
- [AllocationRestartRequest](docs/AllocationRestartRequest.md)
- [Attribute](docs/Attribute.md)
- [AutopilotConfiguration](docs/AutopilotConfiguration.md)
- [CheckRestart](docs/CheckRestart.md)
- [Constraint](docs/Constraint.md)
- [ConsulConnect](docs/ConsulConnect.md)
- [ConsulProxy](docs/ConsulProxy.md)
- [ConsulSidecarService](docs/ConsulSidecarService.md)
- [ConsulUpstream](docs/ConsulUpstream.md)
- [CpuStats](docs/CpuStats.md)
- [CsiControllerInfo](docs/CsiControllerInfo.md)
- [CsiInfo](docs/CsiInfo.md)
- [CsiMountOptions](docs/CsiMountOptions.md)
- [CsiNodeInfo](docs/CsiNodeInfo.md)
- [CsiPlugin](docs/CsiPlugin.md)
- [CsiPluginListStub](docs/CsiPluginListStub.md)
- [CsiTopology](docs/CsiTopology.md)
- [CsiVolume](docs/CsiVolume.md)
- [CsiVolumeListStub](docs/CsiVolumeListStub.md)
- [CsiVolumeRegisterRequest](docs/CsiVolumeRegisterRequest.md)
- [Deployment](docs/Deployment.md)
- [DeploymentAllocHealthRequest](docs/DeploymentAllocHealthRequest.md)
- [DeploymentFailRequest](docs/DeploymentFailRequest.md)
- [DeploymentPauseRequest](docs/DeploymentPauseRequest.md)
- [DeploymentPromoteRequest](docs/DeploymentPromoteRequest.md)
- [DeploymentState](docs/DeploymentState.md)
- [DeploymentUpdateResponse](docs/DeploymentUpdateResponse.md)
- [DesiredTransition](docs/DesiredTransition.md)
- [DesiredUpdates](docs/DesiredUpdates.md)
- [DeviceGroupStats](docs/DeviceGroupStats.md)
- [DeviceStats](docs/DeviceStats.md)
- [DispatchPayloadConfig](docs/DispatchPayloadConfig.md)
- [DrainSpec](docs/DrainSpec.md)
- [DrainStrategy](docs/DrainStrategy.md)
- [DriverInfo](docs/DriverInfo.md)
- [EphemeralDisk](docs/EphemeralDisk.md)
- [EvalOptions](docs/EvalOptions.md)
- [Evaluation](docs/Evaluation.md)
- [FieldDiff](docs/FieldDiff.md)
- [HostCpuStats](docs/HostCpuStats.md)
- [HostDiskStats](docs/HostDiskStats.md)
- [HostMemoryStats](docs/HostMemoryStats.md)
- [HostStats](docs/HostStats.md)
- [HostVolumeInfo](docs/HostVolumeInfo.md)
- [Job](docs/Job.md)
- [JobChildrenSummary](docs/JobChildrenSummary.md)
- [JobDeregisterResponse](docs/JobDeregisterResponse.md)
- [JobDiff](docs/JobDiff.md)
- [JobDispatchRequest](docs/JobDispatchRequest.md)
- [JobDispatchResponse](docs/JobDispatchResponse.md)
- [JobEvaluateRequest](docs/JobEvaluateRequest.md)
- [JobListStub](docs/JobListStub.md)
- [JobPlanRequest](docs/JobPlanRequest.md)
- [JobPlanResponse](docs/JobPlanResponse.md)
- [JobRegisterResponse](docs/JobRegisterResponse.md)
- [JobRevertRequest](docs/JobRevertRequest.md)
- [JobScaleStatusResponse](docs/JobScaleStatusResponse.md)
- [JobStabilityRequest](docs/JobStabilityRequest.md)
- [JobStabilityResponse](docs/JobStabilityResponse.md)
- [JobSummary](docs/JobSummary.md)
- [JobValidateRequest](docs/JobValidateRequest.md)
- [JobValidateResponse](docs/JobValidateResponse.md)
- [JobVersionsResponse](docs/JobVersionsResponse.md)
- [JobsParseRequest](docs/JobsParseRequest.md)
- [JoinResponse](docs/JoinResponse.md)
- [KeyringRequest](docs/KeyringRequest.md)
- [KeyringResponse](docs/KeyringResponse.md)
- [LogConfig](docs/LogConfig.md)
- [MemoryStats](docs/MemoryStats.md)
- [MigrateStrategy](docs/MigrateStrategy.md)
- [MonitorMessage](docs/MonitorMessage.md)
- [Namespace](docs/Namespace.md)
- [NetworkResource](docs/NetworkResource.md)
- [Node](docs/Node.md)
- [NodeCpuResources](docs/NodeCpuResources.md)
- [NodeDevice](docs/NodeDevice.md)
- [NodeDeviceLocality](docs/NodeDeviceLocality.md)
- [NodeDeviceResource](docs/NodeDeviceResource.md)
- [NodeDiskResources](docs/NodeDiskResources.md)
- [NodeDrainUpdateResponse](docs/NodeDrainUpdateResponse.md)
- [NodeEligibilityUpdateResponse](docs/NodeEligibilityUpdateResponse.md)
- [NodeEvalResponse](docs/NodeEvalResponse.md)
- [NodeEvent](docs/NodeEvent.md)
- [NodeListStub](docs/NodeListStub.md)
- [NodeMemoryResources](docs/NodeMemoryResources.md)
- [NodeReservedCpuResources](docs/NodeReservedCpuResources.md)
- [NodeReservedDiskResources](docs/NodeReservedDiskResources.md)
- [NodeReservedMemoryResources](docs/NodeReservedMemoryResources.md)
- [NodeReservedNetworkResources](docs/NodeReservedNetworkResources.md)
- [NodeReservedResources](docs/NodeReservedResources.md)
- [NodeResources](docs/NodeResources.md)
- [NodeScoreMeta](docs/NodeScoreMeta.md)
- [NodeUpdateDrainRequest](docs/NodeUpdateDrainRequest.md)
- [NodeUpdateEligibilityRequest](docs/NodeUpdateEligibilityRequest.md)
- [ObjectDiff](docs/ObjectDiff.md)
- [OperatorHealthReply](docs/OperatorHealthReply.md)
- [ParameterizedJobConfig](docs/ParameterizedJobConfig.md)
- [PeriodicConfig](docs/PeriodicConfig.md)
- [PeriodicForceResponse](docs/PeriodicForceResponse.md)
- [PlanAnnotations](docs/PlanAnnotations.md)
- [Port](docs/Port.md)
- [PreemptionConfig](docs/PreemptionConfig.md)
- [QueryOptions](docs/QueryOptions.md)
- [QuotaLimit](docs/QuotaLimit.md)
- [QuotaSpec](docs/QuotaSpec.md)
- [QuotaUsage](docs/QuotaUsage.md)
- [RaftConfiguration](docs/RaftConfiguration.md)
- [RaftServer](docs/RaftServer.md)
- [RegisterJobRequest](docs/RegisterJobRequest.md)
- [RequestedDevice](docs/RequestedDevice.md)
- [RescheduleEvent](docs/RescheduleEvent.md)
- [ReschedulePolicy](docs/ReschedulePolicy.md)
- [RescheduleTracker](docs/RescheduleTracker.md)
- [ResourceUsage](docs/ResourceUsage.md)
- [Resources](docs/Resources.md)
- [RestartPolicy](docs/RestartPolicy.md)
- [ScalingEvent](docs/ScalingEvent.md)
- [ScalingPolicy](docs/ScalingPolicy.md)
- [ScalingPolicyListStub](docs/ScalingPolicyListStub.md)
- [ScalingRequest](docs/ScalingRequest.md)
- [SchedulerConfiguration](docs/SchedulerConfiguration.md)
- [SchedulerConfigurationResponse](docs/SchedulerConfigurationResponse.md)
- [SchedulerSetConfigurationResponse](docs/SchedulerSetConfigurationResponse.md)
- [SearchRequest](docs/SearchRequest.md)
- [SearchResponse](docs/SearchResponse.md)
- [SentinelPolicy](docs/SentinelPolicy.md)
- [SentinelPolicyListStub](docs/SentinelPolicyListStub.md)
- [ServerHealth](docs/ServerHealth.md)
- [ServerMembers](docs/ServerMembers.md)
- [Service](docs/Service.md)
- [ServiceCheck](docs/ServiceCheck.md)
- [SidecarTask](docs/SidecarTask.md)
- [Spread](docs/Spread.md)
- [SpreadTarget](docs/SpreadTarget.md)
- [StatObject](docs/StatObject.md)
- [StatValue](docs/StatValue.md)
- [StreamFrame](docs/StreamFrame.md)
- [Task](docs/Task.md)
- [TaskArtifact](docs/TaskArtifact.md)
- [TaskCsiPluginConfig](docs/TaskCsiPluginConfig.md)
- [TaskDiff](docs/TaskDiff.md)
- [TaskEvent](docs/TaskEvent.md)
- [TaskGroup](docs/TaskGroup.md)
- [TaskGroupDiff](docs/TaskGroupDiff.md)
- [TaskGroupScaleStatus](docs/TaskGroupScaleStatus.md)
- [TaskGroupSummary](docs/TaskGroupSummary.md)
- [TaskLifecycle](docs/TaskLifecycle.md)
- [TaskResourceUsage](docs/TaskResourceUsage.md)
- [TaskState](docs/TaskState.md)
- [Template](docs/Template.md)
- [UpdateStrategy](docs/UpdateStrategy.md)
- [Vault](docs/Vault.md)
- [VolumeMount](docs/VolumeMount.md)
- [VolumeRequest](docs/VolumeRequest.md)