doctl Verified current stable Not installed? Cloud Infrastructure

Doctl / Run Doctl Databases Pool Command With Access Token

Run Doctl Databases Pool Command With Access Token

Run a command on a database pool using a specified access token.

$
Terminal
doctl d p <command> -t <access_token>

When To Use

In scenarios requiring explicit access with a token for security compliance.

Pro Tip

Check expiration of the access token; it can result in `401 Unauthorized` errors if invalid.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
doctl d p <command> -t <access_token>

Anatomy of Output

Understanding the result

Command Executed: List Pool Details Executed Command

Shows the command that was run against the pool.

Pool Size: 5 Pool Size

Indicates the current size of the connection pool.

Database ID: 234567 Database ID

Identifier of the database associated.

Power User Variants

Optimized versions

doctl databases pool command --access-token abcdef123456

Run command against pool with access token directly.

doctl databases pool command --access-token abcdef123456 --timeout 30

Set a timeout for the pool command execution.

Troubleshooting

Common pitfalls

Error: Invalid access token provided.

Solution: Double-check the access token for correctness.

Error: Access token expired.

Solution: Generate a new access token via the DigitalOcean console.

Error: 403 Forbidden - Insufficient permissions.

Solution: Ensure your token has the required database access permissions.

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.
p
p|pool
The value supplied for p|pool.
<command>
command
The value supplied for command.
-t
t| access token
The value supplied for t| access token.
<access_token>
access token
The value supplied for access token.
-t
Command Option
Tool-specific option used by this command invocation.

Alternative Approaches

Comparable commands in other tools

Alternative cloud infrastructure tools for the same job.