#digital_ocean_haskell
digtal_ocean_haskell is a haskell library that provide easy access to digitalocean.com APIs to manage droplets, images and more.
You can install python-digitalocean using pip
cabal install digital-ocean
digital_ocean_haskell support all the features provided via digitalocean.com APIs, such as:
- Get user's Droplets
- Get user's Images (Snapshot and Backups)
- Get public Images
- Get Droplet's event status
- Create and Remove a Droplet
- Resize a Droplet
- Shutdown, restart and boot a Droplet
- Power off, power on and "power cycle" a Droplet
- Perform Snapshot
- Enable/Disable automatic Backups
- Restore root password of a Droplet
This example shows how to shutdown all the active droplets:
import DigitalOcean
myManager = manager {token="secretspecialuniquesnowflake"}
myDroplets = getAllDroplets myManager
map shutdown myDroplets
This example shows how to create a droplet and how to check its status
import DigitalOcean
myDroplet = Droplet{token="secretspecialuniquesnowflake",
name='Example',
region='nyc2', -- New York 2
image='ubuntu-14-04-x64', -- Ubuntu 14.04 x64
sizeSlug='512mb', -- 512MB
backups=True}
createDroplet myManager myDroplet
actions = getActions myDroplet myManager
map load actions
- Project Site: http://arnoblalam.github.io/haskell_digital_ocean
- GitHub: https://github.com/arnoblalam/digital_ocean_haskell
- Author Website: http://arnoblalam.github.io