Changes the specifications of an AnalyticDB for PostgreSQL instance.

Description

This operation can be called to change the specifications of an AnalyticDB for PostgreSQL instance and the number of nodes in the instance.

Note This operation cannot be used for instances in reserved storage mode.

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

Limits

You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered and may affect your business. We recommend that you take note of the limit when you call this operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes UpgradeDBInstance

The operation that you want to perform. Set the value to UpgradeDBInstance.

RegionId String No cn-hangzhou

The region ID of the instance.

Note You can call the DescribeRegions operation to query the most recent region list.
DBInstanceClass String No null

This parameter is no longer used.

DBInstanceGroupCount String No null

This parameter is no longer used.

DBInstanceId String Yes gp-rj***************

The ID of the instance.

Note You can call the DescribeDBInstances operation to query the details of all AnalyticDB for PostgreSQL instances in a specific region, including instance IDs.
PayType String No null

This parameter is no longer used.

MasterNodeNum String No 2

The number of coordinator nodes. Valid values: 1 and 2.

Note This parameter is available only on the China site (aliyun.com).
SegNodeNum String No 2

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

  • Valid values for High-availability Edition instances in elastic storage mode: 4 to 512, in 4 increments
  • Valid values for Basic Edition instances in elastic storage mode: 2 to 512, in 2 increments
  • Valid values for High-availability Edition instances in Serverless mode: 2 to 512, in 2 increments
InstanceSpec String No 4C16G

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

Note This parameter is available only for instances in elastic storage mode.
StorageSize String No 100

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

Note This parameter is available only for instances in elastic storage mode.
UpgradeType Long No 0

The type of instance specification change. Default value: 0. Valid values:

  • 0: changes the number of compute nodes.
  • 1: changes the specifications and storage capacity of compute nodes.
  • 2: changes the number of coordinator nodes.
Note
  • The supported changes to compute node specifications vary based on the instance resource type. For more information, see the "Precautions" section of the Change the specifications of compute nodes topic.
  • After you specify a change type, only the corresponding parameter takes effect. For example, if you set UpgradeType to 0, the parameter used to change the number of compute nodes takes effect, but the parameter 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).

Response parameters

Parameter Type Example Description
RequestId String 25C11EE5-B7E8-481A-A07C-BD**********

The ID of the request.

DBInstanceId String gp-rj***************

The ID of the instance.

OrderId String *********

The ID of the order.

Examples

Sample requests

http(s)://gpdb.aliyuncs.com/?Action=UpgradeDBInstance
&RegionId=cn-hangzhou
&DBInstanceId=gp-rj***************
&SegNodeNum=2
&UpgradeType=0
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<UpgradeDBInstanceResponse>
    <RequestId>25C11EE5-B7E8-481A-A07C-BD**********</RequestId>
    <DBInstanceId>gp-rj***************</DBInstanceId>
    <OrderId>*********</OrderId>
</UpgradeDBInstanceResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

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

Error codes

For a list of error codes, visit the API Error Center.