All Products
Search
Document Center

Elastic Compute Service:DescribeInstanceHistoryEvents

Last Updated:Oct 16, 2026

Queries the system events of specified instances. By default, this operation queries historical system events in the inactive state. You can specify parameters such as InstanceId and EventType.

Operation description

  • You can query completed historical system events that occurred within the last 30 days. There is no time limit for querying unfinished system events.

  • If you do not specify the EventCycleStatus and InstanceEventCycleStatus parameters, the query results include only system events in the Avoided, Executed, Canceled, and Failed states by default.

  • If you specify the InstanceEventCycleStatus parameter, you can also query system events in the Scheduled, Executing, and Inquiring states.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecs:DescribeInstanceHistoryEvents

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID of the resource. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou

InstanceId

string

No

The instance ID. If you do not specify this parameter, the system events of all instances in the specified region are queried.

i-uf678mass4zvr9n1****

EventCycleStatus

string

No

The lifecycle status of the system event. The EventCycleStatus parameter is valid only when the InstanceEventCycleStatus.N parameter is not specified. Valid values:

  • Scheduled: The event is waiting to be executed.

  • Avoided: The event is avoided.

  • Executing: The event is being executed.

  • Executed: The event execution is completed.

  • Canceled: The event is canceled.

  • Failed: The event execution failed.

  • Inquiring: The event is in the inquiring state.

Executed

EventType

string

No

The type of the system event. The EventType parameter is valid only when the InstanceEventType.N parameter is not specified. Valid values:

  • SystemMaintenance.Reboot: The instance is restarted due to system maintenance.

  • SystemMaintenance.Redeploy: The instance is redeployed due to system maintenance.

  • SystemFailure.Reboot: The instance is restarted due to a system failure.

  • SystemFailure.Redeploy: The instance is redeployed due to a system failure.

  • SystemFailure.Delete: The instance is released due to an instance creation failure.

  • InstanceFailure.Reboot: The instance is restarted due to an instance failure.

  • InstanceExpiration.Stop: The subscription instance is stopped due to expiration.

  • InstanceExpiration.Delete: The subscription instance is released due to expiration.

  • AccountUnbalanced.Stop: The pay-as-you-go instance is stopped due to an overdue payment.

  • AccountUnbalanced.Delete: The pay-as-you-go instance is released due to an overdue payment.

Note

For more information about event types, see Overview of system events. The value of this parameter can only be an instance system event, not a disk system event.

SystemMaintenance.Reboot

NotBefore.Start

string

No

The start time of the scheduled execution time of the system event. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. ISO 8601

2017-11-30T06:32:31Z

NotBefore.End

string

No

The end time of the scheduled execution time of the system event. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. ISO 8601

2017-12-01T06:32:31Z

EventPublishTime.Start

string

No

The start time of the publication time of the system event. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. ISO 8601

2017-11-30T06:32:31Z

EventPublishTime.End

string

No

The end time of the publication time of the system event. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. ISO 8601

2017-12-01T06:32:31Z

ImpactLevel

string

No

Note

This parameter is not available.

null

PageNumber

integer

No

Note

This parameter will be deprecated soon. Use the MaxResults or NextToken parameter for pagination.

1

PageSize

integer

No

Note

This parameter will be deprecated soon. Use the MaxResults or NextToken parameter for pagination.

10

ResourceType

string

No

The resource type. Valid values:

  • instance: ECS instance.

  • ddh: dedicated host.

  • managedhost: physical machine in an intelligent fully managed resource pool.

Default value: instance.

instance

EventId

array

No

The IDs of one or more system events. Valid values of N: 1 to 100. Specify multiple values in a repeated list.

e-uf64yvznlao4jl2c****

string

No

The IDs of one or more system events. Valid values of N: 1 to 100. Specify multiple values in a repeated list.

e-uf64yvznlao4jl2c****

InstanceEventCycleStatus

array

No

The lifecycle statuses of one or more system events. Valid values of N: 1 to 7. Specify multiple values in a repeated list. Valid values:

  • Scheduled: The event is waiting to be executed.

  • Avoided: The event is avoided.

  • Executing: The event is being executed.

  • Executed: The event execution is completed.

  • Canceled: The event is canceled.

  • Failed: The event execution failed.

  • Inquiring: The event is in the inquiring state.

