az postgres
Manage Azure Database for PostgreSQL servers.
Commands
az postgres down |
Delete the PostgreSQL server and its cached information. |
az postgres show-connection-string |
Show the connection strings for a PostgreSQL server database. |
az postgres up |
Set up an Azure Database for PostgreSQL server and configurations. |
az postgres down
Delete the PostgreSQL server and its cached information.
az postgres down [--delete-group]
[--no-wait]
[--resource-group]
[--server-name]
[--yes]
Examples
Delete the server and the cached data, aside from the resource group.
az postgres down
Delete the resource group and the full cache.
az postgres down --delete-group
Optional Parameters
Delete the resource group.
Do not wait for the long-running operation to finish.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the server.
Do not prompt for confirmation.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az postgres show-connection-string
Show the connection strings for a PostgreSQL server database.
az postgres show-connection-string [--admin-password]
[--admin-user]
[--database-name]
[--server-name]
Optional Parameters
The login password of the administrator.
The login username of the administrator.
The name of a database.
Name of the server.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az postgres up
Set up an Azure Database for PostgreSQL server and configurations.
az postgres up [--admin-password]
[--admin-user]
[--backup-retention]
[--database-name]
[--generate-password]
[--geo-redundant-backup {Disabled, Enabled}]
[--location]
[--resource-group]
[--server-name]
[--sku-name]
[--ssl-enforcement {Disabled, Enabled}]
[--storage-size]
[--tags]
[--version]
Examples
Ensure that a Azure Database for PostgreSQL server is up and running and configured for immediate use.
az postgres up
To override default names, provide parameters indicating desired values/existing resources.
az postgres up -g MyResourceGroup -s MyServer -d MyDatabase -u MyUsername -p MyPassword
Optional Parameters
The login password of the administrator. Minimum 8 characters and maximum 128 characters. Password must contain characters from three of the following categories: English uppercase letters, English lowercase letters, numbers, and non-alphanumeric characters.Your password cannot contain all or part of the login name. Part of a login name is defined as three or more consecutive alphanumeric characters.
The login username of the administrator.
The number of days a backup is retained.
The name of a database to initialize.
Generate a password.
Enable Geo-redundant or not for server backup.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the server.
The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
Enable ssl enforcement or not when connect to server.
The max storage size of the server. Unit is megabytes.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Server version.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.