Queries the notification events that are related to the autonomy service.

Before you call this operation, make sure that the following conditions are met:

  • When 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 Database Autonomy Service (DAS) must be V1.0.2 or later.
  • When you use the SDK to call the DAS service, you must specify the region as cn-shanghai.
  • After your instance is connected to DAS, notification events such as snapshot capturing are triggered if the changes of database monitoring metrics are detected during DAS anomaly detection.
Note You can query the details of notification events only after the autonomy center is enabled. For more information, see Autonomy center.

Events are categorized based on the following urgency levels:

  • Notice: notification events. When the changes of database monitoring metrics are detected during DAS anomaly detection, notification events such as snapshot capturing are triggered.
  • Optimization: optimization events. DAS provides some recommendations on SQL optimization or specifications based on the previous trends of instance running.
  • Warn: warning events that you must take note of. Warning events may affect databases.
  • Critical: crisis events that you must handle. Crisis events occur when databases cannot provide services, such as emergency events of SQL throttling.

Request parameters

Parameter Type Required Example Description
Action String No GetAutonomousNotifyEvents

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

__context String No 6c2e064b-a45f-4bd0-8a80-*********

The scenario where the event occurs.

InstanceId String No rm-18ff4a195d****

The ID of the instance. On the Instance Monitoring page in the DAS console, you can view the IDs of different types of instances.

StartTime String No 1568269711000

The start timestamp of the SQL query. Unit: millisecond.

EndTime String No 1568267711001

The end timestamp of the SQL query. Unit: millisecond.

NodeId String No r-x****-db-0

The ID of the node. You can call the DescribeDBClusters operation to view the DBNodeId response parameter.

Note This parameter is applicable to only PolarDB.
EventContext String No None

The hidden parameter.

Level String No Notice

The urgency level of the event. When this parameter is specified, the MinLevel parameter is invalid. Valid values:

  • Notice: notification events
  • Optimization: optimization events
  • Warn: warning events
  • Critical: crisis events
MinLevel String No Optimization

The minimum urgency level of events. Only the events whose urgency levels are higher than the specified urgency level are returned. Valid values:

  • Notice: notification events
  • Optimization: optimization events
  • Warn: warning events
  • Critical: crisis events
PageOffset String No 1

The number of the page to return. The paged query is performed.

PageSize String No 30

The number of entries to return on each page. The paged query is performed.

Response parameters

Parameter Type Example Description
Code String 200

The returned status code.

Data String "Data": { "total": 1, "list":[...] }, "Code": 200, "Success": true }

The list of detailed information, including the number of messages and the error codes.

Message String Successful

The returned message of the request.

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

The ID of the request.

Success String true

Indicates whether the request was successful.

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

Examples

Sample requests

https://das.cn-shanghai.aliyuncs.com/?Action=GetAutonomousNotifyEvents
&__context=6c2e064b-a45f-4bd0-8a80-*******
&InstanceId=rm-18ff4a195d****
&StartTime=1596177993000
&EndTime=1596177993000
&NodeId=r-x****-db-0
&PageSize=10
&<Common request parameters>

Sample success responses

XML format

<GetAutonomousNotifyEventsReponse>
  <RequestId> B6D17591-B48B-4D31-9CD6-9B9796B2270A</RequestId>
  <Message>Successful</Message>
  <Data> "Data": {     "total": 1,     "list":[...]   },   "Code": 200,   "Success": true   }</Data>
  <Code>200</Code>
  <Success>true</Success>
</GetAutonomousNotifyEventsReponse>

JSON format

{"RequestId":" B6D17591-B48B-4D31-9CD6-9B9796B2270A",
"Message":"Successful",
"Data":" \"Data\": {     \"total\": 1,     \"list\":[...]   },   \"Code\": 200,   \"Success\": true   }",
"Code":"200",
"Success":"true"}

Error codes

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