Executed

string

No

The lifecycle statuses of one or more system events. Valid values of N: 1 to 7. Specify multiple values in a repeated list. Valid values:

  • Scheduled: The event is waiting to be executed.

  • Avoided: The event is avoided.

  • Executing: The event is being executed.

  • Executed: The event execution is completed.

  • Canceled: The event is canceled.

  • Failed: The event execution failed.

  • Inquiring: The event is in the inquiring state.

Executed

InstanceEventType

array

No

The types of one or more system events. Valid values of N: 1 to 30. Specify multiple values in a repeated list. Valid values:

  • SystemMaintenance.Reboot: The instance is restarted due to system maintenance.

  • SystemMaintenance.Redeploy: The instance is redeployed due to system maintenance.

  • SystemFailure.Reboot: The instance is restarted due to a system failure.

  • SystemFailure.Redeploy: The instance is redeployed due to a system failure.

  • SystemFailure.Delete: The instance is released due to an instance creation failure.

  • InstanceFailure.Reboot: The instance is restarted due to an instance failure.

  • InstanceExpiration.Stop: The subscription instance is stopped due to expiration.

  • InstanceExpiration.Delete: The subscription instance is released due to expiration.

  • AccountUnbalanced.Stop: The pay-as-you-go instance is stopped due to an overdue payment.

  • AccountUnbalanced.Delete: The pay-as-you-go instance is released due to an overdue payment.

Note

For more information about event types, see Overview of system events. The value of this parameter can only be an instance system event, not a disk system event.

SystemMaintenance.Reboot

string

No

The types of one or more system events. Valid values of N: 1 to 30. Specify multiple values in a repeated list. Valid values:

  • SystemMaintenance.Reboot: The instance is restarted due to system maintenance.

  • SystemMaintenance.Redeploy: The instance is redeployed due to system maintenance.

  • SystemFailure.Reboot: The instance is restarted due to a system failure.

  • SystemFailure.Redeploy: The instance is redeployed due to a system failure.

  • SystemFailure.Delete: The instance is released due to an instance creation failure.

  • InstanceFailure.Reboot: The instance is restarted due to an instance failure.

  • InstanceExpiration.Stop: The subscription instance is stopped due to expiration.

  • InstanceExpiration.Delete: The subscription instance is released due to expiration.

  • AccountUnbalanced.Stop: The pay-as-you-go instance is stopped due to an overdue payment.

  • AccountUnbalanced.Delete: The pay-as-you-go instance is released due to an overdue payment.

Note

For more information about event types, see Overview of system events. The value of this parameter can only be an instance system event, not a disk system event.

SystemMaintenance.Reboot

ResourceId

array

No

The IDs of one or more resources. Valid values of N: 1 to 100. Specify multiple values in a repeated list. Valid values:

  • When ResourceType is set to instance, the resource ID is the ECS instance ID.

  • When ResourceType is set to ddh, the resource ID is the dedicated host ID.

  • When ResourceType is set to managedhost, the resource ID is the physical machine ID in an intelligent fully managed resource pool.

If you do not specify this parameter, the system events of all resources of the specified resource type (ResourceType) in the specified region (RegionId) are queried.

Note

Use the ResourceId.N parameter to specify one or more resource IDs. If you specify both the ResourceId.N and InstanceId parameters, the ResourceId.N parameter takes precedence by default.

i-uf678mass4zvr9n1****

string

No

The IDs of one or more resources. Valid values of N: 1 to 100. Specify multiple values in a repeated list. Valid values:

  • When ResourceType is set to instance, the resource ID is the ECS instance ID.

  • When ResourceType is set to ddh, the resource ID is the dedicated host ID.

  • When ResourceType is set to managedhost, the resource ID is the physical machine ID in an intelligent fully managed resource pool.

If you do not specify this parameter, the system events of all resources of the specified resource type (ResourceType) in the specified region (RegionId) are queried.

Note

Use the ResourceId.N parameter to specify one or more resource IDs. If you specify both the ResourceId.N and InstanceId parameters, the ResourceId.N parameter takes precedence by default.

