doctl Verified current stable Not installed? Cloud Infrastructure

Doctl / List Available Slugs For Database Engine

List Available Slugs For Database Engine

Retrieve available slugs for a given database engine.

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

When To Use

During a configuration phase to select available database instances.

Pro Tip

Use verbose output to gain insight into slug versions and potential deployment issues.

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
$ doctl databases slugs --engine pg

Available Slugs for PostgreSQL:
+----------------+----------------+----------------+----------------+
|      Name      |   Version      |   Plan         |   Region       |
+----------------+----------------+----------------+----------------+
| pg-13          | 13.3          | Basic          | nyc1           |
| pg-12          | 12.7          | Standard       | sfo1           |
| pg-11          | 11.12         | Premium        | nyc3           |
+----------------+----------------+----------------+----------------+

Anatomy of Output

Understanding the result

Available slugs for MySQL: Header

Descriptive header for the output.

1. db-mysql-11 Slug

First available slug for MySQL.

2. db-mysql-12 Slug

Second available slug for MySQL.

3. db-mysql-13 Slug

Third available slug for MySQL.

Power User Variants

Optimized versions

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

List Redis slugs in JSON format.

doctl databases slugs --engine mongodb --verbose

List MongoDB slugs with extended information.

Troubleshooting

Common pitfalls

Error: No slugs found for the specified engine

Solution: Verify the engine name and ensure that it supports slugs.

Error: Database slug service temporarily unavailable

Solution: Retry the command after a brief wait.

Error: Insufficient permissions to view slugs

Solution: Check your API token's permissions and roles.

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.
s
s|slugs
The value supplied for s|slugs.
<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 `doctl databases slugs --engine pg` to list PostgreSQL slugs.

  2. Step 2

    Review the output table for available versions and plans.

Alternative Approaches

Comparable commands in other tools

Alternative cloud infrastructure tools for the same job.