すべてのプロダクト
Search
ドキュメントセンター

:Query notifications for an ApsaraDB RDS instance

最終更新日:Mar 07, 2025

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.

デバッグ

OpenAPI Explorer は署名値を自動的に計算します。 この操作は、OpenAPI Explorer で呼び出すことを推奨します。 OpenAPI Explorer は、さまざまな SDK に対して操作のサンプルコードを動的に生成します。

リクエストパラメーター

項目データ型必須/任意例:説明 
操作String必須QueryNotify

実行する操作です。 Set the value to QueryNotify.

WithConfirmedブール

Specifies whether the query results contain confirmed notifications. 有効な値:

  • true
  • false
    説明 A confirmed notification is a notification that has been marked as confirmed by calling the ConfirmNotify operation.
FromString必須2022-05-02T08:38:37Z

クエリする期間の開始時刻です。 Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. 時間は UTC にする必要があります。

ToString必須2022-05-09T08:38:37Z

クエリする期間の終了時刻を設定します。 終了時刻は開始時刻よりも後の時刻にする必要があります。 Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. 時間は UTC にする必要があります。

PageSizeIntegerいいえ30

各ページで返されるエントリ数。 有効な値:

  • 30
  • 50
  • 100

既定値: 30.

PageNumberIntegerいいえ1

返されるページ数。 Valid values: any non-zero positive integer.

既定値:1

レスポンスパラメーター

項目データ型例:説明 
データオブジェクト

The details of the returned parameters.

NotifyItemListArray of NotifyItemList

The details of the notification.

IdLong103499

The ID of the notification.

GmtCreatedString2022-04-21T02:04:04Z

The time when the notification was created.

GmtModifiedString2022-04-21T02:10:47Z

The time when the notification was modified.

AliUidLong22973492**********

Alibaba Cloud アカウントの ID。

IdempotentIdStringETnLKlblzczshOTUbOCzxxxxxxxxxx

This parameter ensures the idempotence of the notification and prevents the notification from being repeatedly sent.

IdempotentCountString0

The number of times that repeatedly sent notifications are blocked.

種類StringSell

The type of the notification. 有効な値:

  • Sell: sales notification
  • Operation: O&M notification
  • Promotion: promotion notification
LevelStringerror

The level of the notification. 有効な値:

  • help
  • success
  • warning
  • error
  • loading
  • notice
TemplateNameStringInstanceCreateFailed

The template of the notification. 有効な値:

  • RenewalRecommend: The template that is used to notify of renewal suggestions.
  • InstanceCreateFailed: The template that is used to notify that an instance fails to be created and is refunded.
NotifyElementString{\"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.

  • If the TemplateName parameter is RenewalRecommend, the JSON string contains the following fields:
    • instanceName: the ID of the instance that is about to expire
    • reservedTime: the remaining validity period of the instance in days
  • If the TemplateName parameter is InstanceCreateFailed, the JSON string contains the following fields:
    • orderId: the ID of the order to purchase the instance
    • reason: the cause of the instance creation failure
ConfirmFlagブール真実

Indicates whether the notification has been confirmed. You can call the ConfirmNotify operation to mark the notification as confirmed. 有効な値:

  • true
  • false
ConfirmorLong0

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.

PageSizeInteger25

1 ページあたりで返されるエントリ数。

PageNumberInteger1

返されたページ数。

TotalRecordCountInteger1

エントリの総数。

RequestIdString94CB8D93-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 ステータスコードエラーコードエラーメッセージ説明 
400Param.InvalidParam invalidThe error message returned because the specified request parameters are invalid.
400Param.Invalid.TimeEndBeforeStartParam invalid. End time before start timeThe error message returned because the end time is earlier than the start time.

エラーコードリストについては、「API エラーセンター」をご参照ください。