edit-icon download-icon

LookupEvents

Last Updated: Jun 14, 2018

Description

Looks up events captured by ActionTrail.

Request parameters

Name Type Required Description
Action String Yes The parameter of the operation to perform: LookupEvents.
Event String No The ID of the event.
Request String No The ID of the API request.
EventType String No The type of the operation, such as ApiCall.
ServiceName String No The name of the cloud service being called, such as Ecs.
EventName String No The name of the API call, such as CreateInstance.
User String No The name of the API caller, such as the RAM user ID.
ResourceType String No The type of the resource being called, such as Database.
ResourceName String No The name of the resource, such as rdsxxxxxx of RDS.
NextToken String No The token to use to get the next page of results after a previous API call.
This token must be passed in with the same parameters that were specified in the original call.
MaxResults Integer No The maximum number of results returned. Value range: 0-50.
StartTime String No Only events that occur after or at the specified time are returned.
- Only events of the last 7 days can be retrieved.
- The default value is 7 days.
- The format follows the ISO8601 standard and uses UTC time.
The format is YYYY-MM-DDThh:mm:ssZ.
An example is 2014-05-26T12:00:00Z (00:00:00, May 27, 2014, Beijing time).
EndTime String No Only events that occur before or at the specified time are returned.
- Only events of the last 7 days can be retrieved.
- The default value is 7 days.
- The format follows the ISO8601 standard and uses UTC time.
The format is YYYY-MM-DDThh:mm:ssZ.
An example is 2014-05-26T12:00:00Z (00:00:00, May 27, 2014, Beijing time).

Response parameters

Common response parameters. For more information, see Common parameters.

Name Type Description
Events String A list of events returned based on the lookup attributes specified.
NextToken String The token to use to get the next page of results after a previous API call. If the token does not appear, there are no more results to return.
StartTime String The start time of the events retrieved.
EndTime String The end time of the events retrieved.

Required permissions

Action

actiontrail:LookupEvents

Resource

acs:actiontrail:${region}:${AccountId}:*

Error codes

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

Example

Request example

  1. http://actiontrail.cn-hangzhou.aliyuncs.com/actiontrail?
  2. &OssBucketName=yuanchuang
  3. &Name=trail-test
  4. &RoleName=aliyunactiontraildefaultrole
  5. &Action=LookupEvents
  6. &OssKeyPrefix=
  7. &<公共请求参数>

Response example

JSON example

  1. {
  2. "EndTime": "2016-01-12T09:11:06Z",
  3. "Events": [],
  4. "StartTime": "2016-01-05T09:11:36Z"
  5. }
Thank you! We've received your feedback.