All Products
Search
Document Center

ApsaraDB RDS:DescribeResourceUsage

Last Updated:May 29, 2023

You can call the DescribeResourceUsage operation to query the storage usage of an ApsaraDB RDS instance.

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
  • RDS
    acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
  • rds:ResourceTag
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The ID of the resource group.

rm-uf6wjk5xxxxxxx
ResourceGroupIdstringNo

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.

rg-acfmy*****

Response parameters

ParameterTypeDescriptionExample
object
BackupOssDataSizelong

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

8821760
DiskUsedlong

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

2337275904
ArchiveBackupSizelong

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

0
BackupOssLogSizelong

The database engine that the instance runs.

44180999
BackupLogSizelong

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

45145563
BackupDataSizelong

The ID of the instance.

94324736
ColdBackupSizelong

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.

2337275904
DataSizelong

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

1292094741
PaidBackupSizelong

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

0
RequestIdstring

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.

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

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

1045181163
BackupSizelong

The ID of the instance.

53002759
DBInstanceIdstring

The ID of the request.

rm-uf6wjk5xxxxxxx

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 input parameters of the API operation change.
Change itemChange content
Input ParametersThe input parameters of the API operation change.
    Added Input Parameters: ResourceGroupId