az postgres flexible-server db
Manage PostgreSQL databases on a flexible server.
Commands
Name | Description | Type | Status |
---|---|---|---|
az postgres flexible-server db create |
Create a PostgreSQL database on a flexible server. |
Core | GA |
az postgres flexible-server db delete |
Delete a database on a flexible server. |
Core | GA |
az postgres flexible-server db list |
List the databases for a flexible server. |
Core | GA |
az postgres flexible-server db show |
Show the details of a database. |
Core | GA |
az postgres flexible-server db create
Create a PostgreSQL database on a flexible server.
az postgres flexible-server db create --resource-group
--server-name
[--charset]
[--collation]
[--database-name]
Examples
Create database 'testDatabase' in the flexible server 'testserver' with the default parameters.
az postgres flexible-server db create --resource-group testGroup --server-name testserver --database-name testDatabase
Create database 'testDatabase' in the flexible server 'testserver' with a given character set and collation rules.
az postgres flexible-server db create --resource-group testGroup --server-name testserver --database-name testDatabase \ --charset validCharset --collation validCollation
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Optional Parameters
The charset of the database. The default value is UTF8.
The collation of the database.
The name of the database to be created when provisioning the database server.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az postgres flexible-server db delete
Delete a database on a flexible server.
az postgres flexible-server db delete [--database-name]
[--ids]
[--resource-group]
[--server-name]
[--subscription]
[--yes]
Examples
Delete database 'testDatabase' in the flexible server 'testserver'.
az postgres flexible-server db delete --resource-group testGroup --server-name testserver --database-name testDatabase
Optional Parameters
The name of the database to be created when provisioning the database server.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az postgres flexible-server db list
List the databases for a flexible server.
az postgres flexible-server db list --resource-group
--server-name
Examples
List databases in the flexible server 'testserver'.
az postgres flexible-server db list --resource-group testGroup --server-name testserver
List databases in the flexible server 'testserver' in table format.
az postgres flexible-server db list --resource-group testGroup --server-name testserver --output table
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az postgres flexible-server db show
Show the details of a database.
az postgres flexible-server db show [--database-name]
[--ids]
[--resource-group]
[--server-name]
[--subscription]
Examples
Show database 'testDatabase' in the server 'testserver'.
az postgres flexible-server db show --resource-group testGroup --server-name testserver --database-name testDatabase
Optional Parameters
The name of the database to be created when provisioning the database server.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Azure CLI