Class: Aws::Pinpoint::Types::APNSMessage
- Inherits:
-
Struct
- Object
- Struct
- Aws::Pinpoint::Types::APNSMessage
- Includes:
- Structure
- Defined in:
- lib/aws-sdk-pinpoint/types.rb
Overview
When making an API call, you may pass APNSMessage data as a hash:
{
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",
}
APNS Message.
Instance Attribute Summary collapse
-
#action ⇒ String
The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background.
-
#badge ⇒ Integer
Include this key when you want the system to modify the badge of your app icon.
-
#body ⇒ String
The message body of the notification.
-
#category ⇒ String
Provide this key with a string value that represents the notification’s type.
-
#collapse_id ⇒ String
An ID that, if assigned to multiple messages, causes APNs to coalesce the messages into a single push notification instead of delivering each message individually.
-
#data ⇒ Hash<String,String>
The data payload used for a silent push.
-
#media_url ⇒ String
A URL that refers to the location of an image or video that you want to display in the push notification.
-
#preferred_authentication_method ⇒ String
The preferred authentication method, either “CERTIFICATE” or “TOKEN”.
-
#priority ⇒ String
The message priority.
-
#raw_content ⇒ String
The Raw JSON formatted string to be used as the payload.
-
#silent_push ⇒ Boolean
Indicates if the message should display on the users device.
-
#sound ⇒ String
Include this key when you want the system to play a sound.
-
#substitutions ⇒ Hash<String,Array<String>>
Default message substitutions.
-
#thread_id ⇒ String
Provide this key with a string value that represents the app-specific identifier for grouping notifications.
-
#time_to_live ⇒ Integer
The length of time (in seconds) that APNs stores and attempts to deliver the message.
-
#title ⇒ String
The message title that displays above the message on the user’s device.
-
#url ⇒ String
The URL to open in the user’s mobile browser.
Instance Attribute Details
#action ⇒ String
The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user’s device launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK | URL
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 521 class APNSMessage < Struct.new( :action, :badge, :body, :category, :collapse_id, :data, :media_url, :preferred_authentication_method, :priority, :raw_content, :silent_push, :sound, :substitutions, :thread_id, :time_to_live, :title, :url) include Aws::Structure end |
#badge ⇒ Integer
Include this key when you want the system to modify the badge of your app icon. If this key is not included in the dictionary, the badge is not changed. To remove the badge, set the value of this key to 0.
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 521 class APNSMessage < Struct.new( :action, :badge, :body, :category, :collapse_id, :data, :media_url, :preferred_authentication_method, :priority, :raw_content, :silent_push, :sound, :substitutions, :thread_id, :time_to_live, :title, :url) include Aws::Structure end |
#body ⇒ String
The message body of the notification.
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 521 class APNSMessage < Struct.new( :action, :badge, :body, :category, :collapse_id, :data, :media_url, :preferred_authentication_method, :priority, :raw_content, :silent_push, :sound, :substitutions, :thread_id, :time_to_live, :title, :url) include Aws::Structure end |
#category ⇒ String
Provide this key with a string value that represents the notification’s type. This value corresponds to the value in the identifier property of one of your app’s registered categories.
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 521 class APNSMessage < Struct.new( :action, :badge, :body, :category, :collapse_id, :data, :media_url, :preferred_authentication_method, :priority, :raw_content, :silent_push, :sound, :substitutions, :thread_id, :time_to_live, :title, :url) include Aws::Structure end |
#collapse_id ⇒ String
An ID that, if assigned to multiple messages, causes APNs to coalesce the messages into a single push notification instead of delivering each message individually. The value must not exceed 64 bytes. Amazon Pinpoint uses this value to set the apns-collapse-id request header when it sends the message to APNs.
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 521 class APNSMessage < Struct.new( :action, :badge, :body, :category, :collapse_id, :data, :media_url, :preferred_authentication_method, :priority, :raw_content, :silent_push, :sound, :substitutions, :thread_id, :time_to_live, :title, :url) include Aws::Structure end |
#data ⇒ Hash<String,String>
The data payload used for a silent push. This payload is added to the notifications’ data.pinpoint.jsonBody’ object
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 521 class APNSMessage < Struct.new( :action, :badge, :body, :category, :collapse_id, :data, :media_url, :preferred_authentication_method, :priority, :raw_content, :silent_push, :sound, :substitutions, :thread_id, :time_to_live, :title, :url) include Aws::Structure end |
#media_url ⇒ String
A URL that refers to the location of an image or video that you want to display in the push notification.
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 521 class APNSMessage < Struct.new( :action, :badge, :body, :category, :collapse_id, :data, :media_url, :preferred_authentication_method, :priority, :raw_content, :silent_push, :sound, :substitutions, :thread_id, :time_to_live, :title, :url) include Aws::Structure end |
#preferred_authentication_method ⇒ String
The preferred authentication method, either “CERTIFICATE” or “TOKEN”
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 521 class APNSMessage < Struct.new( :action, :badge, :body, :category, :collapse_id, :data, :media_url, :preferred_authentication_method, :priority, :raw_content, :silent_push, :sound, :substitutions, :thread_id, :time_to_live, :title, :url) include Aws::Structure end |
#priority ⇒ String
The message priority. Amazon Pinpoint uses this value to set the apns-priority request header when it sends the message to APNs. Accepts the following values: “5” - Low priority. Messages might be delayed, delivered in groups, and throttled. “10” - High priority. Messages are sent immediately. High priority messages must cause an alert, sound, or badge on the receiving device. The default value is “10”. The equivalent values for FCM or GCM messages are “normal” and “high”. Amazon Pinpoint accepts these values for APNs messages and converts them. For more information about the apns-priority parameter, see Communicating with APNs in the APNs Local and Remote Notification Programming Guide.
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 521 class APNSMessage < Struct.new( :action, :badge, :body, :category, :collapse_id, :data, :media_url, :preferred_authentication_method, :priority, :raw_content, :silent_push, :sound, :substitutions, :thread_id, :time_to_live, :title, :url) include Aws::Structure end |
#raw_content ⇒ String
The Raw JSON formatted string to be used as the payload. This value overrides the message.
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 521 class APNSMessage < Struct.new( :action, :badge, :body, :category, :collapse_id, :data, :media_url, :preferred_authentication_method, :priority, :raw_content, :silent_push, :sound, :substitutions, :thread_id, :time_to_live, :title, :url) include Aws::Structure end |
#silent_push ⇒ Boolean
Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 521 class APNSMessage < Struct.new( :action, :badge, :body, :category, :collapse_id, :data, :media_url, :preferred_authentication_method, :priority, :raw_content, :silent_push, :sound, :substitutions, :thread_id, :time_to_live, :title, :url) include Aws::Structure end |
#sound ⇒ String
Include this key when you want the system to play a sound. The value of this key is the name of a sound file in your app’s main bundle or in the Library/Sounds folder of your app’s data container. If the sound file cannot be found, or if you specify defaultfor the value, the system plays the default alert sound.
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 521 class APNSMessage < Struct.new( :action, :badge, :body, :category, :collapse_id, :data, :media_url, :preferred_authentication_method, :priority, :raw_content, :silent_push, :sound, :substitutions, :thread_id, :time_to_live, :title, :url) include Aws::Structure end |
#substitutions ⇒ Hash<String,Array<String>>
Default message substitutions. Can be overridden by individual address substitutions.
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 521 class APNSMessage < Struct.new( :action, :badge, :body, :category, :collapse_id, :data, :media_url, :preferred_authentication_method, :priority, :raw_content, :silent_push, :sound, :substitutions, :thread_id, :time_to_live, :title, :url) include Aws::Structure end |
#thread_id ⇒ String
Provide this key with a string value that represents the app-specific identifier for grouping notifications. If you provide a Notification Content app extension, you can use this value to group your notifications together.
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 521 class APNSMessage < Struct.new( :action, :badge, :body, :category, :collapse_id, :data, :media_url, :preferred_authentication_method, :priority, :raw_content, :silent_push, :sound, :substitutions, :thread_id, :time_to_live, :title, :url) include Aws::Structure end |
#time_to_live ⇒ Integer
The length of time (in seconds) that APNs stores and attempts to deliver the message. If the value is 0, APNs does not store the message or attempt to deliver it more than once. Amazon Pinpoint uses this value to set the apns-expiration request header when it sends the message to APNs.
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 521 class APNSMessage < Struct.new( :action, :badge, :body, :category, :collapse_id, :data, :media_url, :preferred_authentication_method, :priority, :raw_content, :silent_push, :sound, :substitutions, :thread_id, :time_to_live, :title, :url) include Aws::Structure end |
#title ⇒ String
The message title that displays above the message on the user’s device.
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 521 class APNSMessage < Struct.new( :action, :badge, :body, :category, :collapse_id, :data, :media_url, :preferred_authentication_method, :priority, :raw_content, :silent_push, :sound, :substitutions, :thread_id, :time_to_live, :title, :url) include Aws::Structure end |
#url ⇒ String
The URL to open in the user’s mobile browser. Used if the value for Action is URL.
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 521 class APNSMessage < Struct.new( :action, :badge, :body, :category, :collapse_id, :data, :media_url, :preferred_authentication_method, :priority, :raw_content, :silent_push, :sound, :substitutions, :thread_id, :time_to_live, :title, :url) include Aws::Structure end |