All Products
Search
Document Center

Database Autonomy Service:GetDasProServiceUsage

Last Updated:Jun 10, 2026

Mengkueri penggunaan penyimpanan Instansiasi database yang Database Autonomy Service (DAS) Edisi Perusahaan V1 atau V2-nya diaktifkan.

Deskripsi operasi

  • For information about the database instances that support this operation, see Overview of DAS Enterprise Edition.

  • If you use an Alibaba Cloud SDK or DAS SDK to call this operation, we recommend that you use the latest version of the SDK.

  • If you use an SDK to call API operations of DAS, you must set the region ID to cn-shanghai.

  • This operation is applicable only to DAS Enterprise Edition V1 and V2.

Catatan

We recommend that you call the DescribeSqlLogStatistic operation to query the data statistics of a database instance for which DAS Enterprise Edition is enabled.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

hdm:GetDasProServiceUsage

get

*全部资源

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

UserId

string

No

ID akun Alibaba Cloud yang digunakan untuk membuat Instansiasi database.

Catatan

Parameter ini opsional. Sistem dapat secara otomatis memperoleh ID akun berdasarkan nilai InstanceId saat Anda memanggil operasi ini.

196278346919****

InstanceId

string

Yes

ID Instansiasi database.

rm-2ze8g2am97624****

Elemen respons

Element

Type

Description

Example

object

The response parameters.

Message

string

The returned message.

Catatan

If the request was successful, Successful is returned. If the request failed, an error message such as an error code is returned.

Successful

RequestId

string

The request ID.

7172BECE-588A-5961-8126-C216E16B****

Data

object

The data returned.

{ "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 SQL Explorer storage space that is offered free-of-charge. Unit: MB.

5120

ip

string

The endpoint of the database instance.

rm-2ze8g2am97624****.mysql.****.com

userId

string

The ID of the Alibaba Cloud account that is used to create the database instance.

196278346919****

expireTime

integer

The point of time when DAS Enterprise Edition for the database instance expires. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1648742400000

instanceId

string

The database instance ID.

rm-2ze8g2am97624****

storageUsed

integer

The storage usage of SQL Explorer of the database instance. Unit: bytes.

35903498

engine

string

The type of the database engine.

MySQL

instanceAlias

string

The name of the database instance.

TESTDB01

port

integer

The port number that is used to connect to the database instance.

3306

vpcId

string

The virtual private cloud (VPC) ID.

vpc-2zentqj1sk4qmolci****

commodityInstanceId

string

The ID of the DAS Enterprise Edition instance.

daspro-cn-v0h1l6i****

startTime

integer

The time when DAS Enterprise Edition was enabled for the database instance. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1646100892000

isSpare

boolean

Indicates whether DAS Enterprise Edition for the database instance has expired. Valid values:

  • true

  • false

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 the data generated by the SQL Explorer and Audit feature from the previous version to the new version. Unit: milliseconds.

Catatan

This parameter is returned only when the SQL Explorer and Audit feature is migrated from the previous version to the new version.

60000

Code

integer

The HTTP status code returned.

200

Success

boolean

Indicates whether the request was successful. Valid values:

  • true

  • false

true

Contoh

Respons sukses

JSONformat

{
  "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
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 InvalidParams The request parameters are invalid.
403 NoPermission You are not authorized to do this action.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.