다음을 통해 공유


az postgres flexible-server

비고

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.

명령

Name Description 형식 상태
az postgres flexible-server ad-admin

Manage server Microsoft Entra administrators.

코어 더 이상 권장되지 않음
az postgres flexible-server ad-admin create

Create a Microsoft Entra administrator.

코어 더 이상 권장되지 않음
az postgres flexible-server ad-admin delete

Delete a Microsoft Entra administrator.

코어 더 이상 권장되지 않음
az postgres flexible-server ad-admin list

List all Microsoft Entra administrators.

코어 더 이상 권장되지 않음
az postgres flexible-server ad-admin show

Get a Microsoft Entra administrator.

코어 더 이상 권장되지 않음
az postgres flexible-server ad-admin wait

Wait for a Microsoft Entra administrator to satisfy certain conditions.

코어 더 이상 권장되지 않음
az postgres flexible-server advanced-threat-protection-setting

Manage advanced threat protection setting for a PostgreSQL flexible server.

코어 GA
az postgres flexible-server advanced-threat-protection-setting show

Get advanced threat protection settings for a PostgreSL flexible server.

코어 GA
az postgres flexible-server advanced-threat-protection-setting update

Updates advanced threat protection setting state for a flexible server.

코어 GA
az postgres flexible-server backup

Manage flexible server backups.

코어 GA
az postgres flexible-server backup create

Create a new backup for a flexible server.

코어 GA
az postgres flexible-server backup delete

Delete a specific backup.

코어 GA
az postgres flexible-server backup list

List all the backups for a given server.

코어 GA
az postgres flexible-server backup show

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

코어 GA
az postgres flexible-server connect

Connect to a flexible server.

Extension GA
az postgres flexible-server create

Create a PostgreSQL flexible server.

코어 더 이상 권장되지 않음
az postgres flexible-server db

Manage PostgreSQL databases on a flexible server.

코어 GA
az postgres flexible-server db create

Create a PostgreSQL database on a flexible server.

코어 GA
az postgres flexible-server db delete

Delete a database on a flexible server.

코어 GA
az postgres flexible-server db list

List the databases for a flexible server.

코어 GA
az postgres flexible-server db show

Show the details of a database.

코어 GA
az postgres flexible-server delete

Delete a flexible server.

코어 GA
az postgres flexible-server deploy

Enable and run GitHub Actions workflow for PostgreSQL server.

코어 GA
az postgres flexible-server deploy run

Run an existing workflow in your github repository.

코어 GA
az postgres flexible-server deploy setup

Create GitHub Actions workflow file for PostgreSQL server.

코어 GA
az postgres flexible-server execute

Connect to a flexible server.

Extension GA
az postgres flexible-server fabric-mirroring

Bring your PostgreSQL data into Microsoft Fabric. Mirroring allows you to create a replica of your data in OneLake which can be used for all your analytical needs.

코어 GA
az postgres flexible-server fabric-mirroring start

Enable bringing your PostgreSQL data into Microsoft Fabric.

코어 GA
az postgres flexible-server fabric-mirroring stop

Stop bringing your PostgreSQL data into Microsoft Fabric.

코어 GA
az postgres flexible-server fabric-mirroring update-databases

Update allowed mirrored databases.

코어 GA
az postgres flexible-server firewall-rule

Manage firewall rules for a server.

코어 GA
az postgres flexible-server firewall-rule create

Create a new firewall rule for a flexible server.

코어 GA
az postgres flexible-server firewall-rule delete

Delete a firewall rule.

코어 GA
az postgres flexible-server firewall-rule list

List all firewall rules for a flexible server.

코어 GA
az postgres flexible-server firewall-rule show

Get the details of a firewall rule.

코어 GA
az postgres flexible-server firewall-rule update

Update a firewall rule.

코어 GA
az postgres flexible-server geo-restore

Geo-restore a flexible server from backup.

코어 GA
az postgres flexible-server identity

Manage server user assigned identities.

코어 GA
az postgres flexible-server identity assign

Add user assigned managed identities to the server.

코어 GA
az postgres flexible-server identity list

List all user assigned managed identities from the server.

코어 GA
az postgres flexible-server identity remove

Remove user assigned managed identites from the server.

