All Products
Search
Document Center

Elastic Compute Service:DescribeInstanceHistoryEvents

Last Updated:Mar 19, 2024

Queries historical system events that are inactive.

Operation description

  • You can query system events that were completed within the last 30 days. No limits apply to the time range for querying uncompleted system events.
  • You can also specify InstanceEventCycleStatus to query the system events that are in the Scheduled, Executing, or Inquiring state.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

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

cn-hangzhou
InstanceIdstringNo

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

i-uf678mass4zvr9n1****
EventCycleStatusstringNo

The lifecycle state of the system event. This parameter takes effect only when InstanceEventCycleStatus.N is not specified. Valid values:

  • Scheduled
  • Avoided
  • Executing
  • Executed
  • Canceled
  • Failed
  • Inquiring
Executed
EventTypestringNo

The type of the system event. This parameter takes effect only when InstanceEventType.N 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 error.
  • SystemFailure.Redeploy: The instance is redeployed due to a system error.
  • SystemFailure.Delete: The instance is released due to an instance creation failure.
  • InstanceFailure.Reboot: The instance is restarted due to an instance error.
  • 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, see Overview . The values of this parameter are applicable only to instance system events, but not to disk system events.
SystemMaintenance.Reboot
NotBefore.StartstringNo

The earliest scheduled start time for 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.

2017-11-30T06:32:31Z
NotBefore.EndstringNo

The latest scheduled end time for 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.

2017-12-01T06:32:31Z
EventPublishTime.StartstringNo

The beginning of the time range in which to query published system events. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

2017-11-30T06:32:31Z
EventPublishTime.EndstringNo

The end of the time range in which to query published system events. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

2017-12-01T06:32:31Z
ImpactLevelstringNo
Note This parameter is not publicly available.
null
PageNumberintegerNo

The page number. Pages start from page 1.

Default value: 1.

1
PageSizeintegerNo

The number of entries per page. Valid values: 1 to 100.

Default value: 10.

10
ResourceTypestringNo

The type of the resource. Valid values:

  • instance: ECS instance
  • ddh: dedicated host
  • managehost: physical machine in a smart hosting pool

Default value: instance.

instance
EventIdarrayNo

The ID of system event N. Valid values of N: 1 to 100. You can repeat this parameter to pass multiple values.

stringNo

The ID of system event N. Valid values of N: 1 to 100. You can repeat this parameter to pass multiple values.

e-uf64yvznlao4jl2c****
InstanceEventCycleStatusarrayNo

The lifecycle state of system event N. Valid values of N: 1 to 7. You can repeat this parameter to pass multiple values. Valid values:

  • Scheduled
  • Avoided
  • Executing
  • Executed
  • Canceled
  • Failed
  • Inquiring
stringNo

The lifecycle state of system event N. Valid values of N: 1 to 7. You can repeat this parameter to pass multiple values. Valid values:

  • Scheduled
  • Avoided
  • Executing
  • Executed
  • Canceled
  • Failed
  • Inquiring
Executed
InstanceEventTypearrayNo

The type of system event N. Valid values of N: 1 to 30. You can repeat this parameter to pass multiple values. 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 error.
  • SystemFailure.Redeploy: The instance is redeployed due to a system error.
  • SystemFailure.Delete: The instance is released due to an instance creation failure.
  • InstanceFailure.Reboot: The instance is restarted due to an instance error.
  • 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, see Overview . The values of this parameter are applicable only to instance system events, but not to disk system events.
stringNo

The type of system event N. Valid values of N: 1 to 30. You can repeat this parameter to pass multiple values. 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 error.
  • SystemFailure.Redeploy: The instance is redeployed due to a system error.
  • SystemFailure.Delete: The instance is released due to an instance creation failure.
  • InstanceFailure.Reboot: The instance is restarted due to an instance error.
  • 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, see Overview . The values of this parameter are applicable only to instance system events, but not to disk system events.
SystemMaintenance.Reboot
ResourceIdarrayNo

The ID of resource N. Valid values of N: 1 to 100. You can repeat this parameter to pass multiple values. Valid values:

  • When ResourceType is set to instance, ResourceId.N specifies the ID of instance N.
  • When ResourceType is set to ddh, ResourceId.N specifies the ID of dedicated host N.
  • When ResourceType is set to managedhost, ResourceId.N specifies the ID of physical machine N from a smart hosting pool.

If this parameter is not specified, the system events of all resources of the type specified by ResourceType in the region specified by RegionId are queried.

Note We recommend that you use ResourceId.N to specify one or more resource IDs. If you specify both ResourceId.N and InstanceId, ResourceId.N takes precedence by default.
stringNo

