All URIs are relative to http://127.0.0.1:4646/v1
| Method | HTTP request | Description |
|---|---|---|
| deleteACLPolicy | DELETE /acl/policy/{policyName} | |
| deleteACLToken | DELETE /acl/token/{tokenAccessor} | |
| getACLPolicies | GET /acl/policies | |
| getACLPolicy | GET /acl/policy/{policyName} | |
| getACLToken | GET /acl/token/{tokenAccessor} | |
| getACLTokenSelf | GET /acl/token | |
| getACLTokens | GET /acl/tokens | |
| postACLBootstrap | POST /acl/bootstrap | |
| postACLPolicy | POST /acl/policy/{policyName} | |
| postACLToken | POST /acl/token/{tokenAccessor} | |
| postACLTokenOnetime | POST /acl/token/onetime | |
| postACLTokenOnetimeExchange | POST /acl/token/onetime/exchange |
deleteACLPolicy(policyName, region, namespace, xNomadToken, idempotencyToken)
// 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();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| policyName | String | The ACL policy name. | |
| region | String | Filters results based on the specified region. | [optional] |
| namespace | String | Filters results based on the specified namespace. | [optional] |
| xNomadToken | String | A Nomad ACL token. | [optional] |
| idempotencyToken | String | Can be used to ensure operations are only run once. | [optional] |
null (empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | * X-Nomad-Index - A unique identifier representing the current state of the requested resource. On a new Nomad cluster the value of this index starts at 1. |
|
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 405 | Method not allowed | - |
| 500 | Internal server error | - |
deleteACLToken(tokenAccessor, region, namespace, xNomadToken, idempotencyToken)
// 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 tokenAccessor = "tokenAccessor_example"; // String | The token accessor ID.
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.deleteACLToken(tokenAccessor, region, namespace, xNomadToken, idempotencyToken);
} catch (ApiException e) {
System.err.println("Exception when calling AclApi#deleteACLToken");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| tokenAccessor | String | The token accessor ID. | |
| region | String | Filters results based on the specified region. | [optional] |
| namespace | String | Filters results based on the specified namespace. | [optional] |
| xNomadToken | String | A Nomad ACL token. | [optional] |
| idempotencyToken | String | Can be used to ensure operations are only run once. | [optional] |
null (empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | * X-Nomad-Index - A unique identifier representing the current state of the requested resource. On a new Nomad cluster the value of this index starts at 1. |
|
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 405 | Method not allowed | - |
| 500 | Internal server error | - |
List<ACLPolicyListStub> getACLPolicies(region, namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken)
// 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 region = "region_example"; // String | Filters results based on the specified region.
String namespace = "namespace_example"; // String | Filters results based on the specified namespace.
Integer index = 56; // Integer | If set, wait until query exceeds given index. Must be provided with WaitParam.
String wait = "wait_example"; // String | Provided with IndexParam to wait for change.
String stale = "stale_example"; // String | If present, results will include stale reads.
String prefix = "prefix_example"; // String | Constrains results to jobs that start with the defined prefix
String xNomadToken = "xNomadToken_example"; // String | A Nomad ACL token.
Integer perPage = 56; // Integer | Maximum number of results to return.
String nextToken = "nextToken_example"; // String | Indicates where to start paging for queries that support pagination.
try {
List<ACLPolicyListStub> result = apiInstance.getACLPolicies(region, namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AclApi#getACLPolicies");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| region | String | Filters results based on the specified region. | [optional] |
| namespace | String | Filters results based on the specified namespace. | [optional] |
| index | Integer | If set, wait until query exceeds given index. Must be provided with WaitParam. | [optional] |
| wait | String | Provided with IndexParam to wait for change. | [optional] |
| stale | String | If present, results will include stale reads. | [optional] |
| prefix | String | Constrains results to jobs that start with the defined prefix | [optional] |
| xNomadToken | String | A Nomad ACL token. | [optional] |
| perPage | Integer | Maximum number of results to return. | [optional] |
| nextToken | String | Indicates where to start paging for queries that support pagination. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | * X-Nomad-Index - A unique identifier representing the current state of the requested resource. On a new Nomad cluster the value of this index starts at 1. * X-Nomad-KnownLeader - Boolean indicating if there is a known cluster leader. * X-Nomad-LastContact - The time in milliseconds that a server was last contacted by the leader node. |
|
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 405 | Method not allowed | - |
| 500 | Internal server error | - |
ACLPolicy getACLPolicy(policyName, region, namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken)
// 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.
Integer index = 56; // Integer | If set, wait until query exceeds given index. Must be provided with WaitParam.
String wait = "wait_example"; // String | Provided with IndexParam to wait for change.
String stale = "stale_example"; // String | If present, results will include stale reads.
String prefix = "prefix_example"; // String | Constrains results to jobs that start with the defined prefix
String xNomadToken = "xNomadToken_example"; // String | A Nomad ACL token.
Integer perPage = 56; // Integer | Maximum number of results to return.
String nextToken = "nextToken_example"; // String | Indicates where to start paging for queries that support pagination.
try {
ACLPolicy result = apiInstance.getACLPolicy(policyName, region, namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AclApi#getACLPolicy");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| policyName | String | The ACL policy name. | |
| region | String | Filters results based on the specified region. | [optional] |
| namespace | String | Filters results based on the specified namespace. | [optional] |
| index | Integer | If set, wait until query exceeds given index. Must be provided with WaitParam. | [optional] |
| wait | String | Provided with IndexParam to wait for change. | [optional] |
| stale | String | If present, results will include stale reads. | [optional] |
| prefix | String | Constrains results to jobs that start with the defined prefix | [optional] |
| xNomadToken | String | A Nomad ACL token. | [optional] |
| perPage | Integer | Maximum number of results to return. | [optional] |
| nextToken | String | Indicates where to start paging for queries that support pagination. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | * X-Nomad-Index - A unique identifier representing the current state of the requested resource. On a new Nomad cluster the value of this index starts at 1. * X-Nomad-KnownLeader - Boolean indicating if there is a known cluster leader. * X-Nomad-LastContact - The time in milliseconds that a server was last contacted by the leader node. |
|
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 405 | Method not allowed | - |
| 500 | Internal server error | - |
ACLToken getACLToken(tokenAccessor, region, namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken)
// 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 tokenAccessor = "tokenAccessor_example"; // String | The token accessor ID.
String region = "region_example"; // String | Filters results based on the specified region.
String namespace = "namespace_example"; // String | Filters results based on the specified namespace.
Integer index = 56; // Integer | If set, wait until query exceeds given index. Must be provided with WaitParam.
String wait = "wait_example"; // String | Provided with IndexParam to wait for change.
String stale = "stale_example"; // String | If present, results will include stale reads.
String prefix = "prefix_example"; // String | Constrains results to jobs that start with the defined prefix
String xNomadToken = "xNomadToken_example"; // String | A Nomad ACL token.
Integer perPage = 56; // Integer | Maximum number of results to return.
String nextToken = "nextToken_example"; // String | Indicates where to start paging for queries that support pagination.
try {
ACLToken result = apiInstance.getACLToken(tokenAccessor, region, namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AclApi#getACLToken");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| tokenAccessor | String | The token accessor ID. | |
| region | String | Filters results based on the specified region. | [optional] |
| namespace | String | Filters results based on the specified namespace. | [optional] |
| index | Integer | If set, wait until query exceeds given index. Must be provided with WaitParam. | [optional] |
| wait | String | Provided with IndexParam to wait for change. | [optional] |
| stale | String | If present, results will include stale reads. | [optional] |
| prefix | String | Constrains results to jobs that start with the defined prefix | [optional] |
| xNomadToken | String | A Nomad ACL token. | [optional] |
| perPage | Integer | Maximum number of results to return. | [optional] |
| nextToken | String | Indicates where to start paging for queries that support pagination. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | * X-Nomad-Index - A unique identifier representing the current state of the requested resource. On a new Nomad cluster the value of this index starts at 1. * X-Nomad-KnownLeader - Boolean indicating if there is a known cluster leader. * X-Nomad-LastContact - The time in milliseconds that a server was last contacted by the leader node. |
|
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 405 | Method not allowed | - |
| 500 | Internal server error | - |
ACLToken getACLTokenSelf(region, namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken)
// 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 region = "region_example"; // String | Filters results based on the specified region.
String namespace = "namespace_example"; // String | Filters results based on the specified namespace.
Integer index = 56; // Integer | If set, wait until query exceeds given index. Must be provided with WaitParam.
String wait = "wait_example"; // String | Provided with IndexParam to wait for change.
String stale = "stale_example"; // String | If present, results will include stale reads.
String prefix = "prefix_example"; // String | Constrains results to jobs that start with the defined prefix
String xNomadToken = "xNomadToken_example"; // String | A Nomad ACL token.
Integer perPage = 56; // Integer | Maximum number of results to return.
String nextToken = "nextToken_example"; // String | Indicates where to start paging for queries that support pagination.
try {
ACLToken result = apiInstance.getACLTokenSelf(region, namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AclApi#getACLTokenSelf");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| region | String | Filters results based on the specified region. | [optional] |
| namespace | String | Filters results based on the specified namespace. | [optional] |
| index | Integer | If set, wait until query exceeds given index. Must be provided with WaitParam. | [optional] |
| wait | String | Provided with IndexParam to wait for change. | [optional] |
| stale | String | If present, results will include stale reads. | [optional] |
| prefix | String | Constrains results to jobs that start with the defined prefix | [optional] |
| xNomadToken | String | A Nomad ACL token. | [optional] |
| perPage | Integer | Maximum number of results to return. | [optional] |
| nextToken | String | Indicates where to start paging for queries that support pagination. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | * X-Nomad-Index - A unique identifier representing the current state of the requested resource. On a new Nomad cluster the value of this index starts at 1. * X-Nomad-KnownLeader - Boolean indicating if there is a known cluster leader. * X-Nomad-LastContact - The time in milliseconds that a server was last contacted by the leader node. |
|
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 405 | Method not allowed | - |
| 500 | Internal server error | - |
List<ACLTokenListStub> getACLTokens(region, namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken)
// 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 region = "region_example"; // String | Filters results based on the specified region.
String namespace = "namespace_example"; // String | Filters results based on the specified namespace.
Integer index = 56; // Integer | If set, wait until query exceeds given index. Must be provided with WaitParam.
String wait = "wait_example"; // String | Provided with IndexParam to wait for change.
String stale = "stale_example"; // String | If present, results will include stale reads.
String prefix = "prefix_example"; // String | Constrains results to jobs that start with the defined prefix
String xNomadToken = "xNomadToken_example"; // String | A Nomad ACL token.
Integer perPage = 56; // Integer | Maximum number of results to return.
String nextToken = "nextToken_example"; // String | Indicates where to start paging for queries that support pagination.
try {
List<ACLTokenListStub> result = apiInstance.getACLTokens(region, namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AclApi#getACLTokens");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| region | String | Filters results based on the specified region. | [optional] |
| namespace | String | Filters results based on the specified namespace. | [optional] |
| index | Integer | If set, wait until query exceeds given index. Must be provided with WaitParam. | [optional] |
| wait | String | Provided with IndexParam to wait for change. | [optional] |
| stale | String | If present, results will include stale reads. | [optional] |
| prefix | String | Constrains results to jobs that start with the defined prefix | [optional] |
| xNomadToken | String | A Nomad ACL token. | [optional] |
| perPage | Integer | Maximum number of results to return. | [optional] |
| nextToken | String | Indicates where to start paging for queries that support pagination. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | * X-Nomad-Index - A unique identifier representing the current state of the requested resource. On a new Nomad cluster the value of this index starts at 1. * X-Nomad-KnownLeader - Boolean indicating if there is a known cluster leader. * X-Nomad-LastContact - The time in milliseconds that a server was last contacted by the leader node. |
|
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 405 | Method not allowed | - |
| 500 | Internal server error | - |
ACLToken postACLBootstrap(region, namespace, xNomadToken, idempotencyToken)
// 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 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 {
ACLToken result = apiInstance.postACLBootstrap(region, namespace, xNomadToken, idempotencyToken);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AclApi#postACLBootstrap");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| region | String | Filters results based on the specified region. | [optional] |
| namespace | String | Filters results based on the specified namespace. | [optional] |
| xNomadToken | String | A Nomad ACL token. | [optional] |
| idempotencyToken | String | Can be used to ensure operations are only run once. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | * X-Nomad-Index - A unique identifier representing the current state of the requested resource. On a new Nomad cluster the value of this index starts at 1. |
|
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 405 | Method not allowed | - |
| 500 | Internal server error | - |
postACLPolicy(policyName, acLPolicy, region, namespace, xNomadToken, idempotencyToken)
// 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.
ACLPolicy acLPolicy = new ACLPolicy(); // ACLPolicy |
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.postACLPolicy(policyName, acLPolicy, region, namespace, xNomadToken, idempotencyToken);
} catch (ApiException e) {
System.err.println("Exception when calling AclApi#postACLPolicy");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| policyName | String | The ACL policy name. | |
| acLPolicy | ACLPolicy | ||
| region | String | Filters results based on the specified region. | [optional] |
| namespace | String | Filters results based on the specified namespace. | [optional] |
| xNomadToken | String | A Nomad ACL token. | [optional] |
| idempotencyToken | String | Can be used to ensure operations are only run once. | [optional] |
null (empty response body)
- Content-Type: application/json
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | * X-Nomad-Index - A unique identifier representing the current state of the requested resource. On a new Nomad cluster the value of this index starts at 1. |
|
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 405 | Method not allowed | - |
| 500 | Internal server error | - |
ACLToken postACLToken(tokenAccessor, acLToken, region, namespace, xNomadToken, idempotencyToken)
// 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 tokenAccessor = "tokenAccessor_example"; // String | The token accessor ID.
ACLToken acLToken = new ACLToken(); // ACLToken |
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 {
ACLToken result = apiInstance.postACLToken(tokenAccessor, acLToken, region, namespace, xNomadToken, idempotencyToken);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AclApi#postACLToken");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| tokenAccessor | String | The token accessor ID. | |
| acLToken | ACLToken | ||
| region | String | Filters results based on the specified region. | [optional] |
| namespace | String | Filters results based on the specified namespace. | [optional] |
| xNomadToken | String | A Nomad ACL token. | [optional] |
| idempotencyToken | String | Can be used to ensure operations are only run once. | [optional] |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | * X-Nomad-Index - A unique identifier representing the current state of the requested resource. On a new Nomad cluster the value of this index starts at 1. |
|
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 405 | Method not allowed | - |
| 500 | Internal server error | - |
OneTimeToken postACLTokenOnetime(region, namespace, xNomadToken, idempotencyToken)
// 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 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 {
OneTimeToken result = apiInstance.postACLTokenOnetime(region, namespace, xNomadToken, idempotencyToken);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AclApi#postACLTokenOnetime");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| region | String | Filters results based on the specified region. | [optional] |
| namespace | String | Filters results based on the specified namespace. | [optional] |
| xNomadToken | String | A Nomad ACL token. | [optional] |
| idempotencyToken | String | Can be used to ensure operations are only run once. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | * X-Nomad-Index - A unique identifier representing the current state of the requested resource. On a new Nomad cluster the value of this index starts at 1. |
|
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 405 | Method not allowed | - |
| 500 | Internal server error | - |
ACLToken postACLTokenOnetimeExchange(oneTimeTokenExchangeRequest, region, namespace, xNomadToken, idempotencyToken)
// 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);
OneTimeTokenExchangeRequest oneTimeTokenExchangeRequest = new OneTimeTokenExchangeRequest(); // OneTimeTokenExchangeRequest |
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 {
ACLToken result = apiInstance.postACLTokenOnetimeExchange(oneTimeTokenExchangeRequest, region, namespace, xNomadToken, idempotencyToken);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AclApi#postACLTokenOnetimeExchange");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| oneTimeTokenExchangeRequest | OneTimeTokenExchangeRequest | ||
| region | String | Filters results based on the specified region. | [optional] |
| namespace | String | Filters results based on the specified namespace. | [optional] |
| xNomadToken | String | A Nomad ACL token. | [optional] |
| idempotencyToken | String | Can be used to ensure operations are only run once. | [optional] |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | * X-Nomad-Index - A unique identifier representing the current state of the requested resource. On a new Nomad cluster the value of this index starts at 1. |
|
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 405 | Method not allowed | - |
| 500 | Internal server error | - |