코어 GA
az postgres flexible-server identity show

Get an user assigned managed identity from the server.

코어 GA
az postgres flexible-server identity update

Update to enable or disable system assigned managed identity on the server.

코어 GA
az postgres flexible-server index-tuning

Index tuning analyzes read queries captured in Query Store and recommends index changes to optimize these queries.

코어 GA
az postgres flexible-server index-tuning list-recommendations

Get available tuning index recommendations associated with a PostgreSQL flexible server.

코어 GA
az postgres flexible-server index-tuning list-settings

Get tuning settings associated for a PostgreSQL flexible server.

코어 GA
az postgres flexible-server index-tuning set-settings

Update a tuning setting for a PostgreSQL flexible server.

코어 GA
az postgres flexible-server index-tuning show

Show state of index tuning for a PostgreSQL flexible server.

코어 GA
az postgres flexible-server index-tuning show-settings

Get a tuning setting for a PostgreSQL flexible server.

코어 GA
az postgres flexible-server index-tuning update

Update index tuning to be enabled/disabled for a PostgreSQL flexible server.

코어 GA
az postgres flexible-server list

List available flexible servers.

코어 GA
az postgres flexible-server list-skus

Lists available sku's in the given region.

코어 GA
az postgres flexible-server long-term-retention

Manage flexible server long-term-retention backups.

코어 GA
az postgres flexible-server long-term-retention list

List all the long-term-retention backups for a given server.

코어 GA
az postgres flexible-server long-term-retention pre-check

Performs all the checks that are needed for the subsequent long-term-retention backup operation to succeed.

코어 GA
az postgres flexible-server long-term-retention show

Show the details of a specific long-term-retention backup for a given server.

코어 GA
az postgres flexible-server long-term-retention start

Start long-term-retention backup for a flexible server. SAS URL parameter refers to the container SAS URL, inside the storage account, where the backups will be uploaded.

코어 GA
az postgres flexible-server microsoft-entra-admin

Manage server Microsoft Entra administrators.

코어 GA
az postgres flexible-server microsoft-entra-admin create

Create a Microsoft Entra administrator.

코어 GA
az postgres flexible-server microsoft-entra-admin delete

Delete a Microsoft Entra administrator.

코어 GA
az postgres flexible-server microsoft-entra-admin list

List all Microsoft Entra administrators.

코어 GA
az postgres flexible-server microsoft-entra-admin show

Get a Microsoft Entra administrator.

코어 GA
az postgres flexible-server microsoft-entra-admin wait

Wait for a Microsoft Entra administrator to satisfy certain conditions.

코어 GA
az postgres flexible-server migration

Manage migration workflows for PostgreSQL Flexible Servers.

코어 GA
az postgres flexible-server migration check-name-availability

Checks if the provided migration-name can be used.

코어 GA
az postgres flexible-server migration create

Create a new migration workflow for a flexible server.

코어 GA
az postgres flexible-server migration list

List the migrations of a flexible server.

코어 GA
az postgres flexible-server migration show

Get the details of a specific migration.

코어 GA
az postgres flexible-server migration update

Update a specific migration.

코어 GA
az postgres flexible-server parameter

Commands for managing server parameter values for flexible server.

코어 GA
az postgres flexible-server parameter list

List the parameter values for a flexible server.

코어 GA
az postgres flexible-server parameter set

Update the parameter of a flexible server.

코어 GA
az postgres flexible-server parameter show

Get the parameter for a flexible server.".

코어 GA
az postgres flexible-server private-endpoint-connection

Manage PostgreSQL flexible server private endpoint connections.

코어 GA
az postgres flexible-server private-endpoint-connection approve

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

코어 GA
az postgres flexible-server private-endpoint-connection delete

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

코어 GA
az postgres flexible-server private-endpoint-connection list

List all private endpoint connections associated with a PostgreSQL flexible server.

코어 GA
az postgres flexible-server private-endpoint-connection reject

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

코어 GA
az postgres flexible-server private-endpoint-connection show

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

코어 GA
az postgres flexible-server private-link-resource

Get Private link resource for a PostgreSQL flexible server.

코어 GA
az postgres flexible-server private-link-resource list

List private link resources associated with a PostgreSQL flexible server.

코어 GA
az postgres flexible-server private-link-resource show

