messages
Creates, updates, deletes, gets or lists a messages resource.
Overview
| Name | messages |
| Type | Resource |
| Id | aws.qconnect.messages |
Fields
The following fields are returned by SELECT queries:
- list_messages
| Name | Datatype | Description |
|---|---|---|
message_id | string | The 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>) |
participant | string | The participant of a message. (CUSTOMER, AGENT, BOT) |
timestamp | string (date-time) | The timestamp of a message. |
value | object | The value of a message data. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_messages | select | assistant_id, session_id, region | nextToken, maxResults, filter | Lists messages on an Amazon Q in Connect session. |
activate_message_template | exec | knowledge_base_id, message_template_id, region, versionNumber | 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. | |
deactivate_message_template | exec | knowledge_base_id, message_template_id, region, versionNumber | Deactivates 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.
| Name | Datatype | Description |
|---|---|---|
assistant_id | string | The identifier of the Amazon Q in Connect assistant. |
knowledge_base_id | string | The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN. |
message_template_id | string | The identifier of the message template. Can be either the ID or the ARN. It cannot contain any qualifier. |
region | string | AWS region (default: us-east-1) |
session_id | string | The identifier of the Amazon Q in Connect session. |
filter | string | The filter criteria for listing messages. |
maxResults | integer | The maximum number of results to return per page. |
nextToken | string | The 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
- list_messages
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
- activate_message_template
- deactivate_message_template
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 }}
}'
;
Deactivates 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.
EXEC aws.qconnect.messages.deactivate_message_template
@knowledge_base_id='{{ knowledge_base_id }}' --required,
@message_template_id='{{ message_template_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"versionNumber": {{ versionNumber }}
}'
;