az postgres

Manage Azure Database for PostgreSQL servers.

Commands

az postgres db

Manage PostgreSQL databases on a server.

az postgres db create

Create a PostgreSQL database.

az postgres db delete

Delete a database.

az postgres db list

List the databases for a server.

az postgres db show

Show the details of a database.

az postgres down

Delete the PostgreSQL server and its cached information.

az postgres flexible-server

Manage Azure Database for PostgreSQL Flexible Servers.

az postgres flexible-server ad-admin

Manage server Active Directory administrators.

az postgres flexible-server ad-admin create

Create an Active Directory administrator.

az postgres flexible-server ad-admin delete

Delete an Active Directory administrator.

az postgres flexible-server ad-admin list

List all Active Directory administrators.

az postgres flexible-server ad-admin show

Get an Active Directory administrator.

az postgres flexible-server ad-admin wait

Wait for an Active Directory administrator to satisfy certain conditions.

az postgres flexible-server backup

Manage flexible server backups.

az postgres flexible-server backup list

List all the backups for a given server.

az postgres flexible-server backup show

Show the details of a specific backup for a given server.

az postgres flexible-server connect

Connect to a flexible server.

az postgres flexible-server create

Create a PostgreSQL flexible server.

az postgres flexible-server db

Manage PostgreSQL databases on a flexible server.

az postgres flexible-server db create

Create a PostgreSQL database on a flexible server.

az postgres flexible-server db delete

Delete a database on a flexible server.

az postgres flexible-server db list

List the databases for a flexible server.

az postgres flexible-server db show

Show the details of a database.

az postgres flexible-server delete

Delete a flexible server.

az postgres flexible-server deploy

Enable and run GitHub Actions workflow for PostgreSQL server.

az postgres flexible-server deploy run

Run an existing workflow in your github repository.

az postgres flexible-server deploy setup

Create GitHub Actions workflow file for PostgreSQL server.

az postgres flexible-server execute

Connect to a flexible server.

az postgres flexible-server firewall-rule

Manage firewall rules for a server.

az postgres flexible-server firewall-rule create

Create a new firewall rule for a flexible server.

az postgres flexible-server firewall-rule delete

Delete a firewall rule.

az postgres flexible-server firewall-rule list

List all firewall rules for a flexible server.

az postgres flexible-server firewall-rule show

Get the details of a firewall rule.

az postgres flexible-server firewall-rule update

Update a firewall rule.

az postgres flexible-server geo-restore

Geo-restore a flexible server from backup.

az postgres flexible-server identity

Manage server user assigned identities.

az postgres flexible-server identity assign

Add user asigned managed identities to the server.

az postgres flexible-server identity list

List all user assigned managed identities from the server.

az postgres flexible-server identity remove

Remove user asigned managed identites from the server.

az postgres flexible-server identity show

Get an user assigned managed identity from the server.

az postgres flexible-server list

List available flexible servers.

az postgres flexible-server list-skus

Lists available sku's in the given region.

az postgres flexible-server migration

Manage migration workflows for PostgreSQL Flexible Servers.

az postgres flexible-server migration check-name-availability

Checks if the provided migration-name can be used.

az postgres flexible-server migration create

Create a new migration workflow for a flexible server.

az postgres flexible-server migration list

List the migrations of a flexible server.

az postgres flexible-server migration show

Get the details of a specific migration.

az postgres flexible-server migration update

Update a specific migration.

az postgres flexible-server parameter

Commands for managing server parameter values for flexible server.

az postgres flexible-server parameter list

List the parameter values for a flexible server.

az postgres flexible-server parameter set

Update the parameter of a flexible server.

az postgres flexible-server parameter show

Get the parameter for a flexible server.".

az postgres flexible-server replica

Manage read replicas.

az postgres flexible-server replica create

Create a read replica for a server.

az postgres flexible-server replica list

List all read replicas for a given server.

az postgres flexible-server replica stop-replication

Stop replication to a read replica and make it a read/write server.

az postgres flexible-server restart

Restart a flexible server.

az postgres flexible-server restore

Restore a flexible server from backup.

az postgres flexible-server show

Get the details of a flexible server.

az postgres flexible-server show-connection-string

Show the connection strings for a PostgreSQL flexible-server database.

az postgres flexible-server start

Start a flexible server.

az postgres flexible-server stop

Stop a flexible server.

az postgres flexible-server update

Update a flexible server.

az postgres flexible-server upgrade

Upgrade the major version of a flexible server.

az postgres flexible-server wait

Wait for the flexible server to satisfy certain conditions.

az postgres server

Manage PostgreSQL servers.

az postgres server ad-admin

Manage a postgres server's Active Directory administrator.

az postgres server ad-admin create

Create an Active Directory Administrator for PostgreSQL server.

az postgres server ad-admin delete

Delete an Active Directory Administrator for PostgreSQL server.

az postgres server ad-admin list

List all Active Directory Administrators for PostgreSQL server.

az postgres server ad-admin show

Get Active Directory Administrator information for a PostgreSQL server.

az postgres server ad-admin wait

Place the CLI in a waiting state until a condition of the PostgreSQL server Active Directory Administrator is met.

az postgres server configuration

