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.
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 reserved parameter. |
| InstanceId | String | No | rm-18ff4a195d**** | The ID of the instance. |
| StartTime | String | Yes | 1568269711000 | The beginning of the time range within which you want to query notification events. Specify the time in the UNIX timestamp format. Unit: milliseconds. |
| EndTime | String | Yes | 1568265711221 | 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. |
| NodeId | String | No | r-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. |
| EventContext | String | No | None | A reserved parameter. |
| Level | String | No | Warn | The urgency level of the events. If you configure this parameter, the MinLevel parameter does not take effect. Valid values:
|
| MinLevel | String | No | Notice | The minimum urgency level of the events. Valid values:
|
| PageOffset | String | No | 1 | The number of the page to return. The value must be an integer that is larger than 0. Default value: 1. |
| PageSize | String | No | 30 | The number of entries to return on each page. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| Message | String | Successful | 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. |
| RequestId | String | B6D17591-B48B-4D31-9CD6-9B9796B2**** | The ID of the request. |
| Data | Object | The detailed information, including the error codes and the number of entries that are returned. | |
| List | Array of String | "T": [] | The details of the events. |
| PageNo | Long | 1 | The page number of the returned page. |
| PageSize | Long | 10 | The maximum number of entries returned on each page. |
| Extra | String | None | The reserved parameter. |
| Total | Long | 4 | The total number of entries returned. |
| Code | String | 200 | The HTTP status code returned. |
| Success | String | true | Indicates whether the request was successful. Valid values:
|
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 code | Error code | Error message | Description |
|---|---|---|---|
| 400 | InvalidParams | The request parameters are invalid. | The request parameters are invalid. |
For a list of error codes, see Service error codes.