Skip to main content

messages

Creates, updates, deletes, gets or lists a messages resource.

Overview

Namemessages
TypeResource
Idaws.qconnect.messages

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
message_idstringThe identifier of a message. (pattern: <code>[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}</code>)
participantstringThe participant of a message. (CUSTOMER, AGENT, BOT)
timestampstring (date-time)The timestamp of a message.
valueobjectThe value of a message data.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_messagesselectassistant_id, session_id, regionnextToken, maxResults, filterLists messages on an Amazon Q in Connect session.
activate_message_templateexecknowledge_base_id, message_template_id, region, versionNumberActivates a specific version of the Amazon Q in Connect message template. After the version is activated, the previous active version will be deactivated automatically. You can use the $ACTIVE_VERSION qualifier later to reference the version that is in active status.
deactivate_message_templateexecknowledge_base_id, message_template_id, region, versionNumberDeactivates a specific version of the Amazon Q in Connect message template . After the version is deactivated, you can no longer use the $ACTIVE_VERSION qualifier to reference the version in active status.

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.

NameDatatypeDescription
assistant_idstringThe identifier of the Amazon Q in Connect assistant.
knowledge_base_idstringThe identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.
message_template_idstringThe identifier of the message template. Can be either the ID or the ARN. It cannot contain any qualifier.
regionstringAWS region (default: us-east-1)
session_idstringThe identifier of the Amazon Q in Connect session.
filterstringThe filter criteria for listing messages.
maxResultsintegerThe maximum number of results to return per page.
nextTokenstringThe token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

SELECT examples

Lists messages on an Amazon Q in Connect session.

SELECT
message_id,
participant,
timestamp,
value
FROM aws.qconnect.messages
WHERE assistant_id = '{{ assistant_id }}' -- required
AND session_id = '{{ session_id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
AND filter = '{{ filter }}'
;

Lifecycle Methods

Activates a specific version of the Amazon Q in Connect message template. After the version is activated, the previous active version will be deactivated automatically. You can use the $ACTIVE_VERSION qualifier later to reference the version that is in active status.

EXEC aws.qconnect.messages.activate_message_template
@knowledge_base_id='{{ knowledge_base_id }}' --required,
@message_template_id='{{ message_template_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"versionNumber": {{ versionNumber }}
}'
;