public interface DigitalOcean
DigitalOcean API client in Java
A simple and meaningful java methods for DigitalOcean's API. All of the RESTful that you find in DigitalOcean API's Version 2 is available via simple java methods.
Sample Code:
// Create a DigitalOcean client
DigitalOcean apiClient = new DigitalOceanClient(authToken);
or
DigitalOcean apiClient = new DigitalOceanClient("v2", authToken);
Let's invoke the appropriate method as per need
// Fetching all the available droplets from control panel
Droplets droplets = apiClient.getAvailableDroplets(pageNo);
// Fetching all the available kernels for droplet
Kernels kernels = apiClient.getAvailableKernels(dropletId, pageNo);
// Create a new droplet
Droplet newDroplet = new Droplet();
newDroplet.setName("api-client-test-host");
newDroplet.setSize(new Size("512mb")); // setting size by slug value
newDroplet.setRegion(new Region("sgp1")); // setting region by slug value; sgp1 => Singapore 1 Data center
newDroplet.setImage(new Image(1601)); // setting by Image Id 1601 => centos-5-8-x64 also available in image slug value
newDroplet.setEnableBackup(Boolean.TRUE);
newDroplet.setEnableIpv6(Boolean.TRUE);
newDroplet.setEnablePrivateNetworking(Boolean.TRUE);
Droplet droplet = apiClient.createDroplet(newDroplet);
// Fetch droplet information
Droplet droplet = apiClient.getDropletInfo(dropletId);
// Fetch Available Plans/Sizes supported by DigitalOcean
Sizes sizes = apiClient.getAvailableSizes(pageNo);
// Fetch Available Regions supported by DigitalOcean
Sizes sizes = apiClient.getAvailableRegions(pageNo);
and so on... simple to use and effective!
| Modifier and Type | Method and Description |
|---|---|
Action |
assignFloatingIP(Integer dropletId,
String ipAddress)
Method will assign Floating IP to a Droplet.
|
Action |
attachVolume(Integer dropletId,
String volumeId,
String regionSlug)
Method attaches the given volume into droplet by identifier
|
Action |
attachVolumeByName(Integer dropletId,
String volumeName,
String regionSlug)
Method attaches the given volume into droplet by name
|
Action |
changeDropletKernel(Integer dropletId,
Integer kernelId)
Method changes a OS kernel for given droplet
|
Action |
convertImage(Integer imageId)
Method allows you to convert image into snapshot
|
Domain |
createDomain(Domain domain)
Method creates a new domain name with an A record for the specified [ip_address].
|
DomainRecord |
createDomainRecord(String domainName,
DomainRecord domainRecord)
Method creates a new domain record name with an given domain record values
|
Droplet |
createDroplet(Droplet droplet)
Method allows you to create a new droplet.
|
Droplets |
createDroplets(Droplet droplet)
Method allows you to create multiple droplets simultaneously.
|
FloatingIP |
createFloatingIP(Integer dropletId)
Method creates a new Floating IP and assigns to the Droplet.
|
FloatingIP |
createFloatingIP(String region)
Method creates a new Floating IP and its reserved to a Region
|
Key |
createKey(Key newKey)
Method allows you to add a new public SSH key to your account
|
Tag |
createTag(String name)
Method will create a Tag on DigitalOcean aacount.
|
Volume |
createVolume(Volume volume)
Method creates new volume with given details
|
Delete |
deleteDomain(String domainName)
Method deletes the specified domain from DNS control panel
|
Delete |
deleteDomainRecord(String domainName,
Integer recordId)
Method deletes the specified domain record from domain.
|
Delete |
deleteDroplet(Integer dropletId)
Method destroys one of your droplet; this is irreversible.
|
Delete |
deleteDropletByTagName(String tagName)
Method destroys one or more of your droplet by given tag name; this is irreversible.
|
Delete |
deleteFloatingIP(String ipAddress)
Method deletes the Floating IP and removes it from your account.
|
Delete |
deleteImage(Integer imageId)
Method allows you to deletes an image.
|
Delete |
deleteKey(Integer sshKeyId)
Method will delete the SSH key from your account.
|
Delete |
deleteKey(String fingerprint)
Method will delete the SSH key from your account.
|
Delete |
deleteSnapshot(String snapshotId)
Method deletes snapshot by id
|
Delete |
deleteTag(String name)
Method deletes the existing Tag from DigitalOcean account.
|
Delete |
deleteVolume(String volumeId)
Method deletes volume by identifier
|
Delete |
deleteVolume(String volumeName,
String regionSlug)
Method deletes volume by name and region slug
|
Action |
detachVolume(Integer dropletId,
String volumeId,
String regionSlug)
Method detaches volume from the droplet by identifier
|
Action |
detachVolumeByName(Integer dropletId,
String volumeName,
String regionSlug)
Method detaches volume from the droplet by volume name
|
Action |
disableDropletBackups(Integer dropletId)
Method disables automatic backups from running to backup your droplet's data.
|
Action |
enableDropletBackups(Integer dropletId)
Method enables automatic backups for your droplet's data.
|
Action |
enableDropletIpv6(Integer dropletId)
Enabling IP v6 networking capability for droplet.
|
Action |
enableDropletPrivateNetworking(Integer dropletId)
Enabling private networking capability for droplet.
|
Account |
getAccountInfo()
Method returns account information for provided credentials
|
Action |
getActionInfo(Integer actionId)
To retrieve a specific action information by action ID
|
Neighbors |
getAllDropletNeighbors(Integer pageNo)
For an entire account; Method retrieves a list of any droplets that are
running on the same physical server (any other droplets that share the same physical hardware).
|
Snapshots |
getAllDropletSnapshots(Integer pageNo,
Integer perPage)
Method return all of the droplet snapshots available on your account
|
Snapshots |
getAllVolumeSnapshots(Integer pageNo,
Integer perPage)
Method return all of the volume snapshots available on your account
|
Actions |
getAvailableActions(Integer pageNo,
Integer perPage)
Method return all the action informations, regardless of categories.
|
Domains |
getAvailableDomains(Integer pageNo)
Method returns all of your available domains from DNS control panel
|
Actions |
getAvailableDropletActions(Integer dropletId,
Integer pageNo,
Integer perPage)
Method return all the action informations; specific to given Droplet Id
|
Droplets |
getAvailableDroplets(Integer pageNo,
Integer perPage)
Method returns all active droplets that are currently running in your account.
|
Actions |
getAvailableFloatingIPActions(String ipAddress,
Integer pageNo,
Integer perPage)
Method retrives all actions that have been executed on a Floating IP address.
|
FloatingIPs |
getAvailableFloatingIPs(Integer pageNo,
Integer perPage)
Method will list all of the Floating IPs available from your account.
|
Actions |
getAvailableImageActions(Integer imageId,
Integer pageNo,
Integer perPage)
Method return all the action informations; specific to given Image Id
|
Images |
getAvailableImages(Integer pageNo,
Integer perPage)
Method returns all the available images that can be accessed by your OAuth Token.
|
Images |
getAvailableImages(Integer pageNo,
Integer perPage,
ActionType type)
Method returns all the available images based on
type={distribution or application} that can be accessed by your OAuth Token. |
Keys |
getAvailableKeys(Integer pageNo)
Method lists all the available public SSH keys in your account that can be added to a droplet.
|
Regions |
getAvailableRegions(Integer pageNo)
Method returns all the available regions within the DigitalOcean cloud.
|
Sizes |
getAvailableSizes(Integer pageNo)
Method returns all the available sizes that can be used to create a droplet.
|
Snapshots |
getAvailableSnapshots(Integer pageNo,
Integer perPage)
Method return all of the snapshots available on your account
|
Tags |
getAvailableTags(Integer pageNo,
Integer perPage)
Method will list all of the Tags available from your account.
|
Actions |
getAvailableVolumeActions(String volumeId)
Method will get all the available volume action by volume identifier
|
Volumes |
getAvailableVolumes(String regionSlug)
Method will list all of the Volumes available from your account.
|
Domain |
getDomainInfo(String domainName)
Method returns the specified domain attributes and zone file info.
|
DomainRecord |
getDomainRecordInfo(String domainName,
Integer recordId)
Method returns the specified domain record.
|
DomainRecords |
getDomainRecords(String domainName,
Integer pageNo,
Integer perPage)
Method returns all of your current domain records from DNS control panel for given domain.
|
Backups |
getDropletBackups(Integer dropletId,
Integer pageNo,
Integer perPage)
Method returns all available snapshots for given droplet ID
|
Droplet |
getDropletInfo(Integer dropletId)
Method returns complete information for given droplet ID
|
Kernels |
getDropletKernels(Integer dropletId,
Integer pageNo,
Integer perPage)
Method returns all available kernels for given droplet ID
|
Droplets |
getDropletNeighbors(Integer dropletId,
Integer pageNo)
For an individual droplet; Method retrieves a list of droplets that are running on the same
physical server (any other droplets that share the same physical hardware).
|
Snapshots |
getDropletSnapshots(Integer dropletId,
Integer pageNo,
Integer perPage)
Method returns all available snapshots for given droplet ID
|
Action |
getFloatingIPActionInfo(String ipAddress,
Integer actionId)
Method to retrieve the status of a Floating IP action.
|
FloatingIP |
getFloatingIPInfo(String ipAddress)
Method retrieves the information about given Floating IP
|
Image |
getImageInfo(Integer imageId)
Method retrieves the attributes of an image.
|
Image |
getImageInfo(String slug)
Method retrieves the attributes of an image.
|
Key |
getKeyInfo(Integer sshKeyId)
Method shows a specific public SSH key information from your account that can be added to a
droplet.
|
Key |
getKeyInfo(String fingerprint)
Method shows a specific public SSH key information from your account that can be added to a
droplet.
|
Snapshot |
getSnaphotInfo(String snapshotId)
Method returns specific snapshot info by id
|
Tag |
getTag(String name)
Method retrieves the Tag from DigitalOcean account.
|
Images |
getUserImages(Integer pageNo,
Integer perPage)
Method retrieves only the private images of a user
|
Action |
getVolumeAction(String volumeId,
Integer actionId)
Method returns specific volume action by action & volume identifier
|
Volume |
getVolumeInfo(String volumeId)
Method shows specific volume information by identifier
|
Volumes |
getVolumeInfo(String volumeName,
String regionSlug)
Method shows volume information by name and region slug
|
Snapshots |
getVolumeSnapshots(String volumeId,
Integer pageNo,
Integer perPage)
Method return all of the snapshots for given volume Id
|
Action |
powerCycleDroplet(Integer dropletId)
Method allows you to power cycle a droplet.
|
Action |
powerOffDroplet(Integer dropletId)
Method allows you to poweroff a running droplet.
|
Action |
powerOnDroplet(Integer dropletId)
Method allows you to poweron a powered off droplet.
|
Action |
rebootDroplet(Integer dropletId)
Method allows you to reboot a droplet.
|
Action |
rebuildDroplet(Integer dropletId,
Integer imageId)
Method allows you to reinstall a droplet with a default image.
|
Action |
renameDroplet(Integer dropletId,
String name)
Method renames the droplet to the specified name.
|
Action |
resetDropletPassword(Integer dropletId)
Method will reset the root password for a droplet.
|
Action |
resizeDroplet(Integer dropletId,
String size)
Method allows you to resize a specific droplet to a different size.
|
Action |
resizeVolume(String volumeId,
String regionSlug,
Double sizeGigabytes)
Method resizes volume by identifier
|
Action |
restoreDroplet(Integer dropletId,
Integer imageId)
Method allows you to restore a droplet with a previous image or snapshot.
|
Action |
shutdownDroplet(Integer dropletId)
Method allows you to shutdown a running droplet.
|
Response |
tagResources(String name,
List<Resource> resources)
Method tags a tag to given list of resources on DigitalOcean account.
|
Action |
takeDropletSnapshot(Integer dropletId)
Method allows you to take a snapshot of the running droplet, which can later be restored or
used to create a new droplet from the same image.
|
Action |
takeDropletSnapshot(Integer dropletId,
String snapshotName)
Method allows you to take a snapshot of the running droplet, which can later be restored or
used to create a new droplet from the same image.
|
Snapshot |
takeVolumeSnapshot(String volumeId,
String snapshotName)
Method take snapshot of given volume Id
|
Action |
transferImage(Integer imageId,
String regionSlug)
Method allows you to transfer an image to a specified region.
|
Action |
unassignFloatingIP(String ipAddress)
Method will unassign Floating IP from a Droplet.
|
Response |
untagResources(String name,
List<Resource> resources)
Method untags a tag from given list of resources on DigitalOcean account.
|
DomainRecord |
updateDomainRecord(String domainName,
Integer recordId,
DomainRecord domainRecord)
method edits an existing domain record of the given domain.
|
Image |
updateImage(Image image)
Method updates the given details for an image.
|
Key |
updateKey(Integer sshKeyId,
String newSshKeyName)
Method allows you to modify an existing SSH key in your account.
|
Key |
updateKey(String fingerprint,
String newSshKeyName)
Method allows you to modify an existing SSH key in your account.
|
Droplets getAvailableDroplets(Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
pageNo - for paginationperPage - no. of items per pageDropletsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodKernels getDropletKernels(Integer dropletId, Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - for kernel infopageNo - for paginationperPage - no. of items per pageKernelsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodSnapshots getDropletSnapshots(Integer dropletId, Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - for snapshot infopageNo - for paginationperPage - no. of items per pageSnapshotsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodBackups getDropletBackups(Integer dropletId, Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - for backup infopageNo - for paginationBackupsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodDroplet getDropletInfo(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - the id of the dropletDropletDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodDroplet createDroplet(Droplet droplet) throws DigitalOceanException, RequestUnsuccessfulException
Method allows you to create a new droplet. See the required parameters section below for an explanation of the variables that are needed to create a new droplet.
Note: Currently return object doesn't include 'action' information of create droplet.
Create a instance of Droplet class and populated the droplet object appropriately.
Minimum required values are -
{
"name": "example-droplet-name",
"region": "nyc1",
"size": "512mb",
"image": "ubuntu-14-04-x64",
"backups": false
}
droplet - the instance of the droplet classDropletDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodDroplets createDroplets(Droplet droplet) throws DigitalOceanException, RequestUnsuccessfulException
Method allows you to create multiple droplets simultaneously. See the required parameters section below for an explanation of the variables that are needed to create multiple droplets.
Create a instance of Droplet class and populated the droplet object appropriately.
Particularly names attribute in the Droplet class. Minimum required values are
-
{
"names": [
"sub-01.example.com",
"sub-02.example.com"
],
"region": "nyc1",
"size": "512mb",
"image": "ubuntu-14-04-x64",
"backups": false
}
droplet - the instance of the droplet classDropletDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodDelete deleteDroplet(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - the id of the dropletDeleteDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodDelete deleteDropletByTagName(String tagName) throws DigitalOceanException, RequestUnsuccessfulException
tagName - the associated tag name with dropletDeleteDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodDroplets getDropletNeighbors(Integer dropletId, Integer pageNo) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - the id of the dropletpageNo - for paginationDropletsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodNeighbors getAllDropletNeighbors(Integer pageNo) throws DigitalOceanException, RequestUnsuccessfulException
pageNo - for paginationNeighborsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction rebootDroplet(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - the id of the dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction powerCycleDroplet(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - the id of the dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction shutdownDroplet(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - the id of the dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction powerOffDroplet(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - the id of the dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction powerOnDroplet(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - the id of the dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction resetDropletPassword(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - the id of the dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction resizeDroplet(Integer dropletId, String size) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - the id of the dropletsize - of the dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction takeDropletSnapshot(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - the id of the dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction takeDropletSnapshot(Integer dropletId, String snapshotName) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - the id of the dropletsnapshotName - the name the snapshot to be createdActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction restoreDroplet(Integer dropletId, Integer imageId) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - the id of the dropletimageId - the id of the DigitalOcean public image or your private imageActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction rebuildDroplet(Integer dropletId, Integer imageId) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - the id of the dropletimageId - the id of the DigitalOcean public image or your private imageActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction enableDropletBackups(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - the id of the dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction disableDropletBackups(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - the id of the dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction renameDroplet(Integer dropletId, String name) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - the id of the dropletname - the new name of droplet to be calledActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction changeDropletKernel(Integer dropletId, Integer kernelId) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - the id of the dropletkernelId - the kernel id to be changed for dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction enableDropletIpv6(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - the id of the dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction enableDropletPrivateNetworking(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - the id of the dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAccount getAccountInfo() throws DigitalOceanException, RequestUnsuccessfulException
AccountDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodActions getAvailableActions(Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
pageNo - for paginationperPage - no. of items per pageActionsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction getActionInfo(Integer actionId) throws DigitalOceanException, RequestUnsuccessfulException
actionId - the id of actionActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodActions getAvailableDropletActions(Integer dropletId, Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - the id of the dropletpageNo - for paginationperPage - no. of items per pageActionsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodActions getAvailableImageActions(Integer imageId, Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
imageId - the id of the ImagepageNo - for paginationperPage - no. of items per pageActionsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodActions getAvailableFloatingIPActions(String ipAddress, Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
ipAddress - Floating IP addresspageNo - for paginationperPage - no. of items per pageActionsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction getFloatingIPActionInfo(String ipAddress, Integer actionId) throws DigitalOceanException, RequestUnsuccessfulException
ipAddress - Floating IP addressactionId - the id of actionActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodImages getAvailableImages(Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
pageNo - of request paginationperPage - no. of items per pageImagesDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodImages getAvailableImages(Integer pageNo, Integer perPage, ActionType type) throws DigitalOceanException, RequestUnsuccessfulException
type={distribution or application} that can be accessed by your OAuth Token.pageNo - of request paginationperPage - no. of items per pagetype - of actionImagesDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodImages getUserImages(Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
pageNo - of request paginationperPage - no. of items per pageImagesDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodImage getImageInfo(Integer imageId) throws DigitalOceanException, RequestUnsuccessfulException
imageId - the image Id of the droplet/snapshot/backup imagesImageDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodImage getImageInfo(String slug) throws DigitalOceanException, RequestUnsuccessfulException
slug - of the public imageImageDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodImage updateImage(Image image) throws DigitalOceanException, RequestUnsuccessfulException
image - object for updateImageDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodDelete deleteImage(Integer imageId) throws DigitalOceanException, RequestUnsuccessfulException
imageId - of the droplet/snapshot/backup imagesDeleteDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction transferImage(Integer imageId, String regionSlug) throws DigitalOceanException, RequestUnsuccessfulException
imageId - the Id of the droplet/snapshot/backup imagesregionSlug - is code name of the region aka DigitalOcean data centersActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction convertImage(Integer imageId) throws DigitalOceanException, RequestUnsuccessfulException
imageId - the Id of the droplet/snapshot/backup imagesActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodRegions getAvailableRegions(Integer pageNo) throws DigitalOceanException, RequestUnsuccessfulException
pageNo - for paginationRegionsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodSizes getAvailableSizes(Integer pageNo) throws DigitalOceanException, RequestUnsuccessfulException
pageNo - for paginationSizesDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodDomains getAvailableDomains(Integer pageNo) throws DigitalOceanException, RequestUnsuccessfulException
pageNo - for paginationDomainsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodDomain getDomainInfo(String domainName) throws DigitalOceanException, RequestUnsuccessfulException
domainName - the name of the domainDomainDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodDomain createDomain(Domain domain) throws DigitalOceanException, RequestUnsuccessfulException
domain - object with name and IP address for creationDomainDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodDelete deleteDomain(String domainName) throws DigitalOceanException, RequestUnsuccessfulException
domainName - the name of the domainDeleteDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodDomainRecords getDomainRecords(String domainName, Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
domainName - of the domainpageNo - of request paginationperPage - no. of items per pageDomainRecordsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodDomainRecord createDomainRecord(String domainName, DomainRecord domainRecord) throws DigitalOceanException, RequestUnsuccessfulException
domainName - of the domaindomainRecord - the domain record values domain Id, record type, data, name, priority,
port, weightDomainRecordDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodDomainRecord getDomainRecordInfo(String domainName, Integer recordId) throws DigitalOceanException, RequestUnsuccessfulException
domainName - of the domainrecordId - of the domainDomainRecordDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodDomainRecord updateDomainRecord(String domainName, Integer recordId, DomainRecord domainRecord) throws DigitalOceanException, RequestUnsuccessfulException
domainName - of the domainrecordId - of the domaindomainRecord - the domain record values domain Id, record type, data, name, priority,
port, weightDomainRecordDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodDelete deleteDomainRecord(String domainName, Integer recordId) throws DigitalOceanException, RequestUnsuccessfulException
domainName - of the domainrecordId - of the domainDeleteDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodKeys getAvailableKeys(Integer pageNo) throws DigitalOceanException, RequestUnsuccessfulException
pageNo - for paginationKeysDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodKey getKeyInfo(Integer sshKeyId) throws DigitalOceanException, RequestUnsuccessfulException
sshKeyId - the SSH key IdKeyDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodKey getKeyInfo(String fingerprint) throws DigitalOceanException, RequestUnsuccessfulException
fingerprint - the SSH key fingerprintKeyDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodKey createKey(Key newKey) throws DigitalOceanException, RequestUnsuccessfulException
newKey - the Key object with sshKeyName and sshPublicKeyKeyDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodKey updateKey(Integer sshKeyId, String newSshKeyName) throws DigitalOceanException, RequestUnsuccessfulException
sshKeyId - the SSH key IdnewSshKeyName - the new name to give the SSH keyKeyDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodKey updateKey(String fingerprint, String newSshKeyName) throws DigitalOceanException, RequestUnsuccessfulException
fingerprint - the SSH fingerprintnewSshKeyName - the new name to give the SSH keyKeyDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodDelete deleteKey(Integer sshKeyId) throws DigitalOceanException, RequestUnsuccessfulException
sshKeyId - the SSH key Id, you would like to deleteDeleteDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodDelete deleteKey(String fingerprint) throws DigitalOceanException, RequestUnsuccessfulException
fingerprint - the SSH fingerprintDeleteDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodFloatingIPs getAvailableFloatingIPs(Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
pageNo - for paginationperPage - no. of items per pageFloatingIPsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodFloatingIP createFloatingIP(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - the id of the dropletFloatingIPDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodFloatingIP createFloatingIP(String region) throws DigitalOceanException, RequestUnsuccessfulException
region - name of the DigitalOcean regionFloatingIPDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodFloatingIP getFloatingIPInfo(String ipAddress) throws DigitalOceanException, RequestUnsuccessfulException
ipAddress - Floating IP addressFloatingIPDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodDelete deleteFloatingIP(String ipAddress) throws DigitalOceanException, RequestUnsuccessfulException
ipAddress - Floating IP addressDeleteDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction assignFloatingIP(Integer dropletId, String ipAddress) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - the id of the dropletipAddress - Floating IP addressActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction unassignFloatingIP(String ipAddress) throws DigitalOceanException, RequestUnsuccessfulException
ipAddress - Floating IP addressActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodTags getAvailableTags(Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
pageNo - for paginationperPage - no. of items per pageTagsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodTag createTag(String name) throws DigitalOceanException, RequestUnsuccessfulException
name - Tag NameTagDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodTag getTag(String name) throws DigitalOceanException, RequestUnsuccessfulException
name - Tag NameTagDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodDelete deleteTag(String name) throws DigitalOceanException, RequestUnsuccessfulException
name - Tag NameDeleteDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodResponse tagResources(String name, List<Resource> resources) throws DigitalOceanException, RequestUnsuccessfulException
name - Tag Nameresources - list of resource by Resource objectsResponseDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodResponse untagResources(String name, List<Resource> resources) throws DigitalOceanException, RequestUnsuccessfulException
name - Tag Nameresources - list of resource by Resource objectsResponseDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodVolumes getAvailableVolumes(String regionSlug) throws DigitalOceanException, RequestUnsuccessfulException
regionSlug - is code name of the region aka DigitalOcean data centersVolumesDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodVolume createVolume(Volume volume) throws DigitalOceanException, RequestUnsuccessfulException
volume - details to create new volumeVolumeDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodVolume getVolumeInfo(String volumeId) throws DigitalOceanException, RequestUnsuccessfulException
volumeId - volume identifierVolumeDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodVolumes getVolumeInfo(String volumeName, String regionSlug) throws DigitalOceanException, RequestUnsuccessfulException
volumeName - name of the volumeregionSlug - is code name of the region aka DigitalOcean data centersVolumesDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodDelete deleteVolume(String volumeId) throws DigitalOceanException, RequestUnsuccessfulException
volumeId - volume identifierDeleteDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodDelete deleteVolume(String volumeName, String regionSlug) throws DigitalOceanException, RequestUnsuccessfulException
volumeName - regionSlug - is code name of the region aka DigitalOcean data centersDeleteDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction attachVolume(Integer dropletId, String volumeId, String regionSlug) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - droplet identifiervolumeId - volume identifierregionSlug - is code name of the region aka DigitalOcean data centersActionDigitalOceanExceptionRequestUnsuccessfulExceptionAction attachVolumeByName(Integer dropletId, String volumeName, String regionSlug) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - droplet identifiervolumeName - regionSlug - is code name of the region aka DigitalOcean data centersActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction detachVolume(Integer dropletId, String volumeId, String regionSlug) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - droplet identifiervolumeId - volume identifierregionSlug - is code name of the region aka DigitalOcean data centersActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction detachVolumeByName(Integer dropletId, String volumeName, String regionSlug) throws DigitalOceanException, RequestUnsuccessfulException
dropletId - droplet identifiervolumeName - regionSlug - is code name of the region aka DigitalOcean data centersActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction resizeVolume(String volumeId, String regionSlug, Double sizeGigabytes) throws DigitalOceanException, RequestUnsuccessfulException
volumeId - volume identifierregionSlug - is code name of the region aka DigitalOcean data centerssizeGigabytes - size value in GBActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodActions getAvailableVolumeActions(String volumeId) throws DigitalOceanException, RequestUnsuccessfulException
volumeId - volume identifierActionsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodAction getVolumeAction(String volumeId, Integer actionId) throws DigitalOceanException, RequestUnsuccessfulException
volumeId - actionId - ActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodSnapshots getVolumeSnapshots(String volumeId, Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
volumeId - pageNo - for paginationperPage - no. of items per pageSnapshotsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodSnapshot takeVolumeSnapshot(String volumeId, String snapshotName) throws DigitalOceanException, RequestUnsuccessfulException
volumeId - snapshotName - SnapshotDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodSnapshots getAvailableSnapshots(Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
pageNo - for paginationperPage - no. of items per pageSnapshotsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodSnapshots getAllDropletSnapshots(Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
pageNo - for paginationperPage - no. of items per pageSnapshotsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodSnapshots getAllVolumeSnapshots(Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
pageNo - for paginationperPage - no. of items per pageSnapshotsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodSnapshot getSnaphotInfo(String snapshotId) throws DigitalOceanException, RequestUnsuccessfulException
snapshotId - SnapshotDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodDelete deleteSnapshot(String snapshotId) throws DigitalOceanException, RequestUnsuccessfulException
snapshotId - for snapshotDeleteDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper method
Copyright © myjeeva blog, All rights reserved.
The copyright of the pages and contents on this website is with myjeeva.com and the content is licensed under Creative Commons – Attribution-ShareAlike 4.0 International (CC BY-SA 4.0). Libraries and code snippets on myjeeva blog has license information.