Amazon Simple Notification Service (Amazon SNS) is a web service that makes it easy to set up, operate, and send notifications from the cloud. It provides developers with a highly scalable, flexible, and cost-effective capability to publish messages from an application and immediately deliver them to subscribers or other applications. It is designed to make web-scale computing easier for developers.

Additional Info

Requires Mule Enterprise License

Yes  

Requires Entitlement

No  

Mule Version

3.5.0 or higher

Configs


Configuration

<sns:config>

Connection Management

Attributes

Name Java Type Description Default Value Required

name

String

The name of this configuration. With this name can be later referenced.

x 

accessKey

String

The access key provided by Amazon

x 

secretKey

String

The secret key provided by Amazon

x 

protocol

Protocol

The optional communication protocol to use when sending requests to AWS. Communication over HTTPS is the default

HTTPS

 

proxyHost

String

The optional proxy port

 

proxyPort

Integer

The optional proxy port

 

proxyUsername

String

The optional proxy username

 

proxyPassword

String

The optional proxy password

 

proxyDomain

String

The optional proxy domain

 

proxyWorkstation

String

The optional proxy workstation

 

socketTimeout

Integer

The amount of time to wait (in milliseconds) for data to be transferred over an established, open connection before the connection is timed out. A value of 0 means infinity, and is not recommended.

50000

 

connectionTimeout

Integer

The amount of time to wait (in milliseconds) when initially establishing a connection before giving up and timing out. A value of 0 means infinity, and is not recommended.

50000

 

maxConnections

Integer

Sets the maximum number of allowed open HTTP connections.

50

 

region

RegionEndpoint

Set the topic region endpoint

 

testTopicArn

String

Arn of the topic to test. This is used only to test the connectivity and validate credentials with Amazon SNS.

 

Processors


Add permission

<sns:add-permission>

Adds a statement to a topic's access control policy, granting access for the specified AWS accounts to the specified actions.

API reference

../../../doc/amazon-sns-connector.xml.sample sns:add-permission

XML Sample

<sns:add-permission config-ref="Amazon_SNS">
        <sns:add-permission topicArn="Topic ARN" label="Test SNS"/>
    </sns:add-permission>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

addPermission

AddPermission

Container for the parameters to the AddPermission operation.

#[payload]

 


Confirm subscription

<sns:confirm-subscription>

The ConfirmSubscription action verifies an endpoint owner's intent to receive messages by validating the token sent to the endpoint by an earlier Subscribe action. If the token is valid, the action creates a new subscription and returns its Amazon Resource Name (ARN). This call requires an AWS signature only when the AuthenticateOnUnsubscribe flag is set to "true".

API reference

../../../doc/amazon-sns-connector.xml.sample sns:confirm-subscription

XML Sample

<sns:confirm-subscription  config-ref="Amazon_SNS">
        <sns:confirm-subscription topicArn="SubscriptionARN" token="Token"/>
    </sns:confirm-subscription>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

confirmSubscription

ConfirmSubscription

Container for the parameters to the ConfirmSubscription operation.

#[payload]

 

Returns

Return Java Type Description

String

ARN of the created subscription is returned.


Create platform application

<sns:create-platform-application>

Creates a platform application object for one of the supported push notification services, such as APNS and GCM, to which devices and mobile apps may register.

API reference

../../../doc/amazon-sns-connector.xml.sample sns:create-platform-application

XML Sample

<sns:create-platform-application config-ref="Amazon_SNS">
        <sns:create-platform-application name="gcmpushapp" platform="GCM">
            <sns:attributes ref="platformApplicationRef"/>
        </sns:create-platform-application>
    </sns:create-platform-application>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

createPlatformApplication

CreatePlatformApplication

Container for the parameters to the CreatePlatformApplication operation.

#[payload]

 

Returns

Return Java Type Description

String

ARN of the CreatePlatformApplication is returned.


Create platform endpoint

<sns:create-platform-endpoint>

Creates an endpoint for a device and mobile app on one of the supported push notification services. CreatePlatformEndpoint requires the PlatformApplicationArn that is returned from CreatePlatformApplication.

API reference

../../../doc/amazon-sns-connector.xml.sample sns:create-platform-endpoint

XML Sample

