get_media¶
Operation¶
get_media
async
¶
get_media(input: GetMediaInput, plugins: list[Plugin] | None = None) -> GetMediaOutput
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.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
GetMediaInput
|
An instance of |
required |
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
|
Returns:
| Type | Description |
|---|---|
GetMediaOutput
|
An instance of |
Input¶
GetMediaInput
dataclass
¶
Dataclass for GetMediaInput structure.
Attributes¶
application_id
class-attribute
instance-attribute
¶
application_id: str | None = None
The identifier of the Amazon Q Business which contains the media object.
conversation_id
class-attribute
instance-attribute
¶
conversation_id: str | None = None
The identifier of the Amazon Q Business conversation.
media_id
class-attribute
instance-attribute
¶
media_id: str | None = None
The identifier of the media object. You can find this in the
sourceAttributions returned by the Chat, ChatSync, and
ListMessages API responses.
message_id
class-attribute
instance-attribute
¶
message_id: str | None = None
The identifier of the Amazon Q Business message.
Output¶
GetMediaOutput
dataclass
¶
Dataclass for GetMediaOutput structure.