Queries the notification events of one or more categories or urgency levels.

Before you call this operation, take note of the following items:

  • If you use an Alibaba Cloud SDK or a 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 to cn-shanghai.
  • After your instance is connected to DAS, notification events such as snapshot capture are triggered if changes to database monitoring metrics are detected by DAS during anomaly detection.
Note You can query the details about notification events only after the autonomy service is enabled. For more information, see Autonomy center.

Request parameters

ParameterTypeRequiredExampleDescription
ActionStringYesGetAutonomousNotifyEventsInRange

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

__contextStringNoNone

A reserved parameter.

InstanceIdStringNorm-18ff4a195d****

The ID of the instance.

StartTimeStringYes1568269711000

The beginning of the time range within which you want to query notification events. Specify the time in the UNIX timestamp format. Unit: milliseconds.

EndTimeStringYes1568265711221

The end of the time range within which you want to query notification events. Specify the time in the UNIX timestamp format. Unit: milliseconds.

Note The end time must be later than the start time.
NodeIdStringNor-x****-db-0

The ID of the node on a PolarDB for MySQL cluster. You can call the DescribeDBClusters operation to query the node ID returned by the DBNodeId response parameter.

Note Only PolarDB for MySQL clusters are supported.
EventContextStringNoNone

A reserved parameter.

LevelStringNoWarn

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

  • Notice: events for which the system sends notifications
  • Optimization: events that need to be optimized
  • Warn: events for which the system sends warnings
  • Critical: critical events
MinLevelStringNoNotice

The minimum urgency level of the events. Valid values:

  • Notice: events for which the system sends notifications
  • Optimization: events that need to be optimized
  • Warn: events for which the system sends warnings
  • Critical: critical events
PageOffsetStringNo1

The number of the page to return. The value must be an integer that is larger than 0. Default value: 1.

PageSizeStringNo30

The number of entries to return on each page.

Response parameters

ParameterTypeExampleDescription
MessageStringSuccessful

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 contains information such as an error code is returned.
RequestIdStringB6D17591-B48B-4D31-9CD6-9B9796B2****

The ID of the request.

DataObject

The detailed information, including the error codes and the number of entries that are returned.

ListArray of String"T": []

The details of the events.

PageNoLong1

The page number of the returned page.

PageSizeLong10

The maximum number of entries returned on each page.

ExtraStringNone

The reserved parameter.

TotalLong4

The total number of entries returned.

CodeString200

The HTTP status code returned.

SuccessStringtrue

Indicates whether the request was successful. Valid values:

  • true
  • false

Examples

Sample requests

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

Sample success responses

XML format

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

<GetAutonomousNotifyEventsInRangeResponse>
    <Message>Successful</Message>
    <RequestId>B6D17591-B48B-4D31-9CD6-9B9796B2****</RequestId>
    <Data>
        <List>
        </List>
        <PageNo>1</PageNo>
        <PageSize>10</PageSize>
        <Extra>None</Extra>
        <Total>4</Total>
    </Data>
    <Code>200</Code>
    <Success>true</Success>
</GetAutonomousNotifyEventsInRangeResponse>

JSON format

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

{
  "Message" : "Successful",
  "RequestId" : "B6D17591-B48B-4D31-9CD6-9B9796B2****",
  "Data" : {
    "List" : {
      "T" : [ ]
    },
    "PageNo" : 1,
    "PageSize" : 10,
    "Extra" : "None",
    "Total" : 4
  },
  "Code" : "200",
  "Success" : "true"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParamsThe request parameters are invalid.The request parameters are invalid.

For a list of error codes, see Service error codes.