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 

sessionToken

String

 

tryDefaultAWSCredentialsProviderChain

boolean

Set it to true to try first to obtain credentials from AWS environment. See: http://docs.aws.amazon.com/java-sdk/latest/developer-guide/credentials.html#using-the-default-credential-provider-chain

 

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.

 

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

 


Role Configuration

<sns:role-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 

roleARN

String

The Role ARN allows you to cross account access without using security credentials.

x 

tryDefaultAWSCredentialsProviderChain

boolean

Set it to true to try first to obtain credentials from AWS environment. See: http://docs.aws.amazon.com/java-sdk/latest/developer-guide/credentials.html#using-the-default-credential-provider-chain

 

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.

 

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

 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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