Miosa.Volumes (Miosa v1.0.1)

Copy Markdown View Source

Persistent block storage volumes that survive instance restarts.

Volumes can be attached to computers to provide durable storage beyond the ephemeral rootfs.

Example

client = Miosa.client(System.fetch_env!("MIOSA_API_KEY"))

{:ok, vol} = Miosa.Volumes.create(client, %{name: "data", size_gb: 20})
{:ok, vol} = Miosa.Volumes.get(client, vol["id"])

Summary

Functions

Create a volume.

Delete a volume by ID.

Fetch a volume by ID.

List volumes for the authenticated tenant.

Functions

create(client, attrs)

@spec create(Miosa.Client.t(), map()) :: Miosa.Client.result(map())

Create a volume.

Required: :name, :size_gb. Optional: :region, and any other attrs. Pass :idempotency_key to supply your own idempotency key.

delete(client, volume_id)

@spec delete(Miosa.Client.t(), String.t()) :: Miosa.Client.result(map())

Delete a volume by ID.

get(client, volume_id)

Fetch a volume by ID.

list(client, filters \\ [])

@spec list(Miosa.Client.t(), keyword() | map()) :: Miosa.Client.result(map())

List volumes for the authenticated tenant.

Accepts optional filters as a keyword list or map (e.g. :limit, :cursor).