AgentsforBedrock / Client / start_ingestion_job

start_ingestion_job#

AgentsforBedrock.Client.start_ingestion_job(**kwargs)#

Begins an ingestion job, in which a data source is added to a knowledge base.

See also: AWS API Documentation

Request Syntax

response = client.start_ingestion_job(
    clientToken='string',
    dataSourceId='string',
    description='string',
    knowledgeBaseId='string'
)
Parameters:
  • clientToken (string) –

    A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.

    This field is autopopulated if not provided.

  • dataSourceId (string) –

    [REQUIRED]

    The unique identifier of the data source to ingest.

  • description (string) – A description of the ingestion job.

  • knowledgeBaseId (string) –

    [REQUIRED]

    The unique identifier of the knowledge base to which to add the data source.

Return type:

dict

Returns:

Response Syntax

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

Response Structure

  • (dict) –

    • ingestionJob (dict) –

      An object containing information about the ingestion job.

      • dataSourceId (string) –

        The unique identifier of the ingested data source.

      • description (string) –

        The description of the ingestion job.

      • failureReasons (list) –

        A list of reasons that the ingestion job failed.

        • (string) –

      • ingestionJobId (string) –

        The unique identifier of the ingestion job.

      • knowledgeBaseId (string) –

        The unique identifier of the knowledge base to which the data source is being added.

      • startedAt (datetime) –

        The time at which the ingestion job started.

      • statistics (dict) –

        Contains statistics about the ingestion job.

        • numberOfDocumentsDeleted (integer) –

          The number of source documents that was deleted.

        • numberOfDocumentsFailed (integer) –

          The number of source documents that failed to be ingested.

        • numberOfDocumentsScanned (integer) –

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

        • numberOfMetadataDocumentsModified (integer) –

          The number of metadata files that were updated or deleted.

        • numberOfMetadataDocumentsScanned (integer) –

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

        • numberOfModifiedDocumentsIndexed (integer) –

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

        • numberOfNewDocumentsIndexed (integer) –

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

      • status (string) –

        The status of the ingestion job.

      • updatedAt (datetime) –

        The time at which the ingestion job was last updated.

Exceptions

  • AgentsforBedrock.Client.exceptions.ThrottlingException

  • AgentsforBedrock.Client.exceptions.AccessDeniedException

  • AgentsforBedrock.Client.exceptions.ValidationException

  • AgentsforBedrock.Client.exceptions.InternalServerException

  • AgentsforBedrock.Client.exceptions.ResourceNotFoundException

  • AgentsforBedrock.Client.exceptions.ConflictException

  • AgentsforBedrock.Client.exceptions.ServiceQuotaExceededException