Elixir-Scaleway v0.1.7 Scaleway.Image View Source
Images allow you to create series of servers with predefined configuration. For instance, you can prepare to scale your serving capacity with a frontend image for an Apache server.
Link to this section Summary
Functions
Create a new image
List all images
Similar to list/0 but with body only
Delete an image by its id
Retrieves an image by its id
Update an image
Link to this section Functions
Link to this function
create(data)
View Source
create(map()) :: {:ok, HTTPoison.Response} | {:error, HTTPoison.Error}
Create a new image.
Examples
iex> data = %{
:organization => "000a115d-2852-4b0a-9ce8-47f1134ba95a",
:arch => "arm",
:name => "my_image",
:root_volume => "f0361e7b-cbe4-4882-a999-945192b7171b"
}
%{
:organization => "000a115d-2852-4b0a-9ce8-47f1134ba95a",
:arch => "arm",
:name => "my_image",
:root_volume => "f0361e7b-cbe4-4882-a999-945192b7171b"
}
iex> Scaleway.Image.create(data)
Link to this function
list()
View Source
list() :: {:ok, HTTPoison.Response} | {:error, HTTPoison.Error}
List all images.
Examples
iex> Scaleway.Image.list()
Similar to list/0 but with body only.
Link to this function
remove(id)
View Source
remove(charlist()) :: {:ok, HTTPoison.Response} | {:error, HTTPoison.Error}
Delete an image by its id.
Examples
iex> image_id = "98bf3ac2-a1f5-471d-8c8f-1b706ab57ef0"
"98bf3ac2-a1f5-471d-8c8f-1b706ab57ef0"
iex> Scaleway.Image.remove(image_id)
Link to this function
show(id)
View Source
show(charlist()) :: {:ok, HTTPoison.Response} | {:error, HTTPoison.Error}
Retrieves an image by its id.
Examples
iex> image_id = "98bf3ac2-a1f5-471d-8c8f-1b706ab57ef0"
"98bf3ac2-a1f5-471d-8c8f-1b706ab57ef0"
iex> Scaleway.Image.show(image_id)
Update an image