az postgres server
Manage Azure Database for PostgreSQL Single Server. Is scheduled to retire by March 28, 2025. You can migrate to the Azure Database for PostgreSQL flexible server.
Команды
Имя | Описание | Тип | Состояние |
---|---|---|---|
az postgres server ad-admin |
Manage a postgres server's Active Directory administrator. |
Ядро | GA |
az postgres server ad-admin create |
Create an Active Directory Administrator for PostgreSQL server. |
Ядро | GA |
az postgres server ad-admin delete |
Delete an Active Directory Administrator for PostgreSQL server. |
Ядро | GA |
az postgres server ad-admin list |
List all Active Directory Administrators for PostgreSQL server. |
Ядро | GA |
az postgres server ad-admin show |
Get Active Directory Administrator information for a PostgreSQL server. |
Ядро | GA |
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. |
Ядро | GA |
az postgres server configuration |
Manage configuration values for a server. |
Ядро | GA |
az postgres server configuration list |
List the configuration values for a server. |
Ядро | GA |
az postgres server configuration set |
Update the configuration of a server. |
Ядро | GA |
az postgres server configuration show |
Get the configuration for a server.". |
Ядро | GA |
az postgres server create |
Create a server. Azure Database for PostgreSQL Flexible Server is the next generation of the service. Please use 'az postgres flexible-server create' for new deployments. |
Ядро | GA |
az postgres server delete |
Delete a server. |
Ядро | GA |
az postgres server firewall-rule |
Manage firewall rules for a server. |
Ядро | GA |
az postgres server firewall-rule create |
Create a new firewall rule for a server. |
Ядро | GA |
az postgres server firewall-rule delete |
Delete a firewall rule. |
Ядро | GA |
az postgres server firewall-rule list |
List all firewall rules for a server. |
Ядро | GA |
az postgres server firewall-rule show |
Get the details of a firewall rule. |
Ядро | GA |
az postgres server firewall-rule update |
Update a firewall rule. |
Ядро | GA |
az postgres server georestore |
Geo-restore a server from backup. |
Ядро | GA |
az postgres server key |
Manage PostgreSQL server keys. |
Ядро | GA |
az postgres server key create |
Create server key. |
Ядро | GA |
az postgres server key delete |
Delete server key. |
Ядро | GA |
az postgres server key list |
Gets a list of Server keys. |
Ядро | GA |
az postgres server key show |
Show server key. |
Ядро | GA |
az postgres server list |
List available servers. |
Ядро | GA |
az postgres server list-skus |
List available sku's in the given region. |
Ядро | GA |
az postgres server private-endpoint-connection |
Manage PostgreSQL server private endpoint connections. |
Ядро | GA |
az postgres server private-endpoint-connection approve |
Approve the specified private endpoint connection associated with a PostgreSQL server. |
Ядро | GA |
az postgres server private-endpoint-connection delete |
Delete the specified private endpoint connection associated with a PostgreSQL server. |
Ядро | GA |
az postgres server private-endpoint-connection reject |
Reject the specified private endpoint connection associated with a PostgreSQL server. |
Ядро | GA |
az postgres server private-endpoint-connection show |
Show details of a private endpoint connection associated with a PostgreSQL server. |
Ядро | GA |
az postgres server private-link-resource |
Manage PostgreSQL server private link resources. |
Ядро | GA |
az postgres server private-link-resource list |
List the private link resources supported for a PostgreSQL server. |
Ядро | GA |
az postgres server replica |
Manage read replicas. |
Ядро | GA |
az postgres server replica create |
Create a read replica for a server. |
Ядро | GA |
az postgres server replica list |
List all read replicas for a given server. |
Ядро | GA |
az postgres server replica stop |
Stop replication to a read replica and make it a read/write server. |
Ядро | GA |
az postgres server restart |
Restart a server. |
Ядро | GA |
az postgres server restore |
Restore a server from backup. |
Ядро | GA |
az postgres server show |
Get the details of a server. |
Ядро | GA |
az postgres server show-connection-string |
Show the connection strings for a PostgreSQL server database. |
Ядро | GA |
az postgres server update |
Update a server. |
Ядро | GA |
az postgres server vnet-rule |
Manage a server's virtual network rules. |
Ядро | GA |
az postgres server vnet-rule create |
Create a virtual network rule to allows access to a PostgreSQL server. |
Ядро | GA |
az postgres server vnet-rule delete |
Deletes the virtual network rule with the given name. |
Ядро | GA |
az postgres server vnet-rule list |
Gets a list of virtual network rules in a server. |
Ядро | GA |
az postgres server vnet-rule show |
Gets a virtual network rule. |
Ядро | GA |
az postgres server vnet-rule update |
Update a virtual network rule. |
Ядро | GA |
az postgres server wait |
Wait for server to satisfy certain conditions. |
Ядро | GA |
az postgres server create
Create a server. Azure Database for PostgreSQL Flexible Server is the next generation of the service. Please use 'az postgres flexible-server create' for new deployments.
az postgres server create [--admin-password]
[--admin-user]
[--assign-identity]
[--auto-grow {Disabled, Enabled}]
[--backup-retention]
[--geo-redundant-backup {Disabled, Enabled}]
[--infrastructure-encryption {Disabled, Enabled}]
[--location]
[--minimal-tls-version {TLS1_0, TLS1_1, TLS1_2, TLSEnforcementDisabled}]
[--name]
[--public]
[--resource-group]
[--sku-name]
[--ssl-enforcement {Disabled, Enabled}]
[--storage-size]
[--tags]
[--version]
Примеры
Create a PostgreSQL server in North Europe with sku GP_Gen5_2 (General Purpose, Gen 5 hardware, 2 vCores).
az postgres server create -l northeurope -g testgroup -n testsvr -u username -p password \
--sku-name GP_Gen5_2
Create a PostgreSQL server with all paramaters set.
az postgres server create -l northeurope -g testgroup -n testsvr -u username -p password \
--sku-name B_Gen5_1 --ssl-enforcement Enabled --minimal-tls-version TLS1_0 --public-network-access Disabled \
--backup-retention 10 --geo-redundant-backup Enabled --storage-size 51200 \
--tags "key=value" --version 11
Необязательные параметры
The 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.
Administrator username for the server. Once set, it cannot be changed.
Generate and assign an Microsoft Entra Identity for this server for use with key management services like Azure KeyVault.
Enable or disable autogrow of the storage. Default value is Enabled.
The number of days a backup is retained. Range of 7 to 35 days. Default is 7 days.
Enable or disable geo-redundant backups. Default value is Disabled. Not supported in Basic pricing tier.
Add an optional second layer of encryption for data using new encryption algorithm. Default value is Disabled.
Местоположение. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Set the minimal TLS version for connections to server when SSL is enabled. Default is TLSEnforcementDisabled.
Имя сервера. Имя может содержать только строчные буквы, цифры и символ дефиса (-). Minimum 3 characters and maximum 63 characters.
Enable or disable public network access to server. When disabled, only connections made through Private Links can reach this server. Allowed values are : Enabled
, Disabled
, all
, 0.0.0.0
, <SingleIP>
, <StartIP-DestinationIP>
. По умолчанию — Enabled
.
Имя группы ресурсов. Группу по умолчанию можно настроить с помощью az configure --defaults group=<name>
.
The name of the sku. Follows the convention {pricing tier}{compute generation}{vCores} in shorthand. Examples: B_Gen5_1, GP_Gen5_4, MO_Gen5_16.
Enable or disable ssl enforcement for connections to server. Default is Enabled.
The storage capacity of the server (unit is megabytes). Minimum 5120 and increases in 1024 increments. Default is 5120.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Server major version. https://learn.microsoft.com/en-us/azure/postgresql/single-server/concepts-supported-versions.
Глобальные параметры
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Отображать только ошибки, не показывая предупреждения.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Имя или идентификатор подписки. Подписку по умолчанию можно настроить с помощью az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az postgres server delete
Delete a server.
az postgres server delete [--ids]
[--name]
[--resource-group]
[--subscription]
[--yes]
Примеры
Delete a server.
az postgres server delete -g testgroup -n testsvr
Необязательные параметры
Один или несколько идентификаторов ресурсов (разделенных пробелами). Это должен быть полный идентификатор ресурса, содержащий все сведения о аргументах Resource Id. You should provide either --ids or other 'Resource Id' arguments.
Имя сервера. Имя может содержать только строчные буквы, цифры и символ дефиса (-). Minimum 3 characters and maximum 63 characters.
Имя группы ресурсов. Группу по умолчанию можно настроить с помощью az configure --defaults group=<name>
.
Имя или идентификатор подписки. Подписку по умолчанию можно настроить с помощью az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Глобальные параметры
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Отображать только ошибки, не показывая предупреждения.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Имя или идентификатор подписки. Подписку по умолчанию можно настроить с помощью az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az postgres server georestore
Geo-restore a server from backup.
az postgres server georestore --location
--source-server
[--backup-retention]
[--geo-redundant-backup]
[--ids]
[--name]
[--no-wait]
[--resource-group]
[--sku-name]
[--subscription]
Примеры
Geo-restore 'testsvr' into a new server 'testsvrnew' located in West US 2.
az postgres server georestore -g testgroup -n testsvrnew --source-server testsvr -l westus2
Geo-restore 'testsvr' into a new server 'testsvrnew' located in West US 2 with sku GP_Gen5_2.
az postgres server georestore -g testgroup -n testsvrnew --source-server testsvr -l westus2 --sku-name GP_Gen5_2
Geo-restore 'testsvr2' into a new server 'testsvrnew', where 'testsvrnew' is in a different resource group from 'testsvr2'.
az postgres server georestore -g testgroup -n testsvrnew \
-s "/subscriptions/${SubID}/resourceGroups/${ResourceGroup}/providers/Microsoft.DBforPostgreSQL/servers/testsvr2" \
-l westus2
Обязательные параметры
Местоположение. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
The name or ID of the source server to restore from.
Необязательные параметры
The number of days a backup is retained. Range of 7 to 35 days. Default is 7 days.
Enable or disable geo-redundant backups. Default value is Disabled. Not supported in Basic pricing tier.
Один или несколько идентификаторов ресурсов (разделенных пробелами). Это должен быть полный идентификатор ресурса, содержащий все сведения о аргументах Resource Id. You should provide either --ids or other 'Resource Id' arguments.
Имя сервера. Имя может содержать только строчные буквы, цифры и символ дефиса (-). Minimum 3 characters and maximum 63 characters.
Do not wait for the long-running operation to finish.
Имя группы ресурсов. Группу по умолчанию можно настроить с помощью az configure --defaults group=<name>
.
The name of the sku. Defaults to sku of the source server. Follows the convention {pricing tier}{compute generation}{vCores} in shorthand. Examples: B_Gen5_1, GP_Gen5_4, MO_Gen5_16.
Имя или идентификатор подписки. Подписку по умолчанию можно настроить с помощью az account set -s NAME_OR_ID
.
Глобальные параметры
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Отображать только ошибки, не показывая предупреждения.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Имя или идентификатор подписки. Подписку по умолчанию можно настроить с помощью az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az postgres server list
List available servers.
az postgres server list [--resource-group]
Примеры
List all PostgreSQL servers in a subscription.
az postgres server list
List all PostgreSQL servers in a resource group.
az postgres server list -g testgroup
Необязательные параметры
Имя группы ресурсов. Группу по умолчанию можно настроить с помощью az configure --defaults group=<name>
.
Глобальные параметры
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Отображать только ошибки, не показывая предупреждения.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Имя или идентификатор подписки. Подписку по умолчанию можно настроить с помощью az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az postgres server list-skus
List available sku's in the given region.
az postgres server list-skus --location
Примеры
List available sku's in the given region.
az postgres server list-skus -l eastus
Обязательные параметры
The name of the location. Обязательное.
Глобальные параметры
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Отображать только ошибки, не показывая предупреждения.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Имя или идентификатор подписки. Подписку по умолчанию можно настроить с помощью az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az postgres server restart
Restart a server.
az postgres server restart [--ids]
[--name]
[--resource-group]
[--subscription]
Примеры
Restart a server.
az postgres server restart -g testgroup -n testsvr
Необязательные параметры
Один или несколько идентификаторов ресурсов (разделенных пробелами). Это должен быть полный идентификатор ресурса, содержащий все сведения о аргументах Resource Id. You should provide either --ids or other 'Resource Id' arguments.
Имя сервера. Имя может содержать только строчные буквы, цифры и символ дефиса (-). Minimum 3 characters and maximum 63 characters.
Имя группы ресурсов. Группу по умолчанию можно настроить с помощью az configure --defaults group=<name>
.
Имя или идентификатор подписки. Подписку по умолчанию можно настроить с помощью az account set -s NAME_OR_ID
.
Глобальные параметры
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Отображать только ошибки, не показывая предупреждения.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Имя или идентификатор подписки. Подписку по умолчанию можно настроить с помощью az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az postgres server restore
Restore a server from backup.
az postgres server restore --pitr-time
--source-server
[--ids]
[--name]
[--no-wait]
[--resource-group]
[--subscription]
Примеры
Restore 'testsvr' to a specific point-in-time as a new server 'testsvrnew'.
az postgres server restore -g testgroup -n testsvrnew --source-server testsvr --restore-point-in-time "2017-06-15T13:10:00Z"
Restore 'testsvr2' to 'testsvrnew', where 'testsvrnew' is in a different resource group from 'testsvr2'.
az postgres server restore -g testgroup -n testsvrnew \
-s "/subscriptions/${SubID}/resourceGroups/${ResourceGroup}/providers/Microsoft.DBforPostgreSQL/servers/testsvr2" \
--restore-point-in-time "2017-06-15T13:10:00Z"
Обязательные параметры
The point in time in UTC to restore from (ISO8601 format), e.g., 2017-04-26T02:10:00+08:00.
The name or resource ID of the source server to restore from.
Необязательные параметры
Один или несколько идентификаторов ресурсов (разделенных пробелами). Это должен быть полный идентификатор ресурса, содержащий все сведения о аргументах Resource Id. You should provide either --ids or other 'Resource Id' arguments.
Имя сервера. Имя может содержать только строчные буквы, цифры и символ дефиса (-). Minimum 3 characters and maximum 63 characters.
Do not wait for the long-running operation to finish.
Имя группы ресурсов. Группу по умолчанию можно настроить с помощью az configure --defaults group=<name>
.
Имя или идентификатор подписки. Подписку по умолчанию можно настроить с помощью az account set -s NAME_OR_ID
.
Глобальные параметры
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Отображать только ошибки, не показывая предупреждения.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Имя или идентификатор подписки. Подписку по умолчанию можно настроить с помощью az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az postgres server show
Get the details of a server.
az postgres server show [--ids]
[--name]
[--resource-group]
[--subscription]
Примеры
Get the details of a server. (autogenerated)
az postgres server show --name MyServer --resource-group MyResourceGroup
Необязательные параметры
Один или несколько идентификаторов ресурсов (разделенных пробелами). Это должен быть полный идентификатор ресурса, содержащий все сведения о аргументах Resource Id. You should provide either --ids or other 'Resource Id' arguments.
Имя сервера. Имя может содержать только строчные буквы, цифры и символ дефиса (-). Minimum 3 characters and maximum 63 characters.
Имя группы ресурсов. Группу по умолчанию можно настроить с помощью az configure --defaults group=<name>
.
Имя или идентификатор подписки. Подписку по умолчанию можно настроить с помощью az account set -s NAME_OR_ID
.
Глобальные параметры
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Отображать только ошибки, не показывая предупреждения.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Имя или идентификатор подписки. Подписку по умолчанию можно настроить с помощью az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az postgres server show-connection-string
Show the connection strings for a PostgreSQL server database.
az postgres server show-connection-string [--admin-password]
[--admin-user]
[--database-name]
[--ids]
[--server-name]
[--subscription]
Примеры
Show connection strings for cmd and programming languages.
az postgres server show-connection-string -s testServer -u username -p password -d databasename
Необязательные параметры
The login password of the administrator.
The login username of the administrator.
The name of a database.
Один или несколько идентификаторов ресурсов (разделенных пробелами). Это должен быть полный идентификатор ресурса, содержащий все сведения о аргументах Resource Id. You should provide either --ids or other 'Resource Id' arguments.
Имя сервера.
Имя или идентификатор подписки. Подписку по умолчанию можно настроить с помощью az account set -s NAME_OR_ID
.
Глобальные параметры
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Отображать только ошибки, не показывая предупреждения.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Имя или идентификатор подписки. Подписку по умолчанию можно настроить с помощью az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az postgres server update
Update a server.
az postgres server update [--add]
[--admin-password]
[--assign-identity]
[--auto-grow {Disabled, Enabled}]
[--backup-retention]
[--force-string]
[--ids]
[--minimal-tls-version {TLS1_0, TLS1_1, TLS1_2, TLSEnforcementDisabled}]
[--name]
[--public]
[--remove]
[--resource-group]
[--set]
[--sku-name]
[--ssl-enforcement {Disabled, Enabled}]
[--storage-size]
[--subscription]
[--tags]
Примеры
Update a server's sku.
az postgres server update -g testgroup -n testsvrnew --sku-name GP_Gen5_4
Update a server's tags.
az postgres server update -g testgroup -n testsvrnew --tags "k1=v1" "k2=v2"
Update a server. (autogenerated)
az postgres server update --name testsvrnew --resource-group testgroup --ssl-enforcement Enabled --minimal-tls-version TLS1_0
Необязательные параметры
Add an object to a list of objects by specifying a path and key value pairs. Пример: --add property.listProperty <key=value, string or JSON string>
.
The 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.
Generate and assign an Microsoft Entra Identity for this server for use with key management services like Azure KeyVault.
Enable or disable autogrow of the storage. Default value is Enabled.
The number of days a backup is retained. Range of 7 to 35 days. Default is 7 days.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
Один или несколько идентификаторов ресурсов (разделенных пробелами). Это должен быть полный идентификатор ресурса, содержащий все сведения о аргументах Resource Id. You should provide either --ids or other 'Resource Id' arguments.
Set the minimal TLS version for connections to server when SSL is enabled. Default is TLSEnforcementDisabled.
Имя сервера. Имя может содержать только строчные буквы, цифры и символ дефиса (-). Minimum 3 characters and maximum 63 characters.
Enable or disable public network access to server. When disabled, only connections made through Private Links can reach this server. Allowed values are : Enabled
, Disabled
, all
, 0.0.0.0
, <SingleIP>
, <StartIP-DestinationIP>
. По умолчанию — Enabled
.
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Имя группы ресурсов. Группу по умолчанию можно настроить с помощью az configure --defaults group=<name>
.
Update an object by specifying a property path and value to set. Пример: --set property1.property2=<value>
.
The name of the sku. Follows the convention {pricing tier}{compute generation}{vCores} in shorthand. Examples: B_Gen5_1, GP_Gen5_4, MO_Gen5_16.
Enable or disable ssl enforcement for connections to server. Default is Enabled.
The storage capacity of the server (unit is megabytes). Minimum 5120 and increases in 1024 increments. Default is 5120.
Имя или идентификатор подписки. Подписку по умолчанию можно настроить с помощью az account set -s NAME_OR_ID
.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Глобальные параметры
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Отображать только ошибки, не показывая предупреждения.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Имя или идентификатор подписки. Подписку по умолчанию можно настроить с помощью az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az postgres server wait
Wait for server to satisfy certain conditions.
az postgres server wait [--custom]
[--exists]
[--ids]
[--interval]
[--name]
[--resource-group]
[--subscription]
[--timeout]
Необязательные параметры
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Wait until the resource exists.
Один или несколько идентификаторов ресурсов (разделенных пробелами). Это должен быть полный идентификатор ресурса, содержащий все сведения о аргументах Resource Id. You should provide either --ids or other 'Resource Id' arguments.
Polling interval in seconds.
Имя сервера. Имя может содержать только строчные буквы, цифры и символ дефиса (-). Minimum 3 characters and maximum 63 characters.
Имя группы ресурсов. Группу по умолчанию можно настроить с помощью az configure --defaults group=<name>
.
Имя или идентификатор подписки. Подписку по умолчанию можно настроить с помощью az account set -s NAME_OR_ID
.
Maximum wait in seconds.
Глобальные параметры
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Отображать только ошибки, не показывая предупреждения.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Имя или идентификатор подписки. Подписку по умолчанию можно настроить с помощью az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.