Querying Events
Function
This API is used to query events. Before calling this API:
- Learn how to authenticate this API.
- Obtain the required region and endpoint.
Debugging
You can debug this API in API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
- If you are using identity policy-based authorization, the permission listed below is required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
gaussdb:instance:listScheduleEvents
list
-
-
-
-
URI
GET /v3/{project_id}/schedule-events
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID of a tenant in a region. To obtain the value, see Obtaining a Project ID. Constraints N/A Range The value can contain 32 characters. Only letters and digits are allowed. Default Value N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| id | No | String | Definition Event ID.
Constraints N/A Range N/A Default Value N/A |
| instance_id | No | String | Definition Instance ID. The value of this parameter can be obtained by calling the API in Querying DB Instances and obtaining the value of id in the instances table. Constraints N/A Range N/A Default Value N/A |
| status | No | String | Definition Event status. Constraints N/A Range
Default Value If this parameter is left blank, all statuses are queried. |
| type | No | String | Definition Event type. Constraints N/A Range RESTART_NODE: instance node restart. Default Value If this parameter is left blank, all types are queried. |
| level | No | String | Definition Event severity. Constraints N/A Range
Default Value N/A |
| sort_field | No | String | Definition Sorting field. Constraints N/A Range
Default Value N/A |
| order | No | String | Definition Sorting order. Constraints N/A Range
Default Value N/A |
| offset | No | Integer | Definition Index offset. The query starts from the next piece of data indexed by this parameter. Constraints N/A Range ≥ 0 Default Value 0: The query starts from the first data record. |
| limit | No | Integer | Definition Number of records returned by a query. Constraints N/A Range 1~100 Default Value 10 |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| total_count | Integer | Definition Total number of events. Range N/A |
| inquiring_count | Integer | Definition Number of events to be authorized. Range N/A |
| schedule_count | Integer | Definition Number of events to be executed. Range N/A |
| executing_count | Integer | Definition Number of events being executed. Range N/A |
| failed_count | Integer | Definition Number of events that failed to be executed. Range N/A |
| events | Array of objects | Definition Event details list. For details, see Table 4. |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition Event ID. Range N/A |
| instance_id | String | Definition Instance ID. Range N/A |
| instance_name | String | Definition Instance name. Range N/A |
| db_type | String | Definition Database type. Range gaussdbv5: GaussDB database. |
| created_time | String | Definition Event creation time. Range The value is in the yyyy-mm-ddThh:mm:ssZ format. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the offset is +0800. |
| update_time | String | Definition Event update time. Range The value is in the yyyy-mm-ddThh:mm:ssZ format. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the offset is +0800. |
| type | String | Definition Event type. Range RESTART_NODE: instance node restart. |
| impact | String | Definition Impact of the event on the system. Range N/A |
| status | String | Definition Event status. Range
|
| reason | String | Definition Cause of the event. Range N/A |
| level | String | Definition Event severity. Range
|
| execute_time | String | Definition Event execution time. Range N/A |
| latest_execution_time | String | Definition Time when the event was last executed. Range N/A |
| execution_time_window | Array of objects | Definition Time window for event execution. For details, see Table 5. |
| Parameter | Type | Description |
|---|---|---|
| planned_execution_day | String | Definition Date of the execution time window. Range N/A |
| start_time | String | Definition Start time of the time window. Range The value is a UTC time in the format of HH:mm. |
| end_time | String | Definition End time of the time window. Range The value is a UTC time in the format of HH:mm. |
Example Request
Querying events
GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/schedule-events
{
"id": "67323a8c-75aa-4d81-941e-02621ccd4d07",
"instance_id": "6970e9cf7adc41a78e0f1f50215c9d3bin03",
"status": "inquiring",
"type": "RESTART_NODE",
"offset": 0,
"limit": 50,
"sort_field": "execution_time_window",
"order": "desc"
} Example Response
{
"total_count": 1,
"inquiring_count": 1,
"schedule_count": 0,
"executing_count": 0,
"failed_count": 0,
"events": [
{
"id": "created_time",
"instance_id": "0c08894f1d8f44d2a1f392a3d50fe96ein14",
"instance_name": "TestInstance",
"db_type": "gaussdbv5",
"created_time": "2024-06-30T09:04:35+0800",
"update_time": "2024-06-30T09:04:35+0800",
"type": "RESTART_NODE",
"impact": "Instance Intermittent Disconnection",
"status": "inquiring",
"reason": "ECS_RESTART",
"level": "critical",
"execute_time": "",
"latest_execution_time": "",
"execution_time_window": [{
"planned_execution_day": "2026-02-14",
"start_time": "02:00",
"end_time": "06:00"
}]
}
]
} Status Codes
- Normal
- Abnormal
For details, see Status Codes.
Error Codes
For details, see Error Codes.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot