  def LookupEvents(
      self,
      qfilter: Optional[str] = None,
      starttime: Optional['datetime'] = None,
      endtime: Optional['datetime'] = None) -> List[Dict[str, Any]]:
    """Lookup events in the CloudTrail logs of this account.

    Example usage:
      # pylint: disable=line-too-long
      # qfilter = 'key,value'
      # starttime = datetime(2020,5,5,17,33,00)
      # LookupEvents(qfilter=qfilter, starttime=starttime)
      # Check documentation for qfilter details
      # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cloudtrail.html#CloudTrail.Client.lookup_events

    Args:
      qfilter (string): Optional. Filter for the query including 1 key and value.
      starttime (datetime): Optional. Start datetime to add to query filter.
      endtime (datetime): Optional. End datetime to add to query filter.

    Returns:
      List[Dict]: A list of events. E.g. [{'EventId': 'id', ...},
          {'EventId': ...}]
    """

    events = []

    client = self.aws_account.ClientApi(common.CLOUDTRAIL_SERVICE)

    params = {}  # type: Dict[str, Any]
    if qfilter:
      k, v = qfilter.split(',')
      filters = [{'AttributeKey': k, 'AttributeValue': v}]
      params = {'LookupAttributes': filters}
    if starttime:
      params['StartTime'] = starttime
    if endtime:
      params['EndTime'] = endtime

    responses = common.ExecuteRequest(client, 'lookup_events', params)
    for response in responses:
      for entry in response['Events']:
        events.append(entry)
    return events
Lookup events in the CloudTrail logs of this account.

Example usage:
# pylint: disable=line-too-long
# qfilter = 'key,value'
# starttime = datetime(2020,5,5,17,33,00)
# LookupEvents(qfilter=qfilter, starttime=starttime)
# Check documentation for qfilter details
# https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cloudtrail.html#CloudTrail.Client.lookup_events

Args:
qfilter (string): Optional. Filter for the query including 1 key and value.
starttime (datetime): Optional. Start datetime to add to query filter.
endtime (datetime): Optional. End datetime to add to query filter.

Returns:
List[Dict]: A list of events. E.g. [{'EventId': 'id', ...},
{'EventId': ...}]
libcloudforensics/providers/aws/internal/log.py