:doc:`CodeCatalyst <../../codecatalyst>` / Client / list_event_logs

***************
list_event_logs
***************



.. py:method:: CodeCatalyst.Client.list_event_logs(**kwargs)

  

  Retrieves a list of events that occurred during a specific time in a space. You can use these events to audit user and system activity in a space. For more information, see `Monitoring <https://docs.aws.amazon.com/codecatalyst/latest/userguide/ipa-monitoring.html>`__ in the *Amazon CodeCatalyst User Guide*.

   

  .. note::

    

    ListEventLogs guarantees events for the last 30 days in a given space. You can also view and retrieve a list of management events over the last 90 days for Amazon CodeCatalyst in the CloudTrail console by viewing Event history, or by creating a trail to create and maintain a record of events that extends past 90 days. For more information, see `Working with CloudTrail Event History <https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html>`__ and `Working with CloudTrail trails <https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-getting-started.html>`__.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codecatalyst-2022-09-28/ListEventLogs>`_  


  **Request Syntax**
  ::

    response = client.list_event_logs(
        spaceName='string',
        startTime=datetime(2015, 1, 1),
        endTime=datetime(2015, 1, 1),
        eventName='string',
        nextToken='string',
        maxResults=123
    )
    
  :type spaceName: string
  :param spaceName: **[REQUIRED]** 

    The name of the space.

    

  
  :type startTime: datetime
  :param startTime: **[REQUIRED]** 

    The date and time when you want to start retrieving events, in coordinated universal time (UTC) timestamp format as specified in `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339#section-5.6>`__.

    

  
  :type endTime: datetime
  :param endTime: **[REQUIRED]** 

    The time after which you do not want any events retrieved, in coordinated universal time (UTC) timestamp format as specified in `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339#section-5.6>`__.

    

  
  :type eventName: string
  :param eventName: 

    The name of the event.

    

  
  :type nextToken: string
  :param nextToken: 

    A token returned from a call to this API to indicate the next batch of results to return, if any.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results to show in a single call to this API. If the number of results is larger than the number you specified, the response will include a ``NextToken`` element, which you can use to obtain additional results.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'nextToken': 'string',
          'items': [
              {
                  'id': 'string',
                  'eventName': 'string',
                  'eventType': 'string',
                  'eventCategory': 'string',
                  'eventSource': 'string',
                  'eventTime': datetime(2015, 1, 1),
                  'operationType': 'READONLY'|'MUTATION',
                  'userIdentity': {
                      'userType': 'USER'|'AWS_ACCOUNT'|'UNKNOWN',
                      'principalId': 'string',
                      'userName': 'string',
                      'awsAccountId': 'string'
                  },
                  'projectInformation': {
                      'name': 'string',
                      'projectId': 'string'
                  },
                  'requestId': 'string',
                  'requestPayload': {
                      'contentType': 'string',
                      'data': 'string'
                  },
                  'responsePayload': {
                      'contentType': 'string',
                      'data': 'string'
                  },
                  'errorCode': 'string',
                  'sourceIpAddress': 'string',
                  'userAgent': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **nextToken** *(string) --* 

        A token returned from a call to this API to indicate the next batch of results to return, if any.

        
      

      - **items** *(list) --* 

        Information about each event retrieved in the list.

        
        

        - *(dict) --* 

          Information about an entry in an event log of Amazon CodeCatalyst activity.

          
          

          - **id** *(string) --* 

            The system-generated unique ID of the event.

            
          

          - **eventName** *(string) --* 

            The name of the event.

            
          

          - **eventType** *(string) --* 

            The type of the event.

            
          

          - **eventCategory** *(string) --* 

            The category for the event.

            
          

          - **eventSource** *(string) --* 

            The source of the event.

            
          

          - **eventTime** *(datetime) --* 

            The time the event took place, in coordinated universal time (UTC) timestamp format as specified in `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339#section-5.6>`__.

            
          

          - **operationType** *(string) --* 

            The type of the event.

            
          

          - **userIdentity** *(dict) --* 

            The system-generated unique ID of the user whose actions are recorded in the event.

            
            

            - **userType** *(string) --* 

              The role assigned to the user in a Amazon CodeCatalyst space or project when the event occurred.

              
            

            - **principalId** *(string) --* 

              The ID of the Amazon CodeCatalyst service principal.

              
            

            - **userName** *(string) --* 

              The display name of the user in Amazon CodeCatalyst.

              
            

            - **awsAccountId** *(string) --* 

              The Amazon Web Services account number of the user in Amazon Web Services, if any.

              
        
          

          - **projectInformation** *(dict) --* 

            Information about the project where the event occurred.

            
            

            - **name** *(string) --* 

              The name of the project in the space.

              
            

            - **projectId** *(string) --* 

              The system-generated unique ID of the project.

              
        
          

          - **requestId** *(string) --* 

            The system-generated unique ID of the request.

            
          

          - **requestPayload** *(dict) --* 

            Information about the payload of the request.

            
            

            - **contentType** *(string) --* 

              The type of content in the event payload.

              
            

            - **data** *(string) --* 

              The data included in the event payload.

              
        
          

          - **responsePayload** *(dict) --* 

            Information about the payload of the response, if any.

            
            

            - **contentType** *(string) --* 

              The type of content in the event payload.

              
            

            - **data** *(string) --* 

              The data included in the event payload.

              
        
          

          - **errorCode** *(string) --* 

            The code of the error, if any.

            
          

          - **sourceIpAddress** *(string) --* 

            The IP address of the user whose actions are recorded in the event.

            
          

          - **userAgent** *(string) --* 

            The user agent whose actions are recorded in the event.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`CodeCatalyst.Client.exceptions.ThrottlingException`

  
  *   :py:class:`CodeCatalyst.Client.exceptions.ConflictException`

  
  *   :py:class:`CodeCatalyst.Client.exceptions.ValidationException`

  
  *   :py:class:`CodeCatalyst.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`CodeCatalyst.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`CodeCatalyst.Client.exceptions.AccessDeniedException`

  