tencent cloud

APIs

DescribeInstanceAlarmEvents

Download
Focus Mode
Font Size
Last updated: 2026-06-01 17:02:33

1. API Description

Domain name for API request: cdb.intl.tencentcloudapi.com.

This API is used to query event information of instance occurrence.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DescribeInstanceAlarmEvents.
Version Yes String Common Params. The value used for this API: 2017-03-20.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
InstanceId Yes String Instance ID, which can be obtained through the DescribeDBInstances API.
StartTime Yes String Event query range start time, closed interval.
EndTime Yes String End time of the event query range, closed interval.
EventName.N No Array of String Event name. Outofmemory - Memory OOM (status event); Switch - primary-secondary switch (status event); Roremove - read-only instance removal (status event); MemoryUsedHigh - high memory utilization (status event); CPUExpansion - CPU performance scale-out (stateless event); CPUExpansionFailed - CPU performance scale-out failed (stateless event); CPUContraction - CPU performance scale-in (stateless event); Restart - instance restart (status event); ServerFailureNodeMigration - ServerFailureNodeMigration (status event); PlannedSwitch - planned active/standby switch (stateless event); OverusedReadonlySet - instance will be locked (stateless event); OverusedReadWriteSet - instance unlock (stateless event).
EventStatus No String Event status. "1" - Event; "0" - Recovery event; "-" - Stateless event.
Order No String Sorting method. Sort by event occurrence. "DESC" - inverted; "ASC" - in order. Default is inverted.
Limit No String Number of displayed events. Default is 100, maximum is 200.
Offset No String Offset.
NodeId No String Node ID.

3. Output Parameters

Parameter Name Type Description
TotalCount Integer Number of events.
Items Array of InstEventInfo Event information. Items is null when info is not found.
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Queries instance event information

Input Example

POST / HTTP/1.1
Host: cdb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeInstanceAlarmEvents
<Common request parameters>

{
    "InstanceId": "cdb-fbd5agyt",
    "StartTime": "2024-11-15 00:00:00",
    "EndTime": "2024-12-15 00:00:00",
    "EventName": [
        "PlannedSwitch"
    ],
    "EventStatus": "1",
    "Limit": "100"
}

Output Example

{
    "Response": {
        "Items": [
            {
                "EventName": "PlannedSwitch",
                "EventStatus": "1",
                "InstanceId": "cdb-fbd5agyt",
                "NodeId": "",
                "OccurTime": "2024-11-25 14:46:42"
            }
        ],
        "RequestId": "971e2860-c55b-4323-a831-0001",
        "TotalCount": 1
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

There is no error code related to the API business logic. For other error codes, please see Common Error Codes.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback