Class: AWSCDK::Pinpoint::CfnSmsTemplateProps

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

Overview

Properties for defining a CfnSmsTemplate.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(body:, template_name:, default_substitutions: nil, tags: nil, template_description: nil) ⇒ CfnSmsTemplateProps

Returns a new instance of CfnSmsTemplateProps.

Parameters:

  • body (String)

    The message body to use in text messages that are based on the message template.

  • template_name (String)

    The name of the message template to use for the message.

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

    A JSON object that specifies the default values to use for message variables in 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.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'pinpoint/cfn_sms_template_props.rb', line 14

def initialize(body:, template_name:, default_substitutions: nil, tags: nil, template_description: nil)
  @body = body
  Jsii::Type.check_type(@body, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "body")
  @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?
  @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?
end

Instance Attribute Details

#bodyString (readonly)

The message body to use in text messages that are based on the message template.



31
32
33
# File 'pinpoint/cfn_sms_template_props.rb', line 31

def body
  @body
end

#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.



45
46
47
# File 'pinpoint/cfn_sms_template_props.rb', line 45

def default_substitutions
  @default_substitutions
end

#tagsObject? (readonly)

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

For more information, see Tag .



52
53
54
# File 'pinpoint/cfn_sms_template_props.rb', line 52

def tags
  @tags
end

#template_descriptionString? (readonly)

A custom description of the message template.



57
58
59
# File 'pinpoint/cfn_sms_template_props.rb', line 57

def template_description
  @template_description
end

#template_nameString (readonly)

The name of the message template to use for the message.

If specified, this value must match the name of an existing message template.



38
39
40
# File 'pinpoint/cfn_sms_template_props.rb', line 38

def template_name
  @template_name
end

Class Method Details

.jsii_propertiesObject



59
60
61
62
63
64
65
66
67
# File 'pinpoint/cfn_sms_template_props.rb', line 59

def self.jsii_properties
  {
    :body => "body",
    :template_name => "templateName",
    :default_substitutions => "defaultSubstitutions",
    :tags => "tags",
    :template_description => "templateDescription",
  }
end

Instance Method Details

#to_jsiiObject



69
70
71
72
73
74
75
76
77
78
79
# File 'pinpoint/cfn_sms_template_props.rb', line 69

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