Skip to content

Latest commit

 

History

History
568 lines (416 loc) · 21.5 KB

OperatorApi.md

File metadata and controls

568 lines (416 loc) · 21.5 KB

.OperatorApi

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

Method HTTP request Description
deleteOperatorRaftPeer DELETE /operator/raft/peer
getOperatorAutopilotConfiguration GET /operator/autopilot/configuration
getOperatorAutopilotHealth GET /operator/autopilot/health
getOperatorRaftConfiguration GET /operator/raft/configuration
getOperatorSchedulerConfiguration GET /operator/scheduler/configuration
postOperatorSchedulerConfiguration POST /operator/scheduler/configuration
putOperatorAutopilotConfiguration PUT /operator/autopilot/configuration

deleteOperatorRaftPeer

void deleteOperatorRaftPeer()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .OperatorApi(configuration);

let body:.OperatorApiDeleteOperatorRaftPeerRequest = {
  // string | Filters results based on the specified region. (optional)
  region: "region_example",
  // string | Filters results based on the specified namespace. (optional)
  namespace: "namespace_example",
  // string | A Nomad ACL token. (optional)
  xNomadToken: "X-Nomad-Token_example",
  // string | Can be used to ensure operations are only run once. (optional)
  idempotencyToken: "idempotency_token_example",
};

apiInstance.deleteOperatorRaftPeer(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
region [string] Filters results based on the specified region. (optional) defaults to undefined
namespace [string] Filters results based on the specified namespace. (optional) defaults to undefined
xNomadToken [string] A Nomad ACL token. (optional) defaults to undefined
idempotencyToken [string] Can be used to ensure operations are only run once. (optional) defaults to undefined

Return type

void

Authorization

X-Nomad-Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

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]

getOperatorAutopilotConfiguration

AutopilotConfiguration getOperatorAutopilotConfiguration()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .OperatorApi(configuration);

let body:.OperatorApiGetOperatorAutopilotConfigurationRequest = {
  // string | Filters results based on the specified region. (optional)
  region: "region_example",
  // string | Filters results based on the specified namespace. (optional)
  namespace: "namespace_example",
  // number | If set, wait until query exceeds given index. Must be provided with WaitParam. (optional)
  index: 1,
  // string | Provided with IndexParam to wait for change. (optional)
  wait: "wait_example",
  // string | If present, results will include stale reads. (optional)
  stale: "stale_example",
  // string | Constrains results to jobs that start with the defined prefix (optional)
  prefix: "prefix_example",
  // string | A Nomad ACL token. (optional)
  xNomadToken: "X-Nomad-Token_example",
  // number | Maximum number of results to return. (optional)
  perPage: 1,
  // string | Indicates where to start paging for queries that support pagination. (optional)
  nextToken: "next_token_example",
};

apiInstance.getOperatorAutopilotConfiguration(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
region [string] Filters results based on the specified region. (optional) defaults to undefined
namespace [string] Filters results based on the specified namespace. (optional) defaults to undefined
index [number] If set, wait until query exceeds given index. Must be provided with WaitParam. (optional) defaults to undefined
wait [string] Provided with IndexParam to wait for change. (optional) defaults to undefined
stale [string] If present, results will include stale reads. (optional) defaults to undefined
prefix [string] Constrains results to jobs that start with the defined prefix (optional) defaults to undefined
xNomadToken [string] A Nomad ACL token. (optional) defaults to undefined
perPage [number] Maximum number of results to return. (optional) defaults to undefined
nextToken [string] Indicates where to start paging for queries that support pagination. (optional) defaults to undefined

Return type

AutopilotConfiguration

Authorization

X-Nomad-Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

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]

getOperatorAutopilotHealth

OperatorHealthReply getOperatorAutopilotHealth()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .OperatorApi(configuration);

