NomadClient.Api.Volumes (nomad_client v0.12.4)
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
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
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
- :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
- :type (String.t): Specifies the type of volume to query. Currently only supports csi. This is specified as a query string parameter. Returns an empty list if omitted
- :node_id (String.t): node id
- :plugin_id (String.t): Specifies a string to filter volumes based on a plugin ID prefix
Returns
, ...]} on success {:error, Tesla.Env.t} on failure
Link to this function
register_volume(connection, volume_id, csi_volume_register_request, opts \\ [])
Specs
register_volume( Tesla.Env.client(), String.t(), NomadClient.Model.CsiVolumeRegisterRequest.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
- csi_volume_register_request (CsiVolumeRegisterRequest):
- opts (KeywordList): [optional] Optional parameters
on success {:error, Tesla.Env.t} on failure