az postgres flexible-server

Note

This reference is part of the rdbms-connect extension for the Azure CLI (version 2.19.0 or higher). The extension will automatically install the first time you run an az postgres flexible-server command. Learn more about extensions.

Manage Azure Database for PostgreSQL Flexible Servers.

Commands

Name Description Type Status
az postgres flexible-server connect

Connect to a flexible server.

Extension GA
az postgres flexible-server execute

Connect to a flexible server.

Extension GA

az postgres flexible-server connect

Connect to a flexible server.

Azure CLI
az postgres flexible-server connect --admin-user
                                    --name
                                    [--admin-password]
                                    [--database-name]
                                    [--interactive]
                                    [--querytext]

Required Parameters

--admin-user -u

The login username of the administrator.

--name -n

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

--admin-password -p

The login password of the administrator.

--database-name -d

The name of a database.

--interactive

Pass this parameter to connect to database in interactive mode.

--querytext -q
Deprecated

Argument 'querytext' has been deprecated and will be removed in a future release. Use 'execute' instead.

A query to run against the flexible server.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az postgres flexible-server execute

Connect to a flexible server.

Azure CLI
az postgres flexible-server execute --admin-password
                                    --admin-user
                                    --name
                                    [--database-name]
                                    [--file-path]
                                    [--querytext]

Required Parameters

--admin-password -p

The login password of the administrator.

--admin-user -u

The login username of the administrator.

--name -n

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

--database-name -d

The name of a database.

--file-path -f

The path of the sql file to execute.

--querytext -q

A query to run against the flexible server.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.