You can call this operation to retrieve events captured by ActionTrail.

Request parameters

Name Type Required Example Description
Action String Yes LookupEvents The operation that you want to perform. Set the value to LookupEvents.
RegionId String Yes cn-hangzhou The ID of the region where the instance is located. For more information about the latest list of Alibaba Cloud regions, see DescribeRegions.
Event String No AD9CD9DA-EC2D-4EB7-A817-C0442A94**** The ID of the event to be retrieved.
Request String No AD9CD9DA-EC2D-4EB7-A817-C0442A94**** The ID of the request.
EventType String No ConsoleSignin The type of the event to be retrieved, such as ApiCall.
ServiceName String No AsaSub The name of the cloud service referenced by the event, such as Ecs.
EventName String No ConsoleSignin The name of the event to be retrieved, such as CreateInstance.
User String No yanjie.wyj The name of the user referenced by the event, such as the RAM account.
ResourceType String No Instance The type of the resource referenced by the event, such as Database.
ResourceName String No i-bp14664y88udkt45xrsh The name of the resource referenced by the event, such as rdsxxxxxx.
EventRW String No Write Indicates whether the event is a read or a write event. Valid values: Read, Write, and All. Default value: Write.
NextToken String No 20 The token used to obtain the next page of results after a previous API invocation. This token must be passed in with the same parameters that were specified in the original invocation.
MaxResults Integer No 20 The maximum number of results to be returned. Valid values: 0 to 50.
StartTime String No 2014-05-26T12:00:00Z The start time of events to be retrieved.
  • Only events within the last seven days can be retrieved.
  • The events within the last seven days are retrieved by default.
  • The ISO 8601 UTC time format is used. The format is YYYY-MM-DDThh:mm:ssZ.
EndTime String No 2019-01-18Y06:51:13Z The end time of events to be retrieved.
  • Only events within the last seven days can be retrieved.
  • The events within the last seven days are retrieved by default.
  • The ISO 8601 UTC time format is used. The format is YYYY-MM-DDThh:mm:ssZ.

Response parameters

Name Type Example Description
Events The list of events returned based on the specified retrieval attributes.
NextToken String 1 The token used to obtain the next page of results. This parameter is not returned when there are no more results to return.
StartTime String 2016-01-05T09:11:36Z The start time of the events retrieved.
EndTime String 2016-01-12T09:11:06Z The end time of the events retrieved.
RequestId String FD79665A-CE8B-49D4-82E6-5EE2E0E791DD The ID of the request.

Examples

Sample requests

http://actiontrail.cn-hangzhou.aliyuncs.com/?
Action=LookupEvents
&RegionId=cn-hangzhou
&<Common request parameters>
			

Sample responses

JSON format
{
  "EndTime": "2016-01-12T09:11:06Z",
  "Events": [],
  "StartTime": "2016-01-05T09:11:36Z"
}
			

Error codes

Error code Description HTTP status code
InvalidTimeRangeException The error message returned when the start time is later than the end time. 400
InvalidParameterValue The error message returned when the value of the specified parameter is invalid. 400