CLI & APICommand reference
stackblaze db
Inspect an environment's database add-ons (PostgreSQL, MariaDB, Valkey, …)
Usage: stackblaze db|database [options] [command]
Inspect an environment's database add-ons (PostgreSQL, MariaDB, Valkey, …)
Options:
-h, --help Print help
Commands:
info [options] <instance> Engine and current CPU / memory / storage of a
database add-on
help [command] Print this message or the help of the given
subcommand(s)db info
Usage: stackblaze db info [options] <instance>
Engine and current CPU / memory / storage of a database add-on
Options:
--api-url <url> StackBlaze API base URL (env STACKBLAZE_API_URL)
--token <token> API token, sb_pat_... (env STACKBLAZE_TOKEN)
-p, --project <name> Project name
-e, --env <name> Environment name (default: production)
--json Output JSON (same as -o json) (default: false)
-o, --output <format> Output format: text or json (choices: "text", "json")
-h, --help Print helpExample
The engine and current size of a database add-on, by its instance name:
stackblaze db info whiteboard-8stj-postgresql-6bt2 -p github-demo-cw8z -e devwhiteboard-8stj-postgresql-6bt2 (PostgreSQL (CloudNativePG))
cpu: 8
memory: 32Gi
storage: 1GiThe JSON also says what can be resized and whether high availability is on:
stackblaze db info db-qmwu -p import-demo-brkm -e dev --json{
"instance": "db-qmwu",
"kind": "Cluster",
"engine": "PostgreSQL (CloudNativePG)",
"provisioned": true,
"communal": false,
"ephemeral": false,
"resize": {
"supported": true,
"cpu": true,
"memory": true,
"storage": true,
"storageShrink": false
},
"ha": {
"supported": true,
"enabled": false,
"canDisable": false,
"viaPromotionJob": false
},
"current": {
"cpu": "8",
"memory": "32Gi",
"storage": "1Gi"
}
}