You need to enable JavaScript to run this app.
RDS for PostgreSQL

RDS for PostgreSQL

Copy page
Download PDF
Managing instances
DescribeDBInstancePriceDifference
Copy page
Download PDF
DescribeDBInstancePriceDifference
Call the DescribeDBInstancePriceDifference API to query instance price difference.​
Request type​
Synchronous request.​
Debug​
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
​
Request parameters​
​
Parameter​
Type​
Required?​
Example​
Description​
InstanceId​
String​
Yes​
postgres-5aeb3f0b****​
Instance ID.​
tip​
When ModifyType is set to Temporary, the instance specified by InstanceId can only be a prepaid (subscription) instance.​
NodeInfo​
Array of NodeInfoObject​
Yes​
Refer to the request example.​
Instance specification configuration. There is exactly one primary node and one secondary node, with 0 to 10 optional read-only nodes.​
tip​
When ModifyType value is Temporary, NodeID must be specified.​
StorageType​
String​
Yes​
LocalSSD​
Instance storage type. Fixed value LocalSSD (local SSD disk).​
StorageSpace​
Integer​
Yes​
100​
Instance storage space. Unit is GB, with a step size of 10 GB.​
tip​
  • Different specifications have different storage space value ranges. For detailed information on storage space value ranges, refer to Product specifications.​
  • This field is required when ModifyType is Temporary, and its value can only be the current storage space size of the instance.​
ChargeInfo​
Object of ChargeInfoObject​
Yes​
{​
"ChargeType": "PostPaid"​
}​
Payment method.​
tip​
When ModifyType is set to Temporary, ChargeType can only be PrePaid.​
ModifyType​
String​
No​
Temporary​
Modification method. Values are:​
  • Usually: regular modification of specification, which takes effect immediately. Default value.​
  • Temporary: elastic upgrade, that is, temporary upgrade.​
tip​
Only instances with the billing method of subscription support the parameter value Temporary. You can query the instance's billing method by calling the DescribeDBInstanceDetail API.​
RollbackTime​
String​
No​
2023-12-16T03:59:10.000Z​
Restoration time. The time format is yyyy-MM-ddTHH:mm:ss.sssZ (UTC time).​
tip​
  • This parameter is required when ModifyType is Temporary.​
  • This parameter is effective only when ModifyType is Temporary.​
  • The set restoration time should not differ from the API call time by more than 2 minutes. The actual restoration time is based on the API call time.​
  • Temporary upgrades can be initiated multiple times to extend the temporary upgrade period, but the total duration cannot exceed 30 days (based on the time of the first temporary upgrade initiation).​
  • Multiple temporary upgrades can be initiated, but their duration cannot be shortened. If the instance is already in the temporary upgrade period:​
  • The new restoration date cannot be earlier than the effective restoration date.​
  • When the subscription instance is within five days of expiration, initiating another temporary upgrade is not allowed.​
​
NodeInfoObject​
​
Parameter​
Type​
Is it required?​
Example​
Description​
NodeId​
String​
No​
postgres-ca7b7019****​
Node ID. You can call the DescribeDBInstanceDetail API to query.​
tip​
Required when modifying node specification and deleting nodes (ModifyDBInstancesSpec).​
ZoneId​
String​
Yes​
cn-beijing-a​
The availability zone where the node is located. You can call the DescribeAvailabilityZones API to query it.​
tip​
  • Required when creating an instance (CreateDBInstance), restoring to a new instance (RestoreToNewInstance), and adding or modifying nodes (ModifyDBInstancesSpec).​
  • Primary, secondary, and read-only nodes can be deployed in different availability zones within the same region.​
NodeType​
String​
Yes​
Primary​
Node type, with values:​
  • Primary: Primary node.​
  • Secondary: indicates the secondary node.​
  • ReadOnly: Read-only node.​
