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.
Output¶
GetMediaOutput
dataclass
¶
Dataclass for GetMediaOutput structure.
Attributes¶
media_bytes
class-attribute
instance-attribute
¶
media_bytes: bytes | None = None
The base64-encoded bytes of the media object.
media_mime_type
class-attribute
instance-attribute
¶
media_mime_type: str | None = None
The MIME type of the media object (image/png).
response_metadata
class-attribute
instance-attribute
¶
response_metadata: ResponseMetadata = field(default=EMPTY_RESPONSE_METADATA, repr=False, compare=False)
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.