Skip to content

Latest commit

 

History

History
654 lines (481 loc) · 24.2 KB

DeploymentsApi.md

File metadata and controls

654 lines (481 loc) · 24.2 KB

.DeploymentsApi

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

Method HTTP request Description
getDeployment GET /deployment/{deploymentID}
getDeploymentAllocations GET /deployment/allocations/{deploymentID}
getDeployments GET /deployments
postDeploymentAllocationHealth POST /deployment/allocation-health/{deploymentID}
postDeploymentFail POST /deployment/fail/{deploymentID}
postDeploymentPause POST /deployment/pause/{deploymentID}
postDeploymentPromote POST /deployment/promote/{deploymentID}
postDeploymentUnblock POST /deployment/unblock/{deploymentID}

getDeployment

Deployment getDeployment()

Example

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

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

let body:.DeploymentsApiGetDeploymentRequest = {
  // string | Deployment ID.
  deploymentID: "deploymentID_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",
  // 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.getDeployment(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
deploymentID [string] Deployment ID. defaults to undefined
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

Deployment

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]

getDeploymentAllocations

Array getDeploymentAllocations()

Example

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

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

let body:.DeploymentsApiGetDeploymentAllocationsRequest = {
  // string | Deployment ID.
  deploymentID: "deploymentID_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",
  // 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.getDeploymentAllocations(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
deploymentID [string] Deployment ID. defaults to undefined
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

Array

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]

getDeployments

Array getDeployments()

Example

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

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

let body:.DeploymentsApiGetDeploymentsRequest = {
  // 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.getDeployments(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

Array

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]

postDeploymentAllocationHealth

DeploymentUpdateResponse postDeploymentAllocationHealth(deploymentAllocHealthRequest)

Example

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

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

let body:.DeploymentsApiPostDeploymentAllocationHealthRequest = {
  // string | Deployment ID.
  deploymentID: "deploymentID_example",
  // DeploymentAllocHealthRequest
  deploymentAllocHealthRequest: {
    deploymentID: "deploymentID_example",
    healthyAllocationIDs: [
      "healthyAllocationIDs_example",
    ],
    namespace: "namespace_example",
    region: "region_example",
    secretID: "secretID_example",
    unhealthyAllocationIDs: [
      "unhealthyAllocationIDs_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.postDeploymentAllocationHealth(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
deploymentAllocHealthRequest DeploymentAllocHealthRequest
deploymentID [string] Deployment ID. defaults to undefined
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

DeploymentUpdateResponse

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]

postDeploymentFail

DeploymentUpdateResponse postDeploymentFail()

Example

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

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

let body:.DeploymentsApiPostDeploymentFailRequest = {
  // string | Deployment ID.
  deploymentID: "deploymentID_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.postDeploymentFail(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
deploymentID [string] Deployment ID. defaults to undefined
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

DeploymentUpdateResponse

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]

postDeploymentPause

DeploymentUpdateResponse postDeploymentPause(deploymentPauseRequest)

Example

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

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

let body:.DeploymentsApiPostDeploymentPauseRequest = {
  // string | Deployment ID.
  deploymentID: "deploymentID_example",
  // DeploymentPauseRequest
  deploymentPauseRequest: {
    deploymentID: "deploymentID_example",
    namespace: "namespace_example",
    pause: true,
    region: "region_example",
    secretID: "secretID_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.postDeploymentPause(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
deploymentPauseRequest DeploymentPauseRequest
deploymentID [string] Deployment ID. defaults to undefined
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

DeploymentUpdateResponse

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]

postDeploymentPromote

DeploymentUpdateResponse postDeploymentPromote(deploymentPromoteRequest)

Example

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

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

let body:.DeploymentsApiPostDeploymentPromoteRequest = {
  // string | Deployment ID.
  deploymentID: "deploymentID_example",
  // DeploymentPromoteRequest
  deploymentPromoteRequest: {
    all: true,
    deploymentID: "deploymentID_example",
    groups: [
      "groups_example",
    ],
    namespace: "namespace_example",
    region: "region_example",
    secretID: "secretID_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.postDeploymentPromote(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
deploymentPromoteRequest DeploymentPromoteRequest
deploymentID [string] Deployment ID. defaults to undefined
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

DeploymentUpdateResponse

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]

postDeploymentUnblock

DeploymentUpdateResponse postDeploymentUnblock(deploymentUnblockRequest)

Example

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

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

let body:.DeploymentsApiPostDeploymentUnblockRequest = {
  // string | Deployment ID.
  deploymentID: "deploymentID_example",
  // DeploymentUnblockRequest
  deploymentUnblockRequest: {
    deploymentID: "deploymentID_example",
    namespace: "namespace_example",
    region: "region_example",
    secretID: "secretID_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.postDeploymentUnblock(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
deploymentUnblockRequest DeploymentUnblockRequest
deploymentID [string] Deployment ID. defaults to undefined
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

DeploymentUpdateResponse

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]