Class: AWSCDK::Cognito::UserVerificationConfig
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Cognito::UserVerificationConfig
- Defined in:
- cognito/user_verification_config.rb
Overview
User pool configuration for user self sign up.
Instance Attribute Summary collapse
-
#email_body ⇒ String?
readonly
The email body template for the verification email sent to the user upon sign up.
-
#email_style ⇒ AWSCDK::Cognito::VerificationEmailStyle?
readonly
Emails can be verified either using a code or a link.
-
#email_subject ⇒ String?
readonly
The email subject template for the verification email sent to the user upon sign up.
-
#sms_message ⇒ String?
readonly
The message template for the verification SMS sent to the user upon sign up.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(email_body: nil, email_style: nil, email_subject: nil, sms_message: nil) ⇒ UserVerificationConfig
constructor
A new instance of UserVerificationConfig.
- #to_jsii ⇒ Object
Constructor Details
#initialize(email_body: nil, email_style: nil, email_subject: nil, sms_message: nil) ⇒ UserVerificationConfig
Returns a new instance of UserVerificationConfig.
11 12 13 14 15 16 17 18 19 20 |
# File 'cognito/user_verification_config.rb', line 11 def initialize(email_body: nil, email_style: nil, email_subject: nil, sms_message: nil) @email_body = email_body Jsii::Type.check_type(@email_body, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "emailBody") unless @email_body.nil? @email_style = email_style Jsii::Type.check_type(@email_style, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5WZXJpZmljYXRpb25FbWFpbFN0eWxlIn0=")), "emailStyle") unless @email_style.nil? @email_subject = email_subject Jsii::Type.check_type(@email_subject, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "emailSubject") unless @email_subject.nil? @sms_message = Jsii::Type.check_type(@sms_message, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "smsMessage") unless @sms_message.nil? end |
Instance Attribute Details
#email_body ⇒ String? (readonly)
Default: - 'The verification code to your new account is ####' if VerificationEmailStyle.CODE is chosen, 'Verify your account by clicking on Email##' if VerificationEmailStyle.LINK is chosen.
The email body template for the verification email sent to the user upon sign up.
See https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-message-templates.html to learn more about message templates.
29 30 31 |
# File 'cognito/user_verification_config.rb', line 29 def email_body @email_body end |
#email_style ⇒ AWSCDK::Cognito::VerificationEmailStyle? (readonly)
Default: VerificationEmailStyle.CODE
Emails can be verified either using a code or a link.
36 37 38 |
# File 'cognito/user_verification_config.rb', line 36 def email_style @email_style end |
#email_subject ⇒ String? (readonly)
Default: 'Verify your new account'
The email subject template for the verification email sent to the user upon sign up.
See https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-message-templates.html to learn more about message templates.
44 45 46 |
# File 'cognito/user_verification_config.rb', line 44 def email_subject @email_subject end |
#sms_message ⇒ String? (readonly)
Default: - 'The verification code to your new account is ####' if VerificationEmailStyle.CODE is chosen, not configured if VerificationEmailStyle.LINK is chosen
The message template for the verification SMS sent to the user upon sign up.
See https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-message-templates.html to learn more about message templates.
52 53 54 |
# File 'cognito/user_verification_config.rb', line 52 def @sms_message end |
Class Method Details
.jsii_properties ⇒ Object
54 55 56 57 58 59 60 61 |
# File 'cognito/user_verification_config.rb', line 54 def self.jsii_properties { :email_body => "emailBody", :email_style => "emailStyle", :email_subject => "emailSubject", :sms_message => "smsMessage", } end |
Instance Method Details
#to_jsii ⇒ Object
63 64 65 66 67 68 69 70 71 72 |
# File 'cognito/user_verification_config.rb', line 63 def to_jsii result = {} result.merge!({ "emailBody" => @email_body, "emailStyle" => @email_style, "emailSubject" => @email_subject, "smsMessage" => @sms_message, }) result.compact end |