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.
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. |
| 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. |
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"
}
{
"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
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
There is no error code related to the API business logic. For other error codes, please see Common Error Codes.
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback