All Products
Search
Document Center

AnalyticDB:UpgradeDBInstance

Last Updated:Mar 21, 2026

Modifies the specifications of an AnalyticDB for PostgreSQL instance.

Operation description

This operation does not support instances in storage-reserved mode.

Before you call this operation, ensure that you understand the billing methods and pricing of AnalyticDB for PostgreSQL.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

gpdb:UpgradeDBInstance

update

*DBInstance

acs:gpdb:{#regionId}:{#accountId}:dbinstance/{#DBInstanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

ResourceGroupId

string

No

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

rg-bp67acfmxazb4p****

RegionId

string

No

The region ID.

Note

You can call the DescribeRegions operation to query available region IDs.

cn-hangzhou

DBInstanceClass

string

No

This parameter is deprecated.

null

DBInstanceGroupCount

string

No

This parameter is deprecated.

null

DBInstanceId

string

Yes

The instance ID.

Note

You can call the DescribeDBInstances operation to query the details of all AnalyticDB for PostgreSQL instances in a specific region.

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

PayType

string

No

This parameter is deprecated.

null

MasterNodeNum

string

No

This parameter is deprecated.

null

SegNodeNum

string

No

The number of segment nodes. The supported number of nodes varies by instance resource type and edition:

  • Storage-elastic Mode High-availability Edition: values must be a multiple of 4, from 4 to 512.

  • Storage-elastic Mode High-performance Edition: values must be a multiple of 2, from 2 to 512.

  • Serverless manual-scheduling mode: values must be a multiple of 2, from 2 to 512.

2

InstanceSpec

string

No

The segment node specifications. For more information about supported node specifications, see Instance specifications.

Note

This parameter is applicable only to Storage-elastic Mode instances.

4C16G

StorageSize

string

No

The storage capacity of each segment node. Unit: GB. The value must be a multiple of 50, from 50 to 6000.

Note

This parameter is applicable only to Storage-elastic Mode instances.

100

SegDiskPerformanceLevel

string

No

The performance level (PL) of the cloud disks. Valid values:

  • pl0: PL0

  • pl1: PL1

  • pl2: PL2

pl1

SegStorageType

string

No

The target disk storage type. This operation only supports upgrading to an ESSD cloud disk. Set the value to cloud_essd.

cloud_essd

UpgradeType

integer

No

The change type. Valid values:

  • 0 (default): changes the number of segment nodes. The SegNodeNum parameter is required.

  • 1: changes the segment node specifications and storage capacity. The InstanceSpec parameter is required. The StorageSize parameter is optional, and its value must be greater than or equal to the current storage capacity.

  • 2: changes the number of master nodes. The MasterNodeNum parameter is required.

  • 3: changes the disk type and performance level (PL). The SegDiskPerformanceLevel and SegStorageType parameters are required.

Note
  • Support for compute node scaling varies by instance resource type. For more information, see Considerations.

  • Only the parameters corresponding to the specified change type take effect. For example, if you set UpgradeType to 0 and specify both SegNodeNum and MasterNodeNum, only the SegNodeNum parameter takes effect.

  • Changing the number of master nodes is supported only for instances on the China site (aliyun.com).

  • You can change the disk storage type only from Ultra Disk to ESSD.

0

ServerlessResource

string

No

CacheStorageSize

string

No

Response elements

Element

Type

Description

Example

object

The response object.

RequestId

string

The request ID.

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

DBInstanceId

string

The instance ID.

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

OrderId

string

The order ID.

*********

Examples

Success response

JSON format

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

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.