Skip to content
v2.278.0

VerificationMessageTemplateProperty Struct ​

The template for the verification message that your user pool delivers to users who set an email address or phone number attribute.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cognito as cognito } from 'aws-cdk-lib';
const verificationMessageTemplateProperty: cognito.CfnUserPool.VerificationMessageTemplateProperty = {
  defaultEmailOption: 'defaultEmailOption',
  emailMessage: 'emailMessage',
  emailMessageByLink: 'emailMessageByLink',
  emailSubject: 'emailSubject',
  emailSubjectByLink: 'emailSubjectByLink',
  smsMessage: 'smsMessage',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cognito as cognito

verification_message_template_property = cognito.CfnUserPool.VerificationMessageTemplateProperty(
    default_email_option="defaultEmailOption",
    email_message="emailMessage",
    email_message_by_link="emailMessageByLink",
    email_subject="emailSubject",
    email_subject_by_link="emailSubjectByLink",
    sms_message="smsMessage"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cognito.*;

VerificationMessageTemplateProperty verificationMessageTemplateProperty = VerificationMessageTemplateProperty.builder()
        .defaultEmailOption("defaultEmailOption")
        .emailMessage("emailMessage")
        .emailMessageByLink("emailMessageByLink")
        .emailSubject("emailSubject")
        .emailSubjectByLink("emailSubjectByLink")
        .smsMessage("smsMessage")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Cognito;

var verificationMessageTemplateProperty = new VerificationMessageTemplateProperty {
    DefaultEmailOption = "defaultEmailOption",
    EmailMessage = "emailMessage",
    EmailMessageByLink = "emailMessageByLink",
    EmailSubject = "emailSubject",
    EmailSubjectByLink = "emailSubjectByLink",
    SmsMessage = "smsMessage"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

verificationMessageTemplateProperty := &VerificationMessageTemplateProperty{
	DefaultEmailOption: jsii.String("defaultEmailOption"),
	EmailMessage: jsii.String("emailMessage"),
	EmailMessageByLink: jsii.String("emailMessageByLink"),
	EmailSubject: jsii.String("emailSubject"),
	EmailSubjectByLink: jsii.String("emailSubjectByLink"),
	SmsMessage: jsii.String("smsMessage"),
}

Properties ​

defaultEmailOptionoptionalstringdefault_email_optionoptionalstrdefaultEmailOptionoptionalStringDefaultEmailOptionoptionalstringDefaultEmailOptionoptional*string #
The configuration of verification emails to contain a clickable link or a verification code.

For link, your template body must contain link text in the format {##Click here##} . "Click here" in the example is a customizable string. For code, your template body must contain a code placeholder in the format {####} .

emailMessageoptionalstringemail_messageoptionalstremailMessageoptionalStringEmailMessageoptionalstringEmailMessageoptional*string #
The template for email messages that Amazon Cognito sends to your users.
notes

You can set an EmailMessage template only if the value of EmailSendingAccount is DEVELOPER . When your EmailSendingAccount is DEVELOPER , your user pool sends email messages with your own Amazon SES configuration.

emailSubjectoptionalstringemail_subjectoptionalstremailSubjectoptionalStringEmailSubjectoptionalstringEmailSubjectoptional*string #
The subject line for the email message template.
notes

You can set an EmailSubject template only if the value of EmailSendingAccount is DEVELOPER . When your EmailSendingAccount is DEVELOPER , your user pool sends email messages with your own Amazon SES configuration.

smsMessageoptionalstringsms_messageoptionalstrsmsMessageoptionalStringSmsMessageoptionalstringSmsMessageoptional*string #
The template for SMS messages that Amazon Cognito sends to your users.