import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { CreateMessageTemplateRequest, CreateMessageTemplateResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link CreateMessageTemplateCommand}. */ export interface CreateMessageTemplateCommandInput extends CreateMessageTemplateRequest { } /** * @public * * The output of {@link CreateMessageTemplateCommand}. */ export interface CreateMessageTemplateCommandOutput extends CreateMessageTemplateResponse, __MetadataBearer { } declare const CreateMessageTemplateCommand_base: { new (input: CreateMessageTemplateCommandInput): import("@smithy/core/client").CommandImpl; new (input: CreateMessageTemplateCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** *

Creates an Amazon Q in Connect message template. 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 * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { QConnectClient, CreateMessageTemplateCommand } from "@aws-sdk/client-qconnect"; // ES Modules import * // const { QConnectClient, CreateMessageTemplateCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import * // import type { QConnectClientConfig } from "@aws-sdk/client-qconnect"; * const config = {}; // type is QConnectClientConfig * const client = new QConnectClient(config); * const input = { // CreateMessageTemplateRequest * knowledgeBaseId: "STRING_VALUE", // required * name: "STRING_VALUE", * content: { // MessageTemplateContentProvider Union: only one key present * email: { // EmailMessageTemplateContent * subject: "STRING_VALUE", * body: { // EmailMessageTemplateContentBody * plainText: { // MessageTemplateBodyContentProvider Union: only one key present * content: "STRING_VALUE", * }, * html: {// Union: only one key present * content: "STRING_VALUE", * }, * }, * headers: [ // EmailHeaders * { // EmailHeader * name: "STRING_VALUE", * value: "STRING_VALUE", * }, * ], * }, * sms: { // SMSMessageTemplateContent * body: { // SMSMessageTemplateContentBody * plainText: {// Union: only one key present * content: "STRING_VALUE", * }, * }, * }, * whatsApp: { // WhatsAppMessageTemplateContent * data: "STRING_VALUE", * }, * push: { // PushMessageTemplateContent * adm: { // PushADMMessageTemplateContent * title: "STRING_VALUE", * body: {// Union: only one key present * content: "STRING_VALUE", * }, * action: "STRING_VALUE", * sound: "STRING_VALUE", * url: "STRING_VALUE", * imageUrl: "STRING_VALUE", * imageIconUrl: "STRING_VALUE", * smallImageIconUrl: "STRING_VALUE", * rawContent: {// Union: only one key present * content: "STRING_VALUE", * }, * }, * apns: { // PushAPNSMessageTemplateContent * title: "STRING_VALUE", * body: "", * action: "STRING_VALUE", * sound: "STRING_VALUE", * url: "STRING_VALUE", * mediaUrl: "STRING_VALUE", * rawContent: "", * }, * fcm: { // PushFCMMessageTemplateContent * title: "STRING_VALUE", * body: "", * action: "STRING_VALUE", * sound: "STRING_VALUE", * url: "STRING_VALUE", * imageUrl: "STRING_VALUE", * imageIconUrl: "STRING_VALUE", * smallImageIconUrl: "STRING_VALUE", * rawContent: "", * }, * baidu: { // PushBaiduMessageTemplateContent * title: "STRING_VALUE", * body: "", * action: "STRING_VALUE", * sound: "STRING_VALUE", * url: "STRING_VALUE", * imageUrl: "STRING_VALUE", * imageIconUrl: "STRING_VALUE", * smallImageIconUrl: "STRING_VALUE", * rawContent: "", * }, * }, * }, * description: "STRING_VALUE", * channelSubtype: "STRING_VALUE", // required * language: "STRING_VALUE", * sourceConfiguration: { // MessageTemplateSourceConfiguration Union: only one key present * whatsApp: { // WhatsAppMessageTemplateSourceConfiguration * businessAccountId: "STRING_VALUE", // required * templateId: "STRING_VALUE", // required * components: [ // WhatsAppMessageTemplateComponents * "STRING_VALUE", * ], * }, * }, * defaultAttributes: { // MessageTemplateAttributes * systemAttributes: { // SystemAttributes * name: "STRING_VALUE", * customerEndpoint: { // SystemEndpointAttributes * address: "STRING_VALUE", * }, * systemEndpoint: { * address: "STRING_VALUE", * }, * }, * agentAttributes: { // AgentAttributes * firstName: "STRING_VALUE", * lastName: "STRING_VALUE", * }, * customerProfileAttributes: { // CustomerProfileAttributes * profileId: "STRING_VALUE", * profileARN: "STRING_VALUE", * firstName: "STRING_VALUE", * middleName: "STRING_VALUE", * lastName: "STRING_VALUE", * accountNumber: "STRING_VALUE", * emailAddress: "STRING_VALUE", * phoneNumber: "STRING_VALUE", * additionalInformation: "STRING_VALUE", * partyType: "STRING_VALUE", * businessName: "STRING_VALUE", * birthDate: "STRING_VALUE", * gender: "STRING_VALUE", * mobilePhoneNumber: "STRING_VALUE", * homePhoneNumber: "STRING_VALUE", * businessPhoneNumber: "STRING_VALUE", * businessEmailAddress: "STRING_VALUE", * address1: "STRING_VALUE", * address2: "STRING_VALUE", * address3: "STRING_VALUE", * address4: "STRING_VALUE", * city: "STRING_VALUE", * county: "STRING_VALUE", * country: "STRING_VALUE", * postalCode: "STRING_VALUE", * province: "STRING_VALUE", * state: "STRING_VALUE", * shippingAddress1: "STRING_VALUE", * shippingAddress2: "STRING_VALUE", * shippingAddress3: "STRING_VALUE", * shippingAddress4: "STRING_VALUE", * shippingCity: "STRING_VALUE", * shippingCounty: "STRING_VALUE", * shippingCountry: "STRING_VALUE", * shippingPostalCode: "STRING_VALUE", * shippingProvince: "STRING_VALUE", * shippingState: "STRING_VALUE", * mailingAddress1: "STRING_VALUE", * mailingAddress2: "STRING_VALUE", * mailingAddress3: "STRING_VALUE", * mailingAddress4: "STRING_VALUE", * mailingCity: "STRING_VALUE", * mailingCounty: "STRING_VALUE", * mailingCountry: "STRING_VALUE", * mailingPostalCode: "STRING_VALUE", * mailingProvince: "STRING_VALUE", * mailingState: "STRING_VALUE", * billingAddress1: "STRING_VALUE", * billingAddress2: "STRING_VALUE", * billingAddress3: "STRING_VALUE", * billingAddress4: "STRING_VALUE", * billingCity: "STRING_VALUE", * billingCounty: "STRING_VALUE", * billingCountry: "STRING_VALUE", * billingPostalCode: "STRING_VALUE", * billingProvince: "STRING_VALUE", * billingState: "STRING_VALUE", * custom: { // CustomAttributes * "": "STRING_VALUE", * }, * }, * customAttributes: { * "": "STRING_VALUE", * }, * }, * groupingConfiguration: { // GroupingConfiguration * criteria: "STRING_VALUE", * values: [ // GroupingValues * "STRING_VALUE", * ], * }, * clientToken: "STRING_VALUE", * tags: { // Tags * "": "STRING_VALUE", * }, * }; * const command = new CreateMessageTemplateCommand(input); * const response = await client.send(command); * // { // CreateMessageTemplateResponse * // messageTemplate: { // MessageTemplateData * // messageTemplateArn: "STRING_VALUE", // required * // messageTemplateId: "STRING_VALUE", // required * // knowledgeBaseArn: "STRING_VALUE", // required * // knowledgeBaseId: "STRING_VALUE", // required * // name: "STRING_VALUE", // required * // channel: "STRING_VALUE", * // channelSubtype: "STRING_VALUE", // required * // createdTime: new Date("TIMESTAMP"), // required * // lastModifiedTime: new Date("TIMESTAMP"), // required * // lastModifiedBy: "STRING_VALUE", // required * // content: { // MessageTemplateContentProvider Union: only one key present * // email: { // EmailMessageTemplateContent * // subject: "STRING_VALUE", * // body: { // EmailMessageTemplateContentBody * // plainText: { // MessageTemplateBodyContentProvider Union: only one key present * // content: "STRING_VALUE", * // }, * // html: {// Union: only one key present * // content: "STRING_VALUE", * // }, * // }, * // headers: [ // EmailHeaders * // { // EmailHeader * // name: "STRING_VALUE", * // value: "STRING_VALUE", * // }, * // ], * // }, * // sms: { // SMSMessageTemplateContent * // body: { // SMSMessageTemplateContentBody * // plainText: {// Union: only one key present * // content: "STRING_VALUE", * // }, * // }, * // }, * // whatsApp: { // WhatsAppMessageTemplateContent * // data: "STRING_VALUE", * // }, * // push: { // PushMessageTemplateContent * // adm: { // PushADMMessageTemplateContent * // title: "STRING_VALUE", * // body: {// Union: only one key present * // content: "STRING_VALUE", * // }, * // action: "STRING_VALUE", * // sound: "STRING_VALUE", * // url: "STRING_VALUE", * // imageUrl: "STRING_VALUE", * // imageIconUrl: "STRING_VALUE", * // smallImageIconUrl: "STRING_VALUE", * // rawContent: {// Union: only one key present * // content: "STRING_VALUE", * // }, * // }, * // apns: { // PushAPNSMessageTemplateContent * // title: "STRING_VALUE", * // body: "", * // action: "STRING_VALUE", * // sound: "STRING_VALUE", * // url: "STRING_VALUE", * // mediaUrl: "STRING_VALUE", * // rawContent: "", * // }, * // fcm: { // PushFCMMessageTemplateContent * // title: "STRING_VALUE", * // body: "", * // action: "STRING_VALUE", * // sound: "STRING_VALUE", * // url: "STRING_VALUE", * // imageUrl: "STRING_VALUE", * // imageIconUrl: "STRING_VALUE", * // smallImageIconUrl: "STRING_VALUE", * // rawContent: "", * // }, * // baidu: { // PushBaiduMessageTemplateContent * // title: "STRING_VALUE", * // body: "", * // action: "STRING_VALUE", * // sound: "STRING_VALUE", * // url: "STRING_VALUE", * // imageUrl: "STRING_VALUE", * // imageIconUrl: "STRING_VALUE", * // smallImageIconUrl: "STRING_VALUE", * // rawContent: "", * // }, * // }, * // }, * // description: "STRING_VALUE", * // language: "STRING_VALUE", * // sourceConfigurationSummary: { // MessageTemplateSourceConfigurationSummary Union: only one key present * // whatsApp: { // WhatsAppMessageTemplateSourceConfigurationSummary * // businessAccountId: "STRING_VALUE", // required * // templateId: "STRING_VALUE", // required * // name: "STRING_VALUE", * // language: "STRING_VALUE", * // components: [ // WhatsAppMessageTemplateComponents * // "STRING_VALUE", * // ], * // status: "STRING_VALUE", * // statusReason: "STRING_VALUE", * // }, * // }, * // groupingConfiguration: { // GroupingConfiguration * // criteria: "STRING_VALUE", * // values: [ // GroupingValues * // "STRING_VALUE", * // ], * // }, * // defaultAttributes: { // MessageTemplateAttributes * // systemAttributes: { // SystemAttributes * // name: "STRING_VALUE", * // customerEndpoint: { // SystemEndpointAttributes * // address: "STRING_VALUE", * // }, * // systemEndpoint: { * // address: "STRING_VALUE", * // }, * // }, * // agentAttributes: { // AgentAttributes * // firstName: "STRING_VALUE", * // lastName: "STRING_VALUE", * // }, * // customerProfileAttributes: { // CustomerProfileAttributes * // profileId: "STRING_VALUE", * // profileARN: "STRING_VALUE", * // firstName: "STRING_VALUE", * // middleName: "STRING_VALUE", * // lastName: "STRING_VALUE", * // accountNumber: "STRING_VALUE", * // emailAddress: "STRING_VALUE", * // phoneNumber: "STRING_VALUE", * // additionalInformation: "STRING_VALUE", * // partyType: "STRING_VALUE", * // businessName: "STRING_VALUE", * // birthDate: "STRING_VALUE", * // gender: "STRING_VALUE", * // mobilePhoneNumber: "STRING_VALUE", * // homePhoneNumber: "STRING_VALUE", * // businessPhoneNumber: "STRING_VALUE", * // businessEmailAddress: "STRING_VALUE", * // address1: "STRING_VALUE", * // address2: "STRING_VALUE", * // address3: "STRING_VALUE", * // address4: "STRING_VALUE", * // city: "STRING_VALUE", * // county: "STRING_VALUE", * // country: "STRING_VALUE", * // postalCode: "STRING_VALUE", * // province: "STRING_VALUE", * // state: "STRING_VALUE", * // shippingAddress1: "STRING_VALUE", * // shippingAddress2: "STRING_VALUE", * // shippingAddress3: "STRING_VALUE", * // shippingAddress4: "STRING_VALUE", * // shippingCity: "STRING_VALUE", * // shippingCounty: "STRING_VALUE", * // shippingCountry: "STRING_VALUE", * // shippingPostalCode: "STRING_VALUE", * // shippingProvince: "STRING_VALUE", * // shippingState: "STRING_VALUE", * // mailingAddress1: "STRING_VALUE", * // mailingAddress2: "STRING_VALUE", * // mailingAddress3: "STRING_VALUE", * // mailingAddress4: "STRING_VALUE", * // mailingCity: "STRING_VALUE", * // mailingCounty: "STRING_VALUE", * // mailingCountry: "STRING_VALUE", * // mailingPostalCode: "STRING_VALUE", * // mailingProvince: "STRING_VALUE", * // mailingState: "STRING_VALUE", * // billingAddress1: "STRING_VALUE", * // billingAddress2: "STRING_VALUE", * // billingAddress3: "STRING_VALUE", * // billingAddress4: "STRING_VALUE", * // billingCity: "STRING_VALUE", * // billingCounty: "STRING_VALUE", * // billingCountry: "STRING_VALUE", * // billingPostalCode: "STRING_VALUE", * // billingProvince: "STRING_VALUE", * // billingState: "STRING_VALUE", * // custom: { // CustomAttributes * // "": "STRING_VALUE", * // }, * // }, * // customAttributes: { * // "": "STRING_VALUE", * // }, * // }, * // attributeTypes: [ // MessageTemplateAttributeTypeList * // "STRING_VALUE", * // ], * // messageTemplateContentSha256: "STRING_VALUE", // required * // tags: { // Tags * // "": "STRING_VALUE", * // }, * // }, * // }; * * ``` * * @param CreateMessageTemplateCommandInput - {@link CreateMessageTemplateCommandInput} * @returns {@link CreateMessageTemplateCommandOutput} * @see {@link CreateMessageTemplateCommandInput} for command's `input` shape. * @see {@link CreateMessageTemplateCommandOutput} for command's `response` shape. * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

You do not have sufficient access to perform this action.

* * @throws {@link ConflictException} (client fault) *

The request could not be processed because of conflict in the current state of the resource. For example, if you're using a Create API (such as CreateAssistant) that accepts name, a conflicting resource (usually with the same name) is being created or mutated.

* * @throws {@link ResourceNotFoundException} (client fault) *

The specified resource does not exist.

* * @throws {@link ServiceQuotaExceededException} (client fault) *

You've exceeded your service quota. To perform the requested action, remove some of the relevant resources, or use service quotas to request a service quota increase.

* * @throws {@link ThrottlingException} (client fault) *

The throttling limit has been exceeded.

* * @throws {@link ValidationException} (client fault) *

The input fails to satisfy the constraints specified by a service.

* * @throws {@link QConnectServiceException} *

Base exception class for all service exceptions from QConnect service.

* * * @public */ export declare class CreateMessageTemplateCommand extends CreateMessageTemplateCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CreateMessageTemplateRequest; output: CreateMessageTemplateResponse; }; sdk: { input: CreateMessageTemplateCommandInput; output: CreateMessageTemplateCommandOutput; }; }; }