<sns:create-platform-endpoint config-ref="Amazon_SNS">
        <sns:create-platform-endpoint ref="PlatformEndpointRef"/>
    </sns:create-platform-endpoint>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

createPlatformEndpoint

CreatePlatformEndpoint

Container for the parameters to the CreatePlatformEndpoint operation.

#[payload]

 

Returns

Return Java Type Description

String

EndpointArn returned from CreateEndpoint action.


Create topic

<sns:create-topic>

The CreateTopic action creates a topic to which notifications can be published. Users can create at most 100 topics

API reference

../../../doc/amazon-sns-connector.xml.sample sns:create-topic

XML Sample

<sns:create-topic config-ref="Amazon_SNS" topicName="TopicName"/>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

topicName

String

The name of the topic you want to create.

x 

Returns

Return Java Type Description

String

The Amazon Resource Name (ARN) assigned to the created topic.


Delete endpoint

<sns:delete-endpoint>

Deletes the endpoint for a device and mobile app from Amazon SNS.

API reference

../../../doc/amazon-sns-connector.xml.sample sns:delete-endpoint

XML Sample

<sns:delete-endpoint config-ref="Amazon_SNS" endpointArn="EndpointARN"/>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

endpointArn

String

EndpointArn of endpoint to delete.

x 


Delete platform application

<sns:delete-platform-application>

Deletes a platform application object for one of the supported push notification services, such as APNS and GCM.

API reference

../../../doc/amazon-sns-connector.xml.sample sns:delete-platform-application

XML Sample

<sns:delete-platform-application config-ref="Amazon_SNS" platformApplicationArn="PlatformApplicationARN"/>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

platformApplicationArn

String

PlatformApplicationArn of platform application object to delete.

x 


Delete topic

<sns:delete-topic>

The DeleteTopic action deletes a topic and all its subscriptions. Deleting a topic might prevent some messages previously sent to the topic from being delivered to subscribers. This action is idempotent, so deleting a topic that does not exist does not result in an error.

API reference

../../../doc/amazon-sns-connector.xml.sample sns:delete-topic

XML Sample

<sns:delete-topic config-ref="Amazon_SNS" topicArn="TopicARN"/>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

topicArn

String

The ARN of the topic you want to delete.

x 


Get endpoint attributes

<sns:get-endpoint-attributes>

Retrieves the endpoint attributes for a device on one of the supported push notification services, such as GCM and APNS.

API reference

../../../doc/amazon-sns-connector.xml.sample sns:get-endpoint-attributes

XML Sample

<sns:get-endpoint-attributes config-ref="Amazon_SNS" endpointArn="EndpointARN"/>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

endpointArn

String

EndpointArn for GetEndpointAttributes input.

x 

Returns

Return Java Type Description

Map<String,String>

Returns map of attributes that include CustomUserData, Enabled, and Token.


Get platform application attributes

<sns:get-platform-application-attributes>

Retrieves the attributes of the platform application object for the supported push notification services, such as APNS and GCM.

API reference

../../../doc/amazon-sns-connector.xml.sample sns:get-platform-application-attributes

XML Sample

<sns:get-platform-application-attributes config-ref="Amazon_SNS" platformApplicationArn="PlatformApplicationARN"/>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

platformApplicationArn

String

PlatformApplicationArn for GetPlatformApplicationAttributesInput.

x 

Returns

Return Java Type Description

Map<String,String>

Returns map of attributes that include EventEndpointCreated, EventEndpointDeleted, EventEndpointUpdated and EventDeliveryFailure


Get subscription attributes

<sns:get-subscription-attributes>

The GetSubscriptionAttributes action returns all of the properties of a subscription.

API reference

../../../doc/amazon-sns-connector.xml.sample sns:get-subscription-attributes

XML Sample

<sns:get-subscription-attributes config-ref="Amazon_SNS" subscriptionArn="SubscriptionARN"/>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

subscriptionArn

String

The ARN of the subscription whose properties you want to get

x 

Returns

Return Java Type Description

Map<String,String>

A map of the subscription's attributes.


Get topic attributes

<sns:get-topic-attributes>

The GetTopicAttributes action returns all of the properties of a topic. Topic properties returned might differ based on the authorization of the user.

API reference

../../../doc/amazon-sns-connector.xml.sample sns:get-topic-attributes

