Queries the result of the inspection that is implemented on an instance by using the inspection and scoring feature.

Database Autonomy Service (DAS) provides the inspection and scoring feature. This feature allows you to inspect and score the health status of your instances 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, make sure that the following conditions are met:

  • This operation is applicable only to ApsaraDB RDS for MySQL databases, self-managed MySQL databases on Elastic Compute Service (ECS) instances, self-managed MySQL databases in your data center, and ApsaraDB for Redis 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 SDK version for DAS must be V1.0.3 or later.
  • If you use the SDK to call the DAS service, you must set the region to cn-shanghai.

Request parameters

Parameter Type Required Example Description
Action String Yes GetInstanceInspections

The operation that you want to perform. Set the value to GetInstanceInspections.

Engine String Yes MySQL

The engine of the database. Valid values:

  • MySQL
  • Redis
    Note Only MySQL and Redis are supported.
StartTime String Yes 1608888296000

The beginning of the time range to query. Specify the time in the UNIX timestamp format. Unit: milliseconds.

EndTime String Yes 1608888296001

The end of the time range to query. Specify the time in the UNIX timestamp format. Unit: milliseconds.

Note The end time must be later than the start time.
PageNo String Yes 1

The number of the page to return. The value must be a positive integer that does not exceed the maximum value of the INTEGER data type. Default value: 1.

PageSize String Yes 10

The maximum number of entries to return on each page. Default value: 10.

InstanceArea String Yes RDS

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

  • RDS: an Alibaba Cloud database instance
  • ECS: an ECS instance on which a self-managed database is deployed
  • IDC: a self-managed database instance that is not deployed on Alibaba Cloud
    Note IDC is the user data center.
SearchMap String No InstanceId

The filter condition. You can use the following filter conditions:

  • InstanceId: the ID of a single instance
  • InstanceIds: the IDs of multiple instances
  • region: the region where the instance is deployed

Response parameters

Parameter Type Example Description
Message String Successful

The returned message for the request.

Note If the request is successful, Successful is returned. If the request fails, an error message such as an error code is returned.
RequestId String B6D17591-B48B-4D31-9CD6-9B9796B2****

The ID of the request.

Data Object

The details about the inspection and scoring result.

List Array of BaseInspection

The details about the inspection and scoring results.

BaseInspection
EndTime Long 1608888296001

The end of the queried time range. This value is a UNIX timestamp. Unit: milliseconds.

Note The end time must be later than the start time.
StartTime Long 1608888296000

The beginning of the queried time range. This value is a UNIX timestamp. Unit: milliseconds.

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

The returned data.

Instance Object

The detailed information about the instance.

VpcId String vpc-bp1knt7m55z9exoo7****

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

Uuid String hdm_3063db6792965c080a4bcb6e6304****

The unique identifier of the instance.

InstanceArea String RDS

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

  • RDS: an Alibaba Cloud database instance
  • ECS: an ECS instance on which a self-managed database is deployed
  • IDC: a self-managed database instance that is not deployed on Alibaba Cloud
    Note IDC is the user data center.
InstanceClass String rds.mysql.s2.xlarge

The type of the instance.

Region String cn-hangzhou

The ID of the region where the instance is deployed.

AccountId String 108398049688****

The ID of the account. On the Security Settings page in the Alibaba Cloud account management center, you can obtain the ID of the logon account.

NetworkType String Vpc

The network type of the instance.

Engine String MySQL

The engine of the database. Valid values:

  • MySQL
  • Redis
    Note Only MySQL and Redis are supported.
InstanceId String rm-bp10usoc1erj****

The ID of the instance.

NodeId String rm-bp10usoc1erj7****

The ID of the node on the instance.

EngineVersion String 5.7

The version number of the database engine.

ScoreMap String "cpu": 4

The deduction details about the score.

GmtCreate Long 1603247192000

The time when the task was created. This value is a UNIX timestamp. Unit: milliseconds.

Score Integer 100

The inspection score of the instance.

PageNo Long 1

The page number of the returned page. This value is a positive integer that does not exceed the maximum value of the INTEGER data type. Default value: 1.

PageSize Long 10

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

Total Long 4

The total number of entries returned.

Code String 200

The returned status code.

Success String true

Indicates whether the request was successful.

  • true: The request was successful.
  • false: The request failed.

Examples

Sample requests

http(s)://das.cn-shanghai.aliyuncs.com/?Action=GetInstanceInspections
&Engine=MySQL
&StartTime=1608888296000
&EndTime=1608888296001
&PageNo=1
&PageSize=10
&InstanceArea=RDS
&SearchMap=InstanceId
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<GetInstanceInspectionsResponse>
    <Message>Successful</Message>
    <RequestId>B6D17591-B48B-4D31-9CD6-9B9796B2****</RequestId>
    <Data>
        <List>
            <EndTime>1608888296001</EndTime>
            <StartTime>1608888296000</StartTime>
            <Data>"data": { "hasDeadLock": false, "exceptionTableMap": {}, "bigTransactionCount": 0, "cpu": 4, "isRds": true, "rdsEnable": true, "enable": false, "activeSessions": [], "bigTransactionList": [], "bigSessionList": [ { "blockDuration": 0, "active": false, "Time": 0, "db": "" },</Data>
            <Instance>
                <VpcId>vpc-bp1knt7m55z9exoo7****</VpcId>
                <Uuid>hdm_3063db6792965c080a4bcb6e6304****</Uuid>
                <InstanceArea>RDS</InstanceArea>
                <InstanceClass>rds.mysql.s2.xlarge</InstanceClass>
                <Region>cn-hangzhou</Region>
                <AccountId>108398049688****</AccountId>
                <NetworkType>Vpc</NetworkType>
                <Engine>MySQL</Engine>
                <InstanceId>rm-bp10usoc1erj****</InstanceId>
                <NodeId>rm-bp10usoc1erj7****</NodeId>
                <EngineVersion>5.7</EngineVersion>
            </Instance>
            <ScoreMap>"cpu": 4</ScoreMap>
            <GmtCreate>1603247192000</GmtCreate>
            <Score>100</Score>
        </List>
        <PageNo>1</PageNo>
        <PageSize>10</PageSize>
        <Total>4</Total>
    </Data>
    <Code>200</Code>
    <Success>true</Success>
</GetInstanceInspectionsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Message" : "Successful",
  "RequestId" : "B6D17591-B48B-4D31-9CD6-9B9796B2****",
  "Data" : {
    "List" : [ {
      "EndTime" : 1608888296001,
      "StartTime" : 1608888296000,
      "Data" : "\"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" : {
        "VpcId" : "vpc-bp1knt7m55z9exoo7****",
        "Uuid" : "hdm_3063db6792965c080a4bcb6e6304****",
        "InstanceArea" : "RDS",
        "InstanceClass" : "rds.mysql.s2.xlarge",
        "Region" : "cn-hangzhou",
        "AccountId" : "108398049688****",
        "NetworkType" : "Vpc",
        "Engine" : "MySQL",
        "InstanceId" : "rm-bp10usoc1erj****",
        "NodeId" : "rm-bp10usoc1erj7****",
        "EngineVersion" : "5.7"
      },
      "ScoreMap" : "\"cpu\": 4",
      "GmtCreate" : 1603247192000,
      "Score" : 100
    } ],
    "PageNo" : 1,
    "PageSize" : 10,
    "Total" : 4
  },
  "Code" : "200",
  "Success" : "true"
}

Errors

For a list of error codes, visit the API Error Center.