Stability | experimental |
---|---|
Maintainer | Lars Kuhtz <lars@alephcloud.com> |
Safe Haskell | None |
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
- data SnsMessage = SnsMessage {
- snsMessageDefault :: !Text
- snsMessageMap :: !(Map SnsProtocol Text)
- newtype MessageId = MessageId {}
- snsMessage :: Text -> SnsMessage
- data SqsNotification = SqsNotification {
- sqsNotificationMessageId :: !MessageId
- sqsNotificationTopicArn :: !Arn
- sqsNotificationSubject :: !(Maybe Text)
- sqsNotificationMessage :: !Text
- sqsNotificationTimestamp :: !UTCTime
- sqsNotificationSignatureVersion :: !Text
- sqsNotificationSignature :: !Text
- sqsNotificationSigningCertURL :: !Text
- sqsNotificationUnsubscribeURL :: !Text
- data Publish = Publish {
- publishMessage :: !SnsMessage
- publishMessageAttributes_entry_N :: Maybe ()
- publishSubject :: !(Maybe Text)
- publishArn :: !(Either Arn Arn)
- data PublishResponse = PublishResponse {}
- data PublishErrors
Documentation
data SnsMessage Source
SnsMessage | |
|
Unique identifier assigned to a published message.
Length Constraint: Maximum 100 characters
snsMessage :: Text -> SnsMessageSource
data SqsNotification Source
The format of messages used with SnsProtocolSqs
The format is described informally at
http://docs.aws.amazon.com/sns/latest/dg/SendMessageToSQS.html
Publish | |
|
data PublishResponse Source
PublishResponse | |
|
data PublishErrors Source
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 |