Skip to main content

regions

Creates, updates, deletes, gets or lists a regions resource.

Overview

Nameregions
TypeResource
Iddigitalocean.compute.regions

Fields

The following fields are returned by SELECT queries:

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.

NameDatatypeDescription
namestringThe 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)
availablebooleanThis is a boolean value that represents whether new Droplets can be created in this region.
featuresarrayThis attribute is set to an array which contains features available in this region
sizesarrayThis attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view.
slugstringA human-readable string that is used as a unique identifier for each region. (example: nyc3)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
regions_listselectper_page, pageTo 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.

NameDatatypeDescription
pageintegerWhich 'page' of paginated results to return. (example: 1)
per_pageintegerNumber of items returned per page (example: 2)

SELECT examples

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 }}';