All Products
Search
Document Center

AnalyticDB:UpgradeDBInstance

Last Updated:Jan 23, 2026

Changes the configurations of an AnalyticDB for PostgreSQL instance.

Operation description

This operation is not available for instances in reserved storage mode.

Before you call this operation, make sure that you are familiar with the billing of AnalyticDB for PostgreSQL. For more information, see Billing methods and AnalyticDB for PostgreSQL pricing.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
gpdb:UpgradeDBInstanceupdate
*DBInstance
acs:gpdb:{#regionId}:{#accountId}:dbinstance/{#DBInstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ResourceGroupIdstringNo

The ID of the resource group to which the instance belongs. For information about how to obtain the ID of a resource group, see View basic information of a resource group.

rg-bp67acfmxazb4p****
RegionIdstringNo

The region ID of the instance.

Note You can call the DescribeRegions operation to query the most recent region list.
cn-hangzhou
DBInstanceClassstringNo

This parameter is no longer used.

null
DBInstanceGroupCountstringNo

This parameter is no longer used.

null
DBInstanceIdstringYes

The instance ID.

Note You can call the DescribeDBInstances operation to query the IDs of all AnalyticDB for PostgreSQL instances within a region.
gp-rj***************
PayTypestringNo

This parameter is no longer used.

null
MasterNodeNumstringNo

This parameter is no longer used.

2
SegNodeNumstringNo

The number of compute nodes. The number of compute nodes varies based on the instance resource type and edition.

  • Valid values for High-availability Edition instances in elastic storage mode: 4 to 512, in 4 increments.
  • Valid values for High-performance Edition instances in elastic storage mode: 2 to 512, in 2 increments.
  • Valid values for instances in manual Serverless mode: 2 to 512, in 2 increments.
2
InstanceSpecstringNo

The specifications of each compute node. For information about the supported specifications, see Instance specifications.

Note This parameter is available only for instances in elastic storage mode.
4C16G
StorageSizestringNo

The storage capacity of each compute node. Unit: GB. Valid values: 50 to 6000, in 50 increments.

Note This parameter is available only for instances in elastic storage mode.
100
SegDiskPerformanceLevelstringNo

The performance level of Enterprise SSDs (ESSDs). Valid values:

  • pl0
  • pl1
  • pl2
pl1
SegStorageTypestringNo

The disk storage type of the instance after the change. The disk storage type can be changed only to ESSD. Set the value to cloud_essd.

cloud_essd
UpgradeTypelongNo

The type of the instance configuration change. Valid values:

  • 0 (default): changes the number of compute nodes.
  • 1: changes the specifications and storage capacity of each compute node.
  • 2: changes the number of coordinator nodes.
  • 3: changes the disk storage type and ESSD performance level of the instance.
Note
  • The supported changes to compute node configurations vary based on the instance resource type. For more information, see the "Usage notes" section of the Change compute node configurations topic.

  • After you specify a change type, only the corresponding parameters take effect. For example, if you set UpgradeType to 0, the parameter that is used to change the number of compute nodes takes effect, but the parameter that is used to change the number of coordinator nodes does not.

  • The number of coordinator nodes can be changed only on the China site (aliyun.com).

  • The disk storage type can be changed only from ultra disks to ESSDs.

0

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

25C11EE5-B7E8-481A-A07C-BD**********
DBInstanceIdstring

The instance ID.

gp-rj***************
OrderIdstring

The order ID.

*********

Examples

Sample success responses

JSONformat

{
  "RequestId": "25C11EE5-B7E8-481A-A07C-BD**********",
  "DBInstanceId": "gp-rj***************",
  "OrderId": "*********"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-08-04The internal configuration of the API is changed, but the call is not affectedView Change Details