NomadClient.Api.Allocations (nomad_client v0.13.1)
API calls for all endpoints tagged Allocations
.
Link to this section Summary
Functions
Parameters
connection
(NomadClient.Connection): Connection to serveralloc_id
(String.t): Allocation ID.opts
(keyword): Optional parameters:region
(String.t): Filters results based on the specified region.:namespace
(String.t): Filters results based on the specified namespace.:index
(integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.:wait
(String.t): Provided with IndexParam to wait for change.:stale
(String.t): If present, results will include stale reads.:prefix
(String.t): Constrains results to jobs that start with the defined prefix:x_nomad_token
(String.t): A Nomad ACL token.:per_page
(integer()): Maximum number of results to return.:next_token
(String.t): Indicates where to start paging for queries that support pagination.
Returns
{:ok, NomadClient.Model.Allocation.t}
on success{:error, Tesla.Env.t}
on failure
Parameters
connection
(NomadClient.Connection): Connection to serveralloc_id
(String.t): Allocation ID.opts
(keyword): Optional parameters:region
(String.t): Filters results based on the specified region.:namespace
(String.t): Filters results based on the specified namespace.:index
(integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.:wait
(String.t): Provided with IndexParam to wait for change.:stale
(String.t): If present, results will include stale reads.:prefix
(String.t): Constrains results to jobs that start with the defined prefix:x_nomad_token
(String.t): A Nomad ACL token.:per_page
(integer()): Maximum number of results to return.:next_token
(String.t): Indicates where to start paging for queries that support pagination.
Returns
{:ok, [%ServiceRegistration{}, ...]}
on success{:error, Tesla.Env.t}
on failure
Parameters
connection
(NomadClient.Connection): Connection to serveropts
(keyword): Optional parameters:region
(String.t): Filters results based on the specified region.:namespace
(String.t): Filters results based on the specified namespace.:index
(integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.:wait
(String.t): Provided with IndexParam to wait for change.:stale
(String.t): If present, results will include stale reads.:prefix
(String.t): Constrains results to jobs that start with the defined prefix:x_nomad_token
(String.t): A Nomad ACL token.:per_page
(integer()): Maximum number of results to return.:next_token
(String.t): Indicates where to start paging for queries that support pagination.:resources
(boolean()): Flag indicating whether to include resources in response.:task_states
(boolean()): Flag indicating whether to include task states in response.
Returns
{:ok, [%AllocationListStub{}, ...]}
on success{:error, Tesla.Env.t}
on failure
Parameters
connection
(NomadClient.Connection): Connection to serveralloc_id
(String.t): Allocation ID.opts
(keyword): Optional parameters:region
(String.t): Filters results based on the specified region.:namespace
(String.t): Filters results based on the specified namespace.:index
(integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.:wait
(String.t): Provided with IndexParam to wait for change.:stale
(String.t): If present, results will include stale reads.:prefix
(String.t): Constrains results to jobs that start with the defined prefix:x_nomad_token
(String.t): A Nomad ACL token.:per_page
(integer()): Maximum number of results to return.:next_token
(String.t): Indicates where to start paging for queries that support pagination.:no_shutdown_delay
(boolean()): Flag indicating whether to delay shutdown when requesting an allocation stop.
Returns
{:ok, NomadClient.Model.AllocStopResponse.t}
on success{:error, Tesla.Env.t}
on failure
Link to this section Functions
Link to this function
get_allocation(connection, alloc_id, opts \\ [])
@spec get_allocation(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:ok, NomadClient.Model.Allocation.t()} | {:error, Tesla.Env.t()}
parameters
Parameters
connection
(NomadClient.Connection): Connection to serveralloc_id
(String.t): Allocation ID.opts
(keyword): Optional parameters:region
(String.t): Filters results based on the specified region.:namespace
(String.t): Filters results based on the specified namespace.:index
(integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.:wait
(String.t): Provided with IndexParam to wait for change.:stale
(String.t): If present, results will include stale reads.:prefix
(String.t): Constrains results to jobs that start with the defined prefix:x_nomad_token
(String.t): A Nomad ACL token.:per_page
(integer()): Maximum number of results to return.:next_token
(String.t): Indicates where to start paging for queries that support pagination.
returns
Returns
{:ok, NomadClient.Model.Allocation.t}
on success{:error, Tesla.Env.t}
on failure
Link to this function
get_allocation_services(connection, alloc_id, opts \\ [])
@spec get_allocation_services(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:ok, [NomadClient.Model.ServiceRegistration.t()]} | {:error, Tesla.Env.t()}
parameters
Parameters
connection
(NomadClient.Connection): Connection to serveralloc_id
(String.t): Allocation ID.opts
(keyword): Optional parameters:region
(String.t): Filters results based on the specified region.:namespace
(String.t): Filters results based on the specified namespace.:index
(integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.:wait
(String.t): Provided with IndexParam to wait for change.:stale
(String.t): If present, results will include stale reads.:prefix
(String.t): Constrains results to jobs that start with the defined prefix:x_nomad_token
(String.t): A Nomad ACL token.:per_page
(integer()): Maximum number of results to return.:next_token
(String.t): Indicates where to start paging for queries that support pagination.
returns
Returns
{:ok, [%ServiceRegistration{}, ...]}
on success{:error, Tesla.Env.t}
on failure
Link to this function
get_allocations(connection, opts \\ [])
@spec get_allocations( Tesla.Env.client(), keyword() ) :: {:ok, nil} | {:ok, [NomadClient.Model.AllocationListStub.t()]} | {:error, Tesla.Env.t()}
parameters
Parameters
connection
(NomadClient.Connection): Connection to serveropts
(keyword): Optional parameters:region
(String.t): Filters results based on the specified region.:namespace
(String.t): Filters results based on the specified namespace.:index
(integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.:wait
(String.t): Provided with IndexParam to wait for change.:stale
(String.t): If present, results will include stale reads.:prefix
(String.t): Constrains results to jobs that start with the defined prefix:x_nomad_token
(String.t): A Nomad ACL token.:per_page
(integer()): Maximum number of results to return.:next_token
(String.t): Indicates where to start paging for queries that support pagination.:resources
(boolean()): Flag indicating whether to include resources in response.:task_states
(boolean()): Flag indicating whether to include task states in response.
returns
Returns
{:ok, [%AllocationListStub{}, ...]}
on success{:error, Tesla.Env.t}
on failure
Link to this function
post_allocation_stop(connection, alloc_id, opts \\ [])
@spec post_allocation_stop(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:ok, NomadClient.Model.AllocStopResponse.t()} | {:error, Tesla.Env.t()}
parameters
Parameters
connection
(NomadClient.Connection): Connection to serveralloc_id
(String.t): Allocation ID.opts
(keyword): Optional parameters:region
(String.t): Filters results based on the specified region.:namespace
(String.t): Filters results based on the specified namespace.:index
(integer()): If set, wait until query exceeds given index. Must be provided with WaitParam.:wait
(String.t): Provided with IndexParam to wait for change.:stale
(String.t): If present, results will include stale reads.:prefix
(String.t): Constrains results to jobs that start with the defined prefix:x_nomad_token
(String.t): A Nomad ACL token.:per_page
(integer()): Maximum number of results to return.:next_token
(String.t): Indicates where to start paging for queries that support pagination.:no_shutdown_delay
(boolean()): Flag indicating whether to delay shutdown when requesting an allocation stop.
returns
Returns
{:ok, NomadClient.Model.AllocStopResponse.t}
on success{:error, Tesla.Env.t}
on failure