Description Usage Arguments Details Value Author(s) References Examples
Publish a message to a specified topic or application endpoint.
1 |
topic |
Optionally, a character string containing an SNS Topic Amazon Resource Name (ARN). Must specify |
endpoint |
Optionally, a character string containing an SNS Application Endpoint ARN. Must specify |
message |
Either a single character string containing a message to be sent to all endpoints, or a named list of messages to be sent to specific endpoints (where the names of each element correspond to endpoints). |
subject |
Optionally, a character string containing a subject line (e.g., to be used for an email endpoint). |
... |
Additional arguments passed to |
Publishes a message to a topic or an application endpoint. Messages can be the same for all endpoints or customized so that, for example, a short 140-character message is sent to SMS endpoints that are subscribed to a topic while longer messages are sent to email endpoints, etc. The allowed message types are: default, email, email-json, sqs, sms, http, https, and application.
If successful, a character string containing a message ID. Otherwise, a data structure of class “aws_error” containing any error message(s) from AWS and information about the request attempt.
Thomas J. Leeper
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
top <- create_topic("new_topic")
# simple notifications
publish(top, message = "This is a notification message", subject = "Notification!")
# endpoint-specific notification
publish(top, message = list(sms = "This is an sms message",
email = "This is an email"),
subject = "Notification!")
delete_topic(top)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.