:doc:`CloudWatchLogs <../../logs>` / Client / describe_import_tasks

*********************
describe_import_tasks
*********************



.. py:method:: CloudWatchLogs.Client.describe_import_tasks(**kwargs)

  

  Lists and describes import tasks, with optional filtering by import status and source ARN.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeImportTasks>`_  


  **Request Syntax**
  ::

    response = client.describe_import_tasks(
        importId='string',
        importStatus='IN_PROGRESS'|'CANCELLED'|'COMPLETED'|'FAILED',
        importSourceArn='string',
        limit=123,
        nextToken='string'
    )
    
  :type importId: string
  :param importId: 

    Optional filter to describe a specific import task by its ID.

    

  
  :type importStatus: string
  :param importStatus: 

    Optional filter to list imports by their status. Valid values are IN_PROGRESS, CANCELLED, COMPLETED and FAILED.

    

  
  :type importSourceArn: string
  :param importSourceArn: 

    Optional filter to list imports from a specific source

    

  
  :type limit: integer
  :param limit: 

    The maximum number of import tasks to return in the response. Default: 50

    

  
  :type nextToken: string
  :param nextToken: 

    The pagination token for the next set of results.

    

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

    
    ::

      {
          'imports': [
              {
                  'importId': 'string',
                  'importSourceArn': 'string',
                  'importStatus': 'IN_PROGRESS'|'CANCELLED'|'COMPLETED'|'FAILED',
                  'importDestinationArn': 'string',
                  'importStatistics': {
                      'bytesImported': 123
                  },
                  'importFilter': {
                      'startEventTime': 123,
                      'endEventTime': 123
                  },
                  'creationTime': 123,
                  'lastUpdatedTime': 123,
                  'errorMessage': 'string'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **imports** *(list) --* 

        The list of import tasks that match the request filters.

        
        

        - *(dict) --* 

          An import job to move data from CloudTrail Event Data Store to CloudWatch.

          
          

          - **importId** *(string) --* 

            The unique identifier of the import task.

            
          

          - **importSourceArn** *(string) --* 

            The ARN of the CloudTrail Lake Event Data Store being imported from.

            
          

          - **importStatus** *(string) --* 

            The current status of the import task. Valid values are IN_PROGRESS, CANCELLED, COMPLETED and FAILED.

            
          

          - **importDestinationArn** *(string) --* 

            The ARN of the managed CloudWatch Logs log group where the events are being imported to.

            
          

          - **importStatistics** *(dict) --* 

            Statistics about the import progress

            
            

            - **bytesImported** *(integer) --* 

              The total number of bytes that have been imported to the managed log group.

              
        
          

          - **importFilter** *(dict) --* 

            The filter criteria used for this import task.

            
            

            - **startEventTime** *(integer) --* 

              The start of the time range for events to import, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

              
            

            - **endEventTime** *(integer) --* 

              The end of the time range for events to import, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

              
        
          

          - **creationTime** *(integer) --* 

            The timestamp when the import task was created, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

            
          

          - **lastUpdatedTime** *(integer) --* 

            The timestamp when the import task was last updated, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

            
          

          - **errorMessage** *(string) --* 

            Error message related to any failed imports

            
      
    
      

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

        The token to use when requesting the next set of results. Not present if there are no additional results to retrieve.

        
  
  **Exceptions**
  
  *   :py:class:`CloudWatchLogs.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`CloudWatchLogs.Client.exceptions.InvalidParameterException`

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

  
  *   :py:class:`CloudWatchLogs.Client.exceptions.ThrottlingException`

  
  *   :py:class:`CloudWatchLogs.Client.exceptions.InvalidOperationException`

  