All URIs are relative to https://127.0.0.1:4646/v1
Method | HTTP request | Description |
---|---|---|
DeleteJob | DELETE /job/{jobName} | |
GetJob | GET /job/{jobName} | |
GetJobAllocations | GET /job/{jobName}/allocations | |
GetJobDeployment | GET /job/{jobName}/deployment | |
GetJobDeployments | GET /job/{jobName}/deployments | |
GetJobEvaluations | GET /job/{jobName}/evaluations | |
GetJobScaleStatus | GET /job/{jobName}/scale | |
GetJobSummary | GET /job/{jobName}/summary | |
GetJobVersions | GET /job/{jobName}/versions | |
GetJobs | GET /jobs | |
PostJob | POST /job/{jobName} | |
PostJobDispatch | POST /job/{jobName}/dispatch | |
PostJobEvaluate | POST /job/{jobName}/evaluate | |
PostJobParse | POST /jobs/parse | |
PostJobPeriodicForce | POST /job/{jobName}/periodic/force | |
PostJobPlan | POST /job/{jobName}/plan | |
PostJobRevert | POST /job/{jobName}/revert | |
PostJobScalingRequest | POST /job/{jobName}/scale | |
PostJobStability | POST /job/{jobName}/stable | |
PostJobValidateRequest | POST /validate/job | |
RegisterJob | POST /jobs |
JobDeregisterResponse DeleteJob (string jobName, string? region = null, string? _namespace = null, string? xNomadToken = null, string? idempotencyToken = null, bool? purge = null, bool? global = null)
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class DeleteJobExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://127.0.0.1:4646/v1";
// Configure API key authorization: X-Nomad-Token
config.AddApiKey("X-Nomad-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-Nomad-Token", "Bearer");
var apiInstance = new JobsApi(config);
var jobName = "jobName_example"; // string | The job identifier.
var region = "region_example"; // string? | Filters results based on the specified region. (optional)
var _namespace = "_namespace_example"; // string? | Filters results based on the specified namespace. (optional)
var xNomadToken = "xNomadToken_example"; // string? | A Nomad ACL token. (optional)
var idempotencyToken = "idempotencyToken_example"; // string? | Can be used to ensure operations are only run once. (optional)
var purge = true; // bool? | Boolean flag indicating whether to purge allocations of the job after deleting. (optional)
var global = true; // bool? | Boolean flag indicating whether the operation should apply to all instances of the job globally. (optional)
try
{
JobDeregisterResponse result = apiInstance.DeleteJob(jobName, region, _namespace, xNomadToken, idempotencyToken, purge, global);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.DeleteJob: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<JobDeregisterResponse> response = apiInstance.DeleteJobWithHttpInfo(jobName, region, _namespace, xNomadToken, idempotencyToken, purge, global);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.DeleteJobWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
jobName | string | The job identifier. | |
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] |
purge | bool? | Boolean flag indicating whether to purge allocations of the job after deleting. | [optional] |
global | bool? | Boolean flag indicating whether the operation should apply to all instances of the job globally. | [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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Job GetJob (string jobName, string? region = null, string? _namespace = null, int? index = null, string? wait = null, string? stale = null, string? prefix = null, string? xNomadToken = null, int? perPage = null, string? nextToken = null)
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class GetJobExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://127.0.0.1:4646/v1";
// Configure API key authorization: X-Nomad-Token
config.AddApiKey("X-Nomad-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-Nomad-Token", "Bearer");
var apiInstance = new JobsApi(config);
var jobName = "jobName_example"; // string | The job identifier.
var region = "region_example"; // string? | Filters results based on the specified region. (optional)
var _namespace = "_namespace_example"; // string? | Filters results based on the specified namespace. (optional)
var index = 56; // int? | If set, wait until query exceeds given index. Must be provided with WaitParam. (optional)
var wait = "wait_example"; // string? | Provided with IndexParam to wait for change. (optional)
var stale = "stale_example"; // string? | If present, results will include stale reads. (optional)
var prefix = "prefix_example"; // string? | Constrains results to jobs that start with the defined prefix (optional)
var xNomadToken = "xNomadToken_example"; // string? | A Nomad ACL token. (optional)
var perPage = 56; // int? | Maximum number of results to return. (optional)
var nextToken = "nextToken_example"; // string? | Indicates where to start paging for queries that support pagination. (optional)
try
{
Job result = apiInstance.GetJob(jobName, region, _namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.GetJob: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<Job> response = apiInstance.GetJobWithHttpInfo(jobName, region, _namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.GetJobWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
jobName | string | The job identifier. | |
region | string? | Filters results based on the specified region. | [optional] |
_namespace | string? | Filters results based on the specified namespace. | [optional] |
index | int? | 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 | int? | 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<AllocationListStub> GetJobAllocations (string jobName, string? region = null, string? _namespace = null, int? index = null, string? wait = null, string? stale = null, string? prefix = null, string? xNomadToken = null, int? perPage = null, string? nextToken = null, bool? all = null)
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class GetJobAllocationsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://127.0.0.1:4646/v1";
// Configure API key authorization: X-Nomad-Token
config.AddApiKey("X-Nomad-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-Nomad-Token", "Bearer");
var apiInstance = new JobsApi(config);
var jobName = "jobName_example"; // string | The job identifier.
var region = "region_example"; // string? | Filters results based on the specified region. (optional)
var _namespace = "_namespace_example"; // string? | Filters results based on the specified namespace. (optional)
var index = 56; // int? | If set, wait until query exceeds given index. Must be provided with WaitParam. (optional)
var wait = "wait_example"; // string? | Provided with IndexParam to wait for change. (optional)
var stale = "stale_example"; // string? | If present, results will include stale reads. (optional)
var prefix = "prefix_example"; // string? | Constrains results to jobs that start with the defined prefix (optional)
var xNomadToken = "xNomadToken_example"; // string? | A Nomad ACL token. (optional)
var perPage = 56; // int? | Maximum number of results to return. (optional)
var nextToken = "nextToken_example"; // string? | Indicates where to start paging for queries that support pagination. (optional)
var all = true; // bool? | Specifies whether the list of allocations should include allocations from a previously registered job with the same ID. This is possible if the job is deregistered and reregistered. (optional)
try
{
List<AllocationListStub> result = apiInstance.GetJobAllocations(jobName, region, _namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken, all);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.GetJobAllocations: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<List<AllocationListStub>> response = apiInstance.GetJobAllocationsWithHttpInfo(jobName, region, _namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken, all);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.GetJobAllocationsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
jobName | string | The job identifier. | |
region | string? | Filters results based on the specified region. | [optional] |
_namespace | string? | Filters results based on the specified namespace. | [optional] |
index | int? | 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 | int? | Maximum number of results to return. | [optional] |
nextToken | string? | Indicates where to start paging for queries that support pagination. | [optional] |
all | bool? | Specifies whether the list of allocations should include allocations from a previously registered job with the same ID. This is possible if the job is deregistered and reregistered. | [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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Deployment GetJobDeployment (string jobName, string? region = null, string? _namespace = null, int? index = null, string? wait = null, string? stale = null, string? prefix = null, string? xNomadToken = null, int? perPage = null, string? nextToken = null)
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class GetJobDeploymentExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://127.0.0.1:4646/v1";
// Configure API key authorization: X-Nomad-Token
config.AddApiKey("X-Nomad-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-Nomad-Token", "Bearer");
var apiInstance = new JobsApi(config);
var jobName = "jobName_example"; // string | The job identifier.
var region = "region_example"; // string? | Filters results based on the specified region. (optional)
var _namespace = "_namespace_example"; // string? | Filters results based on the specified namespace. (optional)
var index = 56; // int? | If set, wait until query exceeds given index. Must be provided with WaitParam. (optional)
var wait = "wait_example"; // string? | Provided with IndexParam to wait for change. (optional)
var stale = "stale_example"; // string? | If present, results will include stale reads. (optional)
var prefix = "prefix_example"; // string? | Constrains results to jobs that start with the defined prefix (optional)
var xNomadToken = "xNomadToken_example"; // string? | A Nomad ACL token. (optional)
var perPage = 56; // int? | Maximum number of results to return. (optional)
var nextToken = "nextToken_example"; // string? | Indicates where to start paging for queries that support pagination. (optional)
try
{
Deployment result = apiInstance.GetJobDeployment(jobName, region, _namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.GetJobDeployment: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<Deployment> response = apiInstance.GetJobDeploymentWithHttpInfo(jobName, region, _namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.GetJobDeploymentWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
jobName | string | The job identifier. | |
region | string? | Filters results based on the specified region. | [optional] |
_namespace | string? | Filters results based on the specified namespace. | [optional] |
index | int? | 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 | int? | 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<Deployment> GetJobDeployments (string jobName, string? region = null, string? _namespace = null, int? index = null, string? wait = null, string? stale = null, string? prefix = null, string? xNomadToken = null, int? perPage = null, string? nextToken = null, int? all = null)
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class GetJobDeploymentsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://127.0.0.1:4646/v1";
// Configure API key authorization: X-Nomad-Token
config.AddApiKey("X-Nomad-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-Nomad-Token", "Bearer");
var apiInstance = new JobsApi(config);
var jobName = "jobName_example"; // string | The job identifier.
var region = "region_example"; // string? | Filters results based on the specified region. (optional)
var _namespace = "_namespace_example"; // string? | Filters results based on the specified namespace. (optional)
var index = 56; // int? | If set, wait until query exceeds given index. Must be provided with WaitParam. (optional)
var wait = "wait_example"; // string? | Provided with IndexParam to wait for change. (optional)
var stale = "stale_example"; // string? | If present, results will include stale reads. (optional)
var prefix = "prefix_example"; // string? | Constrains results to jobs that start with the defined prefix (optional)
var xNomadToken = "xNomadToken_example"; // string? | A Nomad ACL token. (optional)
var perPage = 56; // int? | Maximum number of results to return. (optional)
var nextToken = "nextToken_example"; // string? | Indicates where to start paging for queries that support pagination. (optional)
var all = 56; // int? | Flag indicating whether to constrain by job creation index or not. (optional)
try
{
List<Deployment> result = apiInstance.GetJobDeployments(jobName, region, _namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken, all);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.GetJobDeployments: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<List<Deployment>> response = apiInstance.GetJobDeploymentsWithHttpInfo(jobName, region, _namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken, all);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.GetJobDeploymentsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
jobName | string | The job identifier. | |
region | string? | Filters results based on the specified region. | [optional] |
_namespace | string? | Filters results based on the specified namespace. | [optional] |
index | int? | 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 | int? | Maximum number of results to return. | [optional] |
nextToken | string? | Indicates where to start paging for queries that support pagination. | [optional] |
all | int? | Flag indicating whether to constrain by job creation index or not. | [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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<Evaluation> GetJobEvaluations (string jobName, string? region = null, string? _namespace = null, int? index = null, string? wait = null, string? stale = null, string? prefix = null, string? xNomadToken = null, int? perPage = null, string? nextToken = null)
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class GetJobEvaluationsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://127.0.0.1:4646/v1";
// Configure API key authorization: X-Nomad-Token
config.AddApiKey("X-Nomad-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-Nomad-Token", "Bearer");
var apiInstance = new JobsApi(config);
var jobName = "jobName_example"; // string | The job identifier.
var region = "region_example"; // string? | Filters results based on the specified region. (optional)
var _namespace = "_namespace_example"; // string? | Filters results based on the specified namespace. (optional)
var index = 56; // int? | If set, wait until query exceeds given index. Must be provided with WaitParam. (optional)
var wait = "wait_example"; // string? | Provided with IndexParam to wait for change. (optional)
var stale = "stale_example"; // string? | If present, results will include stale reads. (optional)
var prefix = "prefix_example"; // string? | Constrains results to jobs that start with the defined prefix (optional)
var xNomadToken = "xNomadToken_example"; // string? | A Nomad ACL token. (optional)
var perPage = 56; // int? | Maximum number of results to return. (optional)
var nextToken = "nextToken_example"; // string? | Indicates where to start paging for queries that support pagination. (optional)
try
{
List<Evaluation> result = apiInstance.GetJobEvaluations(jobName, region, _namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.GetJobEvaluations: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<List<Evaluation>> response = apiInstance.GetJobEvaluationsWithHttpInfo(jobName, region, _namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.GetJobEvaluationsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
jobName | string | The job identifier. | |
region | string? | Filters results based on the specified region. | [optional] |
_namespace | string? | Filters results based on the specified namespace. | [optional] |
index | int? | 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 | int? | 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
JobScaleStatusResponse GetJobScaleStatus (string jobName, string? region = null, string? _namespace = null, int? index = null, string? wait = null, string? stale = null, string? prefix = null, string? xNomadToken = null, int? perPage = null, string? nextToken = null)
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class GetJobScaleStatusExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://127.0.0.1:4646/v1";
// Configure API key authorization: X-Nomad-Token
config.AddApiKey("X-Nomad-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-Nomad-Token", "Bearer");
var apiInstance = new JobsApi(config);
var jobName = "jobName_example"; // string | The job identifier.
var region = "region_example"; // string? | Filters results based on the specified region. (optional)
var _namespace = "_namespace_example"; // string? | Filters results based on the specified namespace. (optional)
var index = 56; // int? | If set, wait until query exceeds given index. Must be provided with WaitParam. (optional)
var wait = "wait_example"; // string? | Provided with IndexParam to wait for change. (optional)
var stale = "stale_example"; // string? | If present, results will include stale reads. (optional)
var prefix = "prefix_example"; // string? | Constrains results to jobs that start with the defined prefix (optional)
var xNomadToken = "xNomadToken_example"; // string? | A Nomad ACL token. (optional)
var perPage = 56; // int? | Maximum number of results to return. (optional)
var nextToken = "nextToken_example"; // string? | Indicates where to start paging for queries that support pagination. (optional)
try
{
JobScaleStatusResponse result = apiInstance.GetJobScaleStatus(jobName, region, _namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.GetJobScaleStatus: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<JobScaleStatusResponse> response = apiInstance.GetJobScaleStatusWithHttpInfo(jobName, region, _namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.GetJobScaleStatusWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
jobName | string | The job identifier. | |
region | string? | Filters results based on the specified region. | [optional] |
_namespace | string? | Filters results based on the specified namespace. | [optional] |
index | int? | 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 | int? | 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
JobSummary GetJobSummary (string jobName, string? region = null, string? _namespace = null, int? index = null, string? wait = null, string? stale = null, string? prefix = null, string? xNomadToken = null, int? perPage = null, string? nextToken = null)
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class GetJobSummaryExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://127.0.0.1:4646/v1";
// Configure API key authorization: X-Nomad-Token
config.AddApiKey("X-Nomad-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-Nomad-Token", "Bearer");
var apiInstance = new JobsApi(config);
var jobName = "jobName_example"; // string | The job identifier.
var region = "region_example"; // string? | Filters results based on the specified region. (optional)
var _namespace = "_namespace_example"; // string? | Filters results based on the specified namespace. (optional)
var index = 56; // int? | If set, wait until query exceeds given index. Must be provided with WaitParam. (optional)
var wait = "wait_example"; // string? | Provided with IndexParam to wait for change. (optional)
var stale = "stale_example"; // string? | If present, results will include stale reads. (optional)
var prefix = "prefix_example"; // string? | Constrains results to jobs that start with the defined prefix (optional)
var xNomadToken = "xNomadToken_example"; // string? | A Nomad ACL token. (optional)
var perPage = 56; // int? | Maximum number of results to return. (optional)
var nextToken = "nextToken_example"; // string? | Indicates where to start paging for queries that support pagination. (optional)
try
{
JobSummary result = apiInstance.GetJobSummary(jobName, region, _namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.GetJobSummary: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<JobSummary> response = apiInstance.GetJobSummaryWithHttpInfo(jobName, region, _namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.GetJobSummaryWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
jobName | string | The job identifier. | |
region | string? | Filters results based on the specified region. | [optional] |
_namespace | string? | Filters results based on the specified namespace. | [optional] |
index | int? | 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 | int? | 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
JobVersionsResponse GetJobVersions (string jobName, string? region = null, string? _namespace = null, int? index = null, string? wait = null, string? stale = null, string? prefix = null, string? xNomadToken = null, int? perPage = null, string? nextToken = null, bool? diffs = null)
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class GetJobVersionsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://127.0.0.1:4646/v1";
// Configure API key authorization: X-Nomad-Token
config.AddApiKey("X-Nomad-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-Nomad-Token", "Bearer");
var apiInstance = new JobsApi(config);
var jobName = "jobName_example"; // string | The job identifier.
var region = "region_example"; // string? | Filters results based on the specified region. (optional)
var _namespace = "_namespace_example"; // string? | Filters results based on the specified namespace. (optional)
var index = 56; // int? | If set, wait until query exceeds given index. Must be provided with WaitParam. (optional)
var wait = "wait_example"; // string? | Provided with IndexParam to wait for change. (optional)
var stale = "stale_example"; // string? | If present, results will include stale reads. (optional)
var prefix = "prefix_example"; // string? | Constrains results to jobs that start with the defined prefix (optional)
var xNomadToken = "xNomadToken_example"; // string? | A Nomad ACL token. (optional)
var perPage = 56; // int? | Maximum number of results to return. (optional)
var nextToken = "nextToken_example"; // string? | Indicates where to start paging for queries that support pagination. (optional)
var diffs = true; // bool? | Boolean flag indicating whether to compute job diffs. (optional)
try
{
JobVersionsResponse result = apiInstance.GetJobVersions(jobName, region, _namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken, diffs);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.GetJobVersions: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<JobVersionsResponse> response = apiInstance.GetJobVersionsWithHttpInfo(jobName, region, _namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken, diffs);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.GetJobVersionsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
jobName | string | The job identifier. | |
region | string? | Filters results based on the specified region. | [optional] |
_namespace | string? | Filters results based on the specified namespace. | [optional] |
index | int? | 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 | int? | Maximum number of results to return. | [optional] |
nextToken | string? | Indicates where to start paging for queries that support pagination. | [optional] |
diffs | bool? | Boolean flag indicating whether to compute job diffs. | [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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<JobListStub> GetJobs (string? region = null, string? _namespace = null, int? index = null, string? wait = null, string? stale = null, string? prefix = null, string? xNomadToken = null, int? perPage = null, string? nextToken = null)
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class GetJobsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://127.0.0.1:4646/v1";
// Configure API key authorization: X-Nomad-Token
config.AddApiKey("X-Nomad-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-Nomad-Token", "Bearer");
var apiInstance = new JobsApi(config);
var region = "region_example"; // string? | Filters results based on the specified region. (optional)
var _namespace = "_namespace_example"; // string? | Filters results based on the specified namespace. (optional)
var index = 56; // int? | If set, wait until query exceeds given index. Must be provided with WaitParam. (optional)
var wait = "wait_example"; // string? | Provided with IndexParam to wait for change. (optional)
var stale = "stale_example"; // string? | If present, results will include stale reads. (optional)
var prefix = "prefix_example"; // string? | Constrains results to jobs that start with the defined prefix (optional)
var xNomadToken = "xNomadToken_example"; // string? | A Nomad ACL token. (optional)
var perPage = 56; // int? | Maximum number of results to return. (optional)
var nextToken = "nextToken_example"; // string? | Indicates where to start paging for queries that support pagination. (optional)
try
{
List<JobListStub> result = apiInstance.GetJobs(region, _namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.GetJobs: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<List<JobListStub>> response = apiInstance.GetJobsWithHttpInfo(region, _namespace, index, wait, stale, prefix, xNomadToken, perPage, nextToken);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.GetJobsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
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 | int? | 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 | int? | 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
JobRegisterResponse PostJob (string jobName, JobRegisterRequest jobRegisterRequest, string? region = null, string? _namespace = null, string? xNomadToken = null, string? idempotencyToken = null)
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class PostJobExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://127.0.0.1:4646/v1";
// Configure API key authorization: X-Nomad-Token
config.AddApiKey("X-Nomad-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-Nomad-Token", "Bearer");
var apiInstance = new JobsApi(config);
var jobName = "jobName_example"; // string | The job identifier.
var jobRegisterRequest = new JobRegisterRequest(); // JobRegisterRequest |
var region = "region_example"; // string? | Filters results based on the specified region. (optional)
var _namespace = "_namespace_example"; // string? | Filters results based on the specified namespace. (optional)
var xNomadToken = "xNomadToken_example"; // string? | A Nomad ACL token. (optional)
var idempotencyToken = "idempotencyToken_example"; // string? | Can be used to ensure operations are only run once. (optional)
try
{
JobRegisterResponse result = apiInstance.PostJob(jobName, jobRegisterRequest, region, _namespace, xNomadToken, idempotencyToken);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.PostJob: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<JobRegisterResponse> response = apiInstance.PostJobWithHttpInfo(jobName, jobRegisterRequest, region, _namespace, xNomadToken, idempotencyToken);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.PostJobWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
jobName | string | The job identifier. | |
jobRegisterRequest | JobRegisterRequest | ||
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. * 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
JobDispatchResponse PostJobDispatch (string jobName, JobDispatchRequest jobDispatchRequest, string? region = null, string? _namespace = null, string? xNomadToken = null, string? idempotencyToken = null)
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class PostJobDispatchExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://127.0.0.1:4646/v1";
// Configure API key authorization: X-Nomad-Token
config.AddApiKey("X-Nomad-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-Nomad-Token", "Bearer");
var apiInstance = new JobsApi(config);
var jobName = "jobName_example"; // string | The job identifier.
var jobDispatchRequest = new JobDispatchRequest(); // JobDispatchRequest |
var region = "region_example"; // string? | Filters results based on the specified region. (optional)
var _namespace = "_namespace_example"; // string? | Filters results based on the specified namespace. (optional)
var xNomadToken = "xNomadToken_example"; // string? | A Nomad ACL token. (optional)
var idempotencyToken = "idempotencyToken_example"; // string? | Can be used to ensure operations are only run once. (optional)
try
{
JobDispatchResponse result = apiInstance.PostJobDispatch(jobName, jobDispatchRequest, region, _namespace, xNomadToken, idempotencyToken);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.PostJobDispatch: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<JobDispatchResponse> response = apiInstance.PostJobDispatchWithHttpInfo(jobName, jobDispatchRequest, region, _namespace, xNomadToken, idempotencyToken);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.PostJobDispatchWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
jobName | string | The job identifier. | |
jobDispatchRequest | JobDispatchRequest | ||
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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
JobRegisterResponse PostJobEvaluate (string jobName, JobEvaluateRequest jobEvaluateRequest, string? region = null, string? _namespace = null, string? xNomadToken = null, string? idempotencyToken = null)
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class PostJobEvaluateExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://127.0.0.1:4646/v1";
// Configure API key authorization: X-Nomad-Token
config.AddApiKey("X-Nomad-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-Nomad-Token", "Bearer");
var apiInstance = new JobsApi(config);
var jobName = "jobName_example"; // string | The job identifier.
var jobEvaluateRequest = new JobEvaluateRequest(); // JobEvaluateRequest |
var region = "region_example"; // string? | Filters results based on the specified region. (optional)
var _namespace = "_namespace_example"; // string? | Filters results based on the specified namespace. (optional)
var xNomadToken = "xNomadToken_example"; // string? | A Nomad ACL token. (optional)
var idempotencyToken = "idempotencyToken_example"; // string? | Can be used to ensure operations are only run once. (optional)
try
{
JobRegisterResponse result = apiInstance.PostJobEvaluate(jobName, jobEvaluateRequest, region, _namespace, xNomadToken, idempotencyToken);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.PostJobEvaluate: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<JobRegisterResponse> response = apiInstance.PostJobEvaluateWithHttpInfo(jobName, jobEvaluateRequest, region, _namespace, xNomadToken, idempotencyToken);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.PostJobEvaluateWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
jobName | string | The job identifier. | |
jobEvaluateRequest | JobEvaluateRequest | ||
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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Job PostJobParse (JobsParseRequest jobsParseRequest)
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class PostJobParseExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://127.0.0.1:4646/v1";
// Configure API key authorization: X-Nomad-Token
config.AddApiKey("X-Nomad-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-Nomad-Token", "Bearer");
var apiInstance = new JobsApi(config);
var jobsParseRequest = new JobsParseRequest(); // JobsParseRequest |
try
{
Job result = apiInstance.PostJobParse(jobsParseRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.PostJobParse: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<Job> response = apiInstance.PostJobParseWithHttpInfo(jobsParseRequest);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.PostJobParseWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
jobsParseRequest | JobsParseRequest |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | - | |
400 | Bad request | - |
403 | Forbidden | - |
405 | Method not allowed | - |
500 | Internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PeriodicForceResponse PostJobPeriodicForce (string jobName, string? region = null, string? _namespace = null, string? xNomadToken = null, string? idempotencyToken = null)
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class PostJobPeriodicForceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://127.0.0.1:4646/v1";
// Configure API key authorization: X-Nomad-Token
config.AddApiKey("X-Nomad-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-Nomad-Token", "Bearer");
var apiInstance = new JobsApi(config);
var jobName = "jobName_example"; // string | The job identifier.
var region = "region_example"; // string? | Filters results based on the specified region. (optional)
var _namespace = "_namespace_example"; // string? | Filters results based on the specified namespace. (optional)
var xNomadToken = "xNomadToken_example"; // string? | A Nomad ACL token. (optional)
var idempotencyToken = "idempotencyToken_example"; // string? | Can be used to ensure operations are only run once. (optional)
try
{
PeriodicForceResponse result = apiInstance.PostJobPeriodicForce(jobName, region, _namespace, xNomadToken, idempotencyToken);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.PostJobPeriodicForce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<PeriodicForceResponse> response = apiInstance.PostJobPeriodicForceWithHttpInfo(jobName, region, _namespace, xNomadToken, idempotencyToken);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.PostJobPeriodicForceWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
jobName | string | The job identifier. | |
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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
JobPlanResponse PostJobPlan (string jobName, JobPlanRequest jobPlanRequest, string? region = null, string? _namespace = null, string? xNomadToken = null, string? idempotencyToken = null)
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class PostJobPlanExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://127.0.0.1:4646/v1";
// Configure API key authorization: X-Nomad-Token
config.AddApiKey("X-Nomad-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-Nomad-Token", "Bearer");
var apiInstance = new JobsApi(config);
var jobName = "jobName_example"; // string | The job identifier.
var jobPlanRequest = new JobPlanRequest(); // JobPlanRequest |
var region = "region_example"; // string? | Filters results based on the specified region. (optional)
var _namespace = "_namespace_example"; // string? | Filters results based on the specified namespace. (optional)
var xNomadToken = "xNomadToken_example"; // string? | A Nomad ACL token. (optional)
var idempotencyToken = "idempotencyToken_example"; // string? | Can be used to ensure operations are only run once. (optional)
try
{
JobPlanResponse result = apiInstance.PostJobPlan(jobName, jobPlanRequest, region, _namespace, xNomadToken, idempotencyToken);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.PostJobPlan: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<JobPlanResponse> response = apiInstance.PostJobPlanWithHttpInfo(jobName, jobPlanRequest, region, _namespace, xNomadToken, idempotencyToken);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.PostJobPlanWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
jobName | string | The job identifier. | |
jobPlanRequest | JobPlanRequest | ||
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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
JobRegisterResponse PostJobRevert (string jobName, JobRevertRequest jobRevertRequest, string? region = null, string? _namespace = null, string? xNomadToken = null, string? idempotencyToken = null)
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class PostJobRevertExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://127.0.0.1:4646/v1";
// Configure API key authorization: X-Nomad-Token
config.AddApiKey("X-Nomad-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-Nomad-Token", "Bearer");
var apiInstance = new JobsApi(config);
var jobName = "jobName_example"; // string | The job identifier.
var jobRevertRequest = new JobRevertRequest(); // JobRevertRequest |
var region = "region_example"; // string? | Filters results based on the specified region. (optional)
var _namespace = "_namespace_example"; // string? | Filters results based on the specified namespace. (optional)
var xNomadToken = "xNomadToken_example"; // string? | A Nomad ACL token. (optional)
var idempotencyToken = "idempotencyToken_example"; // string? | Can be used to ensure operations are only run once. (optional)
try
{
JobRegisterResponse result = apiInstance.PostJobRevert(jobName, jobRevertRequest, region, _namespace, xNomadToken, idempotencyToken);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.PostJobRevert: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<JobRegisterResponse> response = apiInstance.PostJobRevertWithHttpInfo(jobName, jobRevertRequest, region, _namespace, xNomadToken, idempotencyToken);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.PostJobRevertWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
jobName | string | The job identifier. | |
jobRevertRequest | JobRevertRequest | ||
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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
JobRegisterResponse PostJobScalingRequest (string jobName, ScalingRequest scalingRequest, string? region = null, string? _namespace = null, string? xNomadToken = null, string? idempotencyToken = null)
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class PostJobScalingRequestExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://127.0.0.1:4646/v1";
// Configure API key authorization: X-Nomad-Token
config.AddApiKey("X-Nomad-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-Nomad-Token", "Bearer");
var apiInstance = new JobsApi(config);
var jobName = "jobName_example"; // string | The job identifier.
var scalingRequest = new ScalingRequest(); // ScalingRequest |
var region = "region_example"; // string? | Filters results based on the specified region. (optional)
var _namespace = "_namespace_example"; // string? | Filters results based on the specified namespace. (optional)
var xNomadToken = "xNomadToken_example"; // string? | A Nomad ACL token. (optional)
var idempotencyToken = "idempotencyToken_example"; // string? | Can be used to ensure operations are only run once. (optional)
try
{
JobRegisterResponse result = apiInstance.PostJobScalingRequest(jobName, scalingRequest, region, _namespace, xNomadToken, idempotencyToken);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.PostJobScalingRequest: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<JobRegisterResponse> response = apiInstance.PostJobScalingRequestWithHttpInfo(jobName, scalingRequest, region, _namespace, xNomadToken, idempotencyToken);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.PostJobScalingRequestWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
jobName | string | The job identifier. | |
scalingRequest | ScalingRequest | ||
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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
JobStabilityResponse PostJobStability (string jobName, JobStabilityRequest jobStabilityRequest, string? region = null, string? _namespace = null, string? xNomadToken = null, string? idempotencyToken = null)
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class PostJobStabilityExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://127.0.0.1:4646/v1";
// Configure API key authorization: X-Nomad-Token
config.AddApiKey("X-Nomad-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-Nomad-Token", "Bearer");
var apiInstance = new JobsApi(config);
var jobName = "jobName_example"; // string | The job identifier.
var jobStabilityRequest = new JobStabilityRequest(); // JobStabilityRequest |
var region = "region_example"; // string? | Filters results based on the specified region. (optional)
var _namespace = "_namespace_example"; // string? | Filters results based on the specified namespace. (optional)
var xNomadToken = "xNomadToken_example"; // string? | A Nomad ACL token. (optional)
var idempotencyToken = "idempotencyToken_example"; // string? | Can be used to ensure operations are only run once. (optional)
try
{
JobStabilityResponse result = apiInstance.PostJobStability(jobName, jobStabilityRequest, region, _namespace, xNomadToken, idempotencyToken);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.PostJobStability: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<JobStabilityResponse> response = apiInstance.PostJobStabilityWithHttpInfo(jobName, jobStabilityRequest, region, _namespace, xNomadToken, idempotencyToken);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.PostJobStabilityWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
jobName | string | The job identifier. | |
jobStabilityRequest | JobStabilityRequest | ||
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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
JobValidateResponse PostJobValidateRequest (JobValidateRequest jobValidateRequest, string? region = null, string? _namespace = null, string? xNomadToken = null, string? idempotencyToken = null)
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class PostJobValidateRequestExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://127.0.0.1:4646/v1";
// Configure API key authorization: X-Nomad-Token
config.AddApiKey("X-Nomad-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-Nomad-Token", "Bearer");
var apiInstance = new JobsApi(config);
var jobValidateRequest = new JobValidateRequest(); // JobValidateRequest |
var region = "region_example"; // string? | Filters results based on the specified region. (optional)
var _namespace = "_namespace_example"; // string? | Filters results based on the specified namespace. (optional)
var xNomadToken = "xNomadToken_example"; // string? | A Nomad ACL token. (optional)
var idempotencyToken = "idempotencyToken_example"; // string? | Can be used to ensure operations are only run once. (optional)
try
{
JobValidateResponse result = apiInstance.PostJobValidateRequest(jobValidateRequest, region, _namespace, xNomadToken, idempotencyToken);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.PostJobValidateRequest: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<JobValidateResponse> response = apiInstance.PostJobValidateRequestWithHttpInfo(jobValidateRequest, region, _namespace, xNomadToken, idempotencyToken);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.PostJobValidateRequestWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
jobValidateRequest | JobValidateRequest | ||
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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
JobRegisterResponse RegisterJob (JobRegisterRequest jobRegisterRequest, string? region = null, string? _namespace = null, string? xNomadToken = null, string? idempotencyToken = null)
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class RegisterJobExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://127.0.0.1:4646/v1";
// Configure API key authorization: X-Nomad-Token
config.AddApiKey("X-Nomad-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-Nomad-Token", "Bearer");
var apiInstance = new JobsApi(config);
var jobRegisterRequest = new JobRegisterRequest(); // JobRegisterRequest |
var region = "region_example"; // string? | Filters results based on the specified region. (optional)
var _namespace = "_namespace_example"; // string? | Filters results based on the specified namespace. (optional)
var xNomadToken = "xNomadToken_example"; // string? | A Nomad ACL token. (optional)
var idempotencyToken = "idempotencyToken_example"; // string? | Can be used to ensure operations are only run once. (optional)
try
{
JobRegisterResponse result = apiInstance.RegisterJob(jobRegisterRequest, region, _namespace, xNomadToken, idempotencyToken);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.RegisterJob: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<JobRegisterResponse> response = apiInstance.RegisterJobWithHttpInfo(jobRegisterRequest, region, _namespace, xNomadToken, idempotencyToken);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling JobsApi.RegisterJobWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
jobRegisterRequest | JobRegisterRequest | ||
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. * 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]