Class: AWSCDK::SES::CfnEmailIdentity::MailFromAttributesProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ses/cfn_email_identity.rb

Overview

Used to enable or disable the custom Mail-From domain configuration for an email identity.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(behavior_on_mx_failure: nil, mail_from_domain: nil) ⇒ MailFromAttributesProperty

Returns a new instance of MailFromAttributesProperty.

Parameters:

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

    The action to take if the required MX record isn't found when you send an email.

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

    The custom MAIL FROM domain that you want the verified identity to use.



821
822
823
824
825
826
# File 'ses/cfn_email_identity.rb', line 821

def initialize(behavior_on_mx_failure: nil, mail_from_domain: nil)
  @behavior_on_mx_failure = behavior_on_mx_failure
  Jsii::Type.check_type(@behavior_on_mx_failure, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "behaviorOnMxFailure") unless @behavior_on_mx_failure.nil?
  @mail_from_domain = mail_from_domain
  Jsii::Type.check_type(@mail_from_domain, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "mailFromDomain") unless @mail_from_domain.nil?
end

Instance Attribute Details

#behavior_on_mx_failureString? (readonly)

The action to take if the required MX record isn't found when you send an email.

When you set this value to USE_DEFAULT_VALUE , the mail is sent using amazonses.com as the MAIL FROM domain. When you set this value to REJECT_MESSAGE , the Amazon SES API v2 returns a MailFromDomainNotVerified error, and doesn't attempt to deliver the email.

These behaviors are taken when the custom MAIL FROM domain configuration is in the Pending , Failed , and TemporaryFailure states.

Valid Values: USE_DEFAULT_VALUE | REJECT_MESSAGE



838
839
840
# File 'ses/cfn_email_identity.rb', line 838

def behavior_on_mx_failure
  @behavior_on_mx_failure
end

#mail_from_domainString? (readonly)

The custom MAIL FROM domain that you want the verified identity to use.

The MAIL FROM domain must meet the following criteria:

  • It has to be a subdomain of the verified identity.
  • It can't be used to receive email.
  • It can't be used in a "From" address if the MAIL FROM domain is a destination for feedback forwarding emails.


849
850
851
# File 'ses/cfn_email_identity.rb', line 849

def mail_from_domain
  @mail_from_domain
end

Class Method Details

.jsii_propertiesObject



851
852
853
854
855
856
# File 'ses/cfn_email_identity.rb', line 851

def self.jsii_properties
  {
    :behavior_on_mx_failure => "behaviorOnMxFailure",
    :mail_from_domain => "mailFromDomain",
  }
end

Instance Method Details

#to_jsiiObject



858
859
860
861
862
863
864
865
# File 'ses/cfn_email_identity.rb', line 858

def to_jsii
  result = {}
  result.merge!({
    "behaviorOnMxFailure" => @behavior_on_mx_failure,
    "mailFromDomain" => @mail_from_domain,
  })
  result.compact
end