Get private link resource for a PostgreSQL flexible server.

코어 GA
az postgres flexible-server replica

Manage read replicas.

코어 GA
az postgres flexible-server replica create

Create a read replica for a server.

코어 GA
az postgres flexible-server replica list

List all read replicas for a given server.

코어 GA
az postgres flexible-server replica promote

Stop replication of a read replica and promote it to an independent server or as a primary server.

코어 GA
az postgres flexible-server restart

Restart a flexible server.

코어 GA
az postgres flexible-server restore

Restore a flexible server from backup.

코어 GA
az postgres flexible-server revive-dropped

Revive a dropped flexible server from backup.

코어 GA
az postgres flexible-server server-logs

Manage server logs (log files) for a PostgreSQL flexible server.

코어 GA
az postgres flexible-server server-logs download

Download log files for a PostgreSQL flexible server.

코어 GA
az postgres flexible-server server-logs list

List log files for a PostgreSQL flexible server.

코어 GA
az postgres flexible-server show

Get the details of a flexible server.

코어 GA
az postgres flexible-server show-connection-string

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

코어 GA
az postgres flexible-server start

Start a flexible server.

코어 GA
az postgres flexible-server stop

Stop a flexible server.

코어 GA
az postgres flexible-server update

Update a flexible server.

코어 더 이상 권장되지 않음
az postgres flexible-server upgrade

Upgrade the major version of a flexible server.

코어 GA
az postgres flexible-server virtual-endpoint

Manage virtual endpoints for a PostgreSQL flexible server.

코어 GA
az postgres flexible-server virtual-endpoint create

Create a new virtual endpoint for a flexible server.

코어 GA
az postgres flexible-server virtual-endpoint delete

Delete a virtual endpoint.

코어 GA
az postgres flexible-server virtual-endpoint list

List all virtual endpoints for a flexible server.

코어 GA
az postgres flexible-server virtual-endpoint show

Get the details of a virtual endpoint.

코어 GA
az postgres flexible-server virtual-endpoint update

Update a virtual endpoint.

코어 GA
az postgres flexible-server wait

Wait for the flexible server to satisfy certain conditions.

코어 GA

az postgres flexible-server connect

Connect to a flexible server.

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

필수 매개 변수

--admin-user -u

The login username of the administrator.

--name -n

서버의 이름입니다. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

선택적 매개 변수

--admin-password -p

The login password of the administrator.

--database-name -d

The name of a database.

--interactive

Pass this parameter to connect to database in interactive mode.

--querytext -q
사용되지 않음

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

A query to run against the flexible server.

전역 매개 변수
--debug

로깅 수위를 높여 모든 디버그 로그를 표시합니다.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

출력 형식

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

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

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--verbose

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

az postgres flexible-server create

사용되지 않음

Update default value of "--sku-name" in next breaking change release(2.73.0) scheduled for May 2025. The default value will be changed from "Standard_D2s_v3" to a supported sku based on regional capabilities.

Create a PostgreSQL flexible server.

Create a PostgreSQL flexible server with custom or default configuration. For more information for network configuration, see

az postgres flexible-server create [--active-directory-auth {Disabled, Enabled}]
                                   [--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]

예제

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

선택적 매개 변수

--active-directory-auth
사용되지 않음

Argument '--active-directory-auth' has been deprecated and will be removed in next breaking change release(2.73.0) scheduled for May 2025. Use '--microsoft-entra-auth' instead.

Whether Microsoft Entra authentication is enabled.

허용되는 값: Disabled, Enabled
Default value: Disabled
--address-prefixes

The IP address prefix to use when creating a new virtual network in CIDR format. Default value is 10.0.0.0/16.

--admin-display-name -m

Display name of the Microsoft Entra administrator user or group.

--admin-object-id -i

The unique ID of the Microsoft Entra administrator.

--admin-password -p

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.

--admin-type -t

Type of the Microsoft Entra administrator.

허용되는 값: Group, ServicePrincipal, Unknown, User
--admin-user -u

Administrator username for the server. Once set, it cannot be changed.

Default value: entirepudding0
--backup-identity

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.

--backup-key

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.

--backup-retention

The number of days a backup is retained. Range of 7 to 35 days. Default is 7 days.

