message_templates
Creates, updates, deletes or gets a message_template
resource or lists message_templates
in a region
Overview
Name | message_templates |
Type | Resource |
Description | Definition of AWS::Wisdom::MessageTemplate Resource Type |
Id | aws.wisdom.message_templates |
Fields
Name | Datatype | Description |
---|---|---|
knowledge_base_arn | string | The Amazon Resource Name (ARN) of the knowledge base to which the message template belongs. |
message_template_id | string | The unique identifier of the message template. |
message_template_arn | string | The Amazon Resource Name (ARN) of the message template. |
name | string | The name of the message template. |
channel_subtype | string | The channel subtype this message template applies to. |
content | object | The content of the message template. |
description | string | The description of the message template. |
language | string | The language code value for the language in which the message template is written. The supported language codes include de_DE, en_US, es_ES, fr_FR, id_ID, it_IT, ja_JP, ko_KR, pt_BR, zh_CN, zh_TW |
grouping_configuration | object | The configuration information of the user groups that the message template is accessible to. |
default_attributes | object | An object that specifies the default values to use for variables in the message template. This object contains different categories of key-value pairs. Each key defines a variable or placeholder in the message template. The corresponding value defines the default value for that variable. |
message_template_content_sha256 | string | The content SHA256 of the message template. |
tags | array | The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }. |
region | string | AWS region. |
For more information, see AWS::Wisdom::MessageTemplate
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | KnowledgeBaseArn, ChannelSubtype, Name, Content, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all message_templates
in a region.
SELECT
region,
knowledge_base_arn,
message_template_id,
message_template_arn,
name,
channel_subtype,
content,
description,
language,
grouping_configuration,
default_attributes,
message_template_content_sha256,
tags
FROM aws.wisdom.message_templates
WHERE region = 'us-east-1';
Gets all properties from an individual message_template
.
SELECT
region,
knowledge_base_arn,
message_template_id,
message_template_arn,
name,
channel_subtype,
content,
description,
language,
grouping_configuration,
default_attributes,
message_template_content_sha256,
tags
FROM aws.wisdom.message_templates
WHERE region = 'us-east-1' AND data__Identifier = '<MessageTemplateArn>';
INSERT
example
Use the following StackQL query and manifest file to create a new message_template
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.wisdom.message_templates (
KnowledgeBaseArn,
Name,
ChannelSubtype,
Content,
region
)
SELECT
'{{ KnowledgeBaseArn }}',
'{{ Name }}',
'{{ ChannelSubtype }}',
'{{ Content }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.wisdom.message_templates (
KnowledgeBaseArn,
Name,
ChannelSubtype,
Content,
Description,
Language,
GroupingConfiguration,
DefaultAttributes,
Tags,
region
)
SELECT
'{{ KnowledgeBaseArn }}',
'{{ Name }}',
'{{ ChannelSubtype }}',
'{{ Content }}',
'{{ Description }}',
'{{ Language }}',
'{{ GroupingConfiguration }}',
'{{ DefaultAttributes }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: message_template
props:
- name: KnowledgeBaseArn
value: '{{ KnowledgeBaseArn }}'
- name: Name
value: '{{ Name }}'
- name: ChannelSubtype
value: '{{ ChannelSubtype }}'
- name: Content
value:
EmailMessageTemplateContent:
Subject: '{{ Subject }}'
Body:
PlainText:
Content: '{{ Content }}'
Html: null
Headers:
- Name: '{{ Name }}'
Value: '{{ Value }}'
SmsMessageTemplateContent:
Body:
PlainText: null
- name: Description
value: '{{ Description }}'
- name: Language
value: '{{ Language }}'
- name: GroupingConfiguration
value:
Criteria: '{{ Criteria }}'
Values:
- '{{ Values[0] }}'
- name: DefaultAttributes
value:
SystemAttributes:
Name: '{{ Name }}'
CustomerEndpoint:
Address: '{{ Address }}'
SystemEndpoint: null
AgentAttributes:
FirstName: '{{ FirstName }}'
LastName: '{{ LastName }}'
CustomerProfileAttributes:
ProfileId: '{{ ProfileId }}'
ProfileARN: '{{ ProfileARN }}'
FirstName: '{{ FirstName }}'
MiddleName: '{{ MiddleName }}'
LastName: '{{ LastName }}'
AccountNumber: '{{ AccountNumber }}'
EmailAddress: '{{ EmailAddress }}'
PhoneNumber: '{{ PhoneNumber }}'
AdditionalInformation: '{{ AdditionalInformation }}'
PartyType: '{{ PartyType }}'
BusinessName: '{{ BusinessName }}'
BirthDate: '{{ BirthDate }}'
Gender: '{{ Gender }}'
MobilePhoneNumber: '{{ MobilePhoneNumber }}'
HomePhoneNumber: '{{ HomePhoneNumber }}'
BusinessPhoneNumber: '{{ BusinessPhoneNumber }}'
BusinessEmailAddress: '{{ BusinessEmailAddress }}'
Address1: '{{ Address1 }}'
Address2: '{{ Address2 }}'
Address3: '{{ Address3 }}'
Address4: '{{ Address4 }}'
City: '{{ City }}'
County: '{{ County }}'
Country: '{{ Country }}'
PostalCode: '{{ PostalCode }}'
Province: '{{ Province }}'
State: '{{ State }}'
ShippingAddress1: '{{ ShippingAddress1 }}'
ShippingAddress2: '{{ ShippingAddress2 }}'
ShippingAddress3: '{{ ShippingAddress3 }}'
ShippingAddress4: '{{ ShippingAddress4 }}'
ShippingCity: '{{ ShippingCity }}'
ShippingCounty: '{{ ShippingCounty }}'
ShippingCountry: '{{ ShippingCountry }}'
ShippingPostalCode: '{{ ShippingPostalCode }}'
ShippingProvince: '{{ ShippingProvince }}'
ShippingState: '{{ ShippingState }}'
MailingAddress1: '{{ MailingAddress1 }}'
MailingAddress2: '{{ MailingAddress2 }}'
MailingAddress3: '{{ MailingAddress3 }}'
MailingAddress4: '{{ MailingAddress4 }}'
MailingCity: '{{ MailingCity }}'
MailingCounty: '{{ MailingCounty }}'
MailingCountry: '{{ MailingCountry }}'
MailingPostalCode: '{{ MailingPostalCode }}'
MailingProvince: '{{ MailingProvince }}'
MailingState: '{{ MailingState }}'
BillingAddress1: '{{ BillingAddress1 }}'
BillingAddress2: '{{ BillingAddress2 }}'
BillingAddress3: '{{ BillingAddress3 }}'
BillingAddress4: '{{ BillingAddress4 }}'
BillingCity: '{{ BillingCity }}'
BillingCounty: '{{ BillingCounty }}'
BillingCountry: '{{ BillingCountry }}'
BillingPostalCode: '{{ BillingPostalCode }}'
BillingProvince: '{{ BillingProvince }}'
BillingState: '{{ BillingState }}'
Custom: {}
CustomAttributes: null
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.wisdom.message_templates
WHERE data__Identifier = '<MessageTemplateArn>'
AND region = 'us-east-1';
Permissions
To operate on the message_templates
resource, the following permissions are required:
Create
wisdom:CreateMessageTemplate,
wisdom:GetMessageTemplate,
wisdom:TagResource,
connect:SearchRoutingProfiles,
connect:DescribeRoutingProfile
Update
wisdom:UpdateMessageTemplate,
wisdom:UpdateMessageTemplateMetadata,
wisdom:GetMessageTemplate,
wisdom:TagResource,
wisdom:UntagResource,
connect:SearchRoutingProfiles,
connect:DescribeRoutingProfile
Delete
wisdom:DeleteMessageTemplate,
wisdom:UntagResource
List
wisdom:ListMessageTemplates
Read
wisdom:GetMessageTemplate