sns {paws}R Documentation

Amazon Simple Notification Service

Description

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 the Amazon SNS product page. 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.

Usage

sns(config = list(), credentials = list(), endpoint = NULL, region = NULL)

Arguments

config

Optional configuration of credentials, endpoint, and/or region.

  • credentials:

    • creds:

      • access_key_id: AWS access key ID

      • secret_access_key: AWS secret access key

      • session_token: AWS temporary session token

    • profile: The name of a profile to use. If not given, then the default profile is used.

    • anonymous: Set anonymous credentials.

  • endpoint: The complete URL to use for the constructed client.

  • region: The AWS Region used in instantiating the client.

  • close_connection: Immediately close all HTTP connections.

  • timeout: The time in seconds till a timeout exception is thrown when attempting to make a connection. The default is 60 seconds.

  • s3_force_path_style: Set this to true to force the request to use path-style addressing, i.e. ⁠http://s3.amazonaws.com/BUCKET/KEY⁠.

  • sts_regional_endpoint: Set sts regional endpoint resolver to regional or legacy https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html

credentials

Optional credentials shorthand for the config parameter

  • creds:

    • access_key_id: AWS access key ID

    • secret_access_key: AWS secret access key

    • session_token: AWS temporary session token

  • profile: The name of a profile to use. If not given, then the default profile is used.

  • anonymous: Set anonymous credentials.

endpoint

Optional shorthand for complete URL to use for the constructed client.

region

Optional shorthand for AWS Region used in instantiating the client.

Value

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.

Service syntax

svc <- sns(
  config = list(
    credentials = list(
      creds = list(
        access_key_id = "string",
        secret_access_key = "string",
        session_token = "string"
      ),
      profile = "string",
      anonymous = "logical"
    ),
    endpoint = "string",
    region = "string",
    close_connection = "logical",
    timeout = "numeric",
    s3_force_path_style = "logical",
    sts_regional_endpoint = "string"
  ),
  credentials = list(
    creds = list(
      access_key_id = "string",
      secret_access_key = "string",
      session_token = "string"
    ),
    profile = "string",
    anonymous = "logical"
  ),
  endpoint = "string",
  region = "string"
)

Operations

add_permission Adds a statement to a topic's access control policy, granting access for the specified Amazon Web Services 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 Amazon Web Services 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_sms_sandbox_phone_number Adds a destination phone number to an Amazon Web Services account in the SMS sandbox and sends a one-time password (OTP) to that phone number
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_sms_sandbox_phone_number Deletes an Amazon Web Services account's verified or pending phone number from the SMS sandbox
delete_topic Deletes a topic and all its subscriptions
get_data_protection_policy Retrieves the specified inline DataProtectionPolicy document that is stored in the specified Amazon SNS topic
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 Amazon Web Services account
get_sms_sandbox_account_status Retrieves the SMS sandbox status for the calling Amazon Web Services account in the target Amazon Web Services Region
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_origination_numbers Lists the calling Amazon Web Services account's dedicated origination numbers and their metadata
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_sms_sandbox_phone_numbers Lists the calling Amazon Web Services account's current verified and pending destination phone numbers in the SMS sandbox
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)
publish_batch Publishes up to ten messages to the specified topic
put_data_protection_policy Adds or updates an inline policy document that is stored in the specified Amazon SNS topic
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
verify_sms_sandbox_phone_number Verifies a destination phone number with a one-time password (OTP) for the calling Amazon Web Services account

Examples

## Not run: 
svc <- sns()
svc$add_permission(
  Foo = 123
)

## End(Not run)


[Package paws version 0.6.0 Index]