View Source DockerEngineAPI.Api.Volume (docker_engine_api v1.43.0)
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
Create a volume
Parameters
- connection (DockerEngineAPI.Connection): Connection to server
- volume_config (VolumeCreateOptions): Volume configuration
- opts (KeywordList): [optional] Optional parameters
Returns
} on success {:error, info} on failure
Remove a volume Instruct the driver to remove the volume.
Parameters
- connection (DockerEngineAPI.Connection): Connection to server
- name (String.t): Volume name or ID
- opts (KeywordList): [optional] Optional parameters
- :force (boolean()): Force the removal of the volume
Returns
} on success {:error, info} on failure
Inspect a volume
Parameters
- connection (DockerEngineAPI.Connection): Connection to server
- name (String.t): Volume name or ID
- opts (KeywordList): [optional] Optional parameters
Returns
} on success {:error, info} on failure
List volumes
Parameters
- connection (DockerEngineAPI.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
- :filters (String.t): JSON encoded value of the filters (a `map[string][]string`) to process on the volumes list. Available filters: - `dangling=<boolean>` When set to `true` (or `1`), returns all volumes that are not in use by a container. When set to `false` (or `0`), 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>` or `label=<key>:<value>` Matches volumes based on the presence of a `label` alone or a `label` and a value. - `name=<volume-name>` Matches all or part of a volume name.
Returns
} on success {:error, info} on failure
Delete unused volumes
Parameters
- connection (DockerEngineAPI.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
- :filters (String.t): Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune volumes with (or without, in case `label!=...` is used) the specified labels. - `all` (`all=true`) - Consider all (local) volumes for pruning and not just anonymous volumes.
Returns
} on success {:error, info} on failure
"Update a volume. Valid only for Swarm cluster volumes"
Parameters
- connection (DockerEngineAPI.Connection): Connection to server
- name (String.t): The name or ID of the volume
- version (integer()): The version number of the volume being updated. This is required to avoid conflicting writes. Found in the volume's `ClusterVolume` field.
- opts (KeywordList): [optional] Optional parameters
- :body (Body): The spec of the volume to update. Currently, only Availability may change. All other fields must remain unchanged.
Returns
} on success {:error, info} on failure