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

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 version of Database Autonomy Service (DAS) SDK must be V1.0.2 or later.
  • When you call this operation to use DAS, you must specify cn-shanghai as the region.
  • 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 about notification events only if the autonomy center is enabled. For more information, see Autonomy center.

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 None

A hidden parameter.

InstanceId String No rm-18ff4a195d****

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

StartTime String No 1568269711000

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

EndTime String No 1568267711001

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.
NodeId String No r-x****-db-0

The ID of the node on the PolarDB instance. You can call the DescribeDBClusters operation to query the ID. The DBNodeId response parameter indicates the node ID.

EventContext String No None

A hidden parameter.

Level String No Notice

The urgency level of the event. If you specify this parameter, the MinLevel parameter does not take effect. Valid values:

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

The minimum urgency level of the events. This parameter specifies that only the events whose urgency levels are higher than the specified minimum urgency level are returned. The following valid values specify the urgency levels in ascending order:

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

The number of the page to return.

PageSize String No 30

The number of entries to return on each page.

Response parameters

Parameter Type Example Description
Message String Successful

The message returned 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 String "Data": { "total": 1, "list":[...] }, "Code": 200, "Success": true }

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

Code String 200

The returned status code.

Success String true

Indicates whether the request is successful. Valid values:

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

Examples

Sample requests

http(s)://das.cn-shanghai.aliyuncs.com/?Action=GetAutonomousNotifyEvents
&__context=None
&InstanceId=rm-18ff4a195d****
&StartTime=1568269711000
&EndTime=1568267711001
&NodeId=r-x****-db-0
&EventContext=None
&Level=Notice
&MinLevel=Notice
&PageOffset=1
&PageSize=30
&<Common request parameters>

Sample success responses

XML format

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

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

JSON format

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

{
  "Message" : "Successful",
  "RequestId" : "B6D17591-B48B-4D31-9CD6-9B9796B2****",
  "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.