Operating Events Reported by EG
Function
This API is used to operate events reported by EventGrid (EG). EG is a serverless event bus service provided by Huawei Cloud. 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:operateScheduleEvents
write
-
-
-
-
URI
POST /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 |
|---|---|---|---|
| event_instances | Yes | object | Definition Event list. For details, see Table 3. Constraints N/A |
| operation_type | Yes | String | Definition Event operation type. Constraints N/A Range
Default Value N/A |
| event_schedule_window | No | object | Definition Event scheduling window. For details, see Table 4. Constraints If operation_type is set to reservation, the event_schedule_window parameter is mandatory. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| event_id | Yes | String | Definition Event ID. The value of this parameter can be obtained by calling the API in Querying Events and obtaining the value of id in the events field description table. Constraints N/A Range N/A Default Value N/A |
| instance_id | Yes | 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 |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| planned_day | Yes | String | Definition Planned execution date. Constraints The value is in yyyy-MM-dd format. Range N/A Default Value N/A |
| start_time | No | String | Definition Scheduled start time. Constraints The value is a UTC time in the format of HH:mm. Range N/A Default Value N/A |
| end_time | No | String | Definition Scheduled end time. Constraints The value is a UTC time in the format of HH:mm. Range N/A Default Value N/A |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| results | Array of objects | Definition Event operation response result. For details, see Table 6. |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition Event ID. Range N/A |
| instance_id | String | Definition Instance ID. Range N/A |
| job_id | String | Definition Job ID. Range N/A |
| error_code | String | Definition Error code. Range N/A |
| error_msg | String | Definition Error message. Range N/A |
| success | Boolean | Definition Whether the operation is successful. Range
|
Example Request
Modifying the event scheduling window of an instance
POST https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/54623db08b174c858ba779d2aa7923a3/schedule-events
{
"event_instances": [
{
"instance_id": "a2c16e6bfd3d4d28ba41091b95488618in01",
"event_id": "131375c299d54da989589048900e568fev01"
}
],
"event_schedule_window": {
"planned_day": "2025-11-13",
"start_time": "06:00",
"end_time": "10:00"
},
"operation_type": "reservation"
} Example Response
{
"results": [
{
"id": "131375c299d54da989589048900e568fev01",
"instance_id": "a2c16e6bfd3d4d28ba41091b95488618in01",
"success": true,
"job_id": "a2c16e6bfd3d4d28ba41091b954886181221",
"error_code": "",
"error_msg": ""
}
]
} 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