All Products
Search
Document Center

Database Autonomy Service:GetDasProServiceUsage

Last Updated:Aug 22, 2026

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.

Note

Use the DescribeSqlLogStatistic operation to query the statistics information of DAS Enterprise Edition.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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:

  • true: Expired.

  • false: Not expired.

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: The request is successful.

  • false: The request fails.

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.