i-uf678mass4zvr9n1****

Tag

array<object>

No

The list of tags supported by the system event.

object

No

The list of tags supported by the system event.

Key

string

No

The tag key of the resource.

TestKey

Value

string

No

The tag value of the resource.

TestValue

ResourceGroupId

string

No

The ID of the resource group to which the resource belongs.

rg-bp67acfmxazb4p****

NextToken

string

No

The query token. Set the value to the NextToken value returned from the previous API call.

f1c9fa9de5752***

MaxResults

integer

No

The maximum number of entries per page for paging. Valid values: 10 to 100.

Default value:

  • If the specified value is greater than 0 and less than 10, the default value is 10.

  • If the specified value is greater than 100, the default value is 100.

100

Response elements

Element

Type

Description

Example

object

The system event information of the queried instances.

PageSize

integer

The number of entries per page specified in the request.

Note
  • If you use the MaxResults and NextToken parameters for paging, the returned PageSize value is meaningless.

  • This parameter will be deprecated soon. Use the NextToken and MaxResults parameters for paging.

10

RequestId

string

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

PageNumber

integer

The page number of the instance event list.

Note
  • If you use the MaxResults and NextToken parameters for paging, the returned PageNumber value is meaningless.

  • This parameter will be deprecated soon. Use the NextToken and MaxResults parameters for paging.

1

TotalCount

integer

The total number of instance events.

Note

If you use the MaxResults and NextToken parameters for paging, the returned TotalCount value is meaningless.

2

InstanceSystemEventSet

object

InstanceSystemEventType

array<object>

The array of historical system events of the instance.

array<object>

The historical system event of the instance.

EventId

string

The ID of the system event.

e-uf64yvznlao4jl2c****

EventPublishTime

string

The publication time of the system event. The time is displayed in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is in UTC. ISO 8601

2017-11-30T06:32:31Z

EventFinishTime

string

The end time of the system event. The time is displayed in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is in UTC. ISO 8601

2017-12-01T06:35:31Z

ResourceType

string

The resource type. Valid values:

  • instance: ECS instance.

  • ddh: dedicated host.

  • managedhost: physical machine in an intelligent fully managed resource pool.

instance

ImpactLevel

string

The impact level.

100

NotBefore

string

The scheduled execution time of the system event. The time is displayed in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is in UTC. ISO 8601

2017-12-06T00:00:00Z

InstanceId

string

The instance ID.

i-uf678mass4zvr9n1****

Reason

string

The cause of the system event.

System maintenance is scheduled due to ***.

EventType

object

The system event type.

Name

string

The name of the system event type.

InstanceExpiration.Stop

Code

integer

The code of the system event type.

34

EventCycleStatus

object

The lifecycle status of the system event.

Name

string

The name of the system event status.

Executed

Code

integer

The status code of the system event.

0

ExtendedAttribute

object

The extended attributes of the event.

Device

string

The device name of the local disk.

/dev/vda

DiskId

string

The ID of the local disk.

d-diskid1

InactiveDisks

object

InactiveDisk

array<object>

The list of information about inactive cloud disks or local disks that are released but need to be cleaned up.

object

The information about an inactive cloud disk or local disk that is released but needs to be cleaned up.

CreationTime

string

The creation time of the cloud disk or local disk. The time is displayed in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is in UTC. ISO 8601

2018-11-30T06:32:31Z

DeviceSize

string

The size of the cloud disk or local disk. Unit: GiB.

80

DeviceCategory

string

The category of the cloud disk or local disk. Valid values:

  • cloud: basic disk.

  • cloud_efficiency: ultra disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: enterprise SSD.

  • local_ssd_pro: I/O-intensive local disk.

  • local_hdd_pro: throughput-intensive local disk.

  • ephemeral: (retired) local disk.

  • ephemeral_ssd: (retired) local SSD.

cloud_efficiency

DeviceType

string

The type of the cloud disk or local disk. Valid values:

  • system: system disk.

  • data: data disk.

data

ReleaseTime

string

The release time of the cloud disk or local disk. The time is displayed in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is in UTC. ISO 8601

2019-11-30T06:32:31Z

