All Products
Search
Document Center

AnalyticDB:UpgradeDBInstance

Last Updated:Sep 18, 2026

Changes the specifications of an AnalyticDB for PostgreSQL instance.

Operation description

This operation does not support instances in storage reservation mode.

Before you call this operation, make sure that you fully 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 information about how to obtain the resource group ID, 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

[Deprecated] This parameter is deprecated. You do not need to specify this parameter.

null

DBInstanceGroupCount

string

No

[Deprecated] This parameter is deprecated. You do not need to specify this parameter.

null

DBInstanceId

string

Yes

The instance ID.

Note

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

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

PayType

string

No

[Deprecated] This parameter is deprecated. You do not need to specify this parameter.

null

MasterNodeNum

string

No

[Deprecated] This parameter is deprecated. You do not need to specify this parameter.

null

SegNodeNum

string

No

The number of segment nodes. The supported number of nodes varies based on the instance resource type and instance edition:

  • Elastic storage mode, high-availability edition: valid values are 4 to 512, in increments of 4.

  • Elastic storage mode, high-performance edition: valid values are 2 to 512, in increments of 2.

  • Serverless manual scheduling mode: valid values are 2 to 512, in increments of 2.

2

InstanceSpec

string

No

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

Note

This parameter is supported only for elastic storage mode instances.

4C16G

StorageSize

string

No

The storage capacity of segment nodes. Unit: GB. Valid values: 50 to 6000, in increments of 50.

Note

This parameter is supported only for elastic storage mode instances.

100

SegDiskPerformanceLevel

string

No

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

  • pl0: PL0.

  • pl1: PL1.

  • pl2: PL2.

pl1

SegStorageType

string

No

The cloud disk storage type after the change. Currently, only ESSD cloud disks are supported. Set the value to cloud_essd.

cloud_essd

UpgradeType

integer

No

The type of the specification change. Valid values:

  • 0 (default): Changes the number of segment nodes. SegNodeNum is required. Other parameters do not take effect.

  • 1: Changes the segment node specifications and instance storage capacity. InstanceSpec is required. StorageSize is optional and must be greater than or equal to the current instance storage capacity.

  • 2: Changes the number of master nodes. MasterNodeNum is required. Other parameters do not take effect.

  • 3: Changes the cloud disk storage type and performance level (PL). SegDiskPerformanceLevel and SegStorageType are required. Other parameters do not take effect.

Note
  • Different instance resource types support different Upgrade/Downgrade operations for compute nodes. For more information, see Precautions.

  • After you select a specification change type, only the corresponding parameters take effect. Other parameters do not take effect. For example, if UpgradeType is set to 0 and you specify both the number of segment nodes and the number of master nodes, only the number of segment nodes is changed.

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

  • You can change the cloud disk storage type only from standard SSD to ESSD cloud disk.

0

ServerlessResource

string

No

  • Serverless instances: The compute resource threshold. Valid values: 8 to 32, in increments of 8. Unit: ACU. Default value: 32.

  • Serverless Pro instances: The reserved compute resources. Valid values: 16 to 1024. Unit: ACU. Default value: 16. The increment rules are as follows:

    • Range 16 to 32: increments of 4.

    • Range 32 to 64: increments of 8.

    • Range 64 to 128: increments of 16.

    • Range 128 to 256: increments of 32.

    • Range greater than 256: increments of 64.

Note

This parameter is required only for Serverless automatic scheduling mode and Serverless Pro instances.

16

CacheStorageSize

string

No

The Serverless cache storage capacity. Unit: GB.

Note

This parameter is required only for Serverless Pro instances.

800

Response elements

Element

Type

Description

Example

object

DBInstanceId

string

The instance ID.

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

OrderId

string

The order ID.

*********

RequestId

string

The request ID.

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

Examples

Success response

JSON format

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

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.