XML Sample

<sns:get-topic-attributes config-ref="Amazon_SNS" topicArn="TopicARN"/>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

topicArn

String

The ARN of the topic whose properties you want to get.

x 

Returns

Return Java Type Description

Map<String,String>

A map of the topic's attributes.


List endpoints by platform application

<sns:list-endpoints-by-platform-application>

Lists the endpoints and endpoint attributes for devices in a supported push notification service, such as GCM and APNS.

API reference

../../../doc/amazon-sns-connector.xml.sample sns:list-endpoints-by-platform-application

XML Sample

<sns:list-endpoints-by-platform-application config-ref="Amazon_SNS">
        <sns:endpoints-by-platform ref="endpointByPlatformRef"/>
    </sns:list-endpoints-by-platform-application>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

endpointsByPlatform

EndpointsByPlatform

Container for the parameters to the ListEndpointsByPlatformApplication operation.

#[payload]

 

Returns

Return Java Type Description

ListEndpointsByPlatform

Returns a list of the requester's endpoints.


List platform applications

<sns:list-platform-applications>

Lists the platform application objects for the supported push notification services, such as APNS and GCM.

API reference

../../../doc/amazon-sns-connector.xml.sample sns:list-platform-applications

XML Sample

<sns:list-platform-applications config-ref="Amazon_SNS" nextToken="NextToken"/>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

nextToken

String

NextToken string is used when calling ListPlatformApplications action to retrieve additional records that are available after the first page results.

 

Returns

Return Java Type Description

ListPlatformApplications

a list of the requester's PlatformApplications.


List subscriptions

<sns:list-subscriptions>

The ListSubscriptions action returns a list of the requester's subscriptions. Each call returns a limited list of subscriptions, up to 100. If there are more subscriptions, a NextToken is also returned. Use the NextToken parameter in a new ListSubscriptions call to get further results.

API reference

../../../doc/amazon-sns-connector.xml.sample sns:list-subscriptions

XML Sample

<sns:list-subscriptions config-ref="Amazon_SNS" nextToken="NextToken"/>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

nextToken

String

Token returned by the previous ListSubscriptions request

 

Returns

Return Java Type Description

ListSubscriptions

Returns a list of the requester's subscriptions.


List subscriptions by topic

<sns:list-subscriptions-by-topic>

The SubscriptionsByTopic action returns a list of the subscriptions to a specific topic. Each call returns a limited list of subscriptions, up to 100. If there are more subscriptions, a NextToken is also returned. Use the NextToken parameter in a new SubscriptionsByTopic call to get further results.

API reference

../../../doc/amazon-sns-connector.xml.sample sns:list-subscriptions-by-topic

XML Sample

<sns:list-subscriptions-by-topic config-ref="Amazon_SNS">
      <sns:subscriptions-by-topic ref="subscriptionsRef" />
    </sns:list-subscriptions-by-topic>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

subscriptionsByTopic

SubscriptionsByTopic

Container for the parameters to the ListSubscriptionsByTopic operation.

#[payload]

 

Returns

Return Java Type Description

ListSubscriptionsByTopic

Returns a list of the subscriptions to a specific topic.


List topics

<sns:list-topics>

The ListTopics action returns a list of the requester's topics. Each call returns a limited list of topics, up to 100. If there are more topics, a NextToken is also returned. Use the NextToken parameter in a new ListTopics call to get further results.

API reference

../../../doc/amazon-sns-connector.xml.sample sns:list-topics

XML Sample

<sns:list-topics config-ref="Amazon_SNS" nextTopic="Next Topic"/>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

nextTopic

String

Token returned by the previous ListTopics request.

 

Returns

Return Java Type Description

ListTopics

Returns a list of the requester's topics.


Publish

<sns:publish>

The Publish action 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.

API reference

../../../doc/amazon-sns-connector.xml.sample sns:publish

XML Sample

<sns:publish config-ref="Amazon_SNS">
      <sns:publish message="Message" topicArn="TopicARN" subject="Subject" />
    </sns:publish>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

publish

Publish

Container for the parameters to the publish operation.

#[payload]

 

Returns

Return Java Type Description

String

Unique identifier assigned to the published message.


Remove permission

<sns:remove-permission>