Manage configuration values for a server.

az postgres server configuration list

List the configuration values for a server.

az postgres server configuration set

Update the configuration of a server.

az postgres server configuration show

Get the configuration for a server.".

az postgres server create

Create a server.

az postgres server delete

Delete a server.

az postgres server firewall-rule

Manage firewall rules for a server.

az postgres server firewall-rule create

Create a new firewall rule for a server.

az postgres server firewall-rule delete

Delete a firewall rule.

az postgres server firewall-rule list

List all firewall rules for a server.

az postgres server firewall-rule show

Get the details of a firewall rule.

az postgres server firewall-rule update

Update a firewall rule.

az postgres server georestore

Geo-restore a server from backup.

az postgres server key

Manage PostgreSQL server keys.

az postgres server key create

Create server key.

az postgres server key delete

Delete server key.

az postgres server key list

Gets a list of Server keys.

az postgres server key show

Show server key.

az postgres server list

List available servers.

az postgres server list-skus

List available sku's in the given region.

az postgres server private-endpoint-connection

Manage PostgreSQL server private endpoint connections.

az postgres server private-endpoint-connection approve

Approve the specified private endpoint connection associated with a PostgreSQL server.

az postgres server private-endpoint-connection delete

Delete the specified private endpoint connection associated with a PostgreSQL server.

az postgres server private-endpoint-connection reject

Reject the specified private endpoint connection associated with a PostgreSQL server.

az postgres server private-endpoint-connection show

Show details of a private endpoint connection associated with a PostgreSQL server.

az postgres server private-link-resource

Manage PostgreSQL server private link resources.

az postgres server private-link-resource list

List the private link resources supported for a PostgreSQL server.

az postgres server replica

Manage read replicas.

az postgres server replica create

Create a read replica for a server.

az postgres server replica list

List all read replicas for a given server.

az postgres server replica stop

Stop replication to a read replica and make it a read/write server.

az postgres server restart

Restart a server.

az postgres server restore

Restore a server from backup.

az postgres server show

Get the details of a server.

az postgres server show-connection-string

Show the connection strings for a PostgreSQL server database.

az postgres server update

Update a server.

az postgres server vnet-rule

Manage a server's virtual network rules.

az postgres server vnet-rule create

Create a virtual network rule to allows access to a PostgreSQL server.

az postgres server vnet-rule delete

Deletes the virtual network rule with the given name.

az postgres server vnet-rule list

Gets a list of virtual network rules in a server.

az postgres server vnet-rule show

Gets a virtual network rule.

az postgres server vnet-rule update

Update a virtual network rule.

az postgres server wait

Wait for server to satisfy certain conditions.

az postgres server-arc

Manage Azure Arc enabled PostgreSQL servers.

az postgres server-arc create

Create an Azure Arc enabled PostgreSQL server.

az postgres server-arc delete

Delete an Azure Arc enabled PostgreSQL server.

az postgres server-arc endpoint

Manage Azure Arc enabled PostgreSQL server endpoints.

az postgres server-arc endpoint list

List Azure Arc enabled PostgreSQL server endpoints.

az postgres server-arc list

List Azure Arc enabled PostgreSQL server.

az postgres server-arc restore

Restore an Azure Arc enabled PostgreSQL server from backup from another server.

az postgres server-arc show

Show the details of an Azure Arc enabled PostgreSQL server.

az postgres server-arc update

Update the configuration of an Azure Arc enabled PostgreSQL server.

az postgres server-logs

Manage server logs.

az postgres server-logs download

Download log files.

az postgres server-logs list

List log files for a server.

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]
                 [--ids]
                 [--no-wait]
                 [--resource-group]
                 [--server-name]
                 [--subscription]
                 [--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-group

Delete the resource group.

--ids

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.

--no-wait

Do not wait for the long-running operation to finish.

default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--server-name -s

Name of the server.

--subscription

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

--yes -y

Do not prompt for confirmation.

default value: False

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]
                                   [--ids]
                                   [--server-name]
                                   [--subscription]

Optional Parameters

--admin-password -p

The login password of the administrator.

default value: {password}
--admin-user -u

The login username of the administrator.

default value: {login}
--database-name -d

The name of a database.

default value: {database}
--ids

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.

--server-name -s

Name of the server.

default value: {server}
--subscription

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

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}]
               [--ids]
               [--location]
               [--resource-group]
               [--server-name]
               [--sku-name]
               [--ssl-enforcement {Disabled, Enabled}]
               [--storage-size]
               [--subscription]
               [--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

--admin-password -p

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.

--admin-user -u

The login username of the administrator.

--backup-retention

The number of days a backup is retained.

--database-name -d

The name of a database to initialize.

--generate-password

Generate a password.

--geo-redundant-backup

Enable Geo-redundant or not for server backup.

accepted values: Disabled, Enabled
default value: Disabled
--ids

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.

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--server-name -s

Name of the server.

--sku-name

The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.

default value: GP_Gen5_2
--ssl-enforcement

Enable ssl enforcement or not when connect to server.

accepted values: Disabled, Enabled
default value: Enabled
--storage-size

The max storage size of the server. Unit is megabytes.

--subscription

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

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--version

Server version.

default value: 10