Queries the storage usage of DAS Enterprise Edition V1 or V2 for a database instance.
Operation description
For information about the supported databases, see DAS Enterprise Edition.
When using the Alibaba Cloud or DAS SDK, use the latest version.
When invoking DAS by using the SDK, set the region to cn-shanghai.
This operation applies only to DAS Enterprise Edition V1 and V2.
Use the DescribeSqlLogStatistic operation to query the statistics information of DAS Enterprise Edition.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
hdm:GetDasProServiceUsage |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| UserId |
string |
No |
The user ID, which is the ID of the Alibaba Cloud account that is used to create the database instance. Note
This parameter is optional. If you specify the instance ID of the database instance, the system automatically obtains the user ID when you invoke the API operation. |
196278346919**** |
| InstanceId |
string |
Yes |
The database instance ID. |
rm-2ze8g2am97624**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Message |
string |
The returned message. Note
If the request is successful, Successful is returned. If the request fails, an error message such as an error code is returned. |
Successful |
| RequestId |
string |
The request ID. |
7172BECE-588A-5961-8126-C216E16B**** |
| Data |
object |
The returned data. |
{ "storageFreeQuotaInMB": 5120, "ip": "rm-2ze8g2am97624****.mysql.****.com", "custinsId": 12448331, "userId": "196278346919****", "uuid": "hdm_b0ae36343407609bf3e8df8709d8****", "expireTime": 1924963200000, "instanceId": "rm-2ze8g2am97624****", "storageUsed": 10773752667393, "engine": "MySQL", "instanceAlias": "TESTDB01_PROD", "port": 3310, "vpcId": "hdm_****", "commodityInstanceId": "daspro-****", "startTime": 1606381940000, "isSpare": false, "region": "cn-shanghai", "serviceUnitId": "5", "sqlRetention": 30 } |
| storageFreeQuotaInMB |
number |
The free storage quota for SQL Explorer data. Unit: MB. |
5120 |
| ip |
string |
The IP address of the database instance. |
rm-2ze8g2am97624****.mysql.****.com |
| userId |
string |
The user ID, which is the ID of the Alibaba Cloud account that is used to create the database instance. |
196278346919**** |
| expireTime |
integer |
The expiration time of DAS Enterprise Edition for the database instance. The value is a UNIX timestamp. Unit: milliseconds. |
1648742400000 |
| instanceId |
string |
The database instance ID. |
rm-2ze8g2am97624**** |
| storageUsed |
integer |
The storage space used by SQL Explorer data for the database instance. Unit: bytes. |
35903498 |
| engine |
string |
The database engine. |
MySQL |
| instanceAlias |
string |
The name of the database instance. |
TESTDB01 |
| port |
integer |
The port number. |
3306 |
| vpcId |
string |
VPC ID。 |
vpc-2zentqj1sk4qmolci**** |
| commodityInstanceId |
string |
The ID of DAS Enterprise Edition. |
daspro-cn-v0h1l6i**** |
| startTime |
integer |
The time when DAS Enterprise Edition was enabled. The value is a UNIX timestamp. Unit: milliseconds. |
1646100892000 |
| isSpare |
boolean |
Indicates whether DAS Enterprise Edition for the database instance has expired. Valid values:
|
false |
| region |
string |
The region in which the database instance resides. |
cn-shanghai |
| serviceUnitId |
string |
The service unit ID. |
4 |
| sqlRetention |
string |
The storage duration of SQL Explorer data. Unit: days. |
180 |
| migrationPredictRemainingTime |
integer |
The estimated remaining time for migrating from the original SQL Explorer and Audit to the new version. Unit: milliseconds. Important This parameter is returned only when the migration from the original SQL Explorer and Audit to the new version is in progress.
|
60000 |
| Code |
integer |
The returned status code. |
200 |
| Success |
boolean |
Indicates whether the request is successful. Valid values:
|
true |
Examples
Success response
JSON format
{
"Message": "Successful",
"RequestId": "7172BECE-588A-5961-8126-C216E16B****",
"Data": {
"storageFreeQuotaInMB": 5120,
"ip": "rm-2ze8g2am97624****.mysql.****.com",
"userId": "196278346919****",
"expireTime": 1648742400000,
"instanceId": "rm-2ze8g2am97624****",
"storageUsed": 35903498,
"engine": "MySQL",
"instanceAlias": "TESTDB01",
"port": 3306,
"vpcId": "vpc-2zentqj1sk4qmolci****",
"commodityInstanceId": "daspro-cn-v0h1l6i****",
"startTime": 1646100892000,
"isSpare": false,
"region": "cn-shanghai",
"serviceUnitId": "4",
"sqlRetention": "180",
"migrationPredictRemainingTime": 60000
},
"Code": 200,
"Success": true
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParams | The request parameters are invalid. | The request parameters are invalid. |
| 403 | NoPermission | You are not authorized to do this action. | You do not have the permissions to perform this operation. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.