HostType

string

The host type. Valid values:

  • ddh: dedicated host.

  • managedhost: physical machine in an intelligent fully managed resource pool.

ddh

HostId

string

The host ID.

dh-bp1ewce1gk3iwv2****

MigrationOptions

object

MigrationOption

array

The instance migration options. Currently, only MigrationOptions (migrate by using a migration plan) is supported.

string

The instance migration options. Currently, only MigrationPlan (migrate by using a migration plan) is supported.

MigrationPlan

OnlineRepairPolicy

string

The online repair policy for damaged cloud disks. Valid values: IsolateOnly, which indicates that only damaged disk isolation is supported and damaged disk repair is not supported.

IsolateOnly

Rack

string

The rack number of the CloudBox.

A01

PunishType

string

The punishment type.

ecs_message_alert

PunishDomain

string

The domain name with security violations.

1228.test.com

PunishUrl

string

The URL with security violations.

http://1228.test.com/1

Code

string

The code of the security violation.

PR111

CanAccept

string

Indicates whether the event can be handled.

true

ResponseResult

string

The response result of the event. Valid values:

  • true: The event response is successful.

  • false: The event response fails.

true

MetricValue

string

The metric value.

18000

MetricName

string

The metric name.

in_mbps

InitialNotBefore

string

The initial scheduled execution time of the system event.

2026-06-22T00:00:00Z

ReasonCode

string

The classification code of the cause of the system event.

VPCMigrationEcs

NextToken

string

The query token returned by this call.

Note

If the NextToken value is not returned when you use the MaxResults and NextToken parameters for paging, no more data is to be returned.

f1c9fa9de5752***

Examples

Success response

JSON format

{
  "PageSize": 10,
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "PageNumber": 1,
  "TotalCount": 2,
  "InstanceSystemEventSet": {
    "InstanceSystemEventType": [
      {
        "EventId": "e-uf64yvznlao4jl2c****",
        "EventPublishTime": "2017-11-30T06:32:31Z",
        "EventFinishTime": "2017-12-01T06:35:31Z",
        "ResourceType": "instance",
        "ImpactLevel": "100",
        "NotBefore": "2017-12-06T00:00:00Z",
        "InstanceId": "i-uf678mass4zvr9n1****",
        "Reason": "System maintenance is scheduled due to ***.",
        "EventType": {
          "Name": "InstanceExpiration.Stop",
          "Code": 34
        },
        "EventCycleStatus": {
          "Name": "Executed",
          "Code": 0
        },
        "ExtendedAttribute": {
          "Device": "/dev/vda",
          "DiskId": "d-diskid1",
          "InactiveDisks": {
            "InactiveDisk": [
              {
                "CreationTime": "2018-11-30T06:32:31Z",
                "DeviceSize": "80",
                "DeviceCategory": "cloud_efficiency",
                "DeviceType": "data",
                "ReleaseTime": "2019-11-30T06:32:31Z"
              }
            ]
          },
          "HostType": "ddh",
          "HostId": "dh-bp1ewce1gk3iwv2****",
          "MigrationOptions": {
            "MigrationOption": [
              "MigrationPlan"
            ]
          },
          "OnlineRepairPolicy": "IsolateOnly",
          "Rack": "A01",
          "PunishType": "ecs_message_alert",
          "PunishDomain": "1228.test.com",
          "PunishUrl": "http://1228.test.com/1",
          "Code": "PR111",
          "CanAccept": "true",
          "ResponseResult": "true",
          "MetricValue": "18000",
          "MetricName": "in_mbps",
          "InitialNotBefore": "2026-06-22T00:00:00Z"
        },
        "ReasonCode": "VPCMigrationEcs"
      }
    ]
  },
  "NextToken": "f1c9fa9de5752***"
}

Error codes

HTTP status code

Error code

Error message

Description

403 InvalidParameter %s
403 EventIdLimitExceeded %s
403 InvalidParameter.TimeEndBeforeStart %s The specified parameter is invalid. Make sure that the end time is later than the start time.
403 OperationDenied.NotInWhiteList %s You are not authorized to perform this operation. Try again when you are authorized.
404 MissingParameter %s

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.