NodeSpec​
String​
Yes​
rds.postgres.1c2g​
Node specification. Query specifications available for sale via DescribeDBInstanceSpecs API.​
NodeOperateType​
String​
No​
Create​
Operation type. Range:​
  • Create: add.​
  • Delete: delete.​
  • Modify: modify.​
tip​
  • In the CreateDBInstance and RestoreToNewInstance APIs, this field can only be set to Create.​
  • When modifying instance configuration, the specified NodeOperateType must be passed in for the involved nodes.​
​
ChargeInfoObject​
​
Parameter​
Type​
Required?​
Example​
Description​
ChargeType​
String​
Yes​
PostPaid​
Payment type. Values:​
  • PostPaid: pay-as-you-go.​
  • PrePaid: subscription (default).​
AutoRenew​
Boolean​
No​
true​
Is automatic renewal enabled for the prepaid scenario?​
  • yes: automatic renewal.​
  • false: no automatic renewal (default).​
PeriodUnit​
String​
No​
Month​
Purchase period for prepaid scenarios.​
  • Month: monthly (default).​
  • Year: subscription.​
Period​
Integer​
No​
1​
Subscription duration in a prepaid scenario. default value: 1.​
Number​
Integer​
No​
1​
Instance purchase quantity. Acceptable integer values range from 1 to 20, with a default of 1.​
tip​
When ChargeInfoObject is referenced by the RestoreToNewInstance API, Number can only be set to 1.​
​
Response parameters​
​
Parameter​
Type​
Example​
Description​
Currency​
String​
RMB​
Currency unit. Default is RMB.​
OriginalPrice​
Double​
-17.5​
Original instance price.​
DiscountPrice​
Double​
-17.5​
Instance discount price.​
PayablePrice​
Double​
-17.5​
Instance payable price.​
ChargeItemPrices​
Refer to the sample response.​
Cost details.​
​
ChargeItemPriceObject​
​
Parameter​
Type​
Example​
Description​
ChargeItemType​
String​
Primary​
Billing item name, with values:​
  • Primary: Primary node.​
  • Secondary: indicates the secondary node.​
  • ReadOnly: Read-only node.​
  • Storage: physical storage space.​
ChargeItemKey​
String​
rds.pg.d1.1c2g​
  • If ChargeItemKey is set to Primary, Secondary, or ReadOnly, this parameter returns the instance specification, such as rds.pg.d1.1c2g.​
  • If ChargeItemKey is set to Storage, this parameter returns the storage key, such as rds.pg.d1.localssd.​
ChargeItemValue​
Integer​
100​
  • If ChargeItemKey is set to Primary, Secondary, or ReadOnly, this parameter returns the number of nodes, which is always 1.​
  • If ChargeItemKey is set to Storage, this parameter returns the storage capacity size in GB.​
