You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::Pinpoint::Types::APNSMessage

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

Instance Attribute Details

#actionString

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

Returns:

  • (String)


495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 495

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

#badgeInteger

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.

Returns:

  • (Integer)


495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 495

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

#bodyString

The message body of the notification, the email body or the text message.

Returns:

  • (String)


495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 495

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

#categoryString

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.

Returns:

  • (String)


495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 495

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_idString

Multiple notifications with the same collapse identifier are displayed to the user as a single notification. The value of this key must not exceed 64 bytes.

Returns:

  • (String)


495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 495

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

#dataHash<String,String>

Returns:

  • (Hash<String,String>)


495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 495

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_urlString

The URL that points to a video used in the push notification.

Returns:

  • (String)


495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 495

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_methodString

The preferred authentication method, either "CERTIFICATE" or "TOKEN"

Returns:

  • (String)


495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 495

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

#priorityString

Is this a transaction priority message or lower priority.

Returns:

  • (String)


495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 495

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_contentString

The Raw JSON formatted string to be used as the payload. This value overrides the message.

Returns:

  • (String)


495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 495

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_pushBoolean

Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.

Returns:

  • (Boolean)


495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 495

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

#soundString

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.

Returns:

  • (String)


495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 495

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

#substitutionsHash<String,Array<String>>

Returns:

  • (Hash<String,Array<String>>)


495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 495

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_idString

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.

Returns:

  • (String)


495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 495

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_liveInteger

This parameter specifies how long (in seconds) the message should be kept if APNS is unable to deliver the notification the first time. If the value is 0, APNS treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to APNS

Returns:

  • (Integer)


495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 495

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

#titleString

The message title that displays above the message on the user's device.

Returns:

  • (String)


495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 495

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

#urlString

The URL to open in the user's mobile browser. Used if the value for Action is URL.

Returns:

  • (String)


495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 495

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