Skip to content

QBusinessClient.get_media

rboto-qbusiness==0.4.0 · Service index · Types

Model summary (excerpt): Returns the image bytes corresponding to a media object. If you have implemented your own application with the Chat and ChatSync APIs, and have enabled content extraction from visual data in Amazon Q Business, you use the GetMedia API operation to download the images so you can show them in your UI with responses. For more information, see Extracting semantic meaning from images and visuals .

Install and imports

python -m pip install "rboto[qbusiness]==0.4.0"
from rboto import QBusinessClient
from rboto_qbusiness.types import (
    GetMediaOutput,
)

Signature

async def get_media(
    *,
    application_id: str,
    conversation_id: str,
    message_id: str,
    media_id: str,
) -> GetMediaOutput: ...

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 identifier of the Amazon Q Business which contains the media object.
conversation_id Yes The identifier of the Amazon Q Business conversation.
message_id Yes The identifier of the Amazon Q Business message.
media_id Yes The identifier of the media object. You can find this in the sourceAttributions returned by the Chat , ChatSync , and ListMessages API responses.

Output

GetMediaOutput.

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
media_bytes bytes | None Always present —
media_mime_type str | None 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.

GetMediaOutput

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, LicenseNotFoundError, MediaTooLargeError, ResourceNotFoundError, ThrottlingError, ValidationError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model