Queries the details of notification events of a database instance.
Operation description
Before you call this operation, take note of the following items:
If you use Alibaba Cloud SDK or Database Autonomy Service (DAS) SDK to call this operation, we recommend that you use the latest version of the SDK.
If you use an SDK to call operations of DAS, you must set the region ID to cn-shanghai.
After your instance is connected to DAS, notification events such as snapshot capture are triggered if DAS detects changes to database monitoring metrics during anomaly detection.
You can query the details of notification events only if the autonomy center is enabled. For more information, see Autonomy center.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
hdm:GetAutonomousNotifyEventContent |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| __context |
string |
No |
The reserved parameter. |
None |
| InstanceId |
string |
Yes |
The instance ID. |
rm-18ff4a195d**** |
| SpanId |
string |
Yes |
The unique identifier of the event. You can call the GetAutonomousNotifyEventsInRange operation to query the unique identifier returned by the SpanId response parameter. |
7e7b2774-95b8-4fa3-bd9c-0ab47cb7**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The HTTP status code returned. |
200 |
| Data |
string |
The details of the notification events. |
{\"taskId\":\"7e1ba595-0889-48ff-a6ff-010f54991d****\",\"taskType\":\"SQL_OPTIMIZE\",\"advisorId\":\"636dc5f34664dd56ff0****\",\"sqlId\":\"e2b1d6c1ee1bb29555a828b59f16****\",\"indexAdviceCount\":1,\"indexAdvices\":[{\"schemaName\":\"das\",\"tableName\":\"students\",\"indexName\":\"idx_name\",\"columns\":[\"name\"],\"unique\":false,\"ddlAddIndex\":\"ALTER TABLE `das`.`students` ADD INDEX `idx_name` (`name`)\",\"priority\":0,\"optimizeId\":\"96232794517277511\"}],\"tuningAdvices\":[],\"improvement\":8127.25,\"supportLevel\":3,\"priority\":\"HIGH\"} |
| Message |
string |
The returned message. Note
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**** |
| Success |
string |
Indicates whether the request was successful. Valid values:
|
true |
Examples
Success response
JSON format
{
"Code": "200",
"Data": "{\\\"taskId\\\":\\\"7e1ba595-0889-48ff-a6ff-010f54991d****\\\",\\\"taskType\\\":\\\"SQL_OPTIMIZE\\\",\\\"advisorId\\\":\\\"636dc5f34664dd56ff0****\\\",\\\"sqlId\\\":\\\"e2b1d6c1ee1bb29555a828b59f16****\\\",\\\"indexAdviceCount\\\":1,\\\"indexAdvices\\\":[{\\\"schemaName\\\":\\\"das\\\",\\\"tableName\\\":\\\"students\\\",\\\"indexName\\\":\\\"idx_name\\\",\\\"columns\\\":[\\\"name\\\"],\\\"unique\\\":false,\\\"ddlAddIndex\\\":\\\"ALTER TABLE `das`.`students` ADD INDEX `idx_name` (`name`)\\\",\\\"priority\\\":0,\\\"optimizeId\\\":\\\"96232794517277511\\\"}],\\\"tuningAdvices\\\":[],\\\"improvement\\\":8127.25,\\\"supportLevel\\\":3,\\\"priority\\\":\\\"HIGH\\\"}",
"Message": "Successful",
"RequestId": "B6D17591-B48B-4D31-9CD6-9B9796B2****",
"Success": "true"
}
Error codes
|
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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.