Queries the result of the inspection that is performed 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 requirements 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, 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 DAS, 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:
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:
Note IDC refers to your data center. If this value is used, the database instance is deployed
in your data center.
|
SearchMap | String | No | InstanceId |
The filter condition. Valid values:
|
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 includes an error code is returned.
|
RequestId | String | B6D17591-B48B-4D31-9CD6-9B9796B2**** |
The ID of the request. |
Data | Object |
The returned data. |
|
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 details 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:
|
InstanceClass | String | rds.mysql.s2.xlarge |
The specification 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. You can obtain the ID of the logon account on the Security Settings page in the Alibaba Cloud account management center. |
NetworkType | String | Vpc |
The network type of the instance. |
Engine | String | MySQL |
The engine of the database. Valid values:
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 that can be returned per page. Default value: 10. |
Total | Long | 4 |
The total number of returned entries. |
Code | String | 200 |
The returned status code. |
Success | String | true |
Indicates whether the request is successful. Valid values:
|
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"
}
Error codes
For a list of error codes, visit the API Error Center.