E2bEx.Volumes (E2bEx v0.1.0)

Copy Markdown View Source

Team volume operations (/volumes). Every function takes an E2bEx.Client.

A volume can be mounted into a sandbox at create time via volumeMounts:

E2bEx.Sandboxes.create(client, %{templateID: "base",
  volumeMounts: [%{name: "my-vol", path: "/data"}]})

Summary

Functions

Create a team volume (POST /volumes). Returns the volume with its token.

Delete a team volume by id (DELETE /volumes/:id).

Get a team volume by id (GET /volumes/:id). Returns the volume with its token.

List all team volumes (GET /volumes).

Functions

create(client, name)

@spec create(E2bEx.Client.t(), String.t()) ::
  {:ok, E2bEx.Volume.t()} | {:error, E2bEx.Error.t()}

Create a team volume (POST /volumes). Returns the volume with its token.

delete(client, volume_id)

@spec delete(E2bEx.Client.t(), String.t()) :: :ok | {:error, E2bEx.Error.t()}

Delete a team volume by id (DELETE /volumes/:id).

get(client, volume_id)

@spec get(E2bEx.Client.t(), String.t()) ::
  {:ok, E2bEx.Volume.t()} | {:error, E2bEx.Error.t()}

Get a team volume by id (GET /volumes/:id). Returns the volume with its token.

list(client)

@spec list(E2bEx.Client.t()) :: {:ok, [E2bEx.Volume.t()]} | {:error, E2bEx.Error.t()}

List all team volumes (GET /volumes).