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.
デバッグ
リクエストパラメーター
| 項目 | データ型 | 必須/任意 | 例: | 説明 |
| 操作 | String | 必須 | QueryNotify | 実行する操作です。 Set the value to QueryNotify. |
| WithConfirmed | ブール | 〇 | 偽 | Specifies whether the query results contain confirmed notifications. 有効な値:
|
| From | String | 必須 | 2022-05-02T08:38:37Z | クエリする期間の開始時刻です。 Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. 時間は UTC にする必要があります。 |
| To | String | 必須 | 2022-05-09T08:38:37Z | クエリする期間の終了時刻を設定します。 終了時刻は開始時刻よりも後の時刻にする必要があります。 Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. 時間は UTC にする必要があります。 |
| PageSize | Integer | いいえ | 30 | 各ページで返されるエントリ数。 有効な値:
既定値: 30. |
| PageNumber | Integer | いいえ | 1 | 返されるページ数。 Valid values: any non-zero positive integer. 既定値:1 |
レスポンスパラメーター
| 項目 | データ型 | 例: | 説明 |
| データ | オブジェクト | 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********** | Alibaba Cloud アカウントの ID。 |
| 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. |
| 種類 | String | Sell | The type of the notification. 有効な値:
|
| Level | String | error | The level of the notification. 有効な値:
|
| TemplateName | String | InstanceCreateFailed | The template of the notification. 有効な値:
|
| 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 | ブール | 真実 | Indicates whether the notification has been confirmed. You can call the ConfirmNotify operation to mark the notification as confirmed. 有効な値:
|
| 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 | 1 ページあたりで返されるエントリ数。 |
| PageNumber | Integer | 1 | 返されたページ数。 |
| TotalRecordCount | Integer | 1 | エントリの総数。 |
| RequestId | String | 94CB8D93-017A-5AE7-A118-6E0F89D93C0A | リクエストの ID です。 |
例
リクエストの例
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 parameters正常に処理された場合のレスポンス例
XML 形式
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>
<ページ番号> 1 </ PAGENUMBER>
<TotalRecordCount>1</TotalRecordCount>
</Data>
<RequestId>94CB8D93-017A-5AE7-A118-6E0F89D93C0A</RequestId>
</QueryNotifyResponse>JSON 形式
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"
}エラーコード
| HTTP ステータスコード | エラーコード | エラーメッセージ | 説明 |
| 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. |
エラーコードリストについては、「API エラーセンター」をご参照ください。