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

****************************
describe_import_task_batches
****************************



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

  

  Gets detailed information about the individual batches within an import task, including their status and any error messages. For CloudTrail Event Data Store sources, a batch refers to a subset of stored events grouped by their eventTime.

  

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


  **Request Syntax**
  ::

    response = client.describe_import_task_batches(
        importId='string',
        batchImportStatus=[
            'IN_PROGRESS'|'CANCELLED'|'COMPLETED'|'FAILED',
        ],
        limit=123,
        nextToken='string'
    )
    
  :type importId: string
  :param importId: **[REQUIRED]** 

    The ID of the import task to get batch information for.

    

  
  :type batchImportStatus: list
  :param batchImportStatus: 

    Optional filter to list import batches by their status. Accepts multiple status values: IN_PROGRESS, CANCELLED, COMPLETED and FAILED.

    

  
    - *(string) --* 

    

  :type limit: integer
  :param limit: 

    The maximum number of import batches to return in the response. Default: 10

    

  
  :type nextToken: string
  :param nextToken: 

    The pagination token for the next set of results.

    

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

    
    ::

      {
          'importSourceArn': 'string',
          'importId': 'string',
          'importBatches': [
              {
                  'batchId': 'string',
                  'status': 'IN_PROGRESS'|'CANCELLED'|'COMPLETED'|'FAILED',
                  'errorMessage': 'string'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The ARN of the source being imported from.

        
      

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

        The ID of the import task.

        
      

      - **importBatches** *(list) --* 

        The list of import batches that match the request filters.

        
        

        - *(dict) --* 

          A collection of events being imported to CloudWatch

          
          

          - **batchId** *(string) --* 

            The unique identifier of the import batch.

            
          

          - **status** *(string) --* 

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

            
          

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

            The error message if the batch failed to import. Only present when status is FAILED.

            
      
    
      

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

  