All Products
Search
Document Center

ApsaraDB RDS:DescribeResourceUsage

Last Updated:Mar 22, 2024

Queries the storage usage of an instance.

Operation description

Supported database engines

  • MySQL
  • PostgreSQL
  • SQL Server
  • MariaDB

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
rds:DescribeResourceUsageREAD
  • DBInstance
    acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
  • rds:ResourceTag
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The instance ID. You can call the DescribeDBInstances operation to query the instance ID.

rm-uf6wjk5xxxxxxx
ResourceGroupIdstringNo

The resource group ID.

rg-acfmy*****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

BackupOssDataSizelong

The size of data backup files that are stored in Object Storage Service (OSS) buckets. Unit: bytes. The value 0 indicates no data backup files are stored in OSS buckets.

8821760
DiskUsedlong

The total storage that is occupied by data files and log files on the instance. Unit: bytes. The value -1 indicates that no data files or log files are stored on the instance.

2337275904
ArchiveBackupSizelong

The storage that is occupied by archived backup files on the instance. Unit: bytes.

0
BackupOssLogSizelong

The size of log backup files that are stored in OSS buckets. Unit: bytes. The value 0 indicates no log backup files are stored in OSS buckets.

44180999
BackupLogSizelong

The storage that is occupied by log backup files, excluding archived backup files, on the instance. Unit: bytes.

45145563
BackupDataSizelong

The storage that is occupied by data backup files, excluding archived backup files, on the instance. Unit: bytes.

94324736
ColdBackupSizelong

The storage that is used to store cold backup files. Unit: bytes. The value -1 indicates that no cold backup files are stored.

2337275904
DataSizelong

The storage that is used to store data files. Unit: bytes. The value -1 indicates that no data files are stored.

1292094741
PaidBackupSizelong

The backup storage for which you must pay. The system provides a free quota on backup storage. You must pay for the backup storage that exceeds the free quota. Unit: bytes.

0
RequestIdstring

The request ID.

F937E173-559C-4498-8D90-38D32342B9E4
LogSizelong

The storage that is used to store log files. Unit: bytes. The value -1 indicates that no log files are stored.

1045181163
BackupSizelong

The storage that is used to store backup files. Unit: bytes. The value -1 indicates that no backup files are stored.

53002759
DBInstanceIdstring

The instance ID.

rm-uf6wjk5xxxxxxx
Enginestring

The database engine of the instance.

MySQL
SQLSizelong

The storage that is occupied to execute SQL statements on the instance. Unit: bytes. The value -1 indicates that no SQL statements are executed.

315052751

Examples

Sample success responses

JSONformat

{
  "BackupOssDataSize": 8821760,
  "DiskUsed": 2337275904,
  "ArchiveBackupSize": 0,
  "BackupOssLogSize": 44180999,
  "BackupLogSize": 45145563,
  "BackupDataSize": 94324736,
  "ColdBackupSize": 2337275904,
  "DataSize": 1292094741,
  "PaidBackupSize": 0,
  "RequestId": "F937E173-559C-4498-8D90-38D32342B9E4",
  "LogSize": 1045181163,
  "BackupSize": 53002759,
  "DBInstanceId": " rm-uf6wjk5xxxxxxx",
  "Engine": "MySQL",
  "SQLSize": 315052751
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2022-08-04The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: ResourceGroupId