sizes
Creates, updates, deletes, gets or lists a sizes resource.
Overview
| Name | sizes |
| Type | Resource |
| Id | digitalocean.compute.sizes |
Fields
The following fields are returned by SELECT queries:
- sizes_list
A JSON object with a key called sizes. The value of this will be an array of size objects each of which contain the standard size attributes.
| Name | Datatype | Description |
|---|---|---|
available | boolean | This is a boolean value that represents whether new Droplets can be created with this size. |
description | string | A string describing the class of Droplets created from this size. For example: Basic, General Purpose, CPU-Optimized, Memory-Optimized, or Storage-Optimized. (example: Basic) |
disk | integer | The amount of disk space set aside for Droplets of this size. The value is represented in gigabytes. |
disk_info | array | An array of objects containing information about the disks available to Droplets created with this size. |
gpu_info | object | An object containing information about the GPU capabilities of Droplets created with this size. |
memory | integer | The amount of RAM allocated to Droplets created of this size. The value is represented in megabytes. |
price_hourly | number (float) | This describes the price of the Droplet size as measured hourly. The value is measured in US dollars. |
price_monthly | number (float) | This attribute describes the monthly cost of this Droplet size if the Droplet is kept for an entire month. The value is measured in US dollars. |
regions | array | An array containing the region slugs where this size is available for Droplet creates. |
slug | string | A human-readable string that is used to uniquely identify each size. (example: s-1vcpu-1gb) |
transfer | number (float) | The amount of transfer bandwidth that is available for Droplets created in this size. This only counts traffic on the public interface. The value is given in terabytes. |
vcpus | integer | The number of CPUs allocated to Droplets of this size. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
sizes_list | select | per_page, page | To list all of available Droplet sizes, send a GET request to /v2/sizes.The response will be a JSON object with a key called sizes. The value of this will be an array of size objects each of which contain the standard size attributes. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
page | integer | Which 'page' of paginated results to return. (example: 1) |
per_page | integer | Number of items returned per page (example: 2) |
SELECT examples
- sizes_list
To list all of available Droplet sizes, send a GET request to /v2/sizes.
The response will be a JSON object with a key called sizes. The value of this will be an array of size objects each of which contain the standard size attributes.
SELECT
available,
description,
disk,
disk_info,
gpu_info,
memory,
price_hourly,
price_monthly,
regions,
slug,
transfer,
vcpus
FROM digitalocean.compute.sizes
WHERE per_page = '{{ per_page }}'
AND page = '{{ page }}'
;