Default value: 7
--cluster-option

Cluster 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.

허용되는 값: ElasticCluster, Server
Default value: Server
--create-default-database -c
사용되지 않음

The default value of '--create-default-database' will be changed to 'Disabled' from 'Enabled' in next breaking change release(2.73.0) scheduled for May 2025.

Enable or disable the creation of default database flexibleserverdb. Default value is Enabled.

허용되는 값: Disabled, Enabled
Default value: Enabled
--database-name -d

The name of the database to be created when provisioning the database server.

--geo-redundant-backup

Whether or not geo redundant backup is enabled.

허용되는 값: Disabled, Enabled
Default value: Disabled
--high-availability

Enable (ZoneRedundant or SameZone) or disable high availability feature.

허용되는 값: Disabled, SameZone, ZoneRedundant
Default value: Disabled
--identity

The name or resource ID of the user assigned identity for data encryption.

--iops

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.

--key

The resource ID of the primary keyvault key for data encryption.

--location -l

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

--microsoft-entra-auth

Whether Microsoft Entra authentication is enabled.

허용되는 값: Disabled, Enabled
Default value: Disabled
--name -n

서버의 이름입니다. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--node-count

The number of nodes for elastic cluster. Range of 1 to 10. Default is 2 nodes.

--password-auth

Whether password authentication is enabled.

허용되는 값: Disabled, Enabled
Default value: Enabled
--performance-tier

Performance tier of the server.

--private-dns-zone

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.

--public-access

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.

--resource-group -g

Name of resource group. az configure --defaults group=<name>사용하여 기본 그룹을 구성할 수 있습니다.

--sku-name

The name of the compute SKU. Follows the convention Standard_{VM name}. Examples: Standard_B1ms.

Default value: Standard_D2s_v3
--standby-zone

The availability zone information of the standby server when high availability is enabled.

--storage-auto-grow

Enable or disable autogrow of the storage. Default value is Enabled.

허용되는 값: Disabled, Enabled
Default value: Disabled
--storage-size

The storage capacity of the server. Minimum is 32 GiB and max is 16 TiB.

Default value: 128
--storage-type

Storage 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.

허용되는 값: PremiumV2_LRS, Premium_LRS
--subnet

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.

--subnet-prefixes

The subnet IP address prefix to use when creating a new subnet in CIDR format. Default value is 10.0.0.0/24.

--tags

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

--throughput

Storage throughput in (MB/sec) for the server. This value can only be updated if flexible server is using Premium SSD v2 Disks.

--tier

Compute tier of the server. Accepted values: Burstable, GeneralPurpose, MemoryOptimized.

Default value: GeneralPurpose
--version
사용되지 않음

The default value of '--version' will be changed to '17' from '16' in next breaking change release(2.73.0) scheduled for May 2025.

Server major version.

Default value: 16
--vnet

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.

--yes -y

Do not prompt for confirmation.

Default value: False
--zone -z

Availability zone into which to provision the resource.

전역 매개 변수
--debug

로깅 수위를 높여 모든 디버그 로그를 표시합니다.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

출력 형식

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

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

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--verbose

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

az postgres flexible-server delete

Delete a flexible server.

az postgres flexible-server delete [--ids]
                                   [--name]
                                   [--resource-group]
                                   [--subscription]
                                   [--yes]

예제

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

선택적 매개 변수

--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.

--name -n

서버의 이름입니다. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--resource-group -g

Name of resource group. az configure --defaults group=<name>사용하여 기본 그룹을 구성할 수 있습니다.

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--yes -y

Do not prompt for confirmation.

Default value: False
전역 매개 변수
--debug

로깅 수위를 높여 모든 디버그 로그를 표시합니다.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

출력 형식

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

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

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--verbose

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

az postgres flexible-server execute

Connect to a flexible server.

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

필수 매개 변수

--admin-password -p

The login password of the administrator.

--admin-user -u

The login username of the administrator.

--name -n

서버의 이름입니다. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

선택적 매개 변수

--database-name -d

The name of a database.

--file-path -f

The path of the sql file to execute.

--querytext -q

A query to run against the flexible server.

전역 매개 변수
--debug

로깅 수위를 높여 모든 디버그 로그를 표시합니다.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

