Class CfnMessageTemplate
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IMessageTemplateRef,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
The name of the message template has to be unique for each knowledge base. The channel subtype of the message template is immutable and cannot be modified after creation. After the message template is created, you can use the $LATEST qualifier to reference the created message template.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.wisdom.*;
CfnMessageTemplate cfnMessageTemplate = CfnMessageTemplate.Builder.create(this, "MyCfnMessageTemplate")
.channelSubtype("channelSubtype")
.content(ContentProperty.builder()
.emailMessageTemplateContent(EmailMessageTemplateContentProperty.builder()
.body(EmailMessageTemplateContentBodyProperty.builder()
.html(MessageTemplateBodyContentProviderProperty.builder()
.content("content")
.build())
.plainText(MessageTemplateBodyContentProviderProperty.builder()
.content("content")
.build())
.build())
.headers(List.of(EmailMessageTemplateHeaderProperty.builder()
.name("name")
.value("value")
.build()))
.subject("subject")
.build())
.smsMessageTemplateContent(SmsMessageTemplateContentProperty.builder()
.body(SmsMessageTemplateContentBodyProperty.builder()
.plainText(MessageTemplateBodyContentProviderProperty.builder()
.content("content")
.build())
.build())
.build())
.build())
.knowledgeBaseArn("knowledgeBaseArn")
.name("name")
// the properties below are optional
.defaultAttributes(MessageTemplateAttributesProperty.builder()
.agentAttributes(AgentAttributesProperty.builder()
.firstName("firstName")
.lastName("lastName")
.build())
.customAttributes(Map.of(
"customAttributesKey", "customAttributes"))
.customerProfileAttributes(CustomerProfileAttributesProperty.builder()
.accountNumber("accountNumber")
.additionalInformation("additionalInformation")
.address1("address1")
.address2("address2")
.address3("address3")
.address4("address4")
.billingAddress1("billingAddress1")
.billingAddress2("billingAddress2")
.billingAddress3("billingAddress3")
.billingAddress4("billingAddress4")
.billingCity("billingCity")
.billingCountry("billingCountry")
.billingCounty("billingCounty")
.billingPostalCode("billingPostalCode")
.billingProvince("billingProvince")
.billingState("billingState")
.birthDate("birthDate")
.businessEmailAddress("businessEmailAddress")
.businessName("businessName")
.businessPhoneNumber("businessPhoneNumber")
.city("city")
.country("country")
.county("county")
.custom(Map.of(
"customKey", "custom"))
.emailAddress("emailAddress")
.firstName("firstName")
.gender("gender")
.homePhoneNumber("homePhoneNumber")
.lastName("lastName")
.mailingAddress1("mailingAddress1")
.mailingAddress2("mailingAddress2")
.mailingAddress3("mailingAddress3")
.mailingAddress4("mailingAddress4")
.mailingCity("mailingCity")
.mailingCountry("mailingCountry")
.mailingCounty("mailingCounty")
.mailingPostalCode("mailingPostalCode")
.mailingProvince("mailingProvince")
.mailingState("mailingState")
.middleName("middleName")
.mobilePhoneNumber("mobilePhoneNumber")
.partyType("partyType")
.phoneNumber("phoneNumber")
.postalCode("postalCode")
.profileArn("profileArn")
.profileId("profileId")
.province("province")
.shippingAddress1("shippingAddress1")
.shippingAddress2("shippingAddress2")
.shippingAddress3("shippingAddress3")
.shippingAddress4("shippingAddress4")
.shippingCity("shippingCity")
.shippingCountry("shippingCountry")
.shippingCounty("shippingCounty")
.shippingPostalCode("shippingPostalCode")
.shippingProvince("shippingProvince")
.shippingState("shippingState")
.state("state")
.build())
.systemAttributes(SystemAttributesProperty.builder()
.customerEndpoint(SystemEndpointAttributesProperty.builder()
.address("address")
.build())
.name("name")
.systemEndpoint(SystemEndpointAttributesProperty.builder()
.address("address")
.build())
.build())
.build())
.description("description")
.groupingConfiguration(GroupingConfigurationProperty.builder()
.criteria("criteria")
.values(List.of("values"))
.build())
.language("language")
.messageTemplateAttachments(List.of(MessageTemplateAttachmentProperty.builder()
.attachmentName("attachmentName")
.s3PresignedUrl("s3PresignedUrl")
// the properties below are optional
.attachmentId("attachmentId")
.build()))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceInformation about an agent.static final classA fluent builder forCfnMessageTemplate.static interfaceThe content of the message template.static interfaceThe customer profile attributes that are used with the message template.static interfaceThe body to use in email messages.static interfaceThe content of the message template that applies to the email channel subtype.static interfaceThe email headers to include in email messages.static interfaceThe configuration information of the grouping of Amazon Q in Connect users.static interfaceInformation about the message template attachment.static interfaceThe attributes that are used with the message template.static interfaceThe container of the message template body.static interfaceThe body to use in SMS messages.static interfaceThe content of the message template that applies to the SMS channel subtype.static interfaceThe system attributes that are used with the message template.static interfaceThe system endpoint attributes that are used with the message template.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.wisdom.IMessageTemplateRef
IMessageTemplateRef.Jsii$Default, IMessageTemplateRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnMessageTemplate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnMessageTemplate(software.amazon.jsii.JsiiObjectRef objRef) CfnMessageTemplate(software.constructs.Construct scope, String id, CfnMessageTemplateProps props) Create a newAWS::Wisdom::MessageTemplate. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForMessageTemplate(IMessageTemplateRef resource) The Amazon Resource Name (ARN) of the message template.The checksum value of the message template content that is referenced by the$LATESTqualifier.The identifier of the message template.Tag Manager which manages the tags for this resource.The channel subtype this message template applies to.The content of the message template.An object that specifies the default values to use for variables in the message template.The description of the message template.The configuration information of the external data source.The Amazon Resource Name (ARN) of the knowledge base.The language code value for the language in which the quick response is written.List of message template attachments.A reference to a MessageTemplate resource.getName()The name of the message template.getTags()The tags used to organize, track, or control access for this resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnMessageTemplate.renderProperties(Map<String, Object> props) voidsetChannelSubtype(String value) The channel subtype this message template applies to.voidsetContent(IResolvable value) The content of the message template.voidThe content of the message template.voidsetDefaultAttributes(IResolvable value) An object that specifies the default values to use for variables in the message template.voidAn object that specifies the default values to use for variables in the message template.voidsetDescription(String value) The description of the message template.voidThe configuration information of the external data source.voidThe configuration information of the external data source.voidsetKnowledgeBaseArn(String value) The Amazon Resource Name (ARN) of the knowledge base.voidsetLanguage(String value) The language code value for the language in which the quick response is written.voidsetMessageTemplateAttachments(List<Object> value) List of message template attachments.voidList of message template attachments.voidThe name of the message template.voidThe tags used to organize, track, or control access for this resource.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnMessageTemplate
protected CfnMessageTemplate(software.amazon.jsii.JsiiObjectRef objRef) -
CfnMessageTemplate
protected CfnMessageTemplate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnMessageTemplate
@Stability(Stable) public CfnMessageTemplate(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnMessageTemplateProps props) Create a newAWS::Wisdom::MessageTemplate.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForMessageTemplate
@Stability(Stable) @NotNull public static String arnForMessageTemplate(@NotNull IMessageTemplateRef resource) - Parameters:
resource- This parameter is required.
-
isCfnMessageTemplate
Checks whether the given object is a CfnMessageTemplate.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrMessageTemplateArn
The Amazon Resource Name (ARN) of the message template. -
getAttrMessageTemplateContentSha256
The checksum value of the message template content that is referenced by the$LATESTqualifier.It can be returned in
MessageTemplateDataorExtendedMessageTemplateData. It’s calculated by content, language,defaultAttributesandAttachmentsof the message template. -
getAttrMessageTemplateId
The identifier of the message template. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getMessageTemplateRef
A reference to a MessageTemplate resource.- Specified by:
getMessageTemplateRefin interfaceIMessageTemplateRef
-
getChannelSubtype
The channel subtype this message template applies to. -
setChannelSubtype
The channel subtype this message template applies to. -
getContent
The content of the message template.Returns union: either
IResolvableorCfnMessageTemplate.ContentProperty -
setContent
The content of the message template. -
setContent
The content of the message template. -
getKnowledgeBaseArn
The Amazon Resource Name (ARN) of the knowledge base. -
setKnowledgeBaseArn
The Amazon Resource Name (ARN) of the knowledge base. -
getName
The name of the message template. -
setName
The name of the message template. -
getDefaultAttributes
An object that specifies the default values to use for variables in the message template.Returns union: either
IResolvableorCfnMessageTemplate.MessageTemplateAttributesProperty -
setDefaultAttributes
An object that specifies the default values to use for variables in the message template. -
setDefaultAttributes
@Stability(Stable) public void setDefaultAttributes(@Nullable CfnMessageTemplate.MessageTemplateAttributesProperty value) An object that specifies the default values to use for variables in the message template. -
getDescription
The description of the message template. -
setDescription
The description of the message template. -
getGroupingConfiguration
The configuration information of the external data source.Returns union: either
IResolvableorCfnMessageTemplate.GroupingConfigurationProperty -
setGroupingConfiguration
The configuration information of the external data source. -
setGroupingConfiguration
@Stability(Stable) public void setGroupingConfiguration(@Nullable CfnMessageTemplate.GroupingConfigurationProperty value) The configuration information of the external data source. -
getLanguage
The language code value for the language in which the quick response is written. -
setLanguage
The language code value for the language in which the quick response is written. -
getMessageTemplateAttachments
List of message template attachments.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnMessageTemplate.MessageTemplateAttachmentProperty> -
setMessageTemplateAttachments
List of message template attachments. -
setMessageTemplateAttachments
List of message template attachments. -
getTags
The tags used to organize, track, or control access for this resource. -
setTags
The tags used to organize, track, or control access for this resource.
-