Disable backups on an existing droplet
import { DigitalOcean } from 'digitalocean-js';
const client = new DigitalOcean('your-api-key');
const action = await client.dropletActions.disableBackupsForDroplet('droplet-id');
Enable backups on an existing droplet
import { DigitalOcean } from 'digitalocean-js';
const client = new DigitalOcean('your-api-key');
const action = await client.dropletActions.enableBackupsForDroplet('droplet-id');
Enable IPv6 networking on an existing droplet
import { DigitalOcean } from 'digitalocean-js';
const client = new DigitalOcean('your-api-key');
const action = await client.dropletActions.enableIPv6('droplet-id');
Enable private networking on an existing droplet
import { DigitalOcean } from 'digitalocean-js';
const client = new DigitalOcean('your-api-key');
const action = await client.dropletActions.enablePrivateNetworking('droplet-id');
Get a specific droplet action
import { DigitalOcean } from 'digitalocean-js';
const client = new DigitalOcean('your-api-key');
const action = await client.dropletActions
.getExistingDropletAction('droplet-id', 'action-id');
Reset the password for a droplet
import { DigitalOcean } from 'digitalocean-js';
const client = new DigitalOcean('your-api-key');
const action = await client.dropletActions.passwordResetDroplet('droplet-id');
Power cycle a droplet (power off then on)
import { DigitalOcean } from 'digitalocean-js';
const client = new DigitalOcean('your-api-key');
const action = await client.dropletActions.powerCycleDroplet('droplet-id');
Power off a droplet
import { DigitalOcean } from 'digitalocean-js';
const client = new DigitalOcean('your-api-key');
const action = await client.dropletActions.powerOffDroplet('droplet-id');
Rebuild a droplet
import { DigitalOcean } from 'digitalocean-js';
const client = new DigitalOcean('your-api-key');
const action = await client.dropletActions
.rebuildDroplet('droplet-id', 'ubuntu-16-04-x64');
Rename a droplet
import { DigitalOcean } from 'digitalocean-js';
const client = new DigitalOcean('your-api-key');
const action = await client.dropletActions
.renameDroplet('droplet-id', 'nifty-new-name');
Resize a droplet
import { DigitalOcean } from 'digitalocean-js';
const client = new DigitalOcean('your-api-key');
const action = await client.dropletActions
.resizeDroplet('droplet-id', true, '1gb');
Restore a droplet using a backup image
import { DigitalOcean } from 'digitalocean-js';
const client = new DigitalOcean('your-api-key');
const action = await client.dropletActions.restoreDroplet('droplet-id', 12389723);
Shutdown a droplet
import { DigitalOcean } from 'digitalocean-js';
const client = new DigitalOcean('your-api-key');
const action = await client.dropletActions.shutdownDroplet('droplet-id');
Take a snapshot of a droplet
import { DigitalOcean } from 'digitalocean-js';
const client = new DigitalOcean('your-api-key');
const action = await client.dropletActions
.snapshotDroplet('droplet-id', 'Nifty New Snapshot');
Generated using TypeDoc
Change the kernel of a droplet
Example