Queries the storage usage of SQL Explorer of a specified database instance.
- For information about supported database types, see Usage notes on DAS Professional Edition.
- If you use an SDK to call Database Autonomy Service (DAS), you must set the region to cn-shanghai.
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | GetDasProServiceUsage |
The operation that you want to perform. Set the value to GetDasProServiceUsage. |
UserId | String | No | 196278346919**** |
The ID of the Alibaba Cloud account that is used to create the database instance. Note This parameter is optional. The system can automatically obtain the account ID based
on the value of the InstanceId parameter when this operation is called.
|
InstanceId | String | Yes | rm-2ze8g2am97624**** |
The ID of the database instance. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Message | String | Successful |
The message that is returned for the request. Note If the request is successful, Successful is returned. If the request fails, an error message that contains information such
as an error code is returned.
|
RequestId | String | 7172BECE-588A-5961-8126-C216E16B**** |
The ID of the request. |
Data | Array of unit |
The returned data. |
|
storageFreeQuotaInMB | double | 5120 |
The SQL Explorer storage space offered free-of-charge. Unit: MB. |
ip | String | rm-2ze8g2am97624****.mysql.****.com |
The endpoint of the database instance. |
custinsId | Long | 57369374 |
An ID used for internal identification. |
userId | String | 196278346919**** |
The ID of the Alibaba Cloud account that is used to create the database instance. |
uuid | String | hdm_b0ae36343407609bf3e8df8709d8**** |
The UUID of the database instance. |
expireTime | Long | 1648742400000 |
The point of time when DAS Professional Edition for the database instance expires. The value of this parameter is a UNIX timestamp. Unit: milliseconds. |
instanceId | String | rm-2ze8g2am97624**** |
The ID of the database instance. |
storageUsed | Long | 35903498 |
The storage usage of SQL Explorer of the database instance. Unit: Byte. |
engine | String | MySQL |
The database engine of the instance. |
instanceAlias | String | TESTDB01 |
The name of the database instance. |
port | Integer | 3306 |
The port number. |
vpcId | String | vpc-2zentqj1sk4qmolci**** |
The ID of the VPC. |
commodityInstanceId | String | daspro-cn-v0h1l6i**** |
The ID of the DAS Professional Edition instance. |
startTime | Long | 1646100892000 |
The point of time when DAS Professional Edition is enabled for the database instance. The value of this parameter is a UNIX timestamp. Unit: milliseconds. |
isSpare | Boolean | false |
Indicates whether DAS Professional Edition for the database instance has expired. Valid values:
|
region | String | cn-shanghai |
The region where the database instance is deployed. |
serviceUnitId | String | 4 |
The service unit ID. |
sqlRetention | String | 180 |
The storage duration of SQL Explorer data. Unit: days. |
Code | Long | 200 |
The returned HTTP status code. |
Success | Boolean | true |
Indicates whether the request is successful. Valid values:
|
Examples
Sample requests
http(s)://das.cn-shanghai.aliyuncs.com/?Action=GetDasProServiceUsage
&UserId=196278346919****
&InstanceId=rm-2ze8g2am97624****
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<GetDasProServiceUsageResponse>
<Message>Successful</Message>
<RequestId>7172BECE-588A-5961-8126-C216E16B****</RequestId>
<Data>
<storageFreeQuotaInMB>5120</storageFreeQuotaInMB>
<ip>rm-2ze8g2am97624****.mysql.****.com</ip>
<custinsId>57369374</custinsId>
<userId>196278346919****</userId>
<uuid>hdm_b0ae36343407609bf3e8df8709d8****</uuid>
<expireTime>1648742400000</expireTime>
<instanceId>rm-2ze8g2am97624****</instanceId>
<storageUsed>35903498</storageUsed>
<engine>MySQL</engine>
<instanceAlias>TESTDB01</instanceAlias>
<port>3306</port>
<vpcId>vpc-2zentqj1sk4qmolci****</vpcId>
<commodityInstanceId>daspro-cn-v0h1l6i****</commodityInstanceId>
<startTime>1646100892000</startTime>
<isSpare>false</isSpare>
<region>cn-shanghai</region>
<serviceUnitId>4</serviceUnitId>
<sqlRetention>180</sqlRetention>
</Data>
<Code>200</Code>
<Success>true</Success>
</GetDasProServiceUsageResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Message" : "Successful",
"RequestId" : "7172BECE-588A-5961-8126-C216E16B****",
"Data" : {
"storageFreeQuotaInMB" : 5120,
"ip" : "rm-2ze8g2am97624****.mysql.****.com",
"custinsId" : 57369374,
"userId" : "196278346919****",
"uuid" : "hdm_b0ae36343407609bf3e8df8709d8****",
"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
},
"Code" : 200,
"Success" : true
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParams | The request parameters are invalid. | The error message returned because the specified request parameters are invalid. |
For a list of error codes, visit the API Error Center.