You can call the QueryNotify operation to query notifications for an ApsaraDB RDS instance.
The notifications are highlighted at the top of the ApsaraDB RDS console. The notifications include renewal reminders and reminders of instance creation failures.
After you call this operation to query notifications, you can call the ConfirmNotify operation to mark the notifications as confirmed, which means that you understand the content of the notifications.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | QueryNotify |
The operation that you want to perform. Set the value to QueryNotify. |
| WithConfirmed | Boolean | Yes | false |
Specifies whether the query results contain confirmed notifications. Valid values:
|
| From | String | Yes | 2022-05-02T08:38:37Z |
The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. |
| To | String | Yes | 2022-05-09T08:38:37Z |
The end of the time range to query. The end time must be later than the start time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. |
| PageSize | Integer | No | 30 |
The number of entries to return on each page. Valid values:
Default value: 30. |
| PageNumber | Integer | No | 1 |
The number of the page to return. Valid values: any non-zero positive integer. Default value: 1. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| Data | Object |
The details of the returned parameters. |
|
| NotifyItemList | Array of NotifyItemList |
The details of the notification. |
|
| Id | Long | 103499 |
The ID of the notification. |
| GmtCreated | String | 2022-04-21T02:04:04Z |
The time when the notification was created. |
| GmtModified | String | 2022-04-21T02:10:47Z |
The time when the notification was modified. |
| AliUid | Long | 22973492********** |
The ID of the Alibaba Cloud account. |
| IdempotentId | String | ETnLKlblzczshOTUbOCzxxxxxxxxxx |
This parameter ensures the idempotence of the notification and prevents the notification from being repeatedly sent. |
| IdempotentCount | String | 0 |
The number of times that repeatedly sent notifications are blocked. |
| Type | String | Sell |
The type of the notification. Valid values:
|
| Level | String | error |
The level of the notification. Valid values:
|
| TemplateName | String | InstanceCreateFailed |
The template of the notification. Valid values:
|
| NotifyElement | String | {\"orderId\":21466**********} |
The element in the notification template. This parameter is a JSON string. Fields in the JSON string vary based on the value of the TemplateName parameter.
|
| ConfirmFlag | Boolean | true |
Indicates whether the notification has been confirmed. You can call the ConfirmNotify operation to mark the notification as confirmed. Valid values:
|
| Confirmor | Long | 0 |
The UID of the contact who called the ConfirmNotify operation to mark the notification as confirmed. The contact belongs to the current Alibaba Cloud account. The value 0 indicates that the notification is automatically confirmed by the system. |
| PageSize | Integer | 25 |
The number of entries returned per page. |
| PageNumber | Integer | 1 |
The page number of the returned page. |
| TotalRecordCount | Integer | 1 |
The total number of entries. |
| RequestId | String | 94CB8D93-017A-5AE7-A118-6E0F89D93C0A |
The ID of the request. |
Examples
Sample requests
http(s)://rds.aliyuncs.com/?Action=QueryNotify
&WithConfirmed=false
&From=2022-05-02T08:38:37Z
&To=2022-05-09T08:38:37Z
&PageSize=30
&PageNumber=1
&Common request parametersSample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<QueryNotifyResponse>
<Data>
<NotifyItemList>
<Id>103499</Id>
<GmtCreated>2022-04-21T02:04:04Z</GmtCreated>
<GmtModified>2022-04-21T02:10:47Z</GmtModified>
<IdempotentId>ETnLKlblzczshOTUbOCzxxxxxxxxxx</IdempotentId>
<IdempotentCount>0</IdempotentCount>
<Type>Sell</Type>
<Level>error</Level>
<TemplateName>InstanceCreateFailed</TemplateName>
<NotifyElement>{\"orderId\":21466**********}</NotifyElement>
<ConfirmFlag>true</ConfirmFlag>
<Confirmor>0</Confirmor>
</NotifyItemList>
<PageSize>25</PageSize>
<PageNumber>1</PageNumber>
<TotalRecordCount>1</TotalRecordCount>
</Data>
<RequestId>94CB8D93-017A-5AE7-A118-6E0F89D93C0A</RequestId>
</QueryNotifyResponse>JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Data" : {
"NotifyItemList" : [ {
"Id" : 103499,
"GmtCreated" : "2022-04-21T02:04:04Z",
"GmtModified" : "2022-04-21T02:10:47Z",
"IdempotentId" : "ETnLKlblzczshOTUbOCzxxxxxxxxxx",
"IdempotentCount" : "0",
"Type" : "Sell",
"Level" : "error",
"TemplateName" : "InstanceCreateFailed",
"NotifyElement" : "{\\\"orderId\\\":21466**********}",
"ConfirmFlag" : true,
"Confirmor" : 0
} ],
"PageSize" : 25,
"PageNumber" : 1,
"TotalRecordCount" : 1
},
"RequestId" : "94CB8D93-017A-5AE7-A118-6E0F89D93C0A"
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | Param.Invalid | Param invalid | The error message returned because the specified request parameters are invalid. |
| 400 | Param.Invalid.TimeEndBeforeStart | Param invalid. End time before start time | The error message returned because the end time is earlier than the start time. |
For a list of error codes, visit the API Error Center.