NodeNumPerInstance​
Integer​
3​
Number of nodes per instance.​
OriginalPrice​
Double​
300​
Original price.​
DiscountPrice​
Double​
200​
Discount price.​
PayablePrice​
Double​
100​
Payable price.​
​
Example​
Sample request 1 Query price difference for regular modification of specification on instance​
​
POST /?Action=DescribeDBInstancePriceDifference&Version=2022-01-01 HTTP/1.1​
Content-Type: application/json​
Host: rds-postgresql.cn-beijing.volcengineapi.com​
X-Date: 20231002T101010Z​
Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_postgresql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458****​
{​
"InstanceId": "postgres-5aeb3f0b****",​
"NodeInfo": [​
{​
"NodeSpec": "rds.postgres.1c2g",​
"NodeType": "Primary"​
},​
{​
"NodeSpec": "rds.postgres.1c2g",​
"NodeType": "Secondary"​
}​
],​
"StorageType": "LocalSSD",​
"StorageSpace": 100,​
"ChargeInfo": {​
"ChargeType": "PrePaid"​
}​
}​
​
Sample response 1​
​
{​
"ResponseMetadata": {​
"RequestId": "202306192156254A900086CBECA123D60F",​
"Action": "DescribeDBInstancePriceDifference",​
"Version": "2022-01-01",​
"Service": "rds_postgresql",​
"Region": "cn-beijing"​
},​
"Result": {​
"ChargeItemPrices": [​
{​
"ChargeItemKey": "rds.pg.d1.1c2g",​
"ChargeItemType": "Primary",​
"ChargeItemValue": 1,​
"DiscountPrice": 120.345,​
"OriginalPrice": 120.345,​
"PayablePrice": 120.345​
},​
{​
"ChargeItemKey": "rds.pg.d1.1c2g",​
"ChargeItemType": "Secondary",​
"ChargeItemValue": 1,​
"DiscountPrice": 120.345,​
"OriginalPrice": 120.345,​
"PayablePrice": 120.345​
},​
{​
"ChargeItemKey": "rds.pg.d1.localssd",​
"ChargeItemType": "Storage",​
"ChargeItemValue": 100,​
"DiscountPrice": 0.05368034,​
"NodeNumPerInstance": 2,​
"OriginalPrice": 0.25,​
"PayablePrice": 0.05368034​
}​
],​
"Currency": "人民币",​
"DiscountPrice": -17.5,​
"OriginalPrice": -17.5,​
"PayablePrice": -17.5​
}​
}​
​
Sample request 2 Query price difference for temporary upgrade of an instance (upgrade node specification)​
​
POST /?Action=DescribeDBInstancePriceDifference&Version=2022-01-01 HTTP/1.1​
Content-Type: application/json​
Host: rds-postgresql.cn-beijing.volcengineapi.com​
X-Date: 20231002T101010Z​
Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_postgresql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458****​
{​
"InstanceId": "postgres-3461581d****",​
"NodeInfo": [​
{​
"NodeId": "postgres-3461581d****",​
"NodeSpec": "rds.postgres.2c4g",​
"NodeType": "Primary"​
},​
{​
"NodeId": "postgres-3461581d****-wjrh",​
"NodeSpec": "rds.postgres.2c4g",​
"NodeType": "Secondary"​
},​
{​
"NodeId": "postgres-3461581d****-ro6bf6",​
"NodeSpec": "rds.postgres.2c4g",​
"NodeType": "ReadOnly"​
}​
],​
"ChargeInfo": {​
"ChargeType": "PrePaid"​
},​
"StorageType": "LocalSSD",​
"StorageSpace": 20,​
"ModifyType": "Temporary",​
"RollbackTime": "2023-12-16T03:49:10.000Z"​
}​
​
Sample response 2​
​
{​
"ResponseMetadata": {​
"RequestId": "202306192156254A900086CBECA123D60F",​
"Action": "DescribeDBInstancePriceDifference",​
"Version": "2022-01-01",​
"Service": "rds_postgresql",​
"Region": "cn-beijing"​
},​
"Result": {​
"ChargeItemPrices": [​
{​
"ChargeItemKey": "rds.pg.d1.1c2g",​
"ChargeItemType": "Primary",​
"ChargeItemValue": 1,​
"DiscountPrice": 120.345,​
"OriginalPrice": 120.345,​
"PayablePrice": 120.345​
},​
{​
"ChargeItemKey": "rds.pg.d1.1c2g",​
"ChargeItemType": "Secondary",​
"ChargeItemValue": 1,​
"DiscountPrice": 120.345,​
"OriginalPrice": 120.345,​
"PayablePrice": 120.345​
},​
{​
"ChargeItemKey": "rds.pg.d1.localssd",​
"ChargeItemType": "Storage",​
"ChargeItemValue": 100,​
"DiscountPrice": 0.05368034,​
"NodeNumPerInstance": 2,​
"OriginalPrice": 0.25,​
"PayablePrice": 0.05368034​
}​
],​
"Currency": "人民币",​
"DiscountPrice": -17.5,​
"OriginalPrice": -17.5,​
"PayablePrice": -17.5​
}​
}​
​
Last updated: 2026.03.31 10:45:18