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

RDS for MySQL

Copy page
Download PDF
Resource plan management
DescribeResourcePackagePrice
Copy page
Download PDF
DescribeResourcePackagePrice

Call the DescribeResourcePackagePrice interface to query the purchase price of the resource package.

Request type

Synchronous request.

Request parameters

Name
Type
Required
Example
Description
PackageType
String
Yes
StoragePackage
The type of the resource package. Currently, only the value StoragePackage is supported, which means a storage package.
PackageSpec
String
Yes
100

Resource package specifications. If the value of PackageType is StoragePackage, the valid values for PackageSpec are as follows:

  • 100: 100 GiB.
  • 200: 200 GiB.
  • 300: 300 GiB.
  • 500: 500 GiB.
  • 1000: 1000 GiB.
  • 2000: 2000 GiB.
  • 5000: 5000 GiB.
  • 10000: 10000 GiB.
ChargeInfo
Object
Yes
Please refer to the request example.
The purchase duration of the resource package.
ChargeType
String
Yes
PostPaid

Payment type. Value:

  • PostPaid: Pay-as-you-go (postpaid).
  • PrePaid: Annual or monthly subscription (prepaid).
AutoRenew
Boolean
No
true

Whether to automatically renew upon expiration in the prepaid scenario. Value range:

  • true: Automatically renew upon expiration.
  • false: Do not automatically renew upon expiration.

tip

  • When the value of ChargeType is PrePaid, this parameter is required.
  • When the value of ChargeType is PostPaid, this parameter does not need to be passed in.
PeriodUnit
String
No
Month

The purchase cycle in the prepaid scenario. Value range:

  • Month: The purchase cycle is monthly.
  • Year: The purchase cycle is yearly.

tip

  • When the value of ChargeType is PrePaid, this parameter is required.
  • When the value of ChargeType is PostPaid, this parameter does not need to be passed in.
Period
Integer
No
1

The purchase duration in the prepaid scenario. The value range of this parameter depends on the value of PeriodUnit:

  • When the value of PeriodUnit is Month, the value of Period is 1~9.
  • When the value of PeriodUnit is Year, the value of Period is 1~3.

tip

  • When the value of ChargeType is PrePaid, this parameter is required.
  • When the value of ChargeType is PostPaid, this parameter does not need to be passed in.
Number
Integer
No
1

The number of instances purchased. The value range is 1~50. The default value is 1.

tip

  • In the RestoreToNewInstance and RestoreToCrossRegionInstance interfaces, only the value 1 is supported for this field.

  • It is not supported to specify names for instances separately when creating instances in batches. When creating instances in batches:

    • If the instance name is specified in the InstanceName parameter, the serial number will be added after the specified instance name to name the batch-created instances.
    • If the instance name is not specified in the InstanceName parameter, the instance ID will be used to name the instance.

Response parameters

Name
Type
Example
Description
OriginalPrice
Double
120
Original total price.
DiscountPrice
Double
120
Total price after discount.
PayablePrice
Double
120
Total payable price.
Currency
String
Renminbi (RMB)
Currency unit. The default value is Renminbi.
ChargeItemPrices
Object[]
Please refer to the return example.
Cost details of configuration items
ChargeItemKey
String
rds.mysql.d1.1c2g_cn-guangzhou
The Key of the billing item.
ChargeItemType
String
Proxy

Billing item names, with values:

  • Primary: Primary node.
  • Secondary: Secondary node.
  • ReadOnly: Read-only node.
  • Storage: Physical storage space.
  • Proxy: Database proxy.
ChargeItemValue
Long
6
  • If the value of ChargeItemType is Primary, Secondary, or ReadOnly, this field represents the number of nodes.
  • If the value of ChargeItemType is Proxy, this field represents the number of CPU cores of the data proxy service.
  • If the value of ChargeItemType is Storage, this field represents the storage space size of a single node, with the unit of GiB.
  • If the value of ChargeItemType is StoragePackage, this field represents the size of the resource package, with the unit of GiB.
DiscountPrice
Double
0.3942
The discount amount for this billing item.
OriginalPrice
Double
0.876
The original price of this billing item.
PayablePrice
Double
0.3942
The payable fee for this billing item.
Quantity
Integer
2
Number.
HidePriceInfo
Boolean
false

Whether the price information is hidden. If set, the specific price will be replaced with ***. Values:

  • true: Yes.
  • false: No.

Sample request

POST /?Action=DescribeResourcePackagePrice&Version=2022-01-01 HTTP/1.1
Content-Type: application/json
Host: rds-mysql.cn-beijing.volcengineapi.com
X-Date: 20211202T101010Z
Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_mysql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458****
{
    "PackageType": "StoragePackage",
    "PackageSpec": "100",
    "ChargeInfo": {
        "PeriodUnit": "Month",
        "Period": 1,
        "Number": 2
    }
}

Sample response

{
    "ResponseMetadata": {
        "RequestId": "20250922224931B99C6E39ED68C0631967-9216c5",
        "Action": "DescribeResourcePackagePrice",
        "Version": "2022-01-01",
        "Service": "rds_mysql",
        "Region": "cn-beijing"
    },
    "Result": {
        "ChargeItemPrices": [
            {
                "ChargeItemKey": "rds.mysql.storage.pkg100",
                "ChargeItemType": "StoragePackage",
                "ChargeItemValue": 100,
                "DiscountPrice": 120,
                "OriginalPrice": 120,
                "PayablePrice": 120,
                "UnitPrice": 0
            }
        ],
        "Currency": "",
        "DiscountPrice": 120,
        "HidePriceInfo": false,
        "OriginalPrice": 120,
        "PayablePrice": 120,
        "Quantity": 2
    }
}

Error codes

For more details, refer to Error codes.

Last updated: 2025.12.08 15:47:13