The RemovePermission action removes a statement from a topic's access control policy.

API reference

../../../doc/amazon-sns-connector.xml.sample sns:remove-permission

XML Sample

<sns:remove-permission config-ref="Amazon_SNS">
        <sns:remove-permission topicArn="TopicARN" label="Label"/>
    </sns:remove-permission>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

removePermission

RemovePermission

Container for the parameters to the RemovePermission operation.

#[payload]

 


Set endpoint attributes

<sns:set-endpoint-attributes>

Sets the attributes for an endpoint for a device on one of the supported push notification services, such as GCM and APNS.

API reference

../../../doc/amazon-sns-connector.xml.sample sns:set-endpoint-attributes

XML Sample

<sns:set-endpoint-attributes config-ref="Amazon_SNS">
        <sns:endpoint-attributes ref="endpointAttributesRef"/>
    </sns:set-endpoint-attributes>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

endpointAttributes

Endpoint

Container for the parameters to the SetEndpointAttributes operation.

#[payload]

 


Set platform application attributes

<sns:set-platform-application-attributes>

Sets the attributes of the platform application object for the supported push notification services, such as APNS and GCM.

API reference

../../../doc/amazon-sns-connector.xml.sample sns:set-platform-application-attributes

XML Sample

<sns:set-platform-application-attributes config-ref="Amazon_SNS">
        <sns:platform-application-attributes ref="platformApplicationAttributesRef"/>
    </sns:set-platform-application-attributes>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

platformApplicationAttributes

PlatformApplication

Container for the parameters to the SetPlatformApplicationAttributes operation.

#[payload]

 


Set subscription attributes

<sns:set-subscription-attributes>

The SubscriptionAttributes action allows a subscription owner to set an attribute of the topic to a new value.

API reference

../../../doc/amazon-sns-connector.xml.sample sns:set-subscription-attributes

XML Sample

<sns:set-subscription-attributes config-ref="Amazon_SNS">
        <sns:subscription-attributes subscriptionArn="SubscriptionARN" attributeName="DeliveryPolicy"/>
    </sns:set-subscription-attributes>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

subscriptionAttributes

SubscriptionAttributes

Container for the parameters to the SetSubscriptionAttributes operation.

#[payload]

 


Set topic attributes

<sns:set-topic-attributes>

The TopicAttributes action allows a topic owner to set an attribute of the topic to a new value.

API reference

../../../doc/amazon-sns-connector.xml.sample sns:set-topic-attributes

XML Sample

<sns:set-topic-attributes config-ref="Amazon_SNS">
        <sns:topic-attributes topicArn="Topic ARN" attributeName="Policy"/>
    </sns:set-topic-attributes>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

topicAttributes

TopicAttributes

Container for the parameters to the SetTopicAttributes operation.

#[payload]

 


Subscribe

<sns:subscribe>

The Subscribe action prepares to subscribe an endpoint by sending the endpoint a confirmation message. To actually create a subscription, the endpoint owner must call the ConfirmSubscription action with the token from the confirmation message. Confirmation tokens are valid for three days.

API reference

../../../doc/amazon-sns-connector.xml.sample sns:subscribe

XML Sample

<sns:subscribe config-ref="Amazon_SNS">
        <sns:subscribe topicArn="Topic ARN" protocol="HTTP"/>
    </sns:subscribe>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

subscribe

Subscribe

Container for the parameters to the Subscribe operation.

#[payload]

 

Returns

Return Java Type Description

String

The ARN of the subscription, if the service was able to create a subscription immediately (without requiring endpoint owner confirmation).


Unsubscribe

<sns:unsubscribe>

The Unsubscribe action deletes a subscription. If the subscription requires authentication for deletion, only the owner of the subscription or the its topic's owner can unsubscribe, and an AWS signature is required. If the Unsubscribe call does not require authentication and the requester is not the subscription owner, a final cancellation message is delivered to the endpoint, so that the endpoint owner can easily resubscribe to the topic if the Unsubscribe request was unintended.

API reference

../../../doc/amazon-sns-connector.xml.sample sns:unsubscribe

XML Sample

<sns:unsubscribe config-ref="Amazon_SNS" subscriptionArn="SubscriptionARN"/>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

subscriptionArn

String

The ARN of the subscription to be deleted.

x