출력 형식

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

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

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--verbose

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

az postgres flexible-server geo-restore

Geo-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]

예제

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}

필수 매개 변수

--location -l

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

--source-server

The name or resource ID of the source server to restore from.

선택적 매개 변수

--address-prefixes

The IP address prefix to use when creating a new virtual network in CIDR format. Default value is 10.0.0.0/16.

--backup-identity

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.

--backup-key

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.

--geo-redundant-backup

Whether or not geo redundant backup is enabled.

허용되는 값: Disabled, Enabled
Default value: Disabled
--identity

The name or resource ID of the user assigned identity for data encryption.

--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.

--key

The resource ID of the primary keyvault key for data encryption.

--name -n

서버의 이름입니다. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--no-wait

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

Default value: False
--private-dns-zone

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.

--resource-group -g

Name of resource group. az configure --defaults group=<name>사용하여 기본 그룹을 구성할 수 있습니다.

--restore-time

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.

Default value: 2025-04-16T11:12:48+00:00
--subnet

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.

--subnet-prefixes

The subnet IP address prefix to use when creating a new subnet in CIDR format. Default value is 10.0.0.0/24.

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--vnet

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.

--yes -y

Do not prompt for confirmation.

Default value: False
--zone -z

Availability zone into which to provision the resource.

전역 매개 변수
--debug

로깅 수위를 높여 모든 디버그 로그를 표시합니다.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

출력 형식

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

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

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--verbose

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

az postgres flexible-server list

List available flexible servers.

az postgres flexible-server list [--resource-group]
                                 [--show-cluster]

예제

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

선택적 매개 변수

--resource-group -g

Name of resource group. az configure --defaults group=<name>사용하여 기본 그룹을 구성할 수 있습니다.

--show-cluster

Only show elastic clusters.

전역 매개 변수
--debug

로깅 수위를 높여 모든 디버그 로그를 표시합니다.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

출력 형식

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

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

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--verbose

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

az postgres flexible-server list-skus

Lists available sku's in the given region.

az postgres flexible-server list-skus --location

필수 매개 변수

--location -l

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

전역 매개 변수
--debug

로깅 수위를 높여 모든 디버그 로그를 표시합니다.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

출력 형식

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

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

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--verbose

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

az postgres flexible-server restart

Restart a flexible server.

az postgres flexible-server restart [--failover]
                                    [--ids]
                                    [--name]
                                    [--resource-group]
                                    [--subscription]

예제

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

선택적 매개 변수

--failover

Forced or planned failover for server restart operation. Allowed values: Forced, Planned.

--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.

--name -n

서버의 이름입니다. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--resource-group -g

Name of resource group. az configure --defaults group=<name>사용하여 기본 그룹을 구성할 수 있습니다.

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

전역 매개 변수
--debug

로깅 수위를 높여 모든 디버그 로그를 표시합니다.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

출력 형식

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

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

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--verbose

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

az postgres flexible-server restore

Restore 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]

예제

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

필수 매개 변수

--source-server

The name or resource ID of the source server to restore from.

선택적 매개 변수

--address-prefixes

The IP address prefix to use when creating a new virtual network in CIDR format. Default value is 10.0.0.0/16.

--backup-identity

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.

--backup-key

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.

--geo-redundant-backup

Whether or not geo redundant backup is enabled.

허용되는 값: Disabled, Enabled
Default value: Disabled
--identity

The name or resource ID of the user assigned identity for data encryption.

--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.

--key

The resource ID of the primary keyvault key for data encryption.

--name -n

서버의 이름입니다. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--no-wait

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

Default value: False
--private-dns-zone

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.

--resource-group -g

Name of resource group. az configure --defaults group=<name>사용하여 기본 그룹을 구성할 수 있습니다.

--restore-time

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.

Default value: 2025-04-16T11:12:48+00:00
--storage-type

Storage type for the new server. Allowed value is PremiumV2_LRS. Default value is none.

허용되는 값: PremiumV2_LRS
--subnet

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.

--subnet-prefixes

The subnet IP address prefix to use when creating a new subnet in CIDR format. Default value is 10.0.0.0/24.

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--vnet

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.

--yes -y

Do not prompt for confirmation.

Default value: False
--zone -z

Availability zone into which to provision the resource.

