Skip to content

edn-es/nomad-java-client

Repository files navigation

openapi-java-client

Nomad

  • API version: 1.7.6
    • Build date: 2024-03-16T11:56:02.367141Z[Etc/UTC]

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven/Gradle

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>es.edn</groupId>
  <artifactId>nomad-java-client</artifactId>
  <version>1.7.6</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "org.openapitools:openapi-java-client:1.7.6"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/openapi-java-client-1.7.6.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

// Import classes:
import io.nomadproject.client.ApiClient;
import io.nomadproject.client.ApiException;
import io.nomadproject.client.Configuration;
import io.nomadproject.client.auth.*;
import io.nomadproject.client.models.*;
import io.nomadproject.client.api.AclApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://127.0.0.1:4646/v1");
    
    // Configure API key authorization: X-Nomad-Token
    ApiKeyAuth X-Nomad-Token = (ApiKeyAuth) defaultClient.getAuthentication("X-Nomad-Token");
    X-Nomad-Token.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //X-Nomad-Token.setApiKeyPrefix("Token");

    AclApi apiInstance = new AclApi(defaultClient);
    String policyName = "policyName_example"; // String | The ACL policy name.
    String region = "region_example"; // String | Filters results based on the specified region.
    String namespace = "namespace_example"; // String | Filters results based on the specified namespace.
    String xNomadToken = "xNomadToken_example"; // String | A Nomad ACL token.
    String idempotencyToken = "idempotencyToken_example"; // String | Can be used to ensure operations are only run once.
    try {
      apiInstance.deleteACLPolicy(policyName, region, namespace, xNomadToken, idempotencyToken);
    } catch (ApiException e) {
      System.err.println("Exception when calling AclApi#deleteACLPolicy");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Documentation for API Endpoints

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

Class Method HTTP request Description
AclApi deleteACLPolicy DELETE /acl/policy/{policyName}
AclApi deleteACLToken DELETE /acl/token/{tokenAccessor}
AclApi getACLPolicies GET /acl/policies
AclApi getACLPolicy GET /acl/policy/{policyName}
AclApi getACLToken GET /acl/token/{tokenAccessor}
AclApi getACLTokenSelf GET /acl/token
AclApi getACLTokens GET /acl/tokens
AclApi postACLBootstrap POST /acl/bootstrap
AclApi postACLPolicy POST /acl/policy/{policyName}
AclApi postACLToken POST /acl/token/{tokenAccessor}
AclApi postACLTokenOnetime POST /acl/token/onetime
AclApi postACLTokenOnetimeExchange POST /acl/token/onetime/exchange
AllocationsApi getAllocation GET /allocation/{allocID}
AllocationsApi getAllocationServices GET /allocation/{allocID}/services
AllocationsApi getAllocations GET /allocations
AllocationsApi postAllocationStop POST /allocation/{allocID}/stop
DeploymentsApi getDeployment GET /deployment/{deploymentID}
DeploymentsApi getDeploymentAllocations GET /deployment/allocations/{deploymentID}
DeploymentsApi getDeployments GET /deployments
DeploymentsApi postDeploymentAllocationHealth POST /deployment/allocation-health/{deploymentID}
DeploymentsApi postDeploymentFail POST /deployment/fail/{deploymentID}
DeploymentsApi postDeploymentPause POST /deployment/pause/{deploymentID}
DeploymentsApi postDeploymentPromote POST /deployment/promote/{deploymentID}
DeploymentsApi postDeploymentUnblock POST /deployment/unblock/{deploymentID}
EnterpriseApi createQuotaSpec POST /quota
EnterpriseApi deleteQuotaSpec DELETE /quota/{specName}
EnterpriseApi getQuotaSpec GET /quota/{specName}
EnterpriseApi getQuotas GET /quotas
EnterpriseApi postQuotaSpec POST /quota/{specName}
EvaluationsApi getEvaluation GET /evaluation/{evalID}
EvaluationsApi getEvaluationAllocations GET /evaluation/{evalID}/allocations
EvaluationsApi getEvaluations GET /evaluations
JobsApi deleteJob DELETE /job/{jobName}
JobsApi getJob GET /job/{jobName}
JobsApi getJobAllocations GET /job/{jobName}/allocations
JobsApi getJobDeployment GET /job/{jobName}/deployment
JobsApi getJobDeployments GET /job/{jobName}/deployments
JobsApi getJobEvaluations GET /job/{jobName}/evaluations
JobsApi getJobScaleStatus GET /job/{jobName}/scale
JobsApi getJobSummary GET /job/{jobName}/summary
JobsApi getJobVersions GET /job/{jobName}/versions
JobsApi getJobs GET /jobs
JobsApi postJob POST /job/{jobName}
JobsApi postJobDispatch POST /job/{jobName}/dispatch
JobsApi postJobEvaluate POST /job/{jobName}/evaluate
JobsApi postJobParse POST /jobs/parse
JobsApi postJobPeriodicForce POST /job/{jobName}/periodic/force
JobsApi postJobPlan POST /job/{jobName}/plan
JobsApi postJobRevert POST /job/{jobName}/revert
JobsApi postJobScalingRequest POST /job/{jobName}/scale
JobsApi postJobStability POST /job/{jobName}/stable
JobsApi postJobValidateRequest POST /validate/job
JobsApi registerJob POST /jobs
MetricsApi getMetricsSummary GET /metrics
NamespacesApi createNamespace POST /namespace
NamespacesApi deleteNamespace DELETE /namespace/{namespaceName}
NamespacesApi getNamespace GET /namespace/{namespaceName}
NamespacesApi getNamespaces GET /namespaces
NamespacesApi postNamespace POST /namespace/{namespaceName}
NodesApi getNode GET /node/{nodeId}
NodesApi getNodeAllocations GET /node/{nodeId}/allocations
NodesApi getNodes GET /nodes
NodesApi updateNodeDrain POST /node/{nodeId}/drain
NodesApi updateNodeEligibility POST /node/{nodeId}/eligibility
NodesApi updateNodePurge POST /node/{nodeId}/purge
OperatorApi deleteOperatorRaftPeer DELETE /operator/raft/peer
OperatorApi getOperatorAutopilotConfiguration GET /operator/autopilot/configuration
OperatorApi getOperatorAutopilotHealth GET /operator/autopilot/health
OperatorApi getOperatorRaftConfiguration GET /operator/raft/configuration
OperatorApi getOperatorSchedulerConfiguration GET /operator/scheduler/configuration
OperatorApi postOperatorSchedulerConfiguration POST /operator/scheduler/configuration
OperatorApi putOperatorAutopilotConfiguration PUT /operator/autopilot/configuration
PluginsApi getPluginCSI GET /plugin/csi/{pluginID}
PluginsApi getPlugins GET /plugins
RegionsApi getRegions GET /regions
ScalingApi getScalingPolicies GET /scaling/policies
ScalingApi getScalingPolicy GET /scaling/policy/{policyID}
SearchApi getFuzzySearch POST /search/fuzzy
SearchApi getSearch POST /search
StatusApi getStatusLeader GET /status/leader
StatusApi getStatusPeers GET /status/peers
SystemApi putSystemGC PUT /system/gc
SystemApi putSystemReconcileSummaries PUT /system/reconcile/summaries
VariablesApi deleteVariable DELETE /var/{path}
VariablesApi getVariableQuery GET /var/{path}
VariablesApi getVariablesListRequest GET /vars
VariablesApi postVariable POST /var/{path}
VariablesApi putVariable PUT /var/{path}
VolumesApi createVolume POST /volume/csi/{volumeId}/{action}
VolumesApi deleteSnapshot DELETE /volumes/snapshot
VolumesApi deleteVolumeRegistration DELETE /volume/csi/{volumeId}
VolumesApi detachOrDeleteVolume DELETE /volume/csi/{volumeId}/{action}
VolumesApi getExternalVolumes GET /volumes/external
VolumesApi getSnapshots GET /volumes/snapshot
VolumesApi getVolume GET /volume/csi/{volumeId}
VolumesApi getVolumes GET /volumes
VolumesApi postSnapshot POST /volumes/snapshot
VolumesApi postVolume POST /volumes
VolumesApi postVolumeRegistration POST /volume/csi/{volumeId}

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

X-Nomad-Token

  • Type: API key
  • API key parameter name: X-Nomad-Token
  • Location: HTTP header

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

support@hashicorp.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages