All Products
Search
Document Center

Database Autonomy Service:GetInstanceInspections

Last Updated:Jun 10, 2026

Mengkueri hasil inspeksi yang dilakukan pada Instansiasi database dengan menggunakan fitur inspeksi dan penilaian.

Deskripsi operasi

Database Autonomy Service (DAS) provides the inspection and scoring feature. This feature allows you to inspect and score the health status of your instance on a regular basis. This helps you obtain information about the status of your databases. For more information, see Inspection and scoring.

Before you call this operation, take note of the following items:

  • This operation is applicable only to ApsaraDB RDS for MySQL databases, self-managed MySQL databases hosted on Elastic Compute Service (ECS) instances, self-managed MySQL databases in data centers, ApsaraDB for Redis databases, and PolarDB for MySQL databases.

  • If you use an Alibaba Cloud SDK, make sure that the aliyun-sdk-core version is later than V4.3.3. We recommend that you use the latest version.

  • The version of DAS SDK must be V1.0.3 or later.

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

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:GetInstanceInspections

get

*全部资源

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

Engine

string

Yes

Mesin database. Nilai valid:

  • MySQL

  • Redis

  • PolarDBMySQL.

MySQL

StartTime

string

Yes

Awal rentang pengatur waktu yang akan dikueri. Tentukan Stempel waktu UNIX yang merepresentasikan jumlah milidetik sejak 1 Januari 1970, 00:00:00 UTC.

1655416825000

EndTime

string

Yes

Akhir rentang pengatur waktu yang akan dikueri. Tentukan Stempel waktu UNIX yang merepresentasikan jumlah milidetik sejak 1 Januari 1970, 00:00:00 UTC.

Catatan

Waktu akhir harus lebih lambat daripada waktu mulai.

1655427625000

PageNo

string

Yes

Nomor halaman. Nilainya harus berupa bilangan bulat positif. Nilai default: 1.

1

PageSize

string

Yes

Jumlah entri per halaman. Nilai default: 10.

10

InstanceArea

string

Yes

Tipe instans tempat database dideploy. Nilai valid:

  • RDS: Instansiasi database Alibaba Cloud.

  • ECS: Instance ECS tempat database yang dikelola sendiri dideploy.

  • IDC: Instansiasi database yang dikelola sendiri dan tidak dideploy di Alibaba Cloud.

Catatan

Nilai IDC menunjukkan bahwa instans dideploy di Pusat data lokal.

RDS

SearchMap

string

No

Kondisi filter. Tentukan kondisi dalam salah satu format berikut:

  • Untuk menentukan satu ID instans, gunakan format {"InstanceId":"Instance ID"}.

  • Untuk menentukan beberapa ID instans, gunakan format {"InstanceIds":["Instance ID1","Instance ID2"]}. Pisahkan ID instans dengan koma (,).

  • Untuk menentukan wilayah instans, gunakan format {"region":"Region of the instance"}.

{"InstanceId":"rm-bp10usoc1erj7****"}

ResourceGroupId

string

No

ID kelompok sumber daya.

rg-aek2eil6npi****

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.

B6D17591-B48B-4D31-9CD6-9B9796B2****

Data

object

The details.

List

array<object>

The detailed information.

array<object>

EndTime

integer

The end time of the inspection and scoring task. The value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

Catatan

The end time must be later than the start time.

1608888296001

StartTime

integer

The start time of the inspection and scoring task. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1608888296000

Data

object

The data returned.

"data": { "hasDeadLock": false, "exceptionTableMap": {}, "bigTransactionCount": 0, "cpu": 4, "isRds": true, "rdsEnable": true, "enable": false, "activeSessions": [], "bigTransactionList": [], "bigSessionList": [ { "blockDuration": 0, "active": false, "Time": 0, "db": "" },

Instance

object

The information about the instance.

VpcId

string

The ID of the virtual private cloud (VPC) in which the instance is deployed.

vpc-bp1knt7m55z9exoo7****

Uuid

string

The unique identifier of the instance.

hdm_3063db6792965c080a4bcb6e6304****

InstanceArea

string

The type of the instance on which the database is deployed. Valid values:

  • RDS: an Alibaba Cloud database instance.

  • ECS: an Elastic Compute Service (ECS) instance on which a self-managed database is deployed.

  • IDC: a self-managed database instance that is not deployed on Alibaba Cloud.

Catatan

The value IDC indicates that the instance is deployed in a data center.

RDS

InstanceClass

string

The instance type.

rds.mysql.s2.xlarge

Region

string

The region ID of the instance.

cn-hangzhou

AccountId

string

The account ID. You can view the ID of the logon account by moving the pointer over the profile in the Alibaba Cloud management console.

108398049688****

NetworkType

string

The network type of the instance.

VPC

Engine

string

The database engine. Valid values:

  • MySQL

  • Redis

  • PolarDBMySQL

MySQL

InstanceId

string

The instance ID.

rm-bp10usoc1erj7****

NodeId

string

The ID of the node on the instance.

rm-bp10usoc1erj7****

EngineVersion

string

The version number of the database engine.

8.0

InstanceAlias

string

The instance name.

test-01

Cpu

string

The CPU specification of the instance. For example, if a value of 8 is returned, the instance has eight CPU cores.

8

Memory

integer

The memory capacity of the database that is deployed on the instance. Unit: MB.

32768

Storage

integer

The storage space of the instance. Unit: GB.

150

Category

string

The connection mode of the instance. Valid values:

  • standard: standard mode.

  • safe: database proxy mode.

standard

ScoreMap

object

The scores that are deducted for the instance.

GmtCreate

integer

The time when the task was created. The value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1603247192000

Score

integer

The inspection score of the instance.

100

AutoFunction

object

Indicates whether the autonomy service is enabled.

EventSubscription

integer

Indicates whether the event subscription feature is enabled. Valid values:

  • 0: disabled.

  • 1: enabled.

  • 2: not supported.

0

AutoIndex

integer

Indicates whether the feature of automatically creating and deleting indexes is enabled. Valid values:

  • 0: disabled.

  • 1: enabled.

  • 2: not supported.

2

AutoLimitedSql

integer

Indicates whether the automatic throttling feature is enabled. Valid values:

  • 0: disabled.

  • 1: enabled.

  • 2: not supported.

2

AutoResourceOptimize

integer

Indicates whether the automatic fragment recycling feature is enabled. Valid values:

  • 0: disabled.

  • 1: enabled.

  • 2: not supported.

0

AutoScale

integer

Indicates whether the auto scaling feature is enabled. Valid values:

  • 0: disabled.

  • 1: enabled.

  • 2: not supported.

0

EnableDasPro

integer

Indicates whether DAS Enterprise Edition is enabled. Valid values:

  • 0: disabled.

  • 1: enabled.

  • 2: not supported.

0

State

integer

The state of the inspection and scoring task. Valid values:

  • 0: The task is waiting for execution.

  • 1: The task is in progress.

  • 2: The task is complete.

2

TaskType

integer

The mode in which the inspection and scoring task was initiated. Valid values:

  • 0: automatic mode.

  • 1: manual mode.

0

PageNo

integer

The page number. The value returned is a positive integer. Default value: 1.

1

PageSize

integer

The number of entries per page. Default value: 10.

10

Total

integer

The total number of entries returned.

4

Code

string

The HTTP status code returned.

200

Success

string

Indicates whether the request was successful. Valid values:

  • true

  • false

true

Contoh

Respons sukses

JSONformat

{
  "Message": "Successful",
  "RequestId": "B6D17591-B48B-4D31-9CD6-9B9796B2****",
  "Data": {
    "List": [
      {
        "EndTime": 1608888296001,
        "StartTime": 1608888296000,
        "Data": {
          "test": "test",
          "test2": 1
        },
        "Instance": {
          "VpcId": "vpc-bp1knt7m55z9exoo7****",
          "Uuid": "hdm_3063db6792965c080a4bcb6e6304****",
          "InstanceArea": "RDS",
          "InstanceClass": "rds.mysql.s2.xlarge",
          "Region": "cn-hangzhou",
          "AccountId": "108398049688****",
          "NetworkType": "VPC",
          "Engine": "MySQL",
          "InstanceId": "rm-bp10usoc1erj7****",
          "NodeId": "rm-bp10usoc1erj7****",
          "EngineVersion": "8.0",
          "InstanceAlias": "test-01",
          "Cpu": "8",
          "Memory": 32768,
          "Storage": 150,
          "Category": "standard"
        },
        "ScoreMap": {
          "test": "test",
          "test2": 1
        },
        "GmtCreate": 1603247192000,
        "Score": 100,
        "AutoFunction": {
          "EventSubscription": 0,
          "AutoIndex": 2,
          "AutoLimitedSql": 2,
          "AutoResourceOptimize": 0,
          "AutoScale": 0
        },
        "EnableDasPro": 0,
        "State": 2,
        "TaskType": 0
      }
    ],
    "PageNo": 1,
    "PageSize": 10,
    "Total": 4
  },
  "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.