ExIncus.Snapshots (ex_incus v1.0.0)

Copy Markdown

Manage instance snapshots.

{:ok, _} = ExIncus.Snapshots.create(client, "web1", "before-upgrade")
{:ok, _} = ExIncus.Snapshots.restore(client, "web1", "before-upgrade")
{:ok, _} = ExIncus.Snapshots.delete(client, "web1", "before-upgrade")

Summary

Functions

Fetches a single snapshot.

Lists snapshots of an instance (full objects by default).

Restores the instance to a snapshot.

Updates a snapshot (currently only "expires_at").

Types

result()

@type result() :: {:ok, term()} | {:error, ExIncus.Error.t()}

Functions

create(client, instance, name, opts \\ [])

@spec create(ExIncus.Client.t(), String.t(), String.t(), keyword()) :: result()

Creates a snapshot.

Options: :stateful (include runtime state), :expires_at (ISO8601 string), plus the usual :wait / :timeout / :project.

delete(client, instance, name, opts \\ [])

@spec delete(ExIncus.Client.t(), String.t(), String.t(), keyword()) :: result()

Deletes a snapshot.

get(client, instance, name, opts \\ [])

@spec get(ExIncus.Client.t(), String.t(), String.t(), keyword()) :: result()

Fetches a single snapshot.

list(client, instance, opts \\ [])

@spec list(ExIncus.Client.t(), String.t(), keyword()) :: result()

Lists snapshots of an instance (full objects by default).

rename(client, instance, name, new_name, opts \\ [])

@spec rename(ExIncus.Client.t(), String.t(), String.t(), String.t(), keyword()) ::
  result()

Renames a snapshot.

restore(client, instance, name, opts \\ [])

@spec restore(ExIncus.Client.t(), String.t(), String.t(), keyword()) :: result()

Restores the instance to a snapshot.

update(client, instance, name, params, opts \\ [])

@spec update(ExIncus.Client.t(), String.t(), String.t(), map(), keyword()) :: result()

Updates a snapshot (currently only "expires_at").