Elixir-Scaleway v0.1.8 Scaleway.Snapshot View Source

A snapshot is a full-volume copy stored in our secure data centers.

Scaleway documentation API for snapshots

Link to this section Summary

Functions

Create a snapshot

List all snapshots

Remove a snapshot by its id

Retrieve a snapshot by its id

Update a snapshot by its id

Link to this section Functions

Link to this function create(data) View Source
create(map()) :: {:ok, HTTPoison.Response} | {:error, HTTPoison.Error}

Create a snapshot.

Examples

iex> data = %{
  :name => "snapshot-0-1",
  :organization => "000a115d-2852-4b0a-9ce8-47f1134ba95a",
  :volume_id => "701a8946-ff9d-4579-95e3-1c2c2d0f892d"
}
%{
  :name => "snapshot-0-1",
  :organization => "000a115d-2852-4b0a-9ce8-47f1134ba95a",
  :volume_id => "701a8946-ff9d-4579-95e3-1c2c2d0f892d"
}

iex> Scaleway.Snapshot.create(data)
Link to this function create!(data) View Source
create!(map()) :: map()
Link to this function list() View Source
list() :: {:ok, HTTPoison.Response} | {:error, HTTPoison.Error}

List all snapshots.

Examples

iex> Scaleway.Snapshot.list()
Link to this function remove(id) View Source
remove(charlist()) :: {:ok, HTTPoison.Response} | {:error, HTTPoison.Error}

Remove a snapshot by its id.

Examples

iex> snapshot_id = "6f418e5f-b42d-4423-a0b5-349c74c454a4"
"6f418e5f-b42d-4423-a0b5-349c74c454a4"

iex> Scaleway.Snapshot.remove(snapshot_id)
Link to this function show(id) View Source
show(charlist()) :: {:ok, HTTPoison.Response} | {:error, HTTPoison.Error}

Retrieve a snapshot by its id.

Examples

iex> snapshot_id = "6f418e5f-b42d-4423-a0b5-349c74c454a4"
"6f418e5f-b42d-4423-a0b5-349c74c454a4"

iex> Scaleway.Snapshot.show(snapshot_id)
Link to this function update(id, data) View Source
update(charlist(), map()) ::
  {:ok, HTTPoison.Response} | {:error, HTTPoison.Error}

Update a snapshot by its id.

Examples

iex> snapshot_id = "6f418e5f-b42d-4423-a0b5-349c74c454a4"
"6f418e5f-b42d-4423-a0b5-349c74c454a4"

iex> data = %{:name => "snapshot-0-1"}
%{:name => "snapshot-0-1"}

iex> Scaleway.Snapshot.update(snapshot_id, data)
Link to this function update!(id, data) View Source
update!(charlist(), map()) :: map()