messages
Creates, updates, deletes, gets or lists a messages resource.
Overview
| Name | messages |
| Type | Resource |
| Id | aws.qbusiness.messages |
Fields
The following fields are returned by SELECT queries:
- list_messages
| Name | Datatype | Description |
|---|---|---|
action_execution | object | Performs an Amazon Q Business plugin action during a non-streaming chat conversation. |
action_review | object | An output event that Amazon Q Business returns to an user who wants to perform a plugin action during a non-streaming chat conversation. It contains information about the selected action with a list of possible user input fields, some pre-populated by Amazon Q Business. |
attachments | array | A file directly uploaded into an Amazon Q Business web experience chat. |
body | string | The content of the Amazon Q Business web experience message. (pattern: <code>\P{C}*$}</code>) |
message_id | string | The identifier of the Amazon Q Business web experience message. |
source_attribution | array | The source documents used to generate Amazon Q Business web experience message. |
time | string (date-time) | The timestamp of the first Amazon Q Business web experience message. |
type_ | string | The type of Amazon Q Business message, whether HUMAN or AI generated. (USER, SYSTEM) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_messages | select | conversation_id, application_id, region | userId, nextToken, maxResults | Gets a list of messages associated with an Amazon Q Business web experience. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
application_id | string | The identifier for the Amazon Q Business application. |
conversation_id | string | The identifier of the Amazon Q Business web experience conversation. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of messages to return. |
nextToken | string | If the number of messages returned exceeds maxResults, Amazon Q Business returns a next token as a pagination token to retrieve the next set of messages. |
userId | string | The identifier of the user involved in the Amazon Q Business web experience conversation. |
SELECT examples
- list_messages
Gets a list of messages associated with an Amazon Q Business web experience.
SELECT
action_execution,
action_review,
attachments,
body,
message_id,
source_attribution,
time,
type_
FROM aws.qbusiness.messages
WHERE conversation_id = '{{ conversation_id }}' -- required
AND application_id = '{{ application_id }}' -- required
AND region = '{{ region }}' -- required
AND userId = '{{ userId }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;