Doctl / List Available Database Engines
List Available Database Engines
List available database engines in the DigitalOcean environment.
doctl d o eng doctl d o eng #!/bin/bash
# List Available Database Engines
doctl {{[d|databases]}} {{[o|options]}} {{[eng|engines]}} import subprocess
# List Available Database Engines
# Make sure to replace <placeholders> with actual values
def run_command():
cmd = [
"doctl",
"d",
"o",
"eng"
]
try:
print(f"Executing: {' '.join(cmd)}")
subprocess.run(cmd, check=True)
except subprocess.CalledProcessError as e:
print(f"Error: {e}")
except FileNotFoundError:
print("Error: doctl not found. Please install it first.")
if __name__ == "__main__":
run_command() When To Use
When evaluating database options for a new project deployment.
Pro Tip
Use the `--format` option to filter the output specifically to engine names for easier ingestion by automation scripts.
Terminal Output
Expected runtime feedback
$ doctl databases engines list
| Engine Name | Version | Status |
|-------------|--------------|----------|
| postgres | 13.3 | available|
| mysql | 8.0 | available|
| redis | 6.2 | available|
| mongodb | 4.4 | available|
| cockroachdb | 21.1 | available| Anatomy of Output
Understanding the result
Available database engines: Header Descriptive header for the output.
1. PostgreSQL Engine Name First listed supported database engine.
2. MySQL Engine Name Second listed supported database engine.
3. Redis Engine Name Third listed supported database engine.
4. MongoDB Engine Name Fourth listed supported database engine.
Power User Variants
Optimized versions
doctl databases engines --format=json Output in JSON format for easier integration with scripts.
doctl databases engines --region nyc1 Filter engines available in the specific region.
Troubleshooting
Common pitfalls
Error: Invalid command
Solution: Check command syntax for typos. Command format: doctl databases options engines.
Error: Authorization failed
Solution: Ensure your API token is valid and has sufficient permissions.
Error: No database engines available
Solution: Confirm your account has the required services enabled and try again.
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.
-
eng - eng|engines
- The value supplied for eng|engines.
How To Run
Execution path
- Step 1
Open your terminal.
- Step 2
Run the command: `doctl databases engines list`.
- Step 3
Review the output for available database engines.
Alternative Approaches
Comparable commands in other tools
Alternative cloud infrastructure tools for the same job.
flyctl status --app <app_name> Ansible Inventory / Dump Default Inventory To File ansible-inventory --list --output <path/to/file> Ansible / List Groups In Inventory ansible localhost -m debug -a '<var=groups.keys()>' Aws / List Indexes aws kendra list-indexes Aws / Describe Index aws kendra describe-index --id <index_id>