Class: Aws::Pinpoint::Types::MessageRequest

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb

Overview

Note:

When making an API call, you may pass MessageRequest data as a hash:

{
  addresses: {
    "__string" => {
      body_override: "__string",
      channel_type: "PUSH", # accepts PUSH, GCM, APNS, APNS_SANDBOX, APNS_VOIP, APNS_VOIP_SANDBOX, ADM, SMS, VOICE, EMAIL, BAIDU, CUSTOM
      context: {
        "__string" => "__string",
      },
      raw_content: "__string",
      substitutions: {
        "__string" => ["__string"],
      },
      title_override: "__string",
    },
  },
  context: {
    "__string" => "__string",
  },
  endpoints: {
    "__string" => {
      body_override: "__string",
      context: {
        "__string" => "__string",
      },
      raw_content: "__string",
      substitutions: {
        "__string" => ["__string"],
      },
      title_override: "__string",
    },
  },
  message_configuration: { # required
    adm_message: {
      action: "OPEN_APP", # accepts OPEN_APP, DEEP_LINK, URL
      body: "__string",
      consolidation_key: "__string",
      data: {
        "__string" => "__string",
      },
      expires_after: "__string",
      icon_reference: "__string",
      image_icon_url: "__string",
      image_url: "__string",
      md5: "__string",
      raw_content: "__string",
      silent_push: false,
      small_image_icon_url: "__string",
      sound: "__string",
      substitutions: {
        "__string" => ["__string"],
      },
      title: "__string",
      url: "__string",
    },
    apns_message: {
      apns_push_type: "__string",
      action: "OPEN_APP", # accepts OPEN_APP, DEEP_LINK, URL
      badge: 1,
      body: "__string",
      category: "__string",
      collapse_id: "__string",
      data: {
        "__string" => "__string",
      },
      media_url: "__string",
      preferred_authentication_method: "__string",
      priority: "__string",
      raw_content: "__string",
      silent_push: false,
      sound: "__string",
      substitutions: {
        "__string" => ["__string"],
      },
      thread_id: "__string",
      time_to_live: 1,
      title: "__string",
      url: "__string",
    },
    baidu_message: {
      action: "OPEN_APP", # accepts OPEN_APP, DEEP_LINK, URL
      body: "__string",
      data: {
        "__string" => "__string",
      },
      icon_reference: "__string",
      image_icon_url: "__string",
      image_url: "__string",
      raw_content: "__string",
      silent_push: false,
      small_image_icon_url: "__string",
      sound: "__string",
      substitutions: {
        "__string" => ["__string"],
      },
      time_to_live: 1,
      title: "__string",
      url: "__string",
    },
    default_message: {
      body: "__string",
      substitutions: {
        "__string" => ["__string"],
      },
    },
    default_push_notification_message: {
      action: "OPEN_APP", # accepts OPEN_APP, DEEP_LINK, URL
      body: "__string",
      data: {
        "__string" => "__string",
      },
      silent_push: false,
      substitutions: {
        "__string" => ["__string"],
      },
      title: "__string",
      url: "__string",
    },
    email_message: {
      body: "__string",
      feedback_forwarding_address: "__string",
      from_address: "__string",
      raw_email: {
        data: "data",
      },
      reply_to_addresses: ["__string"],
      simple_email: {
        html_part: {
          charset: "__string",
          data: "__string",
        },
        subject: {
          charset: "__string",
          data: "__string",
        },
        text_part: {
          charset: "__string",
          data: "__string",
        },
      },
      substitutions: {
        "__string" => ["__string"],
      },
    },
    gcm_message: {
      action: "OPEN_APP", # accepts OPEN_APP, DEEP_LINK, URL
      body: "__string",
      collapse_key: "__string",
      data: {
        "__string" => "__string",
      },
      icon_reference: "__string",
      image_icon_url: "__string",
      image_url: "__string",
      priority: "__string",
      raw_content: "__string",
      restricted_package_name: "__string",
      silent_push: false,
      small_image_icon_url: "__string",
      sound: "__string",
      substitutions: {
        "__string" => ["__string"],
      },
      time_to_live: 1,
      title: "__string",
      url: "__string",
    },
    sms_message: {
      body: "__string",
      keyword: "__string",
      media_url: "__string",
      message_type: "TRANSACTIONAL", # accepts TRANSACTIONAL, PROMOTIONAL
      origination_number: "__string",
      sender_id: "__string",
      substitutions: {
        "__string" => ["__string"],
      },
    },
    voice_message: {
      body: "__string",
      language_code: "__string",
      origination_number: "__string",
      substitutions: {
        "__string" => ["__string"],
      },
      voice_id: "__string",
    },
  },
  template_configuration: {
    email_template: {
      name: "__string",
      version: "__string",
    },
    push_template: {
      name: "__string",
      version: "__string",
    },
    sms_template: {
      name: "__string",
      version: "__string",
    },
    voice_template: {
      name: "__string",
      version: "__string",
    },
  },
  trace_id: "__string",
}

Specifies the configuration and other settings for a message.

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#addressesHash<String,Types::AddressConfiguration>

A map of key-value pairs, where each key is an address and each value is an AddressConfiguration object. An address can be a push notification token, a phone number, or an email address. You can use an AddressConfiguration object to tailor the message for an address by specifying settings such as content overrides and message variables.

Returns:



11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 11787

class MessageRequest < Struct.new(
  :addresses,
  :context,
  :endpoints,
  :message_configuration,
  :template_configuration,
  :trace_id)
  SENSITIVE = []
  include Aws::Structure
end

#contextHash<String,String>

A map of custom attributes to attach to the message. For a push notification, this payload is added to the data.pinpoint object. For an email or text message, this payload is added to email/SMS delivery receipt event attributes.

Returns:

  • (Hash<String,String>)


11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 11787

class MessageRequest < Struct.new(
  :addresses,
  :context,
  :endpoints,
  :message_configuration,
  :template_configuration,
  :trace_id)
  SENSITIVE = []
  include Aws::Structure
end

#endpointsHash<String,Types::EndpointSendConfiguration>

A map of key-value pairs, where each key is an endpoint ID and each value is an EndpointSendConfiguration object. You can use an EndpointSendConfiguration object to tailor the message for an endpoint by specifying settings such as content overrides and message variables.

Returns:



11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 11787

class MessageRequest < Struct.new(
  :addresses,
  :context,
  :endpoints,
  :message_configuration,
  :template_configuration,
  :trace_id)
  SENSITIVE = []
  include Aws::Structure
end

#message_configurationTypes::DirectMessageConfiguration

The settings and content for the default message and any default messages that you defined for specific channels.



11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 11787

class MessageRequest < Struct.new(
  :addresses,
  :context,
  :endpoints,
  :message_configuration,
  :template_configuration,
  :trace_id)
  SENSITIVE = []
  include Aws::Structure
end

#template_configurationTypes::TemplateConfiguration

The message template to use for the message.



11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 11787

class MessageRequest < Struct.new(
  :addresses,
  :context,
  :endpoints,
  :message_configuration,
  :template_configuration,
  :trace_id)
  SENSITIVE = []
  include Aws::Structure
end

#trace_idString

The unique identifier for tracing the message. This identifier is visible to message recipients.

Returns:

  • (String)


11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 11787

class MessageRequest < Struct.new(
  :addresses,
  :context,
  :endpoints,
  :message_configuration,
  :template_configuration,
  :trace_id)
  SENSITIVE = []
  include Aws::Structure
end