message_template_versions
Creates, updates, deletes, gets or lists a message_template_versions resource.
Overview
| Name | message_template_versions |
| Type | Resource |
| Id | aws.qconnect.message_template_versions |
Fields
The following fields are returned by SELECT queries:
- list_message_template_versions
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the message template. (pattern: <code>[a-zA-Z0-9\s_.,-]+.*</code>) |
channel | string | The channel of the message template. |
channel_subtype | string | The channel subtype this message template applies to. (EMAIL, SMS, WHATSAPP, PUSH) |
is_active | boolean | Whether the version of the message template is activated. |
knowledge_base_arn | string | The 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_id | string | The 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_arn | string | The 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_id | string | The 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_number | integer (int64) | The version number of the message template version. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_message_template_versions | select | knowledge_base_id, message_template_id, region | nextToken, maxResults | Lists all the available versions for the specified Amazon Q in Connect message template. |
create_message_template_version | insert | knowledge_base_id, message_template_id, region | 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. |
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 |
|---|---|---|
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) |
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_message_template_versions
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
- create_message_template_version
- Manifest
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
;
# Description fields are for documentation purposes
- name: message_template_versions
props:
- name: knowledge_base_id
value: "{{ knowledge_base_id }}"
description: Required parameter for the message_template_versions resource.
- name: message_template_id
value: "{{ message_template_id }}"
description: Required parameter for the message_template_versions resource.
- name: region
value: "{{ region }}"
description: Required parameter for the message_template_versions resource.
- name: messageTemplateContentSha256
value: "{{ messageTemplateContentSha256 }}"