Updated on 2025-12-10 GMT+08:00

Listing Scheduled Events

Function

This API is used to list scheduled events of an instance.

Debugging

You can debug this API in API Explorer.

Authorization

Each account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned.
  • 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 permissions listed below are required.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

ecs:instanceScheduledEvents:list

list

-

-

-

-

URI

GET /v3/{project_id}/instance-scheduled-events

Table 1 describes the parameters in the URI.

Table 1 Path parameter

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

For details about how to obtain the ID, see Obtaining a Project ID.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Specifies the limit on the number of events that can be returned.

Range: 1–100

marker

No

String

Specifies the unique marker of the last record on the previous page.

id

No

String

Specifies the event ID.

instance_id

No

String

Specifies the instance ID.

type

No

Array of strings

Specifies the event type.

state

No

Array of string

Specifies the event status.

publish_since

No

String

Specifies the start time of publishing an event. The value is filtered by time range.

The value is in the format of "yyyy-MM-ddTHH:mm:ssZ" in UTC+0 and complies with ISO8601.

publish_until

No

String

Specifies the end time of publishing an event. The value is filtered by time range.

The value is in the format of "yyyy-MM-ddTHH:mm:ssZ" in UTC+0 and complies with ISO8601.

Request

None.

Response

Table 3 describes the response parameter.

Table 3 Response parameters

Parameter

Type

Description

events

Array of objects

Specifies the event list. For details, see Table 4.

page_info

Object

Specifies the page marker. For details, see Table 5.

Table 4 events parameters

Parameter

Type

Description

id

String

Specifies the event ID.

type

String

Specifies the event type.

state

String

Specifies the event status.

  • inquiring: An event is waiting to be authorized with the start time specified. The system will complete operations within a specified time. For details, see the response event.
  • scheduled: The event is waiting for the system to schedule resources.
  • executing: The system has scheduled resources and is rectifying the fault.
  • completed: The system has completed the event execution. Check the impacts on services. If any problems occur, contact technical support.
  • failed: The system fails to automatically rectify the fault.
  • canceled: The event has been canceled by the system.

publish_time

String

Specifies when the event is published.

start_time

String

Specifies the event start time.

finish_time

String

Specifies the event completion time.

not_before

String

Specifies when the event is scheduled to start.

not_after

String

Specifies when the event is scheduled to end.

not_before_deadline

String

Specifies the deadline of starting a scheduled event.

description

String

Specifies the event description.

instance_id

String

Specifies the instance ID.

execute_options

Object

Specifies the event execution option. For details, see Table 6.

source

Object

Specifies the event source. For details, see Table 7.

Table 5 page_info parameters

Parameter

Type

Description

next_marker

String

Specifies the query address of the next page.

Table 6 execute_options field description

Parameter

Type

Description

device

String

Specifies the device name of the local disk.

wwn

String

Specifies the unique ID used for attaching the local disk.

serial_number

String

Specifies the SN of the local disk.

resize_target_flavor_id

String

Specifies the flavor ID.

migrate_policy

String

Specifies the instance migration policy.

executor

String

Specifies the executor.

Table 7 source field description

Parameter

Type

Description

type

String

Specifies the source type of the scheduled event.

Range:

  • platform: The event is initiated by the O&M platform.
  • user: The event is initiated by users.

host_scheduled_event_id

String

Specifies the ID of the scheduled event for the host.

Example Request

List scheduled events.

GET https://{endpoint}/v3/{project_id}/instance-scheduled-events?state=inquiring,scheduled,executing&limit=1

Example Response

{
    "events": [
        {
            "id": "0ead944a-72e8-494f-89ba-5846fb7ac5c0",
            "type": "instance-redeploy",
            "state": "scheduled",
            "publish_time": "2025-03-13T12:55:36Z",
            "start_time": null,
            "finish_time": null,
            "not_before": "2025-03-21T09:22:41Z",
            "not_after": "2025-03-21T11:22:41Z",
            "not_before_deadline": "2025-03-21T09:22:41Z",
            "description": "{\"en-us\":\"As being affected by underlying hardware or system OM, ECSs will be redeployed on new hosts\"}",
            "instance_id": "c51b9e4f-0469-4c6f-ad03-22b23247b7a8"
        }
    ],
    "page_info": {
        "next_marker": "0ead944a-72e8-494f-89ba-5846fb7ac5c0"
    }
}

Error Codes

See Error Codes.