def lookup_events(LookupAttributes=None, StartTime=None, EndTime=None,
    MaxResults=None, NextToken=None):
    """
    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 the following attributes:
    All attributes are optional. 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.
    See also: AWS API Documentation
    
    
    :example: response = client.lookup_events(
        LookupAttributes=[
            {
                'AttributeKey': 'EventId'|'EventName'|'Username'|'ResourceType'|'ResourceName'|'EventSource',
                'AttributeValue': 'string'
            },
        ],
        StartTime=datetime(2015, 1, 1),
        EndTime=datetime(2015, 1, 1),
        MaxResults=123,
        NextToken='string'
    )
    
    
    :type LookupAttributes: list
    :param LookupAttributes: Contains a list of lookup attributes. Currently the list can contain only one item.
            (dict) --Specifies an attribute and value that filter the events returned.
            AttributeKey (string) -- [REQUIRED]Specifies an attribute on which to filter the events returned.
            AttributeValue (string) -- [REQUIRED]Specifies a value for the specified AttributeKey.
            
            

    :type StartTime: datetime
    :param StartTime: Specifies that only events that occur after or at the specified time are returned. If the specified start time is after the specified end time, an error is returned.

    :type EndTime: datetime
    :param EndTime: Specifies that only events that occur before or at the specified time are returned. If the specified end time is before the specified start time, an error is returned.

    :type MaxResults: integer
    :param MaxResults: The number of events to return. Possible values are 1 through 50. The default is 10.

    :type NextToken: string
    :param NextToken: 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 the original call. For example, if the original call specified an AttributeKey of 'Username' with a value of 'root', the call with NextToken should include those same parameters.

    :rtype: dict
    :return: {
        'Events': [
            {
                'EventId': 'string',
                'EventName': 'string',
                'EventTime': datetime(2015, 1, 1),
                'EventSource': 'string',
                'Username': 'string',
                'Resources': [
                    {
                        'ResourceType': 'string',
                        'ResourceName': 'string'
                    },
                ],
                'CloudTrailEvent': 'string'
            },
        ],
        'NextToken': 'string'
    }
    
    
    :returns: 
    LookupAttributes (list) -- Contains a list of lookup attributes. Currently the list can contain only one item.
    
    (dict) --Specifies an attribute and value that filter the events returned.
    
    AttributeKey (string) -- [REQUIRED]Specifies an attribute on which to filter the events returned.
    
    AttributeValue (string) -- [REQUIRED]Specifies a value for the specified AttributeKey.
    
    
    
    
    
    StartTime (datetime) -- Specifies that only events that occur after or at the specified time are returned. If the specified start time is after the specified end time, an error is returned.
    EndTime (datetime) -- Specifies that only events that occur before or at the specified time are returned. If the specified end time is before the specified start time, an error is returned.
    MaxResults (integer) -- The number of events to return. Possible values are 1 through 50. The default is 10.
    NextToken (string) -- 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 the original call. For example, if the original call specified an AttributeKey of 'Username' with a value of 'root', the call with NextToken should include those same parameters.
    
    """
    pass
