Skip to main content

message_template_versions

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

Overview

Namemessage_template_versions
TypeResource
Idaws.qconnect.message_template_versions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the message template. (pattern: <code>[a-zA-Z0-9\s_.,-]+.*</code>)
channelstringThe channel of the message template.
channel_subtypestringThe channel subtype this message template applies to. (EMAIL, SMS, WHATSAPP, PUSH)
is_activebooleanWhether the version of the message template is activated.
knowledge_base_arnstringThe Amazon Resource Name (ARN) of the knowledge base. (pattern: <code>arn:[a-z-]?:wisdom:[a-z0-9-]?:[0-9]{12}:[a-z-]*?/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}){0,2}</code>)
knowledge_base_idstringThe identifier of the knowledge base. (pattern: <code>[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}</code>)
message_template_arnstringThe Amazon Resource Name (ARN) of the message template. (pattern: <code>arn:[a-z-]?:wisdom:[a-z0-9-]?:[0-9]{12}:[a-z-]*?/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}){0,2}(:[A-Z0-9_$]+){0,1}</code>)
message_template_idstringThe identifier of the message template. (pattern: <code>[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}</code>)
version_numberinteger (int64)The version number of the message template version.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_message_template_versionsselectknowledge_base_id, message_template_id, regionnextToken, maxResultsLists all the available versions for the specified Amazon Q in Connect message template.
create_message_template_versioninsertknowledge_base_id, message_template_id, regionCreates a new Amazon Q in Connect message template version from the current content and configuration of a message template. Versions are immutable and monotonically increasing. Once a version is created, you can reference a specific version of the message template by passing in <message-template-id>:<versionNumber> as the message template identifier. An error is displayed if the supplied messageTemplateContentSha256 is different from the messageTemplateContentSha256 of the message template with $LATEST qualifier. If multiple CreateMessageTemplateVersion requests are made while the message template remains the same, only the first invocation creates a new version and the succeeding requests will return the same response as the first invocation.

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
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)
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 all the available versions for the specified Amazon Q in Connect message template.

SELECT
name,
channel,
channel_subtype,
is_active,
knowledge_base_arn,
knowledge_base_id,
message_template_arn,
message_template_id,
version_number
FROM aws.qconnect.message_template_versions
WHERE knowledge_base_id = '{{ knowledge_base_id }}' -- required
AND message_template_id = '{{ message_template_id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;

INSERT examples

Creates a new Amazon Q in Connect message template version from the current content and configuration of a message template. Versions are immutable and monotonically increasing. Once a version is created, you can reference a specific version of the message template by passing in <message-template-id>:<versionNumber> as the message template identifier. An error is displayed if the supplied messageTemplateContentSha256 is different from the messageTemplateContentSha256 of the message template with $LATEST qualifier. If multiple CreateMessageTemplateVersion requests are made while the message template remains the same, only the first invocation creates a new version and the succeeding requests will return the same response as the first invocation.

INSERT INTO aws.qconnect.message_template_versions (
messageTemplateContentSha256,
knowledge_base_id,
message_template_id,
region
)
SELECT
'{{ messageTemplateContentSha256 }}',
'{{ knowledge_base_id }}',
'{{ message_template_id }}',
'{{ region }}'
RETURNING
message_template
;