DigitalOcean.dropletAction()

Actions include: disable_backups, reboot, shutdown, power_on, restore, password_reset etc

Find a list of actions here: https://developers.digitalocean.com/documentation/v2/#droplet-actions

Usage

Hover over inputs/exits for more info.

var DigitalOcean = require('machinepack-digitalocean');


// Actions include: disable_backups, reboot, shutdown, power_on, restore, password_reset etc

DigitalOcean.dropletAction({

token: 'FFDFdf8f8d',

dropletID: 7564837494,

action: 'reboot',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// Could not find specified ID

notFound: function () {

 

},

// OK.

success: function () {

 

},

});

Inputs

token required

Your DigitalOcean API token.

'FFDFdf8f8d'
dropletID required

Droplet ID - The droplet specified will be deleted.

7564837494
action required

All actions can be found here: https://developers.digitalocean.com/documentation/v2/#droplet-actions

'reboot'

Exits

error

An unexpected error occurred.

notFound

Could not find specified ID

success

OK.