전역 매개 변수
--debug

로깅 수위를 높여 모든 디버그 로그를 표시합니다.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

출력 형식

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

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

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--verbose

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

az postgres flexible-server revive-dropped

Revive 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]

예제

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

필수 매개 변수

--location -l

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

--source-server

The name or resource ID of the source server to restore from.

선택적 매개 변수

--address-prefixes

The IP address prefix to use when creating a new virtual network in CIDR format. Default value is 10.0.0.0/16.

--backup-identity

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.

--backup-key

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.

--geo-redundant-backup

Whether or not geo redundant backup is enabled.

허용되는 값: Disabled, Enabled
Default value: Disabled
--identity

The name or resource ID of the user assigned identity for data encryption.

--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.

--key

The resource ID of the primary keyvault key for data encryption.

--name -n

서버의 이름입니다. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--no-wait

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

Default value: False
--private-dns-zone

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.

--resource-group -g

Name of resource group. az configure --defaults group=<name>사용하여 기본 그룹을 구성할 수 있습니다.

--subnet

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.

--subnet-prefixes

The subnet IP address prefix to use when creating a new subnet in CIDR format. Default value is 10.0.0.0/24.

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--vnet

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.

--yes -y

Do not prompt for confirmation.

Default value: False
--zone -z

Availability zone into which to provision the resource.

전역 매개 변수
--debug

로깅 수위를 높여 모든 디버그 로그를 표시합니다.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

출력 형식

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

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

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--verbose

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

az postgres flexible-server show

Get the details of a flexible server.

az postgres flexible-server show [--ids]
                                 [--name]
                                 [--resource-group]
                                 [--subscription]

예제

Get the details of a flexible server

az postgres flexible-server show --resource-group testGroup --name testserver

선택적 매개 변수

--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.

--name -n

서버의 이름입니다. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--resource-group -g

Name of resource group. az configure --defaults group=<name>사용하여 기본 그룹을 구성할 수 있습니다.

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

전역 매개 변수
--debug

로깅 수위를 높여 모든 디버그 로그를 표시합니다.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

출력 형식

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

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

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--verbose

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

az postgres flexible-server show-connection-string

Show 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]

예제

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

선택적 매개 변수

--admin-password -p

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.

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

Administrator username for the server. Once set, it cannot be changed.

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

The name of the database to be created when provisioning the database server.

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.

--pg-bouncer

Show connection strings for PgBouncer.

Default value: False
--server-name -s

서버의 이름입니다. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

Default value: {server}
--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

전역 매개 변수
--debug

로깅 수위를 높여 모든 디버그 로그를 표시합니다.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

출력 형식

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

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

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--verbose

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

az postgres flexible-server start

Start a flexible server.

az postgres flexible-server start [--ids]
                                  [--name]
                                  [--no-wait]
                                  [--resource-group]
                                  [--subscription]

예제

Start a flexible server.

az postgres flexible-server start --resource-group testGroup --name testserver

선택적 매개 변수

--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.

--name -n

서버의 이름입니다. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--no-wait

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

Default value: False
--resource-group -g

Name of resource group. az configure --defaults group=<name>사용하여 기본 그룹을 구성할 수 있습니다.

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

전역 매개 변수
--debug

로깅 수위를 높여 모든 디버그 로그를 표시합니다.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

출력 형식

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

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

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--verbose

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

az postgres flexible-server stop

Stop a flexible server.

az postgres flexible-server stop [--ids]
                                 [--name]
                                 [--no-wait]
                                 [--resource-group]
                                 [--subscription]

예제

Stop a flexible server.

az postgres flexible-server stop --resource-group testGroup --name testserver

선택적 매개 변수

--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.

--name -n

서버의 이름입니다. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--no-wait

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

Default value: False
--resource-group -g

Name of resource group. az configure --defaults group=<name>사용하여 기본 그룹을 구성할 수 있습니다.

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

전역 매개 변수
--debug

로깅 수위를 높여 모든 디버그 로그를 표시합니다.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

출력 형식

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

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

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--verbose

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

az postgres flexible-server update

사용되지 않음

User confirmation will be needed for compute and storage updates that trigger a restart of the server.

Update a flexible server.

