Skip to content

list_documents

Operation

list_documents

list_documents(request: ListDocumentsInput | ListDocumentsInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[ListDocumentsInputDict]) -> ListDocumentsOutput

A list of documents attached to an index.

Parameters:

Name Type Description Default
request ListDocumentsInput | ListDocumentsInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[ListDocumentsInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
ListDocumentsOutput

An instance of ListDocumentsOutput.

list_documents async

list_documents(request: ListDocumentsInput | ListDocumentsInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[ListDocumentsInputDict]) -> ListDocumentsOutput

A list of documents attached to an index.

Parameters:

Name Type Description Default
request ListDocumentsInput | ListDocumentsInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[ListDocumentsInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
ListDocumentsOutput

An instance of ListDocumentsOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

ListDocumentsInputDict

Bases: TypedDict

Dictionary form of ListDocumentsInput.

Attributes

application_id instance-attribute
application_id: Required[str]

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

data_source_ids instance-attribute
data_source_ids: Sequence[str] | None

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

index_id instance-attribute
index_id: Required[str]

The identifier of the index the documents are attached to.

max_results instance-attribute
max_results: int | None

The maximum number of documents to return.

next_token instance-attribute
next_token: str | None

If the maxResults response was incomplete because there is more data to retrieve, Amazon Q Business returns a pagination token in the response. You can use this pagination token to retrieve the next set of documents.

ListDocumentsInput dataclass

Bases: _SerdeShape

Dataclass for ListDocumentsInput structure.

Attributes

application_id class-attribute instance-attribute
application_id: str | None = ...

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

data_source_ids class-attribute instance-attribute
data_source_ids: list[str] | None = ...

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

index_id class-attribute instance-attribute
index_id: str | None = ...

The identifier of the index the documents are attached to.

max_results class-attribute instance-attribute
max_results: int | None = ...

The maximum number of documents to return.

next_token class-attribute instance-attribute
next_token: str | None = ...

If the maxResults response was incomplete because there is more data to retrieve, Amazon Q Business returns a pagination token in the response. You can use this pagination token to retrieve the next set of documents.

Output

ListDocumentsOutput dataclass

Bases: _SerdeShape

Dataclass for ListDocumentsOutput structure.

Attributes

document_detail_list class-attribute instance-attribute
document_detail_list: list[DocumentDetails] | None = ...

A list of document details.

next_token class-attribute instance-attribute
next_token: str | None = ...

If the maxResults response was incomplete because there is more data to retrieve, Amazon Q Business returns a pagination token in the response. You can use this pagination token to retrieve the next set of documents.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.