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

RDS for MySQL

Copy page
Download PDF
Managing instances
DescribeDBInstanceChargeDetail
Copy page
Download PDF
DescribeDBInstanceChargeDetail

Call the DescribeDBInstanceChargeDetail API to query the billing information of the instance.

Request type

Synchronous request.

Request parameters

Name
Type
Required
Example
Description
InstanceId
String
Yes
mysql-f83edc2e****
Instance ID.

Response parameters

Name
Type
Example
Description
ChargeDetail
Object
Please refer to the return example.
Billing information for the instance.
ChargeType
String
PostPaid

Payment type. Values:

  • PostPaid: Pay-as-you-go (post-payment).
  • PrePaid: Annual and monthly subscription (pre-payment).
AutoRenew
Boolean
true

Whether to automatically renew in the prepaid scenario.

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

The purchase cycle in the prepaid scenario.

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

tip

When this parameter is used as a request parameter, the default value is Month.

Period
Integer
1

The purchase duration in the prepaid scenario.

tip

  • When this parameter is used as a request parameter, the default value is 1.
  • When the value of PeriodUnit is Year, the value range of Period is 1~3.
  • When the value of PeriodUnit is Month, the value range of Period is 1~9.
ChargeStatus
String
Normal

Billing status of the instance. Values:

  • Normal: Normal.
  • Overdue: Arrears.
  • Unpaid: Waiting for payment.
ChargeStartTime
String
2025-07-22T13:10:15.000Z
The billing start time of the instance (UTC time). The format is yyyy-MM-ddTHH:mm:ss.sssZ.
ChargeEndTime
String
2025-08-22T15:59:59.000Z

The billing end time (UTC time) of the yearly and monthly subscribed instances. The format is yyyy-MM-ddTHH:mm:ss.sssZ.

tip

If the queried instance is a pay-as-you-go instance, this field will be returned as empty.

OverdueTime
String
2025-08-23T04:00:00.000Z
The time (UTC time) when the instance is shut down due to arrears (pay-as-you-go) or expiration (yearly/monthly subscription). The format is yyyy-MM-ddTHH:mm:ss.sssZ.
OverdueReclaimTime
String
2025-08-29T15:59:59.000Z
The expected release time (UTC time) after the instance is shut down due to arrears (pay-as-you-go) or expiration (yearly or monthly subscription). The format is yyyy-MM-ddTHH:mm:ss.sssZ.
TempModifyStartTime
String
2022-01-01T10:10:10.000Z

The start time of the temporary upgrade (UTC time). The format is yyyy-MM-ddTHH:mm:ss.sssZ.

tip

For instances that are not in the temporary upgrade period, this field will not be returned.

TempModifyEndTime
String
2022-01-01T10:10:09.000Z

The restoration time (UTC time) of the temporary upgrade. The format is yyyy-MM-ddTHH:mm:ss.sssZ.

tip

For instances not in the temporary upgrade period, this field is not returned.

Sample request

POST /?Action=DescribeDBInstanceChargeDetail&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****
{
    "InstanceId": "mysql-f83edc2e****"
}

Sample response

{
    "ResponseMetadata": {
        "RequestId": "2025072414470358C0C64BFA4C2A01A242-870b4a",
        "Action": "DescribeDBInstanceChargeDetail",
        "Version": "2022-01-01",
        "Service": "rds_mysql",
        "Region": "cn-guangzhou"
    },
    "Result": {
        "ChargeDetail": {
            "AutoRenew": true,
            "ChargeEndTime": "2025-08-22T15:59:59.000Z",
            "ChargeStartTime": "2025-07-22T13:10:15.000Z",
            "ChargeStatus": "Normal",
            "ChargeType": "PrePaid",
            "OverdueReclaimTime": "2025-08-29T15:59:59.000Z",
            "OverdueTime": "2025-08-23T04:00:00.000Z",
            "Period": 1,
            "PeriodUnit": "Month"
        }
    }
}

Error codes

For more details, refer to Error codes.

Last updated: 2025.08.15 18:32:45