doctl Verified current stable Not installed? Cloud Infrastructure

Doctl / List Available Regions For Database Engine

List Available Regions For Database Engine

List available regions for a specified database engine.

$
Terminal
doctl d o r --engine <pg|mysql|redis|mongodb>

When To Use

When determining deployment locations for a specific database engine's performance.

Pro Tip

Check for region-specific limitations or optimizations by querying the API documentation before deploying.

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
$ doctl databases options regions --engine pg

Available Regions for PostgreSQL:
+----------------+---------------------+
| Region         | Slug                |
+----------------+---------------------+
| New York 1     | nyc1                |
| San Francisco 1| sfo1                |
| Amsterdam 1    | ams3                |
| Singapore 1    | sgp1                |
+----------------+---------------------+

Anatomy of Output

Understanding the result

Available regions for PostgreSQL: Header

Descriptive header for the output.

1. NYC1 Region Code

New York City datacenter 1.

2. SFO1 Region Code

San Francisco datacenter 1.

3. LON1 Region Code

London datacenter 1.

Power User Variants

Optimized versions

doctl databases regions --engine mysql

List regions for the MySQL database.

doctl databases regions --engine redis --format=json

Output the regions for Redis in JSON for programmatic access.

Troubleshooting

Common pitfalls

Error: Engine not recognized

Solution: Ensure that the specified engine matches supported options in DigitalOcean.

Error: No regions available for this engine

Solution: Consult DigitalOcean support for active region availability for your chosen engine.

Error: API rate limit exceeded

Solution: Reduce the frequency of requests to remain under your account's API limits.

Command Breakdown

What each part is doing

doctl
Base Command
The executable that performs this operation. Here it runs Doctl before the shell applies any redirect operators.
d
d|databases
The value supplied for d|databases.
o
o|options
The value supplied for o|options.
r
r|regions
The value supplied for r|regions.
<pg|mysql|redis|mongodb>
pg|mysql|redis|mongodb
The value supplied for pg|mysql|redis|mongodb.
--engine
Command Option
Tool-specific option used by this command invocation.

How To Run

Execution path

  1. Step 1

    Run the command: `doctl databases options regions --engine pg`

  2. Step 2

    Review the output for available regions.

Alternative Approaches

Comparable commands in other tools

Alternative cloud infrastructure tools for the same job.