Queries the notification events of one or more urgency levels.

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

  • If you use an Alibaba Cloud SDK, the version of aliyun-sdk-core must be 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.
  • If you use an SDK to call the DAS service, you must set the region to cn-shanghai.
  • After your database instance is connected to DAS, notification events such as snapshot capturing are triggered if the anomaly detection feature of DAS detects changes to database monitoring metrics.
Note You can query the details about notification events only if the autonomy center is enabled for the database instance. For more information, see Autonomy center.

Request parameters

Parameter Type Required Example Description
Action String Yes GetAutonomousNotifyEventsInRange

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

__context String No None

A hidden parameter.

InstanceId String No rm-18ff4a195d****

The ID of the database instance. You can call the AccessHDMInstance operation to query the database instance ID.

StartTime String No 1568269711000

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

EndTime String No 1568265711221

The end of the time range to query. Specify a UNIX timestamp. Unit: milliseconds.

Note The end time must be later than the start time.
NodeId String No r-x****-db-0

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

Note Only instances of the ApsaradDB PolarDB MySQL-compatible edition are supported.
EventContext String No None

A hidden parameter.

Level String No Notice

The urgency level of the events. If you configure 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. Valid values:

  • Notice: notification events
  • Optimization: optimization events
  • Warn: warning events
  • Critical: critical events
PageOffset String No 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 No 30

The number of entries to return per page.

Response parameters

Parameter Type Example Description
Message String Successful

The message returned for the request.

Note If the request was successful, Successful was returned. If the request failed, an error message that contains an error code was returned.
RequestId String B6D17591-B48B-4D31-9CD6-9B9796B2****

The ID of the request.

Data Object

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

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

The list of detailed information.

PageNo Long 1

The number of the returned page.

PageSize Long 10

The maximum number of entries returned on each page.

Extra String None

A hidden parameter.

Total Long 4

The total number of returned entries.

Code String 200

The returned status code.

Success String true

Indicates whether the request was successful. Valid values:

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

Examples

Sample requests

http(s)://das.cn-shanghai.aliyuncs.com/?Action=GetAutonomousNotifyEventsInRange
&InstanceId=rm-18ff4a195d****
&StartTime=1568269711000
&EndTime=1568269711001
&NodeId=r-x****-db-0
&EventContext=None
&Level=Notice
&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>"Data": { "total": 1, "list":[...] }, "Code": 200, "Success": true }</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" : [ "\"Data\": { \"total\": 1, \"list\":[...] }, \"Code\": 200, \"Success\": true }" ],
    "PageNo" : 1,
    "PageSize" : 10,
    "Extra" : "None",
    "Total" : 4
  },
  "Code" : "200",
  "Success" : "true"
}

Errors codes

HTTP status code Error code Error message Description
400 InvalidParams The request parameters are invalid. The error message returned because the specified request parameters are invalid.

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