You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// 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.OperatorApi;
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");OperatorApiapiInstance = newOperatorApi(defaultClient);
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.deleteOperatorRaftPeer(region, namespace, xNomadToken, idempotencyToken);
} catch (ApiExceptione) {
System.err.println("Exception when calling OperatorApi#deleteOperatorRaftPeer");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Parameters
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.
// 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.OperatorApi;
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");OperatorApiapiInstance = newOperatorApi(defaultClient);
Stringregion = "region_example"; // String | Filters results based on the specified region.Stringnamespace = "namespace_example"; // String | Filters results based on the specified namespace.Integerindex = 56; // Integer | If set, wait until query exceeds given index. Must be provided with WaitParam.Stringwait = "wait_example"; // String | Provided with IndexParam to wait for change.Stringstale = "stale_example"; // String | If present, results will include stale reads.Stringprefix = "prefix_example"; // String | Constrains results to jobs that start with the defined prefixStringxNomadToken = "xNomadToken_example"; // String | A Nomad ACL token.IntegerperPage = 56; // Integer | Maximum number of results to return.StringnextToken = "nextToken_example"; // String | Indicates where to start paging for queries that support pagination.try {
AutopilotConfigurationresult = apiInstance.getOperatorAutopilotConfiguration(region, namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken);
System.out.println(result);
} catch (ApiExceptione) {
System.err.println("Exception when calling OperatorApi#getOperatorAutopilotConfiguration");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Parameters
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.
// 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.OperatorApi;
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");OperatorApiapiInstance = newOperatorApi(defaultClient);
Stringregion = "region_example"; // String | Filters results based on the specified region.Stringnamespace = "namespace_example"; // String | Filters results based on the specified namespace.Integerindex = 56; // Integer | If set, wait until query exceeds given index. Must be provided with WaitParam.Stringwait = "wait_example"; // String | Provided with IndexParam to wait for change.Stringstale = "stale_example"; // String | If present, results will include stale reads.Stringprefix = "prefix_example"; // String | Constrains results to jobs that start with the defined prefixStringxNomadToken = "xNomadToken_example"; // String | A Nomad ACL token.IntegerperPage = 56; // Integer | Maximum number of results to return.StringnextToken = "nextToken_example"; // String | Indicates where to start paging for queries that support pagination.try {
OperatorHealthReplyresult = apiInstance.getOperatorAutopilotHealth(region, namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken);
System.out.println(result);
} catch (ApiExceptione) {
System.err.println("Exception when calling OperatorApi#getOperatorAutopilotHealth");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Parameters
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.
// 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.OperatorApi;
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");OperatorApiapiInstance = newOperatorApi(defaultClient);
Stringregion = "region_example"; // String | Filters results based on the specified region.Stringnamespace = "namespace_example"; // String | Filters results based on the specified namespace.Integerindex = 56; // Integer | If set, wait until query exceeds given index. Must be provided with WaitParam.Stringwait = "wait_example"; // String | Provided with IndexParam to wait for change.Stringstale = "stale_example"; // String | If present, results will include stale reads.Stringprefix = "prefix_example"; // String | Constrains results to jobs that start with the defined prefixStringxNomadToken = "xNomadToken_example"; // String | A Nomad ACL token.IntegerperPage = 56; // Integer | Maximum number of results to return.StringnextToken = "nextToken_example"; // String | Indicates where to start paging for queries that support pagination.try {
RaftConfigurationresult = apiInstance.getOperatorRaftConfiguration(region, namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken);
System.out.println(result);
} catch (ApiExceptione) {
System.err.println("Exception when calling OperatorApi#getOperatorRaftConfiguration");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Parameters
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.
// 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.OperatorApi;
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");OperatorApiapiInstance = newOperatorApi(defaultClient);
Stringregion = "region_example"; // String | Filters results based on the specified region.Stringnamespace = "namespace_example"; // String | Filters results based on the specified namespace.Integerindex = 56; // Integer | If set, wait until query exceeds given index. Must be provided with WaitParam.Stringwait = "wait_example"; // String | Provided with IndexParam to wait for change.Stringstale = "stale_example"; // String | If present, results will include stale reads.Stringprefix = "prefix_example"; // String | Constrains results to jobs that start with the defined prefixStringxNomadToken = "xNomadToken_example"; // String | A Nomad ACL token.IntegerperPage = 56; // Integer | Maximum number of results to return.StringnextToken = "nextToken_example"; // String | Indicates where to start paging for queries that support pagination.try {
SchedulerConfigurationResponseresult = apiInstance.getOperatorSchedulerConfiguration(region, namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken);
System.out.println(result);
} catch (ApiExceptione) {
System.err.println("Exception when calling OperatorApi#getOperatorSchedulerConfiguration");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Parameters
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.
* 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.
// 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.OperatorApi;
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");OperatorApiapiInstance = newOperatorApi(defaultClient);
SchedulerConfigurationschedulerConfiguration = newSchedulerConfiguration(); // SchedulerConfiguration | 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 {
SchedulerSetConfigurationResponseresult = apiInstance.postOperatorSchedulerConfiguration(schedulerConfiguration, region, namespace, xNomadToken, idempotencyToken);
System.out.println(result);
} catch (ApiExceptione) {
System.err.println("Exception when calling OperatorApi#postOperatorSchedulerConfiguration");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
* 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.
// 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.OperatorApi;
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");OperatorApiapiInstance = newOperatorApi(defaultClient);
AutopilotConfigurationautopilotConfiguration = newAutopilotConfiguration(); // AutopilotConfiguration | 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 {
Booleanresult = apiInstance.putOperatorAutopilotConfiguration(autopilotConfiguration, region, namespace, xNomadToken, idempotencyToken);
System.out.println(result);
} catch (ApiExceptione) {
System.err.println("Exception when calling OperatorApi#putOperatorAutopilotConfiguration");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}