package equinoxe

  1. Overview
  2. Docs

This module manages API parts related to devices.

type action =
  1. | Power_on
  2. | Power_off
  3. | Reboot
  4. | Reinstall
  5. | Rescue

Actions executable with a device.

type os =
  1. | Debian_9
  2. | Debian_10
  3. | NixOs_21_05
  4. | Ubuntu_18_04
  5. | Ubuntu_20_04
  6. | Ubuntu_21_04
  7. | FreeBSD_11_2
  8. | Centos_8

Os available when creating a new device.

type location =
  1. | Washington
  2. | Dallas
  3. | Silicon_valley
  4. | Sao_paulo
  5. | Amsterdam
  6. | Frankfurt
  7. | Singapore
  8. | Sydney

Locations available when deploying a new device.

type plan =
  1. | C3_small_x86
  2. | C3_medium_x86

Server type when deploying a new device.

type config = {
  1. hostname : string;
  2. location : location;
  3. plan : plan;
  4. os : os;
}

This type represents the configuration wanted for a device.

val os_to_string : os -> string

os_to_string os converts an os into a string understandable by the API.

val location_to_string : location -> string

location_to_string facility convert a facility into a string understandable by the API.

val plan_to_string : plan -> string

plan_to_string plan convert a plan into a string understandable by the API.

val get_devices_id : t -> id:string -> unit -> Json.t

get_devices_id t ~id () returns a Json.t that contains information about the device specified by id.

val get_devices_id_events : t -> id:string -> unit -> Json.t

get_device_id_events t ~id () retrieves information about the device events.

val post_devices_id_actions : t -> id:string -> action:action -> unit -> Json.t

post_devices_id_actions t ~id ~action () executes an action on the device specified by its id.

val delete_devices_id : t -> id:string -> unit -> Json.t

delete_devices_id t ~id () deletes a device on Equinix and returns a Json.t with the result.

val get_devices_id_ips : t -> id:string -> unit -> Json.t

get_devices_id_ips t ~id () retrieves information about the device ips.