Queries instance system events.
Operation description
- You must specify an event type to query. You can query multiple event types at the same time.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| ens:DescribeHistoryEvents | none | *All Resources * |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| PageNumber | integer | No | The page number. Pages start from page 1. Default value: 1. | 1 |
| PageSize | integer | No | The number of entries per page. | 10 |
| EventTypes | array | Yes | The list of event types. | |
| string | Yes | The type of the event. Valid values:
| Instance:SystemFailure.Reboot | |
| EventLevels | array | No | The levels of the event-triggered alerts. | |
| string | No | The level of the specific event. Valid values:
| WARN | |
| ResourceIds | array | No | The IDs of resources. | |
| string | No | The ID of the resource. | i-55qi8m11rr53c4i964md8a00l | |
| EventStatus | array | No | Event status list. | |
| string | No | The status of the event. Valid values:
| Inquiring |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "5359599C-F656-57BD-8A0D-329A2FD511A6",
"Events": [
{
"EventId": "e-d71ff150945b9c02eb6ebc0016328468",
"EventStatus": "Inquiring",
"EventType": "Instance:SystemFailure.Reboot",
"ResourceId": "i-55qi8m11rr53c4i964md8a00l",
"EventLevel": "WARN",
"PublishTime": 1715578245000,
"ExtendedAttribute": {},
"Reason": "",
"NotBefore": 1715578245000
}
],
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 30
}Error codes
| HTTP status code | Error code | Error message |
|---|---|---|
| 400 | NoPermission | Permission denied. |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. |
For a list of error codes, visit the Service error codes.
