ExIncus. StorageVolumes
(ex_incus v1.0.0)
Copy Markdown
Manage storage volumes within a pool.
Volumes have a type; user-created ones are "custom", which is the
default everywhere in this module (instances and images get volumes of
their own types automatically).
{:ok, _} =
ExIncus.StorageVolumes.create(client, "default", %{
"name" => "shared-data",
"config" => %{"size" => "10GiB"}
})
Summary
Functions
Creates a volume from a StorageVolumesPost params map (needs "name").
The volume type defaults to "custom"; override with type:.
Deletes a volume.
Fetches a single volume.
Lists volumes in a pool, all types. Pass type: to restrict (e.g.
type: "custom").
Partially updates the volume configuration (PATCH).
Renames a volume.
Replaces the volume configuration (PUT).
Types
@type result() :: {:ok, term()} | {:error, ExIncus.Error.t()}
Functions
@spec create(ExIncus.Client.t(), String.t(), map(), keyword()) :: result()
Creates a volume from a StorageVolumesPost params map (needs "name").
The volume type defaults to "custom"; override with type:.
@spec delete(ExIncus.Client.t(), String.t(), String.t(), keyword()) :: result()
Deletes a volume.
@spec get(ExIncus.Client.t(), String.t(), String.t(), keyword()) :: result()
Fetches a single volume.
@spec list(ExIncus.Client.t(), String.t(), keyword()) :: result()
Lists volumes in a pool, all types. Pass type: to restrict (e.g.
type: "custom").
Partially updates the volume configuration (PATCH).
Renames a volume.
Replaces the volume configuration (PUT).