Elixir-Scaleway v0.1.7 Scaleway.Server View Source

A Server is a dedicated machine for your own use. servers endpoint allow you to create, list or delete your servers.

Scaleway documentation API for servers

Link to this section Summary

Functions

Create a new server

List all servers

Similar to list/0 but with the body only

Remove a specific server by its id

Retrieve informations on a specific server by its id

Update informations on a specific server 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 server.

Examples

iex> data = %{
  :organization => "000a115d-2852-4b0a-9ce8-47f1134ba95a",
  :name => "my_server",
  :image => "85917034-46b0-4cc5-8b48-f0a2245e357e",
  :commercial_type => "VC1S",
  :tags => [
    "test",
    "www"
  ],
  :enable_ipv6 => true
}
%{
  :organization => "000a115d-2852-4b0a-9ce8-47f1134ba95a",
  :name => "my_server",
  :image => "85917034-46b0-4cc5-8b48-f0a2245e357e",
  :commercial_type => "VC1S",
  :tags => [
    "test",
    "www"
  ],
  :enable_ipv6 => true
}

iex> Scaleway.Server.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 servers.

Examples

iex> Scaleway.Server.list()

Similar to list/0 but with the body only.

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

Remove a specific server by its id.

Examples

iex> server_id = "741db378-6b87-46d4-a8c5-4e46a09ab1f8"
"741db378-6b87-46d4-a8c5-4e46a09ab1f8"

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

Retrieve informations on a specific server by its id.

Examples

iex> server_id = "741db378-6b87-46d4-a8c5-4e46a09ab1f8"
"741db378-6b87-46d4-a8c5-4e46a09ab1f8"

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

Update informations on a specific server by its id.

Link to this function update!(id, data) View Source
update!(charlist(), map()) :: map()