let body:.OperatorApiGetOperatorAutopilotHealthRequest = {
  // string | Filters results based on the specified region. (optional)
  region: "region_example",
  // string | Filters results based on the specified namespace. (optional)
  namespace: "namespace_example",
  // number | If set, wait until query exceeds given index. Must be provided with WaitParam. (optional)
  index: 1,
  // string | Provided with IndexParam to wait for change. (optional)
  wait: "wait_example",
  // string | If present, results will include stale reads. (optional)
  stale: "stale_example",
  // string | Constrains results to jobs that start with the defined prefix (optional)
  prefix: "prefix_example",
  // string | A Nomad ACL token. (optional)
  xNomadToken: "X-Nomad-Token_example",
  // number | Maximum number of results to return. (optional)
  perPage: 1,
  // string | Indicates where to start paging for queries that support pagination. (optional)
  nextToken: "next_token_example",
};

apiInstance.getOperatorAutopilotHealth(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
region [string] Filters results based on the specified region. (optional) defaults to undefined
namespace [string] Filters results based on the specified namespace. (optional) defaults to undefined
index [number] If set, wait until query exceeds given index. Must be provided with WaitParam. (optional) defaults to undefined
wait [string] Provided with IndexParam to wait for change. (optional) defaults to undefined
stale [string] If present, results will include stale reads. (optional) defaults to undefined
prefix [string] Constrains results to jobs that start with the defined prefix (optional) defaults to undefined
xNomadToken [string] A Nomad ACL token. (optional) defaults to undefined
perPage [number] Maximum number of results to return. (optional) defaults to undefined
nextToken [string] Indicates where to start paging for queries that support pagination. (optional) defaults to undefined

Return type

OperatorHealthReply

Authorization

X-Nomad-Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

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]

getOperatorRaftConfiguration

RaftConfiguration getOperatorRaftConfiguration()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .OperatorApi(configuration);

let body:.OperatorApiGetOperatorRaftConfigurationRequest = {
  // string | Filters results based on the specified region. (optional)
  region: "region_example",
  // string | Filters results based on the specified namespace. (optional)
  namespace: "namespace_example",
  // number | If set, wait until query exceeds given index. Must be provided with WaitParam. (optional)
  index: 1,
  // string | Provided with IndexParam to wait for change. (optional)
  wait: "wait_example",
  // string | If present, results will include stale reads. (optional)
  stale: "stale_example",
  // string | Constrains results to jobs that start with the defined prefix (optional)
  prefix: "prefix_example",
  // string | A Nomad ACL token. (optional)
  xNomadToken: "X-Nomad-Token_example",
  // number | Maximum number of results to return. (optional)
  perPage: 1,
  // string | Indicates where to start paging for queries that support pagination. (optional)
  nextToken: "next_token_example",
};

apiInstance.getOperatorRaftConfiguration(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
region [string] Filters results based on the specified region. (optional) defaults to undefined
namespace [string] Filters results based on the specified namespace. (optional) defaults to undefined
index [number] If set, wait until query exceeds given index. Must be provided with WaitParam. (optional) defaults to undefined
wait [string] Provided with IndexParam to wait for change. (optional) defaults to undefined
stale [string] If present, results will include stale reads. (optional) defaults to undefined
prefix [string] Constrains results to jobs that start with the defined prefix (optional) defaults to undefined
xNomadToken [string] A Nomad ACL token. (optional) defaults to undefined
perPage [number] Maximum number of results to return. (optional) defaults to undefined
nextToken [string] Indicates where to start paging for queries that support pagination. (optional) defaults to undefined

Return type

RaftConfiguration

Authorization

X-Nomad-Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

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]

getOperatorSchedulerConfiguration

SchedulerConfigurationResponse getOperatorSchedulerConfiguration()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .OperatorApi(configuration);

let body:.OperatorApiGetOperatorSchedulerConfigurationRequest = {
  // string | Filters results based on the specified region. (optional)
  region: "region_example",
  // string | Filters results based on the specified namespace. (optional)
  namespace: "namespace_example",
  // number | If set, wait until query exceeds given index. Must be provided with WaitParam. (optional)
  index: 1,
  // string | Provided with IndexParam to wait for change. (optional)
  wait: "wait_example",
  // string | If present, results will include stale reads. (optional)
  stale: "stale_example",
  // string | Constrains results to jobs that start with the defined prefix (optional)
  prefix: "prefix_example",
  // string | A Nomad ACL token. (optional)
  xNomadToken: "X-Nomad-Token_example",
  // number | Maximum number of results to return. (optional)
  perPage: 1,
  // string | Indicates where to start paging for queries that support pagination. (optional)
  nextToken: "next_token_example",
};

