NomadClient.Api.Allocations (nomad_client v0.12.4)
API calls for all endpoints tagged Allocations
.
Link to this section Summary
Functions
reads information about a specific allocation
query for and interact with allocations
restarts an allocation or task in-place
sends a signal to an allocation or task
stops and reschedules a specific allocation
Link to this section Functions
Link to this function
get_allocation(connection, alloc_id, opts \\ [])
Specs
get_allocation(Tesla.Env.client(), String.t(), keyword()) :: {:ok, NomadClient.Model.Allocation.t()} | {:error, Tesla.Env.t()}
reads information about a specific allocation
Parameters
- connection (NomadClient.Connection): Connection to server
- alloc_id (String.t): Specifies the UUID of the allocation. This must be the full UUID, not the short 8-character one
- opts (KeywordList): [optional] Optional parameters
on success {:error, Tesla.Env.t} on failure
Link to this function
get_allocations(connection, opts \\ [])
Specs
get_allocations(Tesla.Env.client(), keyword()) :: {:ok, [NomadClient.Model.AllocationListStub.t()]} | {:error, Tesla.Env.t()}
query for and interact with allocations
Parameters
- connection (NomadClient.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
- :namespace (String.t):
- :region (String.t): Make a request across regions to the given region
- :index (integer()): index used for blocking requests
- :wait (String.t): wait time used for blocking requests
- :prefix (String.t): Specifies a string to filter jobs on based on an index prefix. This is specified as a query string parameter
Returns
, ...]} on success {:error, Tesla.Env.t} on failure
Link to this function
restart_allocation(connection, alloc_id, allocation_restart_request, opts \\ [])
Specs
restart_allocation( Tesla.Env.client(), String.t(), NomadClient.Model.AllocationRestartRequest.t(), keyword() ) :: {:ok, nil} | {:error, Tesla.Env.t()}
restarts an allocation or task in-place
Parameters
- connection (NomadClient.Connection): Connection to server
- alloc_id (String.t): Specifies the UUID of the allocation. This must be the full UUID, not the short 8-character one
- allocation_restart_request (AllocationRestartRequest):
- opts (KeywordList): [optional] Optional parameters
on success {:error, Tesla.Env.t} on failure
Link to this function
signal_allocation(connection, alloc_id, alloc_signal_request, opts \\ [])
Specs
signal_allocation( Tesla.Env.client(), String.t(), NomadClient.Model.AllocSignalRequest.t(), keyword() ) :: {:ok, nil} | {:error, Tesla.Env.t()}
sends a signal to an allocation or task
Parameters
- connection (NomadClient.Connection): Connection to server
- alloc_id (String.t): Specifies the UUID of the allocation. This must be the full UUID, not the short 8-character one
- alloc_signal_request (AllocSignalRequest):
- opts (KeywordList): [optional] Optional parameters
on success {:error, Tesla.Env.t} on failure
Link to this function
stop_allocation(connection, alloc_id, opts \\ [])
Specs
stop_allocation(Tesla.Env.client(), String.t(), keyword()) :: {:ok, NomadClient.Model.AllocStopResponse.t()} | {:error, Tesla.Env.t()}
stops and reschedules a specific allocation
Parameters
- connection (NomadClient.Connection): Connection to server
- alloc_id (String.t): Specifies the UUID of the allocation. This must be the full UUID, not the short 8-character one
- opts (KeywordList): [optional] Optional parameters
on success {:error, Tesla.Env.t} on failure