DockerEngineAPI.Api.Volume (elixir_dea v1.45.7)
API calls for all endpoints tagged Volume
.
Summary
Functions
Create a volume
Remove a volume Instruct the driver to remove the volume.
Inspect a volume
List volumes
Delete unused volumes
"Update a volume. Valid only for Swarm cluster volumes"
Functions
Link to this function
volume_create(connection, volume_config, opts \\ [])
@spec volume_create( Tesla.Env.client(), DockerEngineAPI.Model.VolumeCreateOptions.t(), keyword() ) :: {:ok, DockerEngineAPI.Model.Volume.t()} | {:ok, DockerEngineAPI.Model.ErrorResponse.t()} | {:error, Tesla.Env.t()}
Create a volume
Parameters
connection
(DockerEngineAPI.Connection): Connection to servervolume_config
(VolumeCreateOptions): Volume configurationopts
(keyword): Optional parameters
Returns
{:ok, DockerEngineAPI.Model.Volume.t}
on success{:error, Tesla.Env.t}
on failure
Link to this function
volume_delete(connection, name, opts \\ [])
@spec volume_delete(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t()} | {:error, Tesla.Env.t()}
Remove a volume Instruct the driver to remove the volume.
Parameters
connection
(DockerEngineAPI.Connection): Connection to servername
(String.t): Volume name or IDopts
(keyword): Optional parameters:force
(boolean()): Force the removal of the volume
Returns
{:ok, nil}
on success{:error, Tesla.Env.t}
on failure
Link to this function
volume_inspect(connection, name, opts \\ [])
@spec volume_inspect(Tesla.Env.client(), String.t(), keyword()) :: {:ok, DockerEngineAPI.Model.Volume.t()} | {:ok, DockerEngineAPI.Model.ErrorResponse.t()} | {:error, Tesla.Env.t()}
Inspect a volume
Parameters
connection
(DockerEngineAPI.Connection): Connection to servername
(String.t): Volume name or IDopts
(keyword): Optional parameters
Returns
{:ok, DockerEngineAPI.Model.Volume.t}
on success{:error, Tesla.Env.t}
on failure
Link to this function
volume_list(connection, opts \\ [])
@spec volume_list( Tesla.Env.client(), keyword() ) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t()} | {:ok, DockerEngineAPI.Model.VolumeListResponse.t()} | {:error, Tesla.Env.t()}
List volumes
Parameters
connection
(DockerEngineAPI.Connection): Connection to serveropts
(keyword): Optional parameters:filters
(String.t): JSON encoded value of the filters (amap[string][]string
) to process on the volumes list. Available filters: -dangling=<boolean>
When set totrue
(or1
), returns all volumes that are not in use by a container. When set tofalse
(or0
), only volumes that are in use by one or more containers are returned. -driver=<volume-driver-name>
Matches volumes based on their driver. -label=<key>
orlabel=<key>:<value>
Matches volumes based on the presence of alabel
alone or alabel
and a value. -name=<volume-name>
Matches all or part of a volume name.
Returns
{:ok, DockerEngineAPI.Model.VolumeListResponse.t}
on success{:error, Tesla.Env.t}
on failure
Link to this function
volume_prune(connection, opts \\ [])
@spec volume_prune( Tesla.Env.client(), keyword() ) :: {:ok, DockerEngineAPI.Model.VolumePruneResponse.t()} | {:ok, DockerEngineAPI.Model.ErrorResponse.t()} | {:error, Tesla.Env.t()}
Delete unused volumes
Parameters
connection
(DockerEngineAPI.Connection): Connection to serveropts
(keyword): Optional parameters:filters
(String.t): Filters to process on the prune list, encoded as JSON (amap[string][]string
). Available filters: -label
(label=<key>
,label=<key>=<value>
,label!=<key>
, orlabel!=<key>=<value>
) Prune volumes with (or without, in caselabel!=...
is used) the specified labels. -all
(all=true
) - Consider all (local) volumes for pruning and not just anonymous volumes.
Returns
{:ok, DockerEngineAPI.Model.VolumePruneResponse.t}
on success{:error, Tesla.Env.t}
on failure
Link to this function
volume_update(connection, name, version, opts \\ [])
@spec volume_update(Tesla.Env.client(), String.t(), integer(), keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t()} | {:error, Tesla.Env.t()}
"Update a volume. Valid only for Swarm cluster volumes"
Parameters
connection
(DockerEngineAPI.Connection): Connection to servername
(String.t): The name or ID of the volumeversion
(integer()): The version number of the volume being updated. This is required to avoid conflicting writes. Found in the volume'sClusterVolume
field.opts
(keyword): Optional parameters:body
(VolumeUpdateRequest): The spec of the volume to update. Currently, only Availability may change. All other fields must remain unchanged.
Returns
{:ok, nil}
on success{:error, Tesla.Env.t}
on failure