Class: AWSCDK::Cognito::UserPoolSESOptions

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

Overview

Configuration for Cognito sending emails via Amazon SES.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from_email:, configuration_set_name: nil, from_name: nil, reply_to: nil, ses_region: nil, ses_verified_domain: nil) ⇒ UserPoolSESOptions

Returns a new instance of UserPoolSESOptions.

Parameters:

  • from_email (String)

    The verified Amazon SES email address that Cognito should use to send emails.

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

    The name of a configuration set in Amazon SES that should be applied to emails sent via Cognito.

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

    An optional name that should be used as the sender's name along with the email.

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

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

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

    Required if the UserPool region is different than the SES region.

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

    SES Verified custom domain to be used to verify the identity.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'cognito/user_pool_ses_options.rb', line 13

def initialize(from_email:, configuration_set_name: nil, from_name: nil, reply_to: nil, ses_region: nil, ses_verified_domain: nil)
  @from_email = from_email
  Jsii::Type.check_type(@from_email, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "fromEmail")
  @configuration_set_name = configuration_set_name
  Jsii::Type.check_type(@configuration_set_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "configurationSetName") unless @configuration_set_name.nil?
  @from_name = from_name
  Jsii::Type.check_type(@from_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "fromName") unless @from_name.nil?
  @reply_to = reply_to
  Jsii::Type.check_type(@reply_to, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "replyTo") unless @reply_to.nil?
  @ses_region = ses_region
  Jsii::Type.check_type(@ses_region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sesRegion") unless @ses_region.nil?
  @ses_verified_domain = ses_verified_domain
  Jsii::Type.check_type(@ses_verified_domain, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sesVerifiedDomain") unless @ses_verified_domain.nil?
end

Instance Attribute Details

#configuration_set_nameString? (readonly)

Note:

Default: - no configuration set

The name of a configuration set in Amazon SES that should be applied to emails sent via Cognito.



42
43
44
# File 'cognito/user_pool_ses_options.rb', line 42

def configuration_set_name
  @configuration_set_name
end

#from_emailString (readonly)

The verified Amazon SES email address that Cognito should use to send emails.

The email address used must be a verified email address in Amazon SES and must be configured to allow Cognito to send emails.



36
37
38
# File 'cognito/user_pool_ses_options.rb', line 36

def from_email
  @from_email
end

#from_nameString? (readonly)

Note:

Default: - no name

An optional name that should be used as the sender's name along with the email.

Returns:

  • (String, nil)


47
48
49
# File 'cognito/user_pool_ses_options.rb', line 47

def from_name
  @from_name
end

#reply_toString? (readonly)

Note:

Default: - same as the fromEmail

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

Returns:

  • (String, nil)


52
53
54
# File 'cognito/user_pool_ses_options.rb', line 52

def reply_to
  @reply_to
end

#ses_regionString? (readonly)

Note:

Default: - The same region as the Cognito UserPool

Required if the UserPool region is different than the SES region.

If sending emails with a Amazon SES verified email address, and the region that SES is configured is different than the region in which the UserPool is deployed, you must specify that region here.

Returns:

  • (String, nil)


62
63
64
# File 'cognito/user_pool_ses_options.rb', line 62

def ses_region
  @ses_region
end

#ses_verified_domainString? (readonly)

Note:

Default: - no domain

SES Verified custom domain to be used to verify the identity.

Returns:

  • (String, nil)


67
68
69
# File 'cognito/user_pool_ses_options.rb', line 67

def ses_verified_domain
  @ses_verified_domain
end

Class Method Details

.jsii_propertiesObject



69
70
71
72
73
74
75
76
77
78
# File 'cognito/user_pool_ses_options.rb', line 69

def self.jsii_properties
  {
    :from_email => "fromEmail",
    :configuration_set_name => "configurationSetName",
    :from_name => "fromName",
    :reply_to => "replyTo",
    :ses_region => "sesRegion",
    :ses_verified_domain => "sesVerifiedDomain",
  }
end

Instance Method Details

#to_jsiiObject



80
81
82
83
84
85
86
87
88
89
90
91
# File 'cognito/user_pool_ses_options.rb', line 80

def to_jsii
  result = {}
  result.merge!({
    "fromEmail" => @from_email,
    "configurationSetName" => @configuration_set_name,
    "fromName" => @from_name,
    "replyTo" => @reply_to,
    "sesRegion" => @ses_region,
    "sesVerifiedDomain" => @ses_verified_domain,
  })
  result.compact
end