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
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the resource. You can call DescribeRegions to query the most recent region list. | cn-hangzhou |
InstanceId | string | No | 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**** |
EventCycleStatus | string | No | The lifecycle state of the system event. This parameter takes effect only when InstanceEventCycleStatus.N is not specified. Valid values:
| Executed |
EventType | string | No | The type of the system event. This parameter takes effect only when InstanceEventType.N is not specified. Valid values:
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.Start | string | No | 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.End | string | No | 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.Start | string | No | 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.End | string | No | 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 |
ImpactLevel | string | No | Note
This parameter is not publicly available.
| null |
PageNumber | integer | No | The page number. Pages start from page 1. Default value: 1. | 1 |
PageSize | integer | No | The number of entries per page. Valid values: 1 to 100. Default value: 10. | 10 |
ResourceType | string | No | The type of the resource. Valid values:
Default value: instance. | instance |
EventId | array | No | The ID of system event N. Valid values of N: 1 to 100. You can repeat this parameter to pass multiple values. | |
string | No | The ID of system event N. Valid values of N: 1 to 100. You can repeat this parameter to pass multiple values. | e-uf64yvznlao4jl2c**** | |
InstanceEventCycleStatus | array | No | 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:
| |
string | No | 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:
| Executed | |
InstanceEventType | array | No | The type of system event N. Valid values of N: 1 to 30. You can repeat this parameter to pass multiple values. Valid values:
Note
For more information, see Overview . The values of this parameter are applicable only to instance system events, but not to disk system events.
| |
string | No | The type of system event N. Valid values of N: 1 to 30. You can repeat this parameter to pass multiple values. Valid values:
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 | |
ResourceId | array | No | The ID of resource N. Valid values of N: 1 to 100. You can repeat this parameter to pass multiple values. Valid values:
If this parameter is not specified, the system events of all resources of the type specified by 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.
| |
string | No | The ID of resource N. Valid values of N: 1 to 100. You can repeat this parameter to pass multiple values. Valid values:
If this parameter is not specified, the system events of all resources of the type specified by 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**** | |
Tag | object [] | No | The list of tags. | |
Key | string | No | The key of tag N of the resource. | TestKey |
Value | string | No | The value of tag N of the resource. | TestValue |
ResourceGroupId | string | No | The ID of the resource group to which the resource belongs. | rg-bp67acfmxazb4p**** |
Response parameters
Examples
Sample success responses
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"
}
}
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
403 | InvalidParameter | %s | The specified parameter is invalid. |
403 | EventIdLimitExceeded | %s | More than 100 simulated event IDs are specified. |
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 | A parameter is not specified. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
2023-07-13 | The Error code has changed. The response structure of the API has changed | see changesets | ||||||||
|