regions
Creates, updates, deletes, gets or lists a regions resource.
Overview
| Name | regions |
| Type | Resource |
| Id | digitalocean.compute.regions |
Fields
The following fields are returned by SELECT queries:
- regions_list
A JSON object with a key set to regions. The value is an array of region objects, each of which contain the standard region attributes.
| Name | Datatype | Description |
|---|---|---|
name | string | The display name of the region. This will be a full name that is used in the control panel and other interfaces. (example: New York 3) |
available | boolean | This is a boolean value that represents whether new Droplets can be created in this region. |
features | array | This attribute is set to an array which contains features available in this region |
sizes | array | This attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view. |
slug | string | A human-readable string that is used as a unique identifier for each region. (example: nyc3) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
regions_list | select | per_page, page | To list all of the regions that are available, send a GET request to /v2/regions.The response will be a JSON object with a key called regions. The value of this will be an array of region objects, each of which will contain the standard region 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
- regions_list
To list all of the regions that are available, send a GET request to /v2/regions.
The response will be a JSON object with a key called regions. The value of this will be an array of region objects, each of which will contain the standard region attributes.
SELECT
name,
available,
features,
sizes,
slug
FROM digitalocean.compute.regions
WHERE per_page = '{{ per_page }}'
AND page = '{{ page }}'
;