Class: AWSCDK::Cognito::UserInvitationConfig

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

Overview

User pool configuration when administrators sign users up.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(email_body: nil, email_subject: nil, sms_message: nil) ⇒ UserInvitationConfig

Returns a new instance of UserInvitationConfig.

Parameters:

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

    The template to the email body that is sent to the user when an administrator signs them up to the user pool.

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

    The template to the email subject that is sent to the user when an administrator signs them up to the user pool.

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

    The template to the SMS message that is sent to the user when an administrator signs them up to the user pool.



10
11
12
13
14
15
16
17
# File 'cognito/user_invitation_config.rb', line 10

def initialize(email_body: 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_subject = email_subject
  Jsii::Type.check_type(@email_subject, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "emailSubject") unless @email_subject.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

#email_bodyString? (readonly)

Note:

Default: 'Your username is username and temporary password is ####.'

The template to the email body that is sent to the user when an administrator signs them up to the user pool.

Returns:

  • (String, nil)


23
24
25
# File 'cognito/user_invitation_config.rb', line 23

def email_body
  @email_body
end

#email_subjectString? (readonly)

Note:

Default: 'Your temporary password'

The template to the email subject that is sent to the user when an administrator signs them up to the user pool.

Returns:

  • (String, nil)


28
29
30
# File 'cognito/user_invitation_config.rb', line 28

def email_subject
  @email_subject
end

#sms_messageString? (readonly)

Note:

Default: 'Your username is username and temporary password is ####'

The template to the SMS message that is sent to the user when an administrator signs them up to the user pool.

Returns:

  • (String, nil)


33
34
35
# File 'cognito/user_invitation_config.rb', line 33

def sms_message
  @sms_message
end

Class Method Details

.jsii_propertiesObject



35
36
37
38
39
40
41
# File 'cognito/user_invitation_config.rb', line 35

def self.jsii_properties
  {
    :email_body => "emailBody",
    :email_subject => "emailSubject",
    :sms_message => "smsMessage",
  }
end

Instance Method Details

#to_jsiiObject



43
44
45
46
47
48
49
50
51
# File 'cognito/user_invitation_config.rb', line 43

def to_jsii
  result = {}
  result.merge!({
    "emailBody" => @email_body,
    "emailSubject" => @email_subject,
    "smsMessage" => @sms_message,
  })
  result.compact
end