QBusiness / Paginator / ListDocuments

ListDocuments#

class QBusiness.Paginator.ListDocuments#
paginator = client.get_paginator('list_documents')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from QBusiness.Client.list_documents().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    applicationId='string',
    dataSourceIds=[
        'string',
    ],
    indexId='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • applicationId (string) –

    [REQUIRED]

    The identifier of the application id the documents are attached to.

  • dataSourceIds (list) –

    The identifier of the data sources the documents are attached to.

    • (string) –

  • indexId (string) –

    [REQUIRED]

    The identifier of the index the documents are attached to.

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'documentDetailList': [
        {
            'createdAt': datetime(2015, 1, 1),
            'documentId': 'string',
            'error': {
                'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound',
                'errorMessage': 'string'
            },
            'status': 'RECEIVED'|'PROCESSING'|'INDEXED'|'UPDATED'|'FAILED'|'DELETING'|'DELETED'|'DOCUMENT_FAILED_TO_INDEX',
            'updatedAt': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • documentDetailList (list) –

      A list of document details.

      • (dict) –

        The details of a document within an Amazon Q Business index.

        • createdAt (datetime) –

          The timestamp for when the document was created.

        • documentId (string) –

          The identifier of the document.

        • error (dict) –

          An error message associated with the document.

          • errorCode (string) –

            The code associated with the data source sync error.

          • errorMessage (string) –

            The message explaining the data source sync error.

        • status (string) –

          The current status of the document.

        • updatedAt (datetime) –

          The timestamp for when the document was last updated.

    • NextToken (string) –

      A token to resume pagination.