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

******************
cancel_import_task
******************



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

  

  Cancels an active import task and stops importing data from the CloudTrail Lake Event Data Store.

  

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


  **Request Syntax**
  ::

    response = client.cancel_import_task(
        importId='string'
    )
    
  :type importId: string
  :param importId: **[REQUIRED]** 

    The ID of the import task to cancel.

    

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

    
    ::

      {
          'importId': 'string',
          'importStatistics': {
              'bytesImported': 123
          },
          'importStatus': 'IN_PROGRESS'|'CANCELLED'|'COMPLETED'|'FAILED',
          'creationTime': 123,
          'lastUpdatedTime': 123
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The ID of the cancelled import task.

        
      

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

        Statistics about the import progress at the time of cancellation.

        
        

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

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

          
    
      

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

        The final status of the import task. This will be set to CANCELLED.

        
      

      - **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 cancelled, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

        
  
  **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`

  