All Products
Search
Document Center

ApsaraDB RDS:QueryNotify

Last Updated:Apr 17, 2024

Queries the notifications of an ApsaraDB RDS instance.

Operation description

Supported database engines

  • MySQL
  • PostgreSQL
  • SQL Server
  • MariaDB

Feature description

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
WithConfirmedbooleanYes

Specifies whether the query results contain confirmed notifications. Valid values:

  • true
  • false
Note A confirmed notification is a notification that has been marked as confirmed by calling the ConfirmNotify operation.
false
FromstringYes

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.

2022-05-02T08:38:37Z
TostringYes

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.

2022-05-09T08:38:37Z
PageSizeintegerNo

The number of entries to return on each page. Valid values:

  • 30
  • 50
  • 100

Default value: 30.

30
PageNumberintegerNo

The number of the page to return. Valid values: any non-zero positive integer.

Default value: 1.

1

Response parameters

ParameterTypeDescriptionExample
object

PlainResponse

Dataobject

The response parameters.

NotifyItemListobject []

The details of notifications.

Idlong

The ID of the notification.

103499
GmtCreatedstring

The time when the notification was created.

2022-04-21T02:04:04Z
GmtModifiedstring

The time when the notification was modified.

2022-04-21T02:10:47Z
AliUidlong

The ID of the Alibaba Cloud account.

22973492**********
IdempotentIdstring

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

ETnLKlblzczshOTUbOCzxxxxxxxxxx
IdempotentCountstring

The number of times that repeatedly sent notifications are blocked.

0
Typestring

The type of the notification. Valid values:

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

The level of the notification. Valid values:

  • help
  • success
  • warning
  • error
  • loading
  • notice
error
TemplateNamestring

The template of the notification. Valid values:

  • 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.
InstanceCreateFailed
NotifyElementstring

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
{\"orderId\":21466**********}
ConfirmFlagboolean

Indicates whether the notification has been confirmed. You can call the ConfirmNotify operation to mark the notification as confirmed. Valid values:

  • true
  • false
true
Confirmorlong

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.

0
PageSizeinteger

The number of entries returned on each page.

25
PageNumberinteger

The page number of the page returned.

1
TotalRecordCountinteger

The total number of entries returned.

1
RequestIdstring

The request ID.

94CB8D93-017A-5AE7-A118-6E0F89D93C0A

Examples

Sample success responses

JSONformat

{
  "Data": {
    "NotifyItemList": [
      {
        "Id": 103499,
        "GmtCreated": "2022-04-21T02:04:04Z",
        "GmtModified": "2022-04-21T02:10:47Z",
        "AliUid": 0,
        "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 codeError codeError messageDescription
400Param.InvalidParam invalidA request parameter error occurred.
400Param.Invalid.TimeEndBeforeStartParam invalid. End time before start timeThe end time cannot be earlier than the start time.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history