public class DigitalOceanClient extends Object implements DigitalOcean, Constants
| Modifier and Type | Field and Description |
|---|---|
protected String |
apiHost
DigitalOcean API Host is
api.digitalocean.com |
protected String |
apiVersion
DigitalOcean API version.
|
protected String |
authToken
OAuth Authorization Token for Accessing DigitalOcean API
|
protected org.apache.http.impl.client.CloseableHttpClient |
httpClient
Http client
|
DATE_FORMAT, FORM_URLENCODED_CONTENT_TYPE, HDR_AUTHORIZATION, HDR_CONTENT_TYPE, HDR_RATE_LIMIT, HDR_RATE_REMAINING, HDR_RATE_RESET, HDR_USER_AGENT, HTTPS_SCHEME, JSON_CONTENT_TYPE, NO_CONTENT_JSON_STRUCT, PARAM_PAGE_NO, PARAM_PER_PAGE, RATE_LIMIT_ELEMENT_NAME, RATE_LIMIT_JSON_STRUCT, START_PAGE_NO, URL_PATH_SEPARATOR, USER_AGENT, UTF_8| Constructor and Description |
|---|
DigitalOceanClient(String authToken)
DigitalOcean Client Constructor
|
DigitalOceanClient(String apiVersion,
String authToken)
DigitalOcean Client Constructor
|
DigitalOceanClient(String apiVersion,
String authToken,
org.apache.http.impl.client.CloseableHttpClient httpClient)
DigitalOcean Client Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Action |
assignFloatingIP(Integer dropletId,
String ipAddress)
Method will assign Floating IP to a Droplet.
|
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
|
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 |
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.
|
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).
|
String |
getApiVersion() |
String |
getAuthToken() |
Actions |
getAvailableActions(Integer pageNo,
Integer perPage)
Method return all the action informations, regardless of categories.
|
Backups |
getAvailableBackups(Integer dropletId,
Integer pageNo)
Method returns all available snapshots for given droplet ID
|
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. |
Kernels |
getAvailableKernels(Integer dropletId,
Integer pageNo,
Integer perPage)
Method returns all available kernels for given droplet ID
|
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 dropletId,
Integer pageNo,
Integer perPage)
Method returns all available snapshots for given droplet ID
|
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)
Method returns all of your current domain records from DNS control panel for given domain.
|
Droplet |
getDropletInfo(Integer dropletId)
Method returns complete information 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).
|
Action |
getFloatingIPActionInfo(String ipAddress,
Integer actionId)
Method to retrieve the status of a Floating IP action.
|
FloatingIP |
getFloatingIPInfo(String ipAddress)
Method retrives the information about given Floating IP
|
org.apache.http.client.HttpClient |
getHttpClient() |
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.
|
Images |
getUserImages(Integer pageNo,
Integer perPage)
Method retrieves only the private images of a user
|
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 |
restoreDroplet(Integer dropletId,
Integer imageId)
Method allows you to restore a droplet with a previous image or snapshot.
|
void |
setApiVersion(String apiVersion) |
void |
setAuthToken(String authToken) |
void |
setHttpClient(org.apache.http.impl.client.CloseableHttpClient httpClient) |
Action |
shutdownDroplet(Integer dropletId)
Method allows you to shutdown a running droplet.
|
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.
|
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.
|
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.
|
protected org.apache.http.impl.client.CloseableHttpClient httpClient
protected String authToken
protected String apiVersion
protected String apiHost
api.digitalocean.compublic DigitalOceanClient(String authToken)
authToken - a String objectpublic DigitalOceanClient(String apiVersion, String authToken)
public org.apache.http.client.HttpClient getHttpClient()
public void setHttpClient(org.apache.http.impl.client.CloseableHttpClient httpClient)
httpClient - the httpClient to setpublic String getAuthToken()
public void setAuthToken(String authToken)
authToken - the authToken to setpublic String getApiVersion()
public void setApiVersion(String apiVersion)
apiVersion - the apiVersion to setpublic Droplets getAvailableDroplets(Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetAvailableDroplets in interface DigitalOceanpageNo - for paginationperPage - no. of items per pageDropletsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Kernels getAvailableKernels(Integer dropletId, Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetAvailableKernels in interface DigitalOceandropletId - 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 methodpublic Snapshots getAvailableSnapshots(Integer dropletId, Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetAvailableSnapshots in interface DigitalOceandropletId - 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 methodpublic Backups getAvailableBackups(Integer dropletId, Integer pageNo) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetAvailableBackups in interface DigitalOceandropletId - for backup infopageNo - for paginationBackupsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Droplet getDropletInfo(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetDropletInfo in interface DigitalOceandropletId - the id of the dropletDropletDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Droplet createDroplet(Droplet droplet) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceanMethod 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
}
createDroplet in interface DigitalOceandroplet - the instance of the droplet classDropletDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Droplets createDroplets(Droplet droplet) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceanMethod 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
}
createDroplets in interface DigitalOceandroplet - the instance of the droplet classDropletDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Delete deleteDroplet(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceandeleteDroplet in interface DigitalOceandropletId - the id of the dropletDeleteDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Droplets getDropletNeighbors(Integer dropletId, Integer pageNo) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetDropletNeighbors in interface DigitalOceandropletId - the id of the dropletpageNo - for paginationDropletsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Neighbors getAllDropletNeighbors(Integer pageNo) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetAllDropletNeighbors in interface DigitalOceanpageNo - for paginationNeighborsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Action rebootDroplet(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceanrebootDroplet in interface DigitalOceandropletId - the id of the dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Action powerCycleDroplet(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceanpowerCycleDroplet in interface DigitalOceandropletId - the id of the dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Action shutdownDroplet(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceanshutdownDroplet in interface DigitalOceandropletId - the id of the dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Action powerOffDroplet(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceanpowerOffDroplet in interface DigitalOceandropletId - the id of the dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Action powerOnDroplet(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceanpowerOnDroplet in interface DigitalOceandropletId - the id of the dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Action resetDropletPassword(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceanresetDropletPassword in interface DigitalOceandropletId - the id of the dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Action resizeDroplet(Integer dropletId, String size) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceanresizeDroplet in interface DigitalOceandropletId - 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 methodpublic Action takeDropletSnapshot(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceantakeDropletSnapshot in interface DigitalOceandropletId - the id of the dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Action takeDropletSnapshot(Integer dropletId, String snapshotName) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceantakeDropletSnapshot in interface DigitalOceandropletId - 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 methodpublic Action restoreDroplet(Integer dropletId, Integer imageId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceanrestoreDroplet in interface DigitalOceandropletId - 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 methodpublic Action rebuildDroplet(Integer dropletId, Integer imageId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceanrebuildDroplet in interface DigitalOceandropletId - 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 methodpublic Action enableDropletBackups(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceanenableDropletBackups in interface DigitalOceandropletId - the id of the dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Action disableDropletBackups(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceandisableDropletBackups in interface DigitalOceandropletId - the id of the dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Action renameDroplet(Integer dropletId, String name) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceanrenameDroplet in interface DigitalOceandropletId - 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 methodpublic Action changeDropletKernel(Integer dropletId, Integer kernelId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceanchangeDropletKernel in interface DigitalOceandropletId - 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 methodpublic Action enableDropletIpv6(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceanenableDropletIpv6 in interface DigitalOceandropletId - the id of the dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Action enableDropletPrivateNetworking(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceanenableDropletPrivateNetworking in interface DigitalOceandropletId - the id of the dropletActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Account getAccountInfo() throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetAccountInfo in interface DigitalOceanAccountDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Actions getAvailableActions(Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetAvailableActions in interface DigitalOceanpageNo - for paginationperPage - no. of items per pageActionsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Action getActionInfo(Integer actionId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetActionInfo in interface DigitalOceanactionId - the id of actionActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Actions getAvailableDropletActions(Integer dropletId, Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetAvailableDropletActions in interface DigitalOceandropletId - 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 methodpublic Actions getAvailableImageActions(Integer imageId, Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetAvailableImageActions in interface DigitalOceanimageId - 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 methodpublic Actions getAvailableFloatingIPActions(String ipAddress, Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetAvailableFloatingIPActions in interface DigitalOceanipAddress - 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 methodpublic Action getFloatingIPActionInfo(String ipAddress, Integer actionId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetFloatingIPActionInfo in interface DigitalOceanipAddress - Floating IP addressactionId - the id of actionActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Images getAvailableImages(Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetAvailableImages in interface DigitalOceanpageNo - 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 methodpublic Images getAvailableImages(Integer pageNo, Integer perPage, ActionType type) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceantype={distribution or application} that can be accessed by your OAuth Token.getAvailableImages in interface DigitalOceanpageNo - 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 methodpublic Images getUserImages(Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetUserImages in interface DigitalOceanpageNo - 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 methodpublic Image getImageInfo(Integer imageId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetImageInfo in interface DigitalOceanimageId - 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 methodpublic Image getImageInfo(String slug) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetImageInfo in interface DigitalOceanslug - of the public imageImageDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Image updateImage(Image image) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceanupdateImage in interface DigitalOceanimage - object for updateImageDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Delete deleteImage(Integer imageId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceandeleteImage in interface DigitalOceanimageId - of the droplet/snapshot/backup imagesDeleteDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Action transferImage(Integer imageId, String regionSlug) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceantransferImage in interface DigitalOceanimageId - 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 methodpublic Action convertImage(Integer imageId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceanconvertImage in interface DigitalOceanimageId - 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 methodpublic Regions getAvailableRegions(Integer pageNo) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetAvailableRegions in interface DigitalOceanpageNo - for paginationRegionsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Sizes getAvailableSizes(Integer pageNo) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetAvailableSizes in interface DigitalOceanpageNo - for paginationSizesDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Domains getAvailableDomains(Integer pageNo) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetAvailableDomains in interface DigitalOceanpageNo - for paginationDomainsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Domain getDomainInfo(String domainName) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetDomainInfo in interface DigitalOceandomainName - the name of the domainDomainDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Domain createDomain(Domain domain) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceancreateDomain in interface DigitalOceandomain - 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 methodpublic Delete deleteDomain(String domainName) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceandeleteDomain in interface DigitalOceandomainName - the name of the domainDeleteDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic DomainRecords getDomainRecords(String domainName) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetDomainRecords in interface DigitalOceandomainName - of the domainDomainRecordsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic DomainRecord getDomainRecordInfo(String domainName, Integer recordId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetDomainRecordInfo in interface DigitalOceandomainName - of the domainrecordId - of the domainDomainRecordDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic DomainRecord createDomainRecord(String domainName, DomainRecord domainRecord) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceancreateDomainRecord in interface DigitalOceandomainName - 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 methodpublic DomainRecord updateDomainRecord(String domainName, Integer recordId, DomainRecord domainRecord) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceanupdateDomainRecord in interface DigitalOceandomainName - 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 methodpublic Delete deleteDomainRecord(String domainName, Integer recordId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceandeleteDomainRecord in interface DigitalOceandomainName - of the domainrecordId - of the domainDeleteDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Keys getAvailableKeys(Integer pageNo) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetAvailableKeys in interface DigitalOceanpageNo - for paginationKeysDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Key getKeyInfo(Integer sshKeyId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetKeyInfo in interface DigitalOceansshKeyId - the SSH key IdKeyDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Key getKeyInfo(String fingerprint) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetKeyInfo in interface DigitalOceanfingerprint - the SSH key fingerprintKeyDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Key createKey(Key newKey) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceancreateKey in interface DigitalOceannewKey - the Key object with sshKeyName and sshPublicKeyKeyDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Key updateKey(Integer sshKeyId, String newSshKeyName) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceanupdateKey in interface DigitalOceansshKeyId - 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 methodpublic Key updateKey(String fingerprint, String newSshKeyName) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceanupdateKey in interface DigitalOceanfingerprint - 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 methodpublic Delete deleteKey(Integer sshKeyId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceandeleteKey in interface DigitalOceansshKeyId - 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 methodpublic Delete deleteKey(String fingerprint) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceandeleteKey in interface DigitalOceanfingerprint - the SSH fingerprintDeleteDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic FloatingIPs getAvailableFloatingIPs(Integer pageNo, Integer perPage) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetAvailableFloatingIPs in interface DigitalOceanpageNo - for paginationperPage - no. of items per pageFloatingIPsDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic FloatingIP createFloatingIP(Integer dropletId) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceancreateFloatingIP in interface DigitalOceandropletId - the id of the dropletFloatingIPDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic FloatingIP createFloatingIP(String region) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceancreateFloatingIP in interface DigitalOceanregion - name of the DigitalOcean regionFloatingIPDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic FloatingIP getFloatingIPInfo(String ipAddress) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceangetFloatingIPInfo in interface DigitalOceanipAddress - Floating IP addressFloatingIPDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Delete deleteFloatingIP(String ipAddress) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceandeleteFloatingIP in interface DigitalOceanipAddress - Floating IP addressDeleteDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper methodpublic Action assignFloatingIP(Integer dropletId, String ipAddress) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceanassignFloatingIP in interface DigitalOceandropletId - 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 methodpublic Action unassignFloatingIP(String ipAddress) throws DigitalOceanException, RequestUnsuccessfulException
DigitalOceanunassignFloatingIP in interface DigitalOceanipAddress - Floating IP addressActionDigitalOceanException - if request had interruption [
HTTP status code >= 400 && < 510]RequestUnsuccessfulException - if any RESTful request unsuccessful from wrapper method
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.