aws-sns-0.1: Bindings for AWS SNS Version 2013-03-31

Stabilityexperimental
MaintainerLars Kuhtz <lars@alephcloud.com>
Safe HaskellNone

Aws.Sns.Commands.Publish

Description

API Version: 2013-03-31

Sends a message to all of a topic's subscribed endpoints. When a messageId is returned, the message has been saved and Amazon SNS will attempt to deliver it to the topic's subscribers shortly. The format of the outgoing message to each subscribed endpoint depends on the notification protocol selected.

To use the Publish action for sending a message to a mobile endpoint, such as an app on a Kindle device or mobile phone, you must specify the EndpointArn. The EndpointArn is returned when making a call with the CreatePlatformEndpoint action. The second example below shows a request and response for publishing to a mobile endpoint.

http://docs.aws.amazon.com/sns/2010-03-31/APIReference/API_Publish.html

Synopsis

Documentation

newtype MessageId Source

Unique identifier assigned to a published message.

Length Constraint: Maximum 100 characters

Constructors

MessageId 

Fields

messageIdText :: Text
 

data Publish Source

Constructors

Publish 

Fields

publishMessage :: !SnsMessage

The message you want to send to the topic.

If you want to send the same message to all transport protocols, include the text of the message as a String value.

If you want to send different messages for each transport protocol add these to the snsMessageMap map.

Constraints: Messages must be UTF-8 encoded strings at most 256 KB in size (262144 bytes, not 262144 characters).

publishMessageAttributes_entry_N :: Maybe ()

Message attributes for Publish action.

publishSubject :: !(Maybe Text)

Optional parameter to be used as the Subject line when the message is delivered to email endpoints. This field will also be included, if present, in the standard JSON messages delivered to other endpoints.

Constraints: Subjects must be ASCII text that begins with a letter, number, or punctuation mark; must not include line breaks or control characters; and must be less than 100 characters long.

publishArn :: !(Either Arn Arn)

Either TopicArn (left) or EndpointArn (right).

data PublishErrors Source

Constructors

PublishAuthorizationError

Indicates that the user has been denied access to the requested resource.

Code 403

PublishInternalError

Indicates an internal service error.

Code 500

PublishInvalidParameter

Indicates that a request parameter does not comply with the associated constraints.

Code 400

PublishEndpointDisabled

Exception error indicating endpoint disabled.

Code 400

PublishInvalidParameterValue

Indicates that a request parameter does not comply with the associated constraints.

Code 400

PublishNotFound

Indicates that the requested resource does not exist.

Code 404

PublishApplicationDisabled

Exception error indicating platform application disabled.

Code 400