By Andrew SB
Are High CPU Droplet available via the DigtialOcean API? Are there any special considerations when creating them via the API?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
High CPU Droplets can be created via the DigitalOcean API like any other Droplet. In order to use them, provide a “size slug” prefixed with c- when creating your Droplet.
| Slug | Memory | CPUs |
|---|---|---|
| c-2 | 3 GB | 2 |
| c-4 | 6 GB | 4 |
| c-8 | 12 GB | 8 |
| c-16 | 24 GB | 16 |
| c-32 | 48 GB | 32 |
| c-48 | 72 GB | 48 |
For example:
curl -X POST -H "Content-Type: application/json" \
-H "Authorization: Bearer $DO_TOKEN" \
-d '{"name":"example.com","region":"nyc3","size":"c-32","image":"ubuntu-14-04-x64", "monitoring": true, "tags":["web"]}' \
"https://api.digitalocean.com/v2/droplets"
High CPU Droplets may have limited availability in certain datacenters. When a Droplet create is unsuccessful because of insufficient capacity, the API call will return an error message in the following format with 422 for the HTTP status code. The available_regions key will contain a list of regions which can currently handle the desired High-CPU Droplet of that size at that time.
{
"id": "unprocessable_entity",
"message": "The size you selected is temporarily unavailable because of High CPU server capacity",
"error_attributes": {
"available_regions": [
"nyc3",
"nyc1",
"sfo2"
]
}
}
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.