QBusinessClient.get_document_content
rboto-qbusiness==0.4.0 · Service index · Types
Model summary (excerpt): Retrieves the content of a document that was ingested into Amazon Q Business. This API validates user authorization against document ACLs before returning a pre-signed URL for secure document access. You can download or view source documents referenced in chat responses through the URL.
Install and imports
from rboto import QBusinessClient
from rboto_qbusiness.types import (
GetDocumentContentOutput,
OutputFormat,
)
Signature
async def get_document_content(
*,
application_id: str,
index_id: str,
document_id: str,
data_source_id: str | None = None,
output_format: OutputFormat | None = None,
) -> GetDocumentContentOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
application_id |
Yes | The unique identifier of the Amazon Q Business application containing the document. This ensures the request is scoped to the correct application environment and its associated security policies. |
index_id |
Yes | The identifier of the index where documents are indexed. |
document_id |
Yes | The unique identifier of the document that is indexed via BatchPutDocument API or file-upload or connector sync. It is also found in chat or chatSync response. |
data_source_id |
No | The identifier of the data source from which the document was ingested. This field is not present if the document is ingested by directly calling the BatchPutDocument API. If the document is from a file-upload data source, the datasource will be "uploaded-docs-file-stat-datasourceid". |
output_format |
No | Document outputFormat. Defaults to RAW if not selected. |
Output
GetDocumentContentOutput.
Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.
| Field | Type | Presence | References |
|---|---|---|---|
presigned_url |
str |
Always present | — |
mime_type |
str |
Always present | — |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
GetDocumentContentOutput, OutputFormat
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
No output stream.
Errors
Import from rboto_qbusiness.exceptions:
AccessDeniedError, InternalServerError, ResourceNotFoundError, ThrottlingError, ValidationError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.