Amazon Simple Notification Service (Amazon SNS) is a web service that enables you to build distributed web-enabled applications. Applications can use Amazon SNS to easily push real-time notification messages to interested subscribers over multiple delivery protocols. For more information about this product see https://aws.amazon.com/sns. For detailed information about Amazon SNS features and their associated API calls, see the Amazon SNS Developer Guide.
For information on the permissions you need to use this API, see Identity and access management in Amazon SNS in the Amazon SNS Developer Guide.
We also provide SDKs that enable you to access Amazon SNS from your preferred programming language. The SDKs contain functionality that automatically takes care of tasks such as: cryptographically signing your service requests, retrying requests, and handling error responses. For a list of available SDKs, go to Tools for Amazon Web Services.
sns(config = list())
A client for the service. You can call the service's operations using
syntax like svc$operation(...)
, where svc
is the name you've assigned
to the client. The available operations are listed in the
Operations section.
Optional configuration of credentials, endpoint, and/or region.
svc <- sns(
config = list(
credentials = list(
creds = list(
access_key_id = "string",
secret_access_key = "string",
session_token = "string"
),
profile = "string"
),
endpoint = "string",
region = "string"
)
)
add_permission | Adds a statement to a topic's access control policy, granting access for the specified AWS accounts to the specified actions |
check_if_phone_number_is_opted_out | Accepts a phone number and indicates whether the phone holder has opted out of receiving SMS messages from your account |
confirm_subscription | Verifies an endpoint owner's intent to receive messages by validating the token sent to the endpoint by an earlier Subscribe action |
create_platform_application | Creates a platform application object for one of the supported push notification services, such as APNS and GCM (Firebase Cloud Messaging), to which devices and mobile apps may register |
create_platform_endpoint | Creates an endpoint for a device and mobile app on one of the supported push notification services, such as GCM (Firebase Cloud Messaging) and APNS |
create_topic | Creates a topic to which notifications can be published |
delete_endpoint | Deletes the endpoint for a device and mobile app from Amazon SNS |
delete_platform_application | Deletes a platform application object for one of the supported push notification services, such as APNS and GCM (Firebase Cloud Messaging) |
delete_topic | Deletes a topic and all its subscriptions |
get_endpoint_attributes | Retrieves the endpoint attributes for a device on one of the supported push notification services, such as GCM (Firebase Cloud Messaging) and APNS |
get_platform_application_attributes | Retrieves the attributes of the platform application object for the supported push notification services, such as APNS and GCM (Firebase Cloud Messaging) |
get_sms_attributes | Returns the settings for sending SMS messages from your account |
get_subscription_attributes | Returns all of the properties of a subscription |
get_topic_attributes | Returns all of the properties of a topic |
list_endpoints_by_platform_application | Lists the endpoints and endpoint attributes for devices in a supported push notification service, such as GCM (Firebase Cloud Messaging) and APNS |
list_phone_numbers_opted_out | Returns a list of phone numbers that are opted out, meaning you cannot send SMS messages to them |
list_platform_applications | Lists the platform application objects for the supported push notification services, such as APNS and GCM (Firebase Cloud Messaging) |
list_subscriptions | Returns a list of the requester's subscriptions |
list_subscriptions_by_topic | Returns a list of the subscriptions to a specific topic |
list_tags_for_resource | List all tags added to the specified Amazon SNS topic |
list_topics | Returns a list of the requester's topics |
opt_in_phone_number | Use this request to opt in a phone number that is opted out, which enables you to resume sending SMS messages to the number |
publish | Sends a message to an Amazon SNS topic, a text message (SMS message) directly to a phone number, or a message to a mobile platform endpoint (when you specify the TargetArn) |
remove_permission | Removes a statement from a topic's access control policy |
set_endpoint_attributes | Sets the attributes for an endpoint for a device on one of the supported push notification services, such as GCM (Firebase Cloud Messaging) and APNS |
set_platform_application_attributes | Sets the attributes of the platform application object for the supported push notification services, such as APNS and GCM (Firebase Cloud Messaging) |
set_sms_attributes | Use this request to set the default settings for sending SMS messages and receiving daily SMS usage reports |
set_subscription_attributes | Allows a subscription owner to set an attribute of the subscription to a new value |
set_topic_attributes | Allows a topic owner to set an attribute of the topic to a new value |
subscribe | Subscribes an endpoint to an Amazon SNS topic |
tag_resource | Add tags to the specified Amazon SNS topic |
unsubscribe | Deletes a subscription |
untag_resource | Remove tags from the specified Amazon SNS topic |
if (FALSE) {
svc <- sns()
svc$add_permission(
Foo = 123
)
}
Run the code above in your browser using DataLab