Description Usage Arguments Details Value Author(s) References See Also Examples
Subscribes an endpoint to the specified SNS topic.
1 2 3 | subscribe(topic, endpoint, protocol, ...)
unsubscribe(subscription, ...)
|
topic |
A character string containing an SNS Topic Amazon Resource Name (ARN). |
endpoint |
A character string containing the endpoint to be subscribed (e.g., an email address). |
protocol |
The allowed protocol types are: default, email, email-json, sqs, sms, http, https, and application. |
... |
Additional arguments passed to |
subscription |
A character string containing an SNS Subscription Amazon Resource Name (ARN). |
subscribe
initiates a subscription of an endpoint to an SNS topic. For example, this is used to add an email address endpoint to a topic. Subscriptions need to be confirmed by the endpoint. For example, an SMS endpoint will require an SMS response to an subscription invitation message. Subscriptions can be removed using unsubscribe
(or whatever method is described in the invitation message); thus subscriptions can be handled by both users and administrator (you).
unsubscribe
unsubscribes an endpoint from an SNS topic.
If successful, a character string containing a subscription ARN. 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 | ## Not run:
top <- create_topic("new_topic")
# email subscription
subscribe(top, "example@example.com", protocol = "email")
# sms subscription
subscribe(top, "555-123-4567", protocol = "sms")
delete_topic(top)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.