Note
This command group has commands that are defined in both Azure CLI and at least one extension. Install each extension to benefit from its extended capabilities. Learn more about extensions.
Manage Azure Database for PostgreSQL Flexible Servers.
Commands az postgres flexible-server connectConnect to a flexible server.
az postgres flexible-server connect --admin-user
--name
[--admin-password]
[--database-name]
[--interactive]
[--querytext]
Required Parameters
The login username of the administrator.
Property Value Parameter group: Authentication ArgumentsName of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Optional ParametersThe following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The login password of the administrator.
Property Value Parameter group: Authentication ArgumentsThe name of a database.
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 ParametersIncrease logging verbosity to show all debug logs.
Property Value Default value: FalseShow this help message and exit.
Only show errors, suppressing warnings.
Property Value Default value: FalseOutput format.
Property Value Default value: json Accepted values: json, jsonc, none, table, tsv, yaml, yamlcJMESPath 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.
Property Value Default value: False az postgres flexible-server createCreate a PostgreSQL flexible server.
az postgres flexible-server create [--address-prefixes]
[--admin-display-name]
[--admin-object-id]
[--admin-password]
[--admin-type {Group, ServicePrincipal, Unknown, User}]
[--admin-user]
[--backup-identity]
[--backup-key]
[--backup-retention]
[--cluster-option {ElasticCluster, Server}]
[--create-default-database {Disabled, Enabled}]
[--database-name]
[--geo-redundant-backup {Disabled, Enabled}]
[--high-availability {Disabled, SameZone, ZoneRedundant}]
[--identity]
[--iops]
[--key]
[--location]
[--microsoft-entra-auth {Disabled, Enabled}]
[--name]
[--node-count]
[--password-auth {Disabled, Enabled}]
[--performance-tier]
[--private-dns-zone]
[--public-access]
[--resource-group]
[--sku-name]
[--standby-zone]
[--storage-auto-grow {Disabled, Enabled}]
[--storage-size]
[--storage-type {PremiumV2_LRS, Premium_LRS}]
[--subnet]
[--subnet-prefixes]
[--tags]
[--throughput]
[--tier]
[--version]
[--vnet]
[--yes]
[--zone]
Examples
Create a PostgreSQL flexible server with custom parameters
az postgres flexible-server create --location northeurope --resource-group testGroup \
--name testserver --admin-user username --admin-password password \
--sku-name Standard_D2s_v3 --tier GeneralPurpose --public-access 153.24.26.117 --storage-size 128 \
--tags "key=value" --version 17 --high-availability ZoneRedundant --zone 1 \
--standby-zone 3
Create a PostgreSQL flexible server using Premium SSD v2 Disks.
# set storage type to "PremiumV2_LRS" and provide values for Storage size (in GiB), IOPS (operations/sec), and Throughput (MB/sec).
az postgres flexible-server create --location northeurope --resource-group testGroup \
--name testserver --admin-user username --admin-password password \
--sku-name Standard_B1ms --tier Burstable --storage-type PremiumV2_LRS --storage-size 128 --iops 3000 --throughput 125
Create a PostgreSQL flexible server with default parameters and public access enabled by default. Resource group, server name, username, password, and default database will be created by CLI
az postgres flexible-server create
Create a PostgreSQL flexible server with public access and add the range of IP address to have access to this server. The --public-access parameter can be 'Disabled', 'Enabled', 'All', 'None', <startIpAddress>, or <startIpAddress>-<endIpAddress>
az postgres flexible-server create --resource-group testGroup --name testserver --public-access 125.23.54.31-125.23.54.35
Create a PostgreSQL flexible server with private access. If provided virtual network and subnet do not exists, virtual network and subnet with the specified address prefixes will be created.
az postgres flexible-server create --resource-group testGroup --name testserver --vnet myVnet --subnet mySubnet --address-prefixes 10.0.0.0/16 --subnet-prefixes 10.0.0.0/24
Create a PostgreSQL flexible server using a new subnet resource ID and new private DNS zone resource ID. The subnet and DNS zone can be created in different subscription or resource group.
az postgres flexible-server create \
--resource-group testGroup --name testserver \
--subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNetName}/subnets/{SubnetName} \
--private-dns-zone /subscriptions/{SubID}/resourceGroups/{resourceGroup}/providers/Microsoft.Network/privateDnsZones/testPostgreSQLFlexibleDnsZone.private.postgres.database.azure.com \
--address-prefixes 172.0.0.0/16 --subnet-prefixes 172.0.0.0/24
Create a PostgreSQL flexible server using existing network resources in the same resource group. The provided subnet should not have any other resource deployed in it and this subnet will be delegated to Microsoft.DBforPostgreSQL/flexibleServers, if not already delegated. The private DNS zone will be linked to the virtual network if not already linked.
# create vnet
az network vnet create --resource-group testGroup --name testVnet --location testLocation --address-prefixes 172.0.0.0/16
# create subnet
az network vnet subnet create --resource-group testGroup --vnet-name testVnet --address-prefixes 172.0.0.0/24 --name testSubnet
# create private dns zone
az network private-dns zone create -g testGroup -n testDNS.private.postgres.database.azure.com
az postgres flexible-server create --resource-group testGroup \
--name testserver --location testLocation \
--subnet /subscriptions/{SubId}/resourceGroups/{testGroup}/providers/Microsoft.Network/virtualNetworks/tesetVnet/subnets/testSubnet \
--private-dns-zone /subscriptions/{SubId}/resourceGroups/{testGroup}/providers/Microsoft.Network/privateDnsZones/testDNS.postgres.database.azure.com\
az postgres flexible-server create --resource-group testGroup --name testserver \
--vnet testVnet --subnet testSubnet --location testLocation \
--private-dns-zone /subscriptions/{SubId}/resourceGroups/{testGroup}/providers/Microsoft.Network/privateDnsZones/testDNS.postgres.database.azure.com
Create a PostgreSQL flexible server using existing network resources in the different resource group / subscription.
az postgres flexible-server create --resource-group testGroup \
--name testserver --location testLocation \
--subnet /subscriptions/{SubId2}/resourceGroups/{testGroup2}/providers/Microsoft.Network/virtualNetworks/tesetVnet/subnets/testSubnet \
--private-dns-zone /subscriptions/{SubId2}/resourceGroups/{testGroup2}/providers/Microsoft.Network/privateDnsZones/testDNS.postgres.database.azure.com
Create a PostgreSQL flexible server with data encryption.
# create keyvault
az keyvault create -g testGroup -n testVault --location testLocation \
--enable-purge-protection true
# create key in keyvault and save its key identifier
keyIdentifier=$(az keyvault key create --name testKey -p software \
--vault-name testVault --query key.kid -o tsv)
# create identity and save its principalId
identityPrincipalId=$(az identity create -g testGroup --name testIdentity \
--location testLocation --query principalId -o tsv)
# add testIdentity as an access policy with key permissions 'Wrap Key', 'Unwrap Key', 'Get' and 'List' inside testVault
az keyvault set-policy -g testGroup -n testVault --object-id $identityPrincipalId \
--key-permissions wrapKey unwrapKey get list
# create flexible server with data encryption enabled
az postgres flexible-server create -g testGroup -n testServer --location testLocation \
--key $keyIdentifier --identity testIdentity
Create a PostgreSQL flexible server with Microsoft Entra auth as well as password auth.
# create flexible server with aad auth and password auth enabled
az postgres flexible-server create -g testGroup -n testServer --location testLocation \
--microsoft-entra-auth Enabled
Create a PostgreSQL flexible server with Microsoft Entra auth only and primary administrator specified.
# create flexible server with aad only auth and password auth disabled with primary administrator specified
az postgres flexible-server create -g testGroup -n testServer --location testLocation \
--microsoft-entra-auth Enabled --password-auth Disabled \
--admin-object-id 00000000-0000-0000-0000-000000000000 --admin-display-name john@contoso.com --admin-type User
Create a PostgreSQL flexible server with public access, geo-redundant backup enabled and add the range of IP address to have access to this server. The --public-access parameter can be 'All', 'None', <startIpAddress>, or <startIpAddress>-<endIpAddress>
az postgres flexible-server create --resource-group testGroup --name testserver --geo-redundant-backup Enabled --public-access 125.23.54.31-125.23.54.35
Create a PostgreSQL flexible server with data encryption for geo-rundundant backup enabled server.
# create keyvault
az keyvault create -g testGroup -n testVault --location testLocation \
--enable-purge-protection true
# create key in keyvault and save its key identifier
keyIdentifier=$(az keyvault key create --name testKey -p software \
--vault-name testVault --query key.kid -o tsv)
# create identity and save its principalId
identityPrincipalId=$(az identity create -g testGroup --name testIdentity \
--location testLocation --query principalId -o tsv)
# add testIdentity as an access policy with key permissions 'Wrap Key', 'Unwrap Key', 'Get' and 'List' inside testVault
az keyvault set-policy -g testGroup -n testVault --object-id $identityPrincipalId \
--key-permissions wrapKey unwrapKey get list
# create keyvault in geo-paired region
az keyvault create -g testGroup -n geoVault --location geoPairedLocation \
--enable-purge-protection true
# create key in keyvault and save its key identifier
geoKeyIdentifier=$(az keyvault key create --name geoKey -p software \
--vault-name geoVault --query key.kid -o tsv)
# create identity in geo-raired location and save its principalId
geoIdentityPrincipalId=$(az identity create -g testGroup --name geoIdentity \
--location geoPairedLocation --query principalId -o tsv)
# add testIdentity as an access policy with key permissions 'Wrap Key', 'Unwrap Key', 'Get' and 'List' inside testVault
az keyvault set-policy -g testGroup -n geoVault --object-id $geoIdentityPrincipalId \
--key-permissions wrapKey unwrapKey get list
# create flexible server with data encryption enabled for geo-backup Enabled server
az postgres flexible-server create -g testGroup -n testServer --location testLocation --geo-redundant-backup Enabled \
--key $keyIdentifier --identity testIdentity --backup-key $geoKeyIdentifier --backup-identity geoIdentity
Create flexible server with custom storage performance tier. Accepted values "P4", "P6", "P10", "P15", "P20", "P30", \ "P40", "P50", "P60", "P70", "P80". Actual allowed values depend on the --storage-size selection for flexible server creation. \ Default value for storage performance tier depends on the --storage-size selected for flexible server creation.
az postgres flexible-server create -g testGroup -n testServer --location testLocation --performance-tier P15
Create flexible server with storage auto-grow as Enabled. Accepted values Enabled / Disabled. Default value for storage auto-grow is "Disabled".
az postgres flexible-server create -g testGroup -n testServer --location testLocation --storage-auto-grow Enabled
Create elastic cluster with node count of 5. Default node count is 2 when --cluster-option is "ElasticCluster".
az postgres flexible-server create -g testGroup -n testCluster --location testLocation --cluster-option ElasticCluster --node-count 5
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The IP address prefix to use when creating a new virtual network in CIDR format. Default value is 10.0.0.0/16.
Display name of the Microsoft Entra administrator user or group.
The unique ID of the Microsoft Entra administrator.
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.
Property Value Parameter group: Authentication ArgumentsType of the Microsoft Entra administrator.
Property Value Accepted values: Group, ServicePrincipal, Unknown, UserAdministrator username for the server. Once set, it cannot be changed.
Property Value Parameter group: Authentication Arguments Default value: eatablejay4The name or resource ID of the geo backup user identity for data encryption. The identity needs to be in the same region as the backup region.
The resource ID of the geo backup keyvault key for data encryption. The key needs to be in the same region as the backup region.
The number of days a backup is retained. Range of 7 to 35 days. Default is 7 days.
Property Value Default value: 7Cluster option for the server. Servers are for workloads that can fit on one node. Elastic clusters provides schema- and row-based sharding on a database. Default value is Server.
Property Value Default value: Server Accepted values: ElasticCluster, Server--create-default-database -c
Enable or disable the creation of default database flexibleserverdb. Default value is Disabled.
Property Value Default value: Disabled Accepted values: Disabled, EnabledThe name of the database to be created when provisioning the database server. Database name must begin with a letter (a-z) or underscore (_). Subsequent characters in a name can be letters, digits (0-9), hyphens (-), or underscores. Database name length must be less than 64 characters.
Whether or not geo redundant backup is enabled.
Property Value Default value: Disabled Accepted values: Disabled, EnabledEnable (ZoneRedundant or SameZone) or disable high availability feature.
Property Value Default value: Disabled Accepted values: Disabled, SameZone, ZoneRedundantThe name or resource ID of the user assigned identity for data encryption.
Value of IOPS in (operations/sec) to be allocated for this server. This value can only be updated if flexible server is using Premium SSD v2 Disks.
The resource ID of the primary keyvault key for data encryption.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Whether Microsoft Entra authentication is enabled.
Property Value Default value: Disabled Accepted values: Disabled, EnabledName of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
The number of nodes for elastic cluster. Range of 1 to 10. Default is 2 nodes.
Whether password authentication is enabled.
Property Value Default value: Enabled Accepted values: Disabled, EnabledPerformance tier of the server.
This parameter only applies for a server with private access. The name or id of new or existing private dns zone. You can use the private dns zone from same resource group, different resource group, or different subscription. If you want to use a zone from different resource group or subscription, please provide resource Id. CLI creates a new private dns zone within the same resource group as virtual network if not provided by users.
Determines the public access. Enter single or range of IP addresses to be included in the allowed list of IPs. IP address ranges must be dash-separated and not contain any spaces. Specifying 0.0.0.0 allows public access from any resources deployed within Azure to access your server. Setting it to "None" sets the server in public access mode but does not create a firewall rule. Acceptable values are 'Disabled', 'Enabled', 'All', 'None','{startIP}' and '{startIP}-{destinationIP}' where startIP and destinationIP ranges from 0.0.0.0 to 255.255.255.255.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name of the compute SKU. Follows the convention Standard_{VM name}. Examples: Standard_B1ms.
The availability zone information of the standby server when high availability is enabled.
Enable or disable autogrow of the storage. Default value is Enabled.
Property Value Default value: Disabled Accepted values: Disabled, EnabledThe storage capacity of the server. Minimum is 32 GiB and max is 16 TiB.
Property Value Default value: 128Storage type for the server. Allowed values are Premium_LRS and PremiumV2_LRS. Default value is Premium_LRS.Must set iops and throughput if using PremiumV2_LRS.
Property Value Accepted values: PremiumV2_LRS, Premium_LRSName or resource ID of a new or existing subnet. If you want to use a subnet from different resource group or subscription, please provide resource ID instead of name. Please note that the subnet will be delegated to flexibleServers. After delegation, this subnet cannot be used for any other type of Azure resources.
The subnet IP address prefix to use when creating a new subnet in CIDR format. Default value isâ¯10.0.0.0/24.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Storage throughput in (MB/sec) for the server. This value can only be updated if flexible server is using Premium SSD v2 Disks.
Compute tier of the server. Accepted values: Burstable, GeneralPurpose, MemoryOptimized.
Property Value Default value: GeneralPurposeServer major version.
Property Value Default value: 17Name or ID of a new or existing virtual network. If you want to use a vnet from different resource group or subscription, please provide a resource ID. The name must be between 2 to 64 characters. The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens.
Do not prompt for confirmation.
Property Value Default value: FalseAvailability zone into which to provision the resource.
Global ParametersIncrease logging verbosity to show all debug logs.
Property Value Default value: FalseShow this help message and exit.
Only show errors, suppressing warnings.
Property Value Default value: FalseOutput format.
Property Value Default value: json Accepted values: json, jsonc, none, table, tsv, yaml, yamlcJMESPath 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.
Property Value Default value: False az postgres flexible-server deleteDelete a flexible server.
az postgres flexible-server delete [--ids]
[--name]
[--resource-group]
[--subscription]
[--yes]
Examples
Delete a flexible server.
az postgres flexible-server delete --resource-group testGroup --name testserver
Delete a flexible server without prompt or confirmation.
az postgres flexible-server delete --resource-group testGroup --name testserver --yes
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property Value Parameter group: Resource Id ArgumentsName of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Property Value Parameter group: Resource Id ArgumentsName of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Property Value Default value: False Global ParametersIncrease logging verbosity to show all debug logs.
Property Value Default value: FalseShow this help message and exit.
Only show errors, suppressing warnings.
Property Value Default value: FalseOutput format.
Property Value Default value: json Accepted values: json, jsonc, none, table, tsv, yaml, yamlcJMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property Value Default value: False az postgres flexible-server executeConnect to a flexible server.
az postgres flexible-server execute --admin-password
--admin-user
--name
[--database-name]
[--file-path]
[--querytext]
Required Parameters
The login password of the administrator.
Property Value Parameter group: Authentication ArgumentsThe login username of the administrator.
Property Value Parameter group: Authentication ArgumentsName of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Optional ParametersThe following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The name of a database.
The path of the sql file to execute.
A query to run against the flexible server.
Global ParametersIncrease logging verbosity to show all debug logs.
Property Value Default value: FalseShow this help message and exit.
Only show errors, suppressing warnings.
Property Value Default value: FalseOutput format.
Property Value Default value: json Accepted values: json, jsonc, none, table, tsv, yaml, yamlcJMESPath 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.
Property Value Default value: False az postgres flexible-server geo-restoreGeo-restore a flexible server from backup.
az postgres flexible-server geo-restore --location
--source-server
[--address-prefixes]
[--backup-identity]
[--backup-key]
[--geo-redundant-backup {Disabled, Enabled}]
[--identity]
[--ids]
[--key]
[--name]
[--no-wait]
[--private-dns-zone]
[--resource-group]
[--restore-time]
[--subnet]
[--subnet-prefixes]
[--subscription]
[--vnet]
[--yes]
[--zone]
Examples
Geo-restore public access server 'testserver' to a new server 'testserverNew' in location 'newLocation' with public access.
az postgres flexible-server geo-restore --resource-group testGroup --name testserverNew --source-server testserver --location newLocation
Geo-restore private access server 'testserver' as a new server 'testserverNew' with new subnet. New vnet, subnet, and private dns zone for the restored server will be provisioned. Please refer to 'flexible-server create' command for more private access scenarios.
az postgres flexible-server geo-restore --resource-group testGroup --name testserverNew \
--source-server testserver --vnet newVnet --subnet newSubnet \
--address-prefixes 172.0.0.0/16 --subnet-prefixes 172.0.0.0/24 \
--private-dns-zone testDNS.postgres.database.azure.com --location newLocation
Geo-restore 'testserver' to current point-in-time as a new server 'testserverNew' in a different subscription / resource group. \ Here --resource-group is for the target server's resource group, and --source-server must be passed as resource ID. \ This resource ID can be in a subscription different than the subscription used for az account set.
az postgres flexible-server geo-restore --resource-group testGroup --name testserverNew --location newLocation \
--source-server /subscriptions/{sourceSubscriptionId}/resourceGroups/{sourceResourceGroup}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{sourceServerName}
Required Parameters
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
The name or resource ID of the source server to restore from.
Optional ParametersThe following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The IP address prefix to use when creating a new virtual network in CIDR format. Default value is 10.0.0.0/16.
The name or resource ID of the geo backup user identity for data encryption. The identity needs to be in the same region as the backup region.
The resource ID of the geo backup keyvault key for data encryption. The key needs to be in the same region as the backup region.
Whether or not geo redundant backup is enabled.
Property Value Default value: Disabled Accepted values: Disabled, EnabledThe name or resource ID of the user assigned identity for data encryption.
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.
Property Value Parameter group: Resource Id ArgumentsThe resource ID of the primary keyvault key for data encryption.
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Property Value Parameter group: Resource Id ArgumentsDo not wait for the long-running operation to finish.
Property Value Default value: FalseThis parameter only applies for a server with private access. The name or id of new or existing private dns zone. You can use the private dns zone from same resource group, different resource group, or different subscription. If you want to use a zone from different resource group or subscription, please provide resource Id. CLI creates a new private dns zone within the same resource group as virtual network if not provided by users.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The point in time in UTC to restore from (ISO8601 format), e.g., 2017-04-26T02:10:00+00:00The default value is set to current time.
Property Value Default value: 2025-08-14T11:10:02+00:00Name or resource ID of a new or existing subnet. If you want to use a subnet from different resource group or subscription, please provide resource ID instead of name. Please note that the subnet will be delegated to flexibleServers. After delegation, this subnet cannot be used for any other type of Azure resources.
The subnet IP address prefix to use when creating a new subnet in CIDR format. Default value isâ¯10.0.0.0/24.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Name or ID of a new or existing virtual network. If you want to use a vnet from different resource group or subscription, please provide a resource ID. The name must be between 2 to 64 characters. The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens.
Do not prompt for confirmation.
Property Value Default value: FalseAvailability zone into which to provision the resource.
Global ParametersIncrease logging verbosity to show all debug logs.
Property Value Default value: FalseShow this help message and exit.
Only show errors, suppressing warnings.
Property Value Default value: FalseOutput format.
Property Value Default value: json Accepted values: json, jsonc, none, table, tsv, yaml, yamlcJMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property Value Default value: False az postgres flexible-server listList available flexible servers.
az postgres flexible-server list [--resource-group]
[--show-cluster]
Examples
List all PostgreSQL flexible servers in a subscription.
az postgres flexible-server list
List all PostgreSQL flexible servers in a resource group.
az postgres flexible-server list --resource-group testGroup
List all PostgreSQL flexible servers in a resource group in table format.
az postgres flexible-server list --resource-group testGroup --output table
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Only show elastic clusters.
Global ParametersIncrease logging verbosity to show all debug logs.
Property Value Default value: FalseShow this help message and exit.
Only show errors, suppressing warnings.
Property Value Default value: FalseOutput format.
Property Value Default value: json Accepted values: json, jsonc, none, table, tsv, yaml, yamlcJMESPath 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.
Property Value Default value: False az postgres flexible-server list-skusLists available sku's in the given region.
az postgres flexible-server list-skus --location
Required Parameters
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Increase logging verbosity to show all debug logs.
Property Value Default value: FalseShow this help message and exit.
Only show errors, suppressing warnings.
Property Value Default value: FalseOutput format.
Property Value Default value: json Accepted values: json, jsonc, none, table, tsv, yaml, yamlcJMESPath 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.
Property Value Default value: False az postgres flexible-server restartRestart a flexible server.
az postgres flexible-server restart [--failover]
[--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Restart a flexible server.
az postgres flexible-server restart --resource-group testGroup --name testserver
Restart a server with planned failover
az postgres flexible-server restart --resource-group testGroup --name testserver --failover Planned
Restart a server with forced failover
az postgres flexible-server restart --resource-group testGroup --name testserver --failover Forced
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Forced or planned failover for server restart operation. Allowed values: Forced, Planned.
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.
Property Value Parameter group: Resource Id ArgumentsName of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Property Value Parameter group: Resource Id ArgumentsName of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Property Value Default value: FalseShow this help message and exit.
Only show errors, suppressing warnings.
Property Value Default value: FalseOutput format.
Property Value Default value: json Accepted values: json, jsonc, none, table, tsv, yaml, yamlcJMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property Value Default value: False az postgres flexible-server restoreRestore a flexible server from backup.
az postgres flexible-server restore --source-server
[--address-prefixes]
[--backup-identity]
[--backup-key]
[--geo-redundant-backup {Disabled, Enabled}]
[--identity]
[--ids]
[--key]
[--name]
[--no-wait]
[--private-dns-zone]
[--resource-group]
[--restore-time]
[--storage-type {PremiumV2_LRS}]
[--subnet]
[--subnet-prefixes]
[--subscription]
[--vnet]
[--yes]
[--zone]
Examples
Restore 'testserver' to a specific point-in-time as a new server 'testserverNew'.
az postgres flexible-server restore --resource-group testGroup --name testserverNew --source-server testserver --restore-time "2017-06-15T13:10:00Z"
Restore 'testserver' to current point-in-time as a new server 'testserverNew'.
az postgres flexible-server restore --resource-group testGroup --name testserverNew --source-server testserver
Restore 'testserver' to current point-in-time as a new server 'testserverNew' in a different resource group. \ Here --resource-group is for the target server's resource group, and --source-server must be passed as resource ID.
az postgres flexible-server restore --resource-group testGroup --name testserverNew \
--source-server /subscriptions/{testSubscription}/resourceGroups/{sourceResourceGroup}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{sourceServerName}
Restore 'testserver' to current point-in-time as a new server 'testserverNew' in a different subscription. \ Here --resource-group is for the target server's resource group, and --source-server must be passed as resource ID. \ This resource ID can be in a subscription different than the subscription used for az account set.
az postgres flexible-server restore --resource-group testGroup --name testserverNew \
--source-server /subscriptions/{sourceSubscriptionId}/resourceGroups/{sourceResourceGroup}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{sourceServerName}
Restore 'testserver' to current point-in-time as a new server 'testserverNew' using Premium SSD v2 Disks by setting storage type to "PremiumV2_LRS"
az postgres flexible-server restore --resource-group testGroup --name testserverNew --source-server testserver --storage-type PremiumV2_LRS
Required Parameters
The name or resource ID of the source server to restore from.
Optional ParametersThe following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The IP address prefix to use when creating a new virtual network in CIDR format. Default value is 10.0.0.0/16.
The name or resource ID of the geo backup user identity for data encryption. The identity needs to be in the same region as the backup region.
The resource ID of the geo backup keyvault key for data encryption. The key needs to be in the same region as the backup region.
Whether or not geo redundant backup is enabled.
Property Value Default value: Disabled Accepted values: Disabled, EnabledThe name or resource ID of the user assigned identity for data encryption.
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.
Property Value Parameter group: Resource Id ArgumentsThe resource ID of the primary keyvault key for data encryption.
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Property Value Parameter group: Resource Id ArgumentsDo not wait for the long-running operation to finish.
Property Value Default value: FalseThis parameter only applies for a server with private access. The name or id of new or existing private dns zone. You can use the private dns zone from same resource group, different resource group, or different subscription. If you want to use a zone from different resource group or subscription, please provide resource Id. CLI creates a new private dns zone within the same resource group as virtual network if not provided by users.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The point in time in UTC to restore from (ISO8601 format), e.g., 2017-04-26T02:10:00+00:00The default value is set to current time.
Property Value Default value: 2025-08-14T11:10:02+00:00Storage type for the new server. Allowed value is PremiumV2_LRS. Default value is none.
Property Value Accepted values: PremiumV2_LRSName or resource ID of a new or existing subnet. If you want to use a subnet from different resource group or subscription, please provide resource ID instead of name. Please note that the subnet will be delegated to flexibleServers. After delegation, this subnet cannot be used for any other type of Azure resources.
The subnet IP address prefix to use when creating a new subnet in CIDR format. Default value isâ¯10.0.0.0/24.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Name or ID of a new or existing virtual network. If you want to use a vnet from different resource group or subscription, please provide a resource ID. The name must be between 2 to 64 characters. The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens.
Do not prompt for confirmation.
Property Value Default value: FalseAvailability zone into which to provision the resource.
Global ParametersIncrease logging verbosity to show all debug logs.
Property Value Default value: FalseShow this help message and exit.
Only show errors, suppressing warnings.
Property Value Default value: FalseOutput format.
Property Value Default value: json Accepted values: json, jsonc, none, table, tsv, yaml, yamlcJMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property Value Default value: False az postgres flexible-server revive-droppedRevive a dropped flexible server from backup.
az postgres flexible-server revive-dropped --location
--source-server
[--address-prefixes]
[--backup-identity]
[--backup-key]
[--geo-redundant-backup {Disabled, Enabled}]
[--identity]
[--ids]
[--key]
[--name]
[--no-wait]
[--private-dns-zone]
[--resource-group]
[--subnet]
[--subnet-prefixes]
[--subscription]
[--vnet]
[--yes]
[--zone]
Examples
Revive dropped public access server 'testserver' to a new server 'testserverNew' in location 'newLocation' with public access.
az postgres flexible-server revive-dropped --resource-group testGroup --name testserverNew --source-server /subscriptions/{SubId}/resourceGroups/{testGroup}/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver --location newLocation
Revive dropped public access server 'testserver' with data encryption enabled as a new server 'testserverNew' with data encryption.
az postgres flexible-server revive-dropped -l testLocation --resource-group testGroup --name testserverNew \
--source-server testserver --key newKeyIdentifier --identity newIdentity
Required Parameters
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
The name or resource ID of the source server to restore from.
Optional ParametersThe following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The IP address prefix to use when creating a new virtual network in CIDR format. Default value is 10.0.0.0/16.
The name or resource ID of the geo backup user identity for data encryption. The identity needs to be in the same region as the backup region.
The resource ID of the geo backup keyvault key for data encryption. The key needs to be in the same region as the backup region.
Whether or not geo redundant backup is enabled.
Property Value Default value: Disabled Accepted values: Disabled, EnabledThe name or resource ID of the user assigned identity for data encryption.
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.
Property Value Parameter group: Resource Id ArgumentsThe resource ID of the primary keyvault key for data encryption.
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Property Value Parameter group: Resource Id ArgumentsDo not wait for the long-running operation to finish.
Property Value Default value: FalseThis parameter only applies for a server with private access. The name or id of new or existing private dns zone. You can use the private dns zone from same resource group, different resource group, or different subscription. If you want to use a zone from different resource group or subscription, please provide resource Id. CLI creates a new private dns zone within the same resource group as virtual network if not provided by users.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or resource ID of a new or existing subnet. If you want to use a subnet from different resource group or subscription, please provide resource ID instead of name. Please note that the subnet will be delegated to flexibleServers. After delegation, this subnet cannot be used for any other type of Azure resources.
The subnet IP address prefix to use when creating a new subnet in CIDR format. Default value isâ¯10.0.0.0/24.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Name or ID of a new or existing virtual network. If you want to use a vnet from different resource group or subscription, please provide a resource ID. The name must be between 2 to 64 characters. The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens.
Do not prompt for confirmation.
Property Value Default value: FalseAvailability zone into which to provision the resource.
Global ParametersIncrease logging verbosity to show all debug logs.
Property Value Default value: FalseShow this help message and exit.
Only show errors, suppressing warnings.
Property Value Default value: FalseOutput format.
Property Value Default value: json Accepted values: json, jsonc, none, table, tsv, yaml, yamlcJMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property Value Default value: False az postgres flexible-server showGet the details of a flexible server.
az postgres flexible-server show [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Get the details of a flexible server
az postgres flexible-server show --resource-group testGroup --name testserver
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property Value Parameter group: Resource Id ArgumentsName of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Property Value Parameter group: Resource Id ArgumentsName of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Property Value Default value: FalseShow this help message and exit.
Only show errors, suppressing warnings.
Property Value Default value: FalseOutput format.
Property Value Default value: json Accepted values: json, jsonc, none, table, tsv, yaml, yamlcJMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property Value Default value: False az postgres flexible-server show-connection-stringShow the connection strings for a PostgreSQL flexible-server database.
az postgres flexible-server show-connection-string [--admin-password]
[--admin-user]
[--database-name]
[--ids]
[--pg-bouncer]
[--server-name]
[--subscription]
Examples
Show connection strings for cmd and programming languages.
az postgres flexible-server show-connection-string -s testserver -u username -p password -d databasename
Show connection strings for cmd and programming languages with PgBouncer enabled.
az postgres flexible-server show-connection-string -s testserver -u username -p password -d databasename --pg-bouncer
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property Value Parameter group: Authentication Arguments Default value: {password}Administrator username for the server. Once set, it cannot be changed.
Property Value Parameter group: Authentication Arguments Default value: {login}The name of the database.
Property Value Parameter group: Resource Id Arguments Default value: {database}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.
Property Value Parameter group: Resource Id ArgumentsShow connection strings for PgBouncer.
Property Value Default value: FalseName of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Property Value Parameter group: Resource Id Arguments Default value: {server}Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Property Value Default value: FalseShow this help message and exit.
Only show errors, suppressing warnings.
Property Value Default value: FalseOutput format.
Property Value Default value: json Accepted values: json, jsonc, none, table, tsv, yaml, yamlcJMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property Value Default value: False az postgres flexible-server startStart a flexible server.
az postgres flexible-server start [--ids]
[--name]
[--no-wait]
[--resource-group]
[--subscription]
Examples
Start a flexible server.
az postgres flexible-server start --resource-group testGroup --name testserver
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property Value Parameter group: Resource Id ArgumentsName of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Property Value Parameter group: Resource Id ArgumentsDo not wait for the long-running operation to finish.
Property Value Default value: FalseName of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Property Value Default value: FalseShow this help message and exit.
Only show errors, suppressing warnings.
Property Value Default value: FalseOutput format.
Property Value Default value: json Accepted values: json, jsonc, none, table, tsv, yaml, yamlcJMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property Value Default value: False az postgres flexible-server stopStop a flexible server.
az postgres flexible-server stop [--ids]
[--name]
[--no-wait]
[--resource-group]
[--subscription]
Examples
Stop a flexible server.
az postgres flexible-server stop --resource-group testGroup --name testserver
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property Value Parameter group: Resource Id ArgumentsName of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Property Value Parameter group: Resource Id ArgumentsDo not wait for the long-running operation to finish.
Property Value Default value: FalseName of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Property Value Default value: FalseShow this help message and exit.
Only show errors, suppressing warnings.
Property Value Default value: FalseOutput format.
Property Value Default value: json Accepted values: json, jsonc, none, table, tsv, yaml, yamlcJMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property Value Default value: False az postgres flexible-server updateUpdate a flexible server.
az postgres flexible-server update [--add]
[--admin-password]
[--backup-identity]
[--backup-key]
[--backup-retention]
[--force-string]
[--high-availability {Disabled, SameZone, ZoneRedundant}]
[--identity]
[--ids]
[--iops]
[--key]
[--maintenance-window]
[--microsoft-entra-auth {Disabled, Enabled}]
[--name]
[--node-count]
[--password-auth {Disabled, Enabled}]
[--performance-tier]
[--private-dns-zone]
[--public-access {Disabled, Enabled}]
[--remove]
[--resource-group]
[--set]
[--sku-name]
[--standby-zone]
[--storage-auto-grow {Disabled, Enabled}]
[--storage-size]
[--subscription]
[--tags]
[--throughput]
[--tier]
[--yes]
Examples
Update a flexible server's sku, using local context for server and resource group.
az postgres flexible-server update --sku-name Standard_D4s_v3
Update a server's tags.
az postgres flexible-server update --resource-group testGroup --name testserver --tags "k1=v1" "k2=v2"
Reset password
az postgres flexible-server update --resource-group testGroup --name testserver -p password123
Update a flexible server to enable Microsoft Entra auth for password auth enabled server
az postgres flexible-server update --resource-group testGroup --name testserver --microsoft-entra-auth Enabled
Change key/identity for data encryption. Data encryption cannot be enabled post server creation, this will only update the key/identity.
# get key identifier of the existing key
newKeyIdentifier=$(az keyvault key show --vault-name testVault --name testKey \
--query key.kid -o tsv)
# update server with new key/identity
az postgres flexible-server update --resource-group testGroup --name testserver \
--key $newKeyIdentifier --identity newIdentity
Update a flexible server to update private DNS zone for a VNET enabled server, using private DNS zone in the same resource group and subscription. Private DNS zone will be created Private DNS zone will be linked to the VNET if not already linked.
az postgres flexible-server update --resource-group testGroup --name testserver --private-dns-zone testDNS2.postgres.database.azure.com
Update a flexible server to update private DNS zone for a VNET enabled server, using private DNS zone in the different resource group and subscription. Private DNS zone will be linked to the VNET if not already linked.
az postgres flexible-server update --resource-group testGroup --name testserver --private-dns-zone /subscriptions/{SubId2}/resourceGroups/{testGroup2}/providers/Microsoft.Network/privateDnsZones/testDNS.postgres.database.azure.com
Update a flexible server's storage to enable / disable storage auto-grow.
az postgres flexible-server update --resource-group testGroup --name testserver --storage-auto-grow Enabled
Update a flexible server's storage to set custom storage performance tier.
az postgres flexible-server update --resource-group testGroup --name testserver --performance-tier P15
Update a flexible server's storage to set IOPS (operations/sec). Server must be using Premium SSD v2 Disks.
az postgres flexible-server update --resource-group testGroup --name testserver --iops 3000
Update a flexible server's storage to set Throughput (MB/sec). Server must be using Premium SSD v2 Disks.
az postgres flexible-server update --resource-group testGroup --name testserver --throughput 125
Update a flexible server's cluster size by scaling up node count. Must be an Elastic Cluster.
az postgres flexible-server update --resource-group testGroup --name testcluster --node-count 6
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Add an object to a list of objects by specifying a path and key value pairs. Example: --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.
Property Value Parameter group: Authentication ArgumentsThe name or resource ID of the geo backup user identity for data encryption. The identity needs to be in the same region as the backup region.
The resource ID of the geo backup keyvault key for data encryption. The key needs to be in the same region as the backup region.
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.
Property Value Parameter group: Generic Update Arguments Default value: FalseEnable (ZoneRedundant or SameZone) or disable high availability feature.
Property Value Accepted values: Disabled, SameZone, ZoneRedundantThe name or resource ID of the user assigned identity for data encryption.
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.
Property Value Parameter group: Resource Id ArgumentsValue of IOPS in (operations/sec) to be allocated for this server. This value can only be updated if flexible server is using Premium SSD v2 Disks.
The resource ID of the primary keyvault key for data encryption.
Period of time (UTC) designated for maintenance. Examples: "Sun:23:30" to schedule on Sunday, 11:30pm UTC. To set back to default pass in "Disabled".
Whether Microsoft Entra authentication is enabled.
Property Value Accepted values: Disabled, EnabledName of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Property Value Parameter group: Resource Id ArgumentsThe number of nodes for elastic cluster. Range of 1 to 10.
Whether password authentication is enabled.
Property Value Accepted values: Disabled, EnabledPerformance tier of the server.
This parameter only applies for a server with private access. The name or id of new or existing private dns zone. You can use the private dns zone from same resource group, different resource group, or different subscription. If you want to use a zone from different resource group or subscription, please provide resource Id. CLI creates a new private dns zone within the same resource group as virtual network if not provided by users.
Enable or disable the public access on a server.
Property Value Accepted values: Disabled, EnabledRemove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
The name of the compute SKU. Follows the convention Standard_{VM name}. Examples: Standard_B1ms.
The availability zone information of the standby server when high availability is enabled.
Enable or disable autogrow of the storage. Default value is Enabled.
Property Value Accepted values: Disabled, EnabledThe storage capacity of the server. Minimum is 32 GiB and max is 16 TiB.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Storage throughput in (MB/sec) for the server. This value can only be updated if flexible server is using Premium SSD v2 Disks.
Compute tier of the server. Accepted values: Burstable, GeneralPurpose, MemoryOptimized.
Do not prompt for confirmation.
Property Value Default value: False Global ParametersIncrease logging verbosity to show all debug logs.
Property Value Default value: FalseShow this help message and exit.
Only show errors, suppressing warnings.
Property Value Default value: FalseOutput format.
Property Value Default value: json Accepted values: json, jsonc, none, table, tsv, yaml, yamlcJMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property Value Default value: False az postgres flexible-server upgradeUpgrade the major version of a flexible server.
az postgres flexible-server upgrade --version {13, 14, 15, 16, 17}
[--ids]
[--name]
[--resource-group]
[--subscription]
[--yes]
Examples
Upgrade server 'testsvr' to PostgreSQL major version 17.
az postgres flexible-server upgrade -g testgroup -n testsvr -v 17
Required Parameters
Server major version.
Property Value Accepted values: 13, 14, 15, 16, 17 Optional ParametersThe following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property Value Parameter group: Resource Id ArgumentsName of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Property Value Parameter group: Resource Id ArgumentsName of resource group. You can configure the default group using az configure --defaults group=<name>
.
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 ParametersIncrease logging verbosity to show all debug logs.
Property Value Default value: FalseShow this help message and exit.
Only show errors, suppressing warnings.
Property Value Default value: FalseOutput format.
Property Value Default value: json Accepted values: json, jsonc, none, table, tsv, yaml, yamlcJMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property Value Default value: False az postgres flexible-server waitWait for the flexible server to satisfy certain conditions.
az postgres flexible-server wait [--created]
[--custom]
[--deleted]
[--exists]
[--ids]
[--interval]
[--name]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Wait until created with 'provisioningState' at 'Succeeded'.
Property Value Parameter group: Wait Condition Arguments Default value: FalseWait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Property Value Parameter group: Wait Condition ArgumentsWait until deleted.
Property Value Parameter group: Wait Condition Arguments Default value: FalseWait until the resource exists.
Property Value Parameter group: Wait Condition Arguments Default value: FalseOne 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.
Property Value Parameter group: Resource Id ArgumentsPolling interval in seconds.
Property Value Parameter group: Wait Condition Arguments Default value: 30Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Property Value Parameter group: Resource Id ArgumentsName of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Maximum wait in seconds.
Property Value Parameter group: Wait Condition Arguments Default value: 3600Wait until updated with provisioningState at 'Succeeded'.
Property Value Parameter group: Wait Condition Arguments Default value: False Global ParametersIncrease logging verbosity to show all debug logs.
Property Value Default value: FalseShow this help message and exit.
Only show errors, suppressing warnings.
Property Value Default value: FalseOutput format.
Property Value Default value: json Accepted values: json, jsonc, none, table, tsv, yaml, yamlcJMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property Value Default value: FalseRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4