Elixir-Scaleway v0.1.7 Scaleway.IP View Source

A reserved IP address is a static IP address designed for cloud computing. Reserved IPs address allow you to mask the failure of a server rapidly reallocating the IPs address to another server in your account.

Scaleway documentation API for IPs

Link to this section Summary

Functions

Attach an IP address

Create a new IP

Retrieves all IPs addresses

Remove an IP address

Retrieves an IP address by its id

Link to this section Functions

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

Attach an IP address.

Examples

iex> ip_id = "b50cd740-892d-47d3-8cbf-88510ef626e7"
"b50cd740-892d-47d3-8cbf-88510ef626e7"

iex> data = %{
  :address => "212.47.226.88",
  :id => ip_id,
  :organization => "000a115d-2852-4b0a-9ce8-47f1134ba95a",
  :server => "c2d8994f-1582-413e-8d48-c53076db06cc"
}
%{
  :address => "212.47.226.88",
  :id => "b50cd740-892d-47d3-8cbf-88510ef626e7",
  :organization => "000a115d-2852-4b0a-9ce8-47f1134ba95a",
  :server => "c2d8994f-1582-413e-8d48-c53076db06cc"
}

iex> Scaleway.IP.attach(ip_id, data)
Link to this function attach!(ip_id, data) View Source
attach!(charlist(), map()) :: map()
Link to this function create(organization) View Source
create(charlist()) :: {:ok, HTTPoison.Response} | {:error, HTTPoison.Error}

Create a new IP

Examples

iex> data = %{
  :organization => "000a115d-2852-4b0a-9ce8-47f1134ba95a"
}

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

Retrieves all IPs addresses

Examples

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

Remove an IP address.

Examples

iex> ip_id = "b50cd740-892d-47d3-8cbf-88510ef626e7"
"b50cd740-892d-47d3-8cbf-88510ef626e7"

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

Retrieves an IP address by its id.

Examples

iex> ip_id = "b50cd740-892d-47d3-8cbf-88510ef626e7"
"b50cd740-892d-47d3-8cbf-88510ef626e7"

iex> Scaleway.IP.show(ip_id)