The ID of resource N. Valid values of N: 1 to 100. You can repeat this parameter to pass multiple values. Valid values:

  • When ResourceType is set to instance, ResourceId.N specifies the ID of instance N.
  • When ResourceType is set to ddh, ResourceId.N specifies the ID of dedicated host N.
  • When ResourceType is set to managedhost, ResourceId.N specifies the ID of physical machine N from a smart hosting pool.

If this parameter is not specified, the system events of all resources of the type specified by ResourceType in the region specified by RegionId are queried.

Note We recommend that you use ResourceId.N to specify one or more resource IDs. If you specify both ResourceId.N and InstanceId, ResourceId.N takes precedence by default.
i-uf678mass4zvr9n1****
Tagobject []No

The list of tags.

KeystringNo

The key of tag N of the resource.

TestKey
ValuestringNo

The value of tag N of the resource.

TestValue
ResourceGroupIdstringNo

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

rg-bp67acfmxazb4p****

Response parameters

ParameterTypeDescriptionExample
object
PageSizeinteger

The number of entries per page.

10
RequestIdstring

The ID of the request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
PageNumberinteger

The page number.

1
TotalCountinteger

The total number of instances returned.

2
InstanceSystemEventSetobject []

The information about instance system events.

EventIdstring

The ID of the system event.

e-uf64yvznlao4jl2c****
EventPublishTimestring

The time when the system event was published. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2017-11-30T06:32:31Z
EventFinishTimestring

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

2017-12-01T06:35:31Z
ResourceTypestring

The type of the resource. Valid values:

  • instance: ECS instance
  • ddh: dedicated host
  • managehost: physical machine in a smart hosting pool
instance
ImpactLevelstring

The impact level of the system event.

100
NotBeforestring

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

2017-12-06T00:00:00Z
InstanceIdstring

The ID of the instance.

i-uf678mass4zvr9n1****
Reasonstring

The reason why the system event was scheduled.

System maintenance is scheduled due to ***.
EventTypeobject

The type of the system event.

Namestring

The name of the system event type.

InstanceExpiration.Stop
Codeinteger

The code of the system event type.

34
EventCycleStatusobject

The lifecycle state of the system event.

Namestring

The state name of the system event.

Executed
Codeinteger

The state code of the system event.

0
ExtendedAttributeobject

The extended attribute of the system event.

Devicestring

The device name of the local disk.

/dev/vda
DiskIdstring

The ID of the local disk.

d-diskid1
InactiveDisksobject []

The information about the inactive disks that have been released and must be cleared.

CreationTimestring

The time when the disk was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2018-11-30T06:32:31Z
DeviceSizestring

The size of the disk. Unit: GiB.

80
DeviceCategorystring

The category of the disk. Valid values:

  • cloud: basic disk
  • cloud_efficiency: ultra disk
  • cloud_ssd: standard SSD
  • cloud_essd: enhanced SSD (ESSD)
  • 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
DeviceTypestring

The type of the disk. Valid values:

  • system: system disk
  • data: data disk
data
ReleaseTimestring

The time when the disk was released. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2019-11-30T06:32:31Z
HostTypestring

The type of the host. Valid values:

  • ddh: dedicated host
  • managehost: physical machine in a smart hosting pool
ddh
HostIdstring

The ID of the host.

dh-bp1ewce1gk3iwv2****
MigrationOptionsarray

The migration solution of the instance. Valid value: MigrationPlan, which indicates that instances can be migrated only by using migration plans.

string

The migration solution of the instance. Valid value: MigrationPlan, which indicates that instances can be migrated only by using migration plans.

MigrationPlan
OnlineRepairPolicystring

The online repair policy for the damaged disk. Valid value: IsolateOnly, which indicates that damaged disks are isolated but not repaired.

IsolateOnly
Rackstring

The rack number of the cloud box.

A01
PunishTypestring

The type of the penalty.

ecs_message_alert
PunishDomainstring

The illegal domain name.

1228.test.com
PunishUrlstring

The illegal URL.

http://1228.test.com/1
Codestring

The code of the security violation.

PR111
CanAcceptstring

Indicates whether the event can be handled.

true
ResponseResultstring

The response result of the event. Valid values:

  • true: The event was handled.
  • false: The event failed to be handled.
true

Examples

Sample success responses

JSONformat

{
  "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"
        }
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
403InvalidParameter%sThe specified parameter is invalid.
403EventIdLimitExceeded%sMore than 100 simulated event IDs are specified.
403InvalidParameter.TimeEndBeforeStart%sThe specified parameter is invalid. Make sure that the end time is later than the start time.
403OperationDenied.NotInWhiteList%sYou are not authorized to perform this operation. Try again when you are authorized.
404MissingParameter%sA parameter is not specified.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-07-13The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 403
    delete Error Codes: 404
Output ParametersThe response structure of the API has changed.