apiInstance.getOperatorSchedulerConfiguration(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
region [string] Filters results based on the specified region. (optional) defaults to undefined
namespace [string] Filters results based on the specified namespace. (optional) defaults to undefined
index [number] If set, wait until query exceeds given index. Must be provided with WaitParam. (optional) defaults to undefined
wait [string] Provided with IndexParam to wait for change. (optional) defaults to undefined
stale [string] If present, results will include stale reads. (optional) defaults to undefined
prefix [string] Constrains results to jobs that start with the defined prefix (optional) defaults to undefined
xNomadToken [string] A Nomad ACL token. (optional) defaults to undefined
perPage [number] Maximum number of results to return. (optional) defaults to undefined
nextToken [string] Indicates where to start paging for queries that support pagination. (optional) defaults to undefined

Return type

SchedulerConfigurationResponse

Authorization

X-Nomad-Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

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]

postOperatorSchedulerConfiguration

SchedulerSetConfigurationResponse postOperatorSchedulerConfiguration(schedulerConfiguration)

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .OperatorApi(configuration);

let body:.OperatorApiPostOperatorSchedulerConfigurationRequest = {
  // SchedulerConfiguration
  schedulerConfiguration: {
    createIndex: 0,
    memoryOversubscriptionEnabled: true,
    modifyIndex: 0,
    pauseEvalBroker: true,
    preemptionConfig: {
      batchSchedulerEnabled: true,
      serviceSchedulerEnabled: true,
      sysBatchSchedulerEnabled: true,
      systemSchedulerEnabled: true,
    },
    rejectJobRegistration: true,
    schedulerAlgorithm: "schedulerAlgorithm_example",
  },
  // string | Filters results based on the specified region. (optional)
  region: "region_example",
  // string | Filters results based on the specified namespace. (optional)
  namespace: "namespace_example",
  // string | A Nomad ACL token. (optional)
  xNomadToken: "X-Nomad-Token_example",
  // string | Can be used to ensure operations are only run once. (optional)
  idempotencyToken: "idempotency_token_example",
};

apiInstance.postOperatorSchedulerConfiguration(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
schedulerConfiguration SchedulerConfiguration
region [string] Filters results based on the specified region. (optional) defaults to undefined
namespace [string] Filters results based on the specified namespace. (optional) defaults to undefined
xNomadToken [string] A Nomad ACL token. (optional) defaults to undefined
idempotencyToken [string] Can be used to ensure operations are only run once. (optional) defaults to undefined

Return type

SchedulerSetConfigurationResponse

Authorization

X-Nomad-Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]

putOperatorAutopilotConfiguration

boolean putOperatorAutopilotConfiguration(autopilotConfiguration)

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .OperatorApi(configuration);

let body:.OperatorApiPutOperatorAutopilotConfigurationRequest = {
  // AutopilotConfiguration
  autopilotConfiguration: {
    cleanupDeadServers: true,
    createIndex: 0,
    disableUpgradeMigration: true,
    enableCustomUpgrades: true,
    enableRedundancyZones: true,
    lastContactThreshold: "lastContactThreshold_example",
    maxTrailingLogs: 0,
    minQuorum: 0,
    modifyIndex: 0,
    serverStabilizationTime: "serverStabilizationTime_example",
  },
  // string | Filters results based on the specified region. (optional)
  region: "region_example",
  // string | Filters results based on the specified namespace. (optional)
  namespace: "namespace_example",
  // string | A Nomad ACL token. (optional)
  xNomadToken: "X-Nomad-Token_example",
  // string | Can be used to ensure operations are only run once. (optional)
  idempotencyToken: "idempotency_token_example",
};

apiInstance.putOperatorAutopilotConfiguration(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
autopilotConfiguration AutopilotConfiguration
region [string] Filters results based on the specified region. (optional) defaults to undefined
namespace [string] Filters results based on the specified namespace. (optional) defaults to undefined
xNomadToken [string] A Nomad ACL token. (optional) defaults to undefined
idempotencyToken [string] Can be used to ensure operations are only run once. (optional) defaults to undefined

Return type

boolean

Authorization

X-Nomad-Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]