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',
    indexId='string',
    dataSourceIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • applicationId (string) –

    [REQUIRED]

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

  • indexId (string) –

    [REQUIRED]

    The identifier of the index the documents are attached to.

  • dataSourceIds (list) –

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

    • (string) –

  • 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': [
        {
            'documentId': 'string',
            'status': 'RECEIVED'|'PROCESSING'|'INDEXED'|'UPDATED'|'FAILED'|'DELETING'|'DELETED'|'DOCUMENT_FAILED_TO_INDEX',
            'error': {
                'errorMessage': 'string',
                'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound'
            },
            'createdAt': datetime(2015, 1, 1),
            '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.

        • documentId (string) –

          The identifier of the document.

        • status (string) –

          The current status of the document.

        • error (dict) –

          An error message associated with the document.

          • errorMessage (string) –

            The message explaining the Amazon Q Business request error.

          • errorCode (string) –

            The code associated with the Amazon Q Business request error.

        • createdAt (datetime) –

          The timestamp for when the document was created.

        • updatedAt (datetime) –

          The timestamp for when the document was last updated.

    • NextToken (string) –

      A token to resume pagination.