Class: AWSCDK::Cognito::CfnUserPoolRiskConfigurationAttachment::NotifyEmailTypeProperty

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

Overview

The template for email messages that advanced security features sends to a user when your threat protection automated response has a Notify action.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(subject:, html_body: nil, text_body: nil) ⇒ NotifyEmailTypeProperty

Returns a new instance of NotifyEmailTypeProperty.

Parameters:

  • subject (String)

    The subject of the threat protection email notification.

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

    The body of an email notification formatted in HTML.

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

    The body of an email notification formatted in plaintext.



868
869
870
871
872
873
874
875
# File 'cognito/cfn_user_pool_risk_configuration_attachment.rb', line 868

def initialize(subject:, html_body: nil, text_body: nil)
  @subject = subject
  Jsii::Type.check_type(@subject, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "subject")
  @html_body = html_body
  Jsii::Type.check_type(@html_body, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "htmlBody") unless @html_body.nil?
  @text_body = text_body
  Jsii::Type.check_type(@text_body, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "textBody") unless @text_body.nil?
end

Instance Attribute Details

#html_bodyString? (readonly)

The body of an email notification formatted in HTML.

Choose an HtmlBody or a TextBody to send an HTML-formatted or plaintext message, respectively.



888
889
890
# File 'cognito/cfn_user_pool_risk_configuration_attachment.rb', line 888

def html_body
  @html_body
end

#subjectString (readonly)

The subject of the threat protection email notification.



881
882
883
# File 'cognito/cfn_user_pool_risk_configuration_attachment.rb', line 881

def subject
  @subject
end

#text_bodyString? (readonly)

The body of an email notification formatted in plaintext.

Choose an HtmlBody or a TextBody to send an HTML-formatted or plaintext message, respectively.



895
896
897
# File 'cognito/cfn_user_pool_risk_configuration_attachment.rb', line 895

def text_body
  @text_body
end

Class Method Details

.jsii_propertiesObject



897
898
899
900
901
902
903
# File 'cognito/cfn_user_pool_risk_configuration_attachment.rb', line 897

def self.jsii_properties
  {
    :subject => "subject",
    :html_body => "htmlBody",
    :text_body => "textBody",
  }
end

Instance Method Details

#to_jsiiObject



905
906
907
908
909
910
911
912
913
# File 'cognito/cfn_user_pool_risk_configuration_attachment.rb', line 905

def to_jsii
  result = {}
  result.merge!({
    "subject" => @subject,
    "htmlBody" => @html_body,
    "textBody" => @text_body,
  })
  result.compact
end