@heroku-cli/plugin-data-beta
v0.5.0
Published
Heroku CLI plugin for beta Heroku Data features
Downloads
9,291
Maintainers
Readme
Heroku CLI Data Beta Plugin
Heroku CLI Plugin for beta Heroku Data features.
Installation
$ heroku plugins:install @heroku-cli/plugin-data-betaUsage
$ npm install -g @heroku-cli/plugin-data-beta
$ heroku COMMAND
running command...
$ heroku (--version)
@heroku-cli/plugin-data-beta/0.5.0 darwin-arm64 node-v20.19.5
$ heroku --help [COMMAND]
USAGE
$ heroku COMMAND
...Commands
heroku data:pg:attachments DATABASEheroku data:pg:attachments:create DATABASEheroku data:pg:attachments:destroy ATTACHMENT_NAMEheroku data:pg:createheroku data:pg:credentials DATABASEheroku data:pg:credentials:create DATABASEheroku data:pg:credentials:destroy DATABASEheroku data:pg:credentials:rotate DATABASEheroku data:pg:credentials:url DATABASEheroku data:pg:destroy DATABASEheroku data:pg:docsheroku data:pg:info DATABASEheroku data:pg:pools:add DATABASEheroku data:pg:pools:destroy DATABASEheroku data:pg:pools:scale DATABASEheroku data:pg:psql DATABASEheroku data:pg:quotas DATABASEheroku data:pg:quotas:update DATABASEheroku data:pg:scale ADDONheroku data:pg:settings DATABASE
heroku data:pg:attachments DATABASE
list attachments on a Postgres Advanced database
USAGE
$ heroku data:pg:attachments DATABASE -a <value> [-r <value>]
ARGUMENTS
DATABASE database name, database attachment name, or related config var on an app
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
list attachments on a Postgres Advanced database
EXAMPLES
$ heroku data:pg:attachments database_name -a example-appSee code: src/commands/data/pg/attachments/index.ts
heroku data:pg:attachments:create DATABASE
attach an existing Postgres Advanced database to an app
USAGE
$ heroku data:pg:attachments:create DATABASE -a <value> [--as <value>] [--credential <value> | --pool <value>] [-r
<value>]
ARGUMENTS
DATABASE database name, database attachment name, or related config var on an app
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
--as=<value> name for Postgres database attachment
--credential=<value> credential to use for database
--pool=<value> instance pool to attach
DESCRIPTION
attach an existing Postgres Advanced database to an appSee code: src/commands/data/pg/attachments/create.ts
heroku data:pg:attachments:destroy ATTACHMENT_NAME
detach an existing database attachment from an app
USAGE
$ heroku data:pg:attachments:destroy ATTACHMENT_NAME -a <value> [-r <value>]
ARGUMENTS
ATTACHMENT_NAME unique identifier of the database attachment
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
detach an existing database attachment from an appSee code: src/commands/data/pg/attachments/destroy.ts
heroku data:pg:create
create a Postgres Advanced database
USAGE
$ heroku data:pg:create -a <value> [--name <value>] [--as <value>] [--high-availability --level <value>]
[--network private|shield] [--followers <value> ] [--version <value>] [--wait ] [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
--as=<value> name for the initial database attachment
--followers=<value> provision a follower instance pool with the specified number of instances
--[no-]high-availability enable or disable high availability on the leader pool by provisioning a warm standby
instance
--level=<value> set compute scale
--name=<value> name for the database
--network=<option> set network for the database
<options: private|shield>
--version=<value> Postgres version for the database
--wait watch database creation status and exit when complete
DESCRIPTION
create a Postgres Advanced database
EXAMPLES
$ heroku data:pg:create --level 4G-Performance -a example-appSee code: src/commands/data/pg/create.ts
heroku data:pg:credentials DATABASE
list credentials on a Postgres Advanced database
USAGE
$ heroku data:pg:credentials DATABASE -a <value> [-r <value>]
ARGUMENTS
DATABASE database name, database attachment name, or related config var on an app
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
list credentials on a Postgres Advanced database
EXAMPLES
$ heroku data:pg:credentials database_name -a example-appSee code: src/commands/data/pg/credentials/index.ts
heroku data:pg:credentials:create DATABASE
create credentials for a Postgres database
USAGE
$ heroku data:pg:credentials:create DATABASE -a <value> -n <value> [-r <value>]
ARGUMENTS
DATABASE database name, database attachment name, or related config var on an app
FLAGS
-a, --app=<value> (required) app to run command against
-n, --name=<value> (required) name for the credential
-r, --remote=<value> git remote of app to use
DESCRIPTION
create credentials for a Postgres database
EXAMPLES
$ heroku data:pg:credentials:create DATABASE --name my-credential --app example-appSee code: src/commands/data/pg/credentials/create.ts
heroku data:pg:credentials:destroy DATABASE
destroy credentials on a Postgres database
USAGE
$ heroku data:pg:credentials:destroy DATABASE -a <value> -n <value> [-r <value>]
ARGUMENTS
DATABASE database name, database attachment name, or related config var on an app
FLAGS
-a, --app=<value> (required) app to run command against
-n, --name=<value> (required) name of credential
-r, --remote=<value> git remote of app to use
DESCRIPTION
destroy credentials on a Postgres database
EXAMPLES
$ heroku data:pg:credentials:destroy DATABASE --name my-credential --app example-appSee code: src/commands/data/pg/credentials/destroy.ts
heroku data:pg:credentials:rotate DATABASE
rotate credentials on a Postgres database
USAGE
$ heroku data:pg:credentials:rotate DATABASE -a <value> [--all | -n <value>] [--force] [-r <value>]
ARGUMENTS
DATABASE database name, database attachment name, or related config var on an app
FLAGS
-a, --app=<value> (required) app to run command against
-n, --name=<value> [default: owner or default credential, if not specified and --all isn't used] credential to
rotate
-r, --remote=<value> git remote of app to use
--all rotate all credentials
--force force rotate the targeted credentials
DESCRIPTION
rotate credentials on a Postgres databaseSee code: src/commands/data/pg/credentials/rotate.ts
heroku data:pg:credentials:url DATABASE
show information on a Postgres database credential
USAGE
$ heroku data:pg:credentials:url DATABASE -a <value> [-n <value>] [-r <value>]
ARGUMENTS
DATABASE database name, database attachment name, or related config var on an app
FLAGS
-a, --app=<value> (required) app to run command against
-n, --name=<value> [default: owner or default credential, if not specified] credential to show
-r, --remote=<value> git remote of app to use
DESCRIPTION
show information on a Postgres database credential
EXAMPLES
$ heroku data:pg:credentials:url DATABASE --app myappSee code: src/commands/data/pg/credentials/url.ts
heroku data:pg:destroy DATABASE
destroy a Postgres Advanced database
USAGE
$ heroku data:pg:destroy DATABASE [-f] [-c <value>] [-a <value>] [-r <value>]
ARGUMENTS
DATABASE database name, attachment name, or related config var on an app
FLAGS
-a, --app=<value> app to run command against
-c, --confirm=<value> pass in the app name to skip confirmation prompts
-f, --force destroy even if connected to other apps
-r, --remote=<value> git remote of app to use
DESCRIPTION
destroy a Postgres Advanced database
EXAMPLES
$ heroku data:pg:destroy database_nameSee code: src/commands/data/pg/destroy.ts
heroku data:pg:docs
open documentation for Heroku Postgres in your web browser
USAGE
$ heroku data:pg:docs [--browser <value>]
FLAGS
--browser=<value> browser to open docs with (example: "firefox", "safari")
DESCRIPTION
open documentation for Heroku Postgres in your web browserSee code: src/commands/data/pg/docs.ts
heroku data:pg:info DATABASE
get details on a Postgres Advanced database
USAGE
$ heroku data:pg:info DATABASE -a <value> [-r <value>]
ARGUMENTS
DATABASE Name of the database, database attachment name, or related config var on an app
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
get details on a Postgres Advanced database
EXAMPLES
$ heroku data:pg:info database_nameSee code: src/commands/data/pg/info.ts
heroku data:pg:pools:add DATABASE
create a follower pool on a Postgres Advanced database
USAGE
$ heroku data:pg:pools:add DATABASE -a <value> --level <value> --count <value> [--name <value>] [-r <value>]
ARGUMENTS
DATABASE database name, database attachment name, or related config var on an app
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
--count=<value> (required) number of instances
--level=<value> (required) set compute level (example: 32G-Performance)
--name=<value> name for the pool
DESCRIPTION
create a follower pool on a Postgres Advanced database
EXAMPLES
$ heroku data:pg:pools:add database_name --name analytics --level 32G-Performance --count 2 --app example-appSee code: src/commands/data/pg/pools/add.ts
heroku data:pg:pools:destroy DATABASE
destroy a follower pool on a Postgres Advanced database
USAGE
$ heroku data:pg:pools:destroy DATABASE -a <value> --name <value> [-r <value>]
ARGUMENTS
DATABASE database name, database attachment name, or related config var on an app
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
--name=<value> (required) name of the pool to destroy
DESCRIPTION
destroy a follower pool on a Postgres Advanced database
EXAMPLES
$ heroku data:pg:pools:destroy database_name --name analytics --app my-appSee code: src/commands/data/pg/pools/destroy.ts
heroku data:pg:pools:scale DATABASE
scale an existing follower pool on a Postgres Advanced database
USAGE
$ heroku data:pg:pools:scale DATABASE -a <value> --pool <value> [--level <value>] [--count <value>] [-r <value>]
ARGUMENTS
DATABASE database name, database attachment name, or related config var on an app
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
--count=<value> number of instances
--level=<value> set compute level (example: 32G-Performance)
--pool=<value> (required) name of the pool to scale
DESCRIPTION
scale an existing follower pool on a Postgres Advanced database
EXAMPLES
# Scale down the 'analytics' pool to zero instances
$ heroku data:pg:pools:scale DATABASE --name analytics --count 0 --app my-app
# Scale all the 'analytics' pool instances to a 64G-Performance level
$ heroku data:pg:pools:scale DATABASE --name analytics --level 64G-Performance --app my-appSee code: src/commands/data/pg/pools/scale.ts
heroku data:pg:psql DATABASE
open a psql shell to the database
USAGE
$ heroku data:pg:psql DATABASE -a <value> [-c <value>] [--credential <value>] [-f <value>] [-p <value>] [-r
<value>]
ARGUMENTS
DATABASE database name, database attachment name, or related config var on an app
FLAGS
-a, --app=<value> (required) app to run command against
-c, --command=<value> SQL command to run
-f, --file=<value> SQL file to run
-p, --pool=<value> follower instance pool to connect to on Advanced-tier databases
-r, --remote=<value> git remote of app to use
--credential=<value> credential to use
DESCRIPTION
open a psql shell to the database
EXAMPLES
$ heroku data:pg:psql database_name -a example-appSee code: src/commands/data/pg/psql.ts
heroku data:pg:quotas DATABASE
display quotas set on a Postgres Advanced database
USAGE
$ heroku data:pg:quotas DATABASE -a <value> [-r <value>] [--type storage]
ARGUMENTS
DATABASE database name, database attachment name, or related config var on an app
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
--type=<option> type of quota
<options: storage>
DESCRIPTION
display quotas set on a Postgres Advanced database
EXAMPLES
$ heroku data:pg:quotas database_name --app example-appSee code: src/commands/data/pg/quotas/index.ts
heroku data:pg:quotas:update DATABASE
update quota settings on a Postgres Advanced database
USAGE
$ heroku data:pg:quotas:update DATABASE -a <value> --type storage [--warning <value>] [--critical <value>]
[--enforcement-action notify|restrict|none] [-r <value>]
ARGUMENTS
DATABASE database name, database attachment name, or related config var on an app
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
--critical=<value> set critical threshold in GB, set to "none" to remove threshold
--enforcement-action=<option> set enforcement action for when database surpasses the critical threshold
<options: notify|restrict|none>
--type=<option> (required) type of quota to update
<options: storage>
--warning=<value> set warning threshold in GB, set to "none" to remove threshold
DESCRIPTION
update quota settings on a Postgres Advanced database
EXAMPLES
$ heroku data:pg:quotas:update --app example-app --type storage --warning 12 --critical 15 --enforcement-action notifySee code: src/commands/data/pg/quotas/update.ts
heroku data:pg:scale ADDON
Scale your postgres addon
USAGE
$ heroku data:pg:scale ADDON -a <value> [--count <value>] [--level <value>] [--pool <value>]
[--high-availability] [--confirm <value>] [-r <value>]
ARGUMENTS
ADDON Name of the addon to scale. If targeting an app, an env var associate with the addon may be used
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
--confirm=<value> Confirm scale action
--count=<value> Adjust the instance count of a pool
--[no-]high-availability Enable a high availability cluster by provisioning a warm standby writer
--level=<value> Adjust compute scale
--pool=<value> Adds a named instance pool when one does not exist or scales the instance pool which
exists based on level and instance flags
DESCRIPTION
Scale your postgres addon
EXAMPLES
$ heroku data:pg:scaleSee code: src/commands/data/pg/scale.ts
heroku data:pg:settings DATABASE
get or update the settings of a Postgres Advanced database
USAGE
$ heroku data:pg:settings DATABASE -a <value> [--set <value>...] [-r <value>]
ARGUMENTS
DATABASE database name, database attachment name, or related config var on an app
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
--set=<value>... Postgres setting to change in SETTING_NAME:VALUE format (example: 'track_functions:pl' or
'log_lock_waits:1')
DESCRIPTION
get or update the settings of a Postgres Advanced database
EXAMPLES
# Get database settings
$ heroku data:pg:settings database_name -a app_name
# Change ‘log_min_duration_statement’ and ‘log_statement’ settings for database
$ heroku data:pg:settings database_name --set=log_min_duration_statement:2000 --set=log_statement:ddl -a \
app_nameSee code: src/commands/data/pg/settings.ts
