public interface DropletApi extends Closeable
| Modifier and Type | Method and Description |
|---|---|
DropletCreation |
create(String name,
int imageId,
int sizeId,
int regionId)
Creates a new droplet.
|
DropletCreation |
create(String name,
int imageId,
int sizeId,
int regionId,
CreateDropletOptions options)
Creates a new droplet.
|
int |
destroy(int id)
Destroys the given droplet.
|
int |
destroy(int id,
boolean scrubData)
Destroys the given droplet.
|
Droplet |
get(int id)
Gets the details of the given droplet.
|
List<Droplet> |
list()
Lists all existing droplets.
|
int |
powerCycle(int id)
Power cycles the given droplet.
|
int |
powerOff(int id)
Powers off the given droplet.
|
int |
powerOn(int id)
Powers on the given droplet.
|
int |
reboot(int id)
Reboots the given droplet.
|
int |
rebuild(int id,
int imageId)
Rebuilds a droplet with a default image.
|
int |
rename(int id,
String name)
Renames a droplet to the specified name.
|
int |
resetPassword(int id)
Resets the password for the given droplet.
|
int |
resize(int id,
int sizeId)
Changes the size for the given droplet.
|
int |
restore(int id,
int imageId)
Restores a droplet with a previous image or snapshot.
|
int |
shutdown(int id)
Shuts down the given droplet.
|
int |
snapshot(int id)
Takes a snapshot of the droplet once it has been powered off.
|
int |
snapshot(int id,
String name)
Takes a snapshot of the droplet once it has been powered off.
|
Droplet get(int id)
id - The id of the droplet to get.null if no droplet exists with the given id.DropletCreation create(String name, int imageId, int sizeId, int regionId)
name - The name for the new droplet.imageId - The id of the image to use to create the droplet.sizeId - The size to use to create the droplet.regionId - The region where the droplet must be created.DropletCreation create(String name, int imageId, int sizeId, int regionId, CreateDropletOptions options)
name - The name for the new droplet.imageId - The id of the image to use to create the droplet.sizeId - The size to use to create the droplet.regionId - The region where the droplet must be created.options - Custom options to create the droplet.int reboot(int id)
id - The id of the droplet to reboot.int powerCycle(int id)
id - The id of the droplet to power cycle.int shutdown(int id)
id - The id of the droplet to shutdown.int powerOff(int id)
id - The id of the droplet to power off.int powerOn(int id)
id - The id of the droplet to power on.int resetPassword(int id)
id - The id of the droplet to reset the password to.int resize(int id,
int sizeId)
id - The id of the droplet to change the size to.sizeId - The id of the new size for the droplet.int snapshot(int id)
id - The id of the droplet to take the snapshot of.int snapshot(int id,
String name)
id - The id of the droplet to take the snapshot of.name - The name for the snapshot.int restore(int id,
int imageId)
This will be a mirror copy of the image or snapshot to your droplet. Be sure you have backed up any necessary information prior to restore.
id - The id of the droplet to restore.imageId - The id of the image or snapshot to use to restore the droplet.int rebuild(int id,
int imageId)
This is useful if you want to start again but retain the same IP address for your droplet.
id - The id of the droplet to rebuild.imageId - The id of the image or snapshot to use to restore the droplet.int rename(int id,
String name)
id - The id of the droplet to rename.name - The new name for the droplet.int destroy(int id)
id - The id of the droplet to destroy.int destroy(int id,
boolean scrubData)
id - The id of the droplet to destroy.scrubData - If true this will strictly write 0s to your prior partition to ensure that all data is completely
erased.Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.