Help Center/ GaussDB/ API Reference/ APIs/ Event Management/ Operating Events Reported by EG
Updated on 2026-08-18 GMT+08:00

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:

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

Table 1 URI parameters

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

Table 2 Parameter description

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

  • cancel
  • execute
  • reservation

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.

Table 3 event_instances field description

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

Table 4 event_schedule_window field description

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

Table 5 Response body parameters

Parameter

Type

Description

results

Array of objects

Definition

Event operation response result. For details, see Table 6.

Table 6 results field description

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

  • true: successful
  • false: failed

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

Error Codes

For details, see Error Codes.