Class: AWSCDK::Cognito::UserPoolEmailConfig

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

Overview

Result of binding email settings with a user pool.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configuration_set: nil, email_sending_account: nil, from: nil, reply_to_email_address: nil, source_arn: nil) ⇒ UserPoolEmailConfig

Returns a new instance of UserPoolEmailConfig.

Parameters:

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

    The name of the configuration set in SES.

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

    Specifies whether to use Cognito's built in email functionality or SES.

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

    Identifies either the sender's email address or the sender's name with their email address.

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

    The destination to which the receiver of the email should reply to.

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

    The ARN of a verified email address in Amazon SES.



12
13
14
15
16
17
18
19
20
21
22
23
# File 'cognito/user_pool_email_config.rb', line 12

def initialize(configuration_set: nil, email_sending_account: nil, from: nil, reply_to_email_address: nil, source_arn: nil)
  @configuration_set = configuration_set
  Jsii::Type.check_type(@configuration_set, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "configurationSet") unless @configuration_set.nil?
  @email_sending_account = 
  Jsii::Type.check_type(@email_sending_account, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "emailSendingAccount") unless @email_sending_account.nil?
  @from = from
  Jsii::Type.check_type(@from, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "from") unless @from.nil?
  @reply_to_email_address = reply_to_email_address
  Jsii::Type.check_type(@reply_to_email_address, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "replyToEmailAddress") unless @reply_to_email_address.nil?
  @source_arn = source_arn
  Jsii::Type.check_type(@source_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sourceArn") unless @source_arn.nil?
end

Instance Attribute Details

#configuration_setString? (readonly)

Note:

Default: - none

The name of the configuration set in SES.

Returns:

  • (String, nil)


29
30
31
# File 'cognito/user_pool_email_config.rb', line 29

def configuration_set
  @configuration_set
end

#email_sending_accountString? (readonly)

Note:

Default: - Cognito built in email functionality

Specifies whether to use Cognito's built in email functionality or SES.

Returns:

  • (String, nil)


34
35
36
# File 'cognito/user_pool_email_config.rb', line 34

def 
  @email_sending_account
end

#fromString? (readonly)

Identifies either the sender's email address or the sender's name with their email address.

If emailSendingAccount is DEVELOPER then this cannot be specified.

Returns:

  • (String, nil)


41
42
43
# File 'cognito/user_pool_email_config.rb', line 41

def from
  @from
end

#reply_to_email_addressString? (readonly)

Note:

Default: - same as from

The destination to which the receiver of the email should reply to.

Returns:

  • (String, nil)


46
47
48
# File 'cognito/user_pool_email_config.rb', line 46

def reply_to_email_address
  @reply_to_email_address
end

#source_arnString? (readonly)

Note:

Default: - none

The ARN of a verified email address in Amazon SES.

required if emailSendingAccount is DEVELOPER or if 'from' is provided.

Returns:

  • (String, nil)


54
55
56
# File 'cognito/user_pool_email_config.rb', line 54

def source_arn
  @source_arn
end

Class Method Details

.jsii_propertiesObject



56
57
58
59
60
61
62
63
64
# File 'cognito/user_pool_email_config.rb', line 56

def self.jsii_properties
  {
    :configuration_set => "configurationSet",
    :email_sending_account => "emailSendingAccount",
    :from => "from",
    :reply_to_email_address => "replyToEmailAddress",
    :source_arn => "sourceArn",
  }
end

Instance Method Details

#to_jsiiObject



66
67
68
69
70
71
72
73
74
75
76
# File 'cognito/user_pool_email_config.rb', line 66

def to_jsii
  result = {}
  result.merge!({
    "configurationSet" => @configuration_set,
    "emailSendingAccount" => @email_sending_account,
    "from" => @from,
    "replyToEmailAddress" => @reply_to_email_address,
    "sourceArn" => @source_arn,
  })
  result.compact
end