:doc:`AgentsforBedrock <../../bedrock-agent>` / Client / stop_ingestion_job

******************
stop_ingestion_job
******************



.. py:method:: AgentsforBedrock.Client.stop_ingestion_job(**kwargs)

  

  Stops a currently running data ingestion job. You can send a ``StartIngestionJob`` request again to ingest the rest of your data when you are ready.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/StopIngestionJob>`_  


  **Request Syntax**
  ::

    response = client.stop_ingestion_job(
        knowledgeBaseId='string',
        dataSourceId='string',
        ingestionJobId='string'
    )
    
  :type knowledgeBaseId: string
  :param knowledgeBaseId: **[REQUIRED]** 

    The unique identifier of the knowledge base for the data ingestion job you want to stop.

    

  
  :type dataSourceId: string
  :param dataSourceId: **[REQUIRED]** 

    The unique identifier of the data source for the data ingestion job you want to stop.

    

  
  :type ingestionJobId: string
  :param ingestionJobId: **[REQUIRED]** 

    The unique identifier of the data ingestion job you want to stop.

    

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

    
    ::

      {
          'ingestionJob': {
              'knowledgeBaseId': 'string',
              'dataSourceId': 'string',
              'ingestionJobId': 'string',
              'description': 'string',
              'status': 'STARTING'|'IN_PROGRESS'|'COMPLETE'|'FAILED'|'STOPPING'|'STOPPED',
              'statistics': {
                  'numberOfDocumentsScanned': 123,
                  'numberOfMetadataDocumentsScanned': 123,
                  'numberOfNewDocumentsIndexed': 123,
                  'numberOfModifiedDocumentsIndexed': 123,
                  'numberOfMetadataDocumentsModified': 123,
                  'numberOfDocumentsDeleted': 123,
                  'numberOfDocumentsFailed': 123
              },
              'failureReasons': [
                  'string',
              ],
              'startedAt': datetime(2015, 1, 1),
              'updatedAt': datetime(2015, 1, 1)
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ingestionJob** *(dict) --* 

        Contains information about the stopped data ingestion job.

        
        

        - **knowledgeBaseId** *(string) --* 

          The unique identifier of the knowledge for the data ingestion job.

          
        

        - **dataSourceId** *(string) --* 

          The unique identifier of the data source for the data ingestion job.

          
        

        - **ingestionJobId** *(string) --* 

          The unique identifier of the data ingestion job.

          
        

        - **description** *(string) --* 

          The description of the data ingestion job.

          
        

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

          The status of the data ingestion job.

          
        

        - **statistics** *(dict) --* 

          Contains statistics about the data ingestion job.

          
          

          - **numberOfDocumentsScanned** *(integer) --* 

            The total number of source documents that were scanned. Includes new, updated, and unchanged documents.

            
          

          - **numberOfMetadataDocumentsScanned** *(integer) --* 

            The total number of metadata files that were scanned. Includes new, updated, and unchanged files.

            
          

          - **numberOfNewDocumentsIndexed** *(integer) --* 

            The number of new source documents in the data source that were successfully indexed.

            
          

          - **numberOfModifiedDocumentsIndexed** *(integer) --* 

            The number of modified source documents in the data source that were successfully indexed.

            
          

          - **numberOfMetadataDocumentsModified** *(integer) --* 

            The number of metadata files that were updated or deleted.

            
          

          - **numberOfDocumentsDeleted** *(integer) --* 

            The number of source documents that were deleted.

            
          

          - **numberOfDocumentsFailed** *(integer) --* 

            The number of source documents that failed to be ingested.

            
      
        

        - **failureReasons** *(list) --* 

          A list of reasons that the data ingestion job failed.

          
          

          - *(string) --* 
      
        

        - **startedAt** *(datetime) --* 

          The time the data ingestion job started.

           

          If you stop a data ingestion job, the ``startedAt`` time is the time the job was started before the job was stopped.

          
        

        - **updatedAt** *(datetime) --* 

          The time the data ingestion job was last updated.

           

          If you stop a data ingestion job, the ``updatedAt`` time is the time the job was stopped.

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

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

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

  
  *   :py:class:`AgentsforBedrock.Client.exceptions.InternalServerException`

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

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

  