Class: AWSCDK::Pinpoint::CfnEmailTemplateProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
pinpoint/cfn_email_template_props.rb

Overview

Properties for defining a CfnEmailTemplate.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(subject:, template_name:, default_substitutions: nil, html_part: nil, tags: nil, template_description: nil, text_part: nil) ⇒ CfnEmailTemplateProps

Returns a new instance of CfnEmailTemplateProps.

Parameters:

  • subject (String)

    The subject line, or title, to use in email messages that are based on the message template.

  • template_name (String)

    The name of the message template.

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

    A JSON object that specifies the default values to use for message variables in the message template.

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

    The message body, in HTML format, to use in email messages that are based on the message template.

  • tags (Object, nil) (defaults to: nil)

    An array of key-value pairs to apply to this resource.

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

    A custom description of the message template.

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

    The message body, in plain text format, to use in email messages that are based on the message template.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'pinpoint/cfn_email_template_props.rb', line 16

def initialize(subject:, template_name:, default_substitutions: nil, html_part: nil, tags: nil, template_description: nil, text_part: nil)
  @subject = subject
  Jsii::Type.check_type(@subject, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "subject")
  @template_name = template_name
  Jsii::Type.check_type(@template_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "templateName")
  @default_substitutions = default_substitutions
  Jsii::Type.check_type(@default_substitutions, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "defaultSubstitutions") unless @default_substitutions.nil?
  @html_part = html_part
  Jsii::Type.check_type(@html_part, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "htmlPart") unless @html_part.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "tags") unless @tags.nil?
  @template_description = template_description
  Jsii::Type.check_type(@template_description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "templateDescription") unless @template_description.nil?
  @text_part = text_part
  Jsii::Type.check_type(@text_part, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "textPart") unless @text_part.nil?
end

Instance Attribute Details

#default_substitutionsString? (readonly)

A JSON object that specifies the default values to use for message variables in the message template.

This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.



49
50
51
# File 'pinpoint/cfn_email_template_props.rb', line 49

def default_substitutions
  @default_substitutions
end

#html_partString? (readonly)

The message body, in HTML format, to use in email messages that are based on the message template.

We recommend using HTML format for email clients that render HTML content. You can include links, formatted text, and more in an HTML message.



56
57
58
# File 'pinpoint/cfn_email_template_props.rb', line 56

def html_part
  @html_part
end

#subjectString (readonly)

The subject line, or title, to use in email messages that are based on the message template.



37
38
39
# File 'pinpoint/cfn_email_template_props.rb', line 37

def subject
  @subject
end

#tagsObject? (readonly)

An array of key-value pairs to apply to this resource.

For more information, see Tag .



63
64
65
# File 'pinpoint/cfn_email_template_props.rb', line 63

def tags
  @tags
end

#template_descriptionString? (readonly)

A custom description of the message template.



68
69
70
# File 'pinpoint/cfn_email_template_props.rb', line 68

def template_description
  @template_description
end

#template_nameString (readonly)

The name of the message template.



42
43
44
# File 'pinpoint/cfn_email_template_props.rb', line 42

def template_name
  @template_name
end

#text_partString? (readonly)

The message body, in plain text format, to use in email messages that are based on the message template.

We recommend using plain text format for email clients that don't render HTML content and clients that are connected to high-latency networks, such as mobile devices.



75
76
77
# File 'pinpoint/cfn_email_template_props.rb', line 75

def text_part
  @text_part
end

Class Method Details

.jsii_propertiesObject



77
78
79
80
81
82
83
84
85
86
87
# File 'pinpoint/cfn_email_template_props.rb', line 77

def self.jsii_properties
  {
    :subject => "subject",
    :template_name => "templateName",
    :default_substitutions => "defaultSubstitutions",
    :html_part => "htmlPart",
    :tags => "tags",
    :template_description => "templateDescription",
    :text_part => "textPart",
  }
end

Instance Method Details

#to_jsiiObject



89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'pinpoint/cfn_email_template_props.rb', line 89

def to_jsii
  result = {}
  result.merge!({
    "subject" => @subject,
    "templateName" => @template_name,
    "defaultSubstitutions" => @default_substitutions,
    "htmlPart" => @html_part,
    "tags" => @tags,
    "templateDescription" => @template_description,
    "textPart" => @text_part,
  })
  result.compact
end