Skip to content

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:importio.nomadproject.client.ApiClient;
importio.nomadproject.client.ApiException;
importio.nomadproject.client.Configuration;
importio.nomadproject.client.auth.*;
importio.nomadproject.client.models.*;
importio.nomadproject.client.api.AclApi;
publicclassExample {
publicstaticvoidmain(String[] args) {
ApiClientdefaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://127.0.0.1:4646/v1");
// Configure API key authorization: X-Nomad-TokenApiKeyAuthX-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");AclApiapiInstance = newAclApi(defaultClient);
StringpolicyName = "policyName_example"; // String | The ACL policy name.Stringregion = "region_example"; // String | Filters results based on the specified region.Stringnamespace = "namespace_example"; // String | Filters results based on the specified namespace.StringxNomadToken = "xNomadToken_example"; // String | A Nomad ACL token.StringidempotencyToken = "idempotencyToken_example"; // String | Can be used to ensure operations are only run once.try {
apiInstance.deleteACLPolicy(policyName, region, namespace, xNomadToken, idempotencyToken);
} catch (ApiExceptione) {
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

ClassMethodHTTP requestDescription
AclApideleteACLPolicyDELETE /acl/policy/{policyName}
AclApideleteACLTokenDELETE /acl/token/{tokenAccessor}
AclApigetACLPoliciesGET /acl/policies
AclApigetACLPolicyGET /acl/policy/{policyName}
AclApigetACLTokenGET /acl/token/{tokenAccessor}
AclApigetACLTokenSelfGET /acl/token
AclApigetACLTokensGET /acl/tokens
AclApipostACLBootstrapPOST /acl/bootstrap
AclApipostACLPolicyPOST /acl/policy/{policyName}
AclApipostACLTokenPOST /acl/token/{tokenAccessor}
AclApipostACLTokenOnetimePOST /acl/token/onetime
AclApipostACLTokenOnetimeExchangePOST /acl/token/onetime/exchange
AllocationsApigetAllocationGET /allocation/{allocID}
AllocationsApigetAllocationServicesGET /allocation/{allocID}/services
AllocationsApigetAllocationsGET /allocations
AllocationsApipostAllocationStopPOST /allocation/{allocID}/stop
DeploymentsApigetDeploymentGET /deployment/{deploymentID}
DeploymentsApigetDeploymentAllocationsGET /deployment/allocations/{deploymentID}
DeploymentsApigetDeploymentsGET /deployments
DeploymentsApipostDeploymentAllocationHealthPOST /deployment/allocation-health/{deploymentID}
DeploymentsApipostDeploymentFailPOST /deployment/fail/{deploymentID}
DeploymentsApipostDeploymentPausePOST /deployment/pause/{deploymentID}
DeploymentsApipostDeploymentPromotePOST /deployment/promote/{deploymentID}
DeploymentsApipostDeploymentUnblockPOST /deployment/unblock/{deploymentID}
EnterpriseApicreateQuotaSpecPOST /quota
EnterpriseApideleteQuotaSpecDELETE /quota/{specName}
EnterpriseApigetQuotaSpecGET /quota/{specName}
EnterpriseApigetQuotasGET /quotas
EnterpriseApipostQuotaSpecPOST /quota/{specName}
EvaluationsApigetEvaluationGET /evaluation/{evalID}
EvaluationsApigetEvaluationAllocationsGET /evaluation/{evalID}/allocations
EvaluationsApigetEvaluationsGET /evaluations
JobsApideleteJobDELETE /job/{jobName}
JobsApigetJobGET /job/{jobName}
JobsApigetJobAllocationsGET /job/{jobName}/allocations
JobsApigetJobDeploymentGET /job/{jobName}/deployment
JobsApigetJobDeploymentsGET /job/{jobName}/deployments
JobsApigetJobEvaluationsGET /job/{jobName}/evaluations
JobsApigetJobScaleStatusGET /job/{jobName}/scale
JobsApigetJobSummaryGET /job/{jobName}/summary
JobsApigetJobVersionsGET /job/{jobName}/versions
JobsApigetJobsGET /jobs
JobsApipostJobPOST /job/{jobName}
JobsApipostJobDispatchPOST /job/{jobName}/dispatch
JobsApipostJobEvaluatePOST /job/{jobName}/evaluate
JobsApipostJobParsePOST /jobs/parse
JobsApipostJobPeriodicForcePOST /job/{jobName}/periodic/force
JobsApipostJobPlanPOST /job/{jobName}/plan
JobsApipostJobRevertPOST /job/{jobName}/revert
JobsApipostJobScalingRequestPOST /job/{jobName}/scale
JobsApipostJobStabilityPOST /job/{jobName}/stable
JobsApipostJobValidateRequestPOST /validate/job
JobsApiregisterJobPOST /jobs
MetricsApigetMetricsSummaryGET /metrics
NamespacesApicreateNamespacePOST /namespace
NamespacesApideleteNamespaceDELETE /namespace/{namespaceName}
NamespacesApigetNamespaceGET /namespace/{namespaceName}
NamespacesApigetNamespacesGET /namespaces
NamespacesApipostNamespacePOST /namespace/{namespaceName}
NodesApigetNodeGET /node/{nodeId}
NodesApigetNodeAllocationsGET /node/{nodeId}/allocations
NodesApigetNodesGET /nodes
NodesApiupdateNodeDrainPOST /node/{nodeId}/drain
NodesApiupdateNodeEligibilityPOST /node/{nodeId}/eligibility
NodesApiupdateNodePurgePOST /node/{nodeId}/purge
OperatorApideleteOperatorRaftPeerDELETE /operator/raft/peer
OperatorApigetOperatorAutopilotConfigurationGET /operator/autopilot/configuration
OperatorApigetOperatorAutopilotHealthGET /operator/autopilot/health
OperatorApigetOperatorRaftConfigurationGET /operator/raft/configuration
OperatorApigetOperatorSchedulerConfigurationGET /operator/scheduler/configuration
OperatorApipostOperatorSchedulerConfigurationPOST /operator/scheduler/configuration
OperatorApiputOperatorAutopilotConfigurationPUT /operator/autopilot/configuration
PluginsApigetPluginCSIGET /plugin/csi/{pluginID}
PluginsApigetPluginsGET /plugins
RegionsApigetRegionsGET /regions
ScalingApigetScalingPoliciesGET /scaling/policies
ScalingApigetScalingPolicyGET /scaling/policy/{policyID}
SearchApigetFuzzySearchPOST /search/fuzzy
SearchApigetSearchPOST /search
StatusApigetStatusLeaderGET /status/leader
StatusApigetStatusPeersGET /status/peers
SystemApiputSystemGCPUT /system/gc
SystemApiputSystemReconcileSummariesPUT /system/reconcile/summaries
VariablesApideleteVariableDELETE /var/{path}
VariablesApigetVariableQueryGET /var/{path}
VariablesApigetVariablesListRequestGET /vars
VariablesApipostVariablePOST /var/{path}
VariablesApiputVariablePUT /var/{path}
VolumesApicreateVolumePOST /volume/csi/{volumeId}/{action}
VolumesApideleteSnapshotDELETE /volumes/snapshot
VolumesApideleteVolumeRegistrationDELETE /volume/csi/{volumeId}
VolumesApidetachOrDeleteVolumeDELETE /volume/csi/{volumeId}/{action}
VolumesApigetExternalVolumesGET /volumes/external
VolumesApigetSnapshotsGET /volumes/snapshot
VolumesApigetVolumeGET /volume/csi/{volumeId}
VolumesApigetVolumesGET /volumes
VolumesApipostSnapshotPOST /volumes/snapshot
VolumesApipostVolumePOST /volumes
VolumesApipostVolumeRegistrationPOST /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

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages