NomadClient.Api.Volumes (nomad_client v0.11.0)
API calls for all endpoints tagged Volumes
.
Link to this section Summary
Functions
deregisters an external volume with Nomad. It is an error to deregister a volume that is in use
reads information about a specific volume
lists all volumes
registers an external volume with Nomad. It is an error to register an existing volume
Link to this section Functions
Link to this function
deregister_volume(connection, volume_id, opts \\ [])
Specs
deregister_volume(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
deregisters an external volume with Nomad. It is an error to deregister a volume that is in use
Parameters
- connection (NomadClient.Connection): Connection to server
- volume_id (String.t): Specifies the ID of the volume. This must be the full ID. This is specified as part of the path
- opts (KeywordList): [optional] Optional parameters
Returns
on success {:error, Tesla.Env.t} on failure
Link to this function
get_volume(connection, volume_id, opts \\ [])
Specs
get_volume(Tesla.Env.client(), String.t(), keyword()) :: {:ok, NomadClient.Model.CsiVolume.t()} | {:error, Tesla.Env.t()}
reads information about a specific volume
Parameters
- connection (NomadClient.Connection): Connection to server
- volume_id (String.t): Specifies the ID of the volume. This must be the full ID. This is specified as part of the path
- opts (KeywordList): [optional] Optional parameters
Returns
on success {:error, Tesla.Env.t} on failure
Link to this function
get_volumes(connection, opts \\ [])
Specs
get_volumes(Tesla.Env.client(), keyword()) :: {:ok, [NomadClient.Model.CsiVolumeListStub.t()]} | {:error, Tesla.Env.t()}
lists all volumes
Parameters
- connection (NomadClient.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
, ...]} on success {:error, Tesla.Env.t} on failure
Link to this function
register_volume(connection, volume_id, opts \\ [])
Specs
register_volume(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
registers an external volume with Nomad. It is an error to register an existing volume
Parameters
- connection (NomadClient.Connection): Connection to server
- volume_id (String.t): Specifies the ID of the volume. This must be the full ID. This is specified as part of the path
- opts (KeywordList): [optional] Optional parameters
on success {:error, Tesla.Env.t} on failure