AWS SDK Version 2 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

.NET Framework 4.5
Looks up API activity events captured by CloudTrail that create, update, or delete resources in your account. Events for a region can be looked up for the times in which you had CloudTrail turned on in that region during the last seven days. Lookup supports five different attributes: time range (defined by a start time and end time), user name, event name, resource type, and resource name. All attributes are optional. The maximum number of attributes that can be specified in any one lookup request are time range and one other attribute. The default number of results returned is 10, with a maximum of 50 possible. The response includes a token that you can use to get the next page of results. The rate of lookup requests is limited to one per second per account. If this limit is exceeded, a throttling error occurs. Events that occurred during the selected time range will not be available for lookup if CloudTrail logging was not enabled when the events occurred.

Namespace: Amazon.CloudTrail
Assembly: AWSSDK.dll
Version: (assembly version)


public virtual LookupEventsResponse LookupEvents(
         LookupEventsRequest request


Type: Amazon.CloudTrail.Model.LookupEventsRequest

Container for the necessary parameters to execute the LookupEvents service method.

Return Value
Type: Amazon.CloudTrail.Model.LookupEventsResponse
The response from the LookupEvents service method, as returned by CloudTrail.


InvalidLookupAttributesException Occurs when an invalid lookup attribute is specified.
InvalidMaxResultsException This exception is thrown if the limit specified is invalid.
InvalidNextTokenException Invalid token or token that was previously used in a request with different parameters. This exception is thrown if the token is invalid.
InvalidTimeRangeException Occurs if the timestamp values are invalid. Either the start time occurs after the end time or the time range is outside the range of possible values.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5