az postgres flexible-server update [--active-directory-auth {Disabled, Enabled}]
                                   [--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]

예제

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"

암호 재설정

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

선택적 매개 변수

--active-directory-auth
사용되지 않음

Argument '--active-directory-auth' has been deprecated and will be removed in next breaking change release(2.73.0) scheduled for May 2025. Use '--microsoft-entra-auth' instead.

Whether Microsoft Entra authentication is enabled.

허용되는 값: Disabled, Enabled
--add

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>.

Default value: []
--admin-password -p

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.

--backup-identity

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.

--backup-key

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.

--backup-retention

The number of days a backup is retained. Range of 7 to 35 days. Default is 7 days.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Default value: False
--high-availability

Enable (ZoneRedundant or SameZone) or disable high availability feature.

허용되는 값: Disabled, SameZone, ZoneRedundant
--identity

The name or resource ID of the user assigned identity for data encryption.

--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.

--iops

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.

--key

The resource ID of the primary keyvault key for data encryption.

--maintenance-window

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".

--microsoft-entra-auth

Whether Microsoft Entra authentication is enabled.

허용되는 값: Disabled, Enabled
--name -n

서버의 이름입니다. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--node-count

The number of nodes for elastic cluster. Range of 1 to 10.

--password-auth

Whether password authentication is enabled.

허용되는 값: Disabled, Enabled
--performance-tier

Performance tier of the server.

--private-dns-zone

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.

--public-access

Enable or disable the public access on a server.

허용되는 값: Disabled, Enabled
--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

Default value: []
--resource-group -g

Name of resource group. az configure --defaults group=<name>사용하여 기본 그룹을 구성할 수 있습니다.

--set

Update an object by specifying a property path and value to set. 예: --set property1.property2=<value>.

Default value: []
--sku-name

The name of the compute SKU. Follows the convention Standard_{VM name}. Examples: Standard_B1ms.

--standby-zone

The availability zone information of the standby server when high availability is enabled.

--storage-auto-grow

Enable or disable autogrow of the storage. Default value is Enabled.

허용되는 값: Disabled, Enabled
--storage-size

The storage capacity of the server. Minimum is 32 GiB and max is 16 TiB.

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--tags

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

--throughput

Storage throughput in (MB/sec) for the server. This value can only be updated if flexible server is using Premium SSD v2 Disks.

--tier

Compute tier of the server. Accepted values: Burstable, GeneralPurpose, MemoryOptimized.

--yes -y

Do not prompt for confirmation.

Default value: False
전역 매개 변수
--debug

로깅 수위를 높여 모든 디버그 로그를 표시합니다.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

출력 형식

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

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

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--verbose

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

az postgres flexible-server upgrade

Upgrade the major version of a flexible server.

az postgres flexible-server upgrade --version {12, 13, 14, 15, 16}
                                    [--ids]
                                    [--name]
                                    [--resource-group]
                                    [--subscription]
                                    [--yes]

예제

Upgrade server 'testsvr' to PostgreSQL major version 16.

az postgres flexible-server upgrade -g testgroup -n testsvr -v 16

필수 매개 변수

--version -v

Server major version.

허용되는 값: 12, 13, 14, 15, 16

선택적 매개 변수

--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.

--name -n

서버의 이름입니다. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--resource-group -g

Name of resource group. az configure --defaults group=<name>사용하여 기본 그룹을 구성할 수 있습니다.

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--yes -y

Do not prompt for confirmation.

전역 매개 변수
--debug

로깅 수위를 높여 모든 디버그 로그를 표시합니다.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

출력 형식

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

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

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--verbose

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

az postgres flexible-server wait

Wait 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]

선택적 매개 변수

--created

Wait until created with 'provisioningState' at 'Succeeded'.

Default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

Default value: False
--exists

Wait until the resource exists.

Default value: False
--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.

--interval

Polling interval in seconds.

Default value: 30
--name -n

서버의 이름입니다. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--resource-group -g

Name of resource group. az configure --defaults group=<name>사용하여 기본 그룹을 구성할 수 있습니다.

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--timeout

Maximum wait in seconds.

Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Default value: False
전역 매개 변수
--debug

로깅 수위를 높여 모든 디버그 로그를 표시합니다.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

출력 형식

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

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

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--verbose

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