Elixir-Scaleway v0.1.8 Scaleway.Volume View Source
A Volume abstracts data storage operations for your servers in a flexible manner. volumes endpoint allow you to create, list or delete your volumes.
Link to this section Summary
Functions
Create a new volume
Retrieves all volumes
Delete a volume
Retrieves informations about a volume 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 new volume
Examples
iex> data = %{
:name => "volume-0-3",
:organization => "000a115d-2852-4b0a-9ce8-47f1134ba95a",
:size => 10000000000,
:volume_type => "l_ssd"
}
%{
:name => "volume-0-3",
:organization => "000a115d-2852-4b0a-9ce8-47f1134ba95a",
:size => 10000000000,
:volume_type => "l_ssd"
}
iex> Scaleway.Volume.create(data)
Link to this function
list()
View Source
list() :: {:ok, HTTPoison.Response} | {:error, HTTPoison.Error}
Retrieves all volumes
Examples
iex> Scaleway.Volume.list()
Link to this function
remove(id)
View Source
remove(charlist()) :: {:ok, HTTPoison.Response} | {:error, HTTPoison.Error}
Delete a volume.
Examples
iex> volume_id = "f929fe39-63f8-4be8-a80e-1e9c8ae22a76"
"f929fe39-63f8-4be8-a80e-1e9c8ae22a76"
iex> Scaleway.Volume.remove(volume_id)
Link to this function
show(id)
View Source
show(charlist()) :: {:ok, HTTPoison.Response} | {:error, HTTPoison.Error}
Retrieves informations about a volume by its id
Examples
iex> volume_id = "f929fe39-63f8-4be8-a80e-1e9c8ae22a76"
"f929fe39-63f8-4be8-a80e-1e9c8ae22a76"
iex> Scaleway.Volume.show(volume_id)