Class: AWSCDK::Cognito::CfnUserPool::VerificationMessageTemplateProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cognito/cfn_user_pool.rb

Overview

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(default_email_option: nil, email_message: nil, email_message_by_link: nil, email_subject: nil, email_subject_by_link: nil, sms_message: nil) ⇒ VerificationMessageTemplateProperty

Returns a new instance of VerificationMessageTemplateProperty.

Parameters:

  • default_email_option (String, nil) (defaults to: nil)

    The configuration of verification emails to contain a clickable link or a verification code.

  • email_message (String, nil) (defaults to: nil)

    The template for email messages that Amazon Cognito sends to your users.

  • email_message_by_link (String, nil) (defaults to: nil)

    The email message template for sending a confirmation link to the user.

  • email_subject (String, nil) (defaults to: nil)

    The subject line for the email message template.

  • email_subject_by_link (String, nil) (defaults to: nil)

    The subject line for the email message template for sending a confirmation link to the user.

  • sms_message (String, nil) (defaults to: nil)

    The template for SMS messages that Amazon Cognito sends to your users.



2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
# File 'cognito/cfn_user_pool.rb', line 2296

def initialize(default_email_option: nil, email_message: nil, email_message_by_link: nil, email_subject: nil, email_subject_by_link: nil, sms_message: nil)
  @default_email_option = default_email_option
  Jsii::Type.check_type(@default_email_option, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "defaultEmailOption") unless @default_email_option.nil?
  @email_message = email_message
  Jsii::Type.check_type(@email_message, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "emailMessage") unless @email_message.nil?
  @email_message_by_link = email_message_by_link
  Jsii::Type.check_type(@email_message_by_link, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "emailMessageByLink") unless @email_message_by_link.nil?
  @email_subject = email_subject
  Jsii::Type.check_type(@email_subject, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "emailSubject") unless @email_subject.nil?
  @email_subject_by_link = email_subject_by_link
  Jsii::Type.check_type(@email_subject_by_link, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "emailSubjectByLink") unless @email_subject_by_link.nil?
  @sms_message = sms_message
  Jsii::Type.check_type(@sms_message, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "smsMessage") unless @sms_message.nil?
end

Instance Attribute Details

#default_email_optionString? (readonly)

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 {####} .



2317
2318
2319
# File 'cognito/cfn_user_pool.rb', line 2317

def default_email_option
  @default_email_option
end

#email_messageString? (readonly)

The template for email messages that Amazon Cognito sends to your users.

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.



2324
2325
2326
# File 'cognito/cfn_user_pool.rb', line 2324

def email_message
  @email_message
end

The email message template for sending a confirmation link to the user.

You can set an EmailMessageByLink 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.



2331
2332
2333
# File 'cognito/cfn_user_pool.rb', line 2331

def email_message_by_link
  @email_message_by_link
end

#email_subjectString? (readonly)

The subject line for the email message template.

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.



2338
2339
2340
# File 'cognito/cfn_user_pool.rb', line 2338

def email_subject
  @email_subject
end

The subject line for the email message template for sending a confirmation link to the user.

You can set an EmailSubjectByLink 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.



2345
2346
2347
# File 'cognito/cfn_user_pool.rb', line 2345

def email_subject_by_link
  @email_subject_by_link
end

#sms_messageString? (readonly)

The template for SMS messages that Amazon Cognito sends to your users.



2350
2351
2352
# File 'cognito/cfn_user_pool.rb', line 2350

def sms_message
  @sms_message
end

Class Method Details

.jsii_propertiesObject



2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
# File 'cognito/cfn_user_pool.rb', line 2352

def self.jsii_properties
  {
    :default_email_option => "defaultEmailOption",
    :email_message => "emailMessage",
    :email_message_by_link => "emailMessageByLink",
    :email_subject => "emailSubject",
    :email_subject_by_link => "emailSubjectByLink",
    :sms_message => "smsMessage",
  }
end

Instance Method Details

#to_jsiiObject



2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
# File 'cognito/cfn_user_pool.rb', line 2363

def to_jsii
  result = {}
  result.merge!({
    "defaultEmailOption" => @default_email_option,
    "emailMessage" => @email_message,
    "emailMessageByLink" => @email_message_by_link,
    "emailSubject" => @email_subject,
    "emailSubjectByLink" => @email_subject_by_link,
    "smsMessage" => @sms_message,
  })
  result.compact
end