Queries the disk space usage of an AnalyticDB for PostgreSQL instance in reserved storage mode.

Description

This operation is called to query the disk space usage of an AnalyticDB for PostgreSQL instance in reserved storage mode, including the disk space used to store data files, log files, and backup files.

Limit

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 DescribeResourceUsage

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

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

The ID of the instance in reserved storage mode.

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

Response parameters

Parameter Type Example Description
LogSize Long 201326592

The disk space used to store log files. Unit: byte. A value of -1 indicates that no disk space is used.

RequestId String 47AB1806-37FF-5E92-A91E-F2**********

The ID of the request.

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

The ID of the instance.

DataSize Long 405798912

The disk space used to store data files. Unit: byte. A value of -1 indicates that no disk space is used.

BackupSize Long 26624

The disk space used to store backup files. Unit: byte. A value of -1 indicates that no disk space is used.

DiskUsed Long 607125504

The total disk space used. The value is a sum of the DataSize and LogSize values. A value of -1 indicates that no disk space is used.

Engine String gpdb

The database engine of the instance.

Examples

Sample requests

https://gpdb.aliyuncs.com/?Action=DescribeResourceUsage
&DBInstanceId=gp-rj***************
&<Common request parameters>

Sample success responses

XML format

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

<DescribeResourceUsageResponse>
    <LogSize>201326592</LogSize>
    <RequestId>47AB1806-37FF-5E92-A91E-F2**********</RequestId>
    <DBInstanceId>gp-rj***************</DBInstanceId>
    <DataSize>405798912</DataSize>
    <BackupSize>26624</BackupSize>
    <DiskUsed>607125504</DiskUsed>
    <Engine>gpdb</Engine>
</DescribeResourceUsageResponse>

JSON format

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

{
  "LogSize" : 201326592,
  "RequestId" : "47AB1806-37FF-5E92-A91E-F2**********",
  "DBInstanceId" : "gp-rj***************",
  "DataSize" : 405798912,
  "BackupSize" : 26624,
  "DiskUsed" : 607125504,
  "Engine" : "gpdb"
}

Error codes

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