Class | Fog::AWS::SNS::Real

In:

lib/fog/aws/requests/sns/add_permission.rb
lib/fog/aws/requests/sns/confirm_subscription.rb
lib/fog/aws/requests/sns/create_topic.rb
lib/fog/aws/requests/sns/delete_topic.rb
lib/fog/aws/requests/sns/get_topic_attributes.rb
lib/fog/aws/requests/sns/list_subscriptions.rb
lib/fog/aws/requests/sns/list_subscriptions_by_topic.rb
lib/fog/aws/requests/sns/list_topics.rb
lib/fog/aws/requests/sns/publish.rb
lib/fog/aws/requests/sns/remove_permission.rb
lib/fog/aws/requests/sns/set_topic_attributes.rb
lib/fog/aws/requests/sns/subscribe.rb
lib/fog/aws/requests/sns/unsubscribe.rb
lib/fog/aws/sns.rb

Parent: | Object

### Methods

add_permission confirm_subscription create_topic delete_topic get_topic_attributes list_subscriptions list_subscriptions_by_topic list_topics new publish reload remove_permission set_topic_attributes subscribe unsubscribe

### Included Modules

Fog::AWS::CredentialFetcher::ConnectionMethods

### Public Class methods

new(options={})

Initialize connection to SNS

#### Notes

options parameter must include values for :aws_access_key_id and :aws_secret_access_key in order to create a connection

#### Examples

      sns = SNS.new(
       :aws_access_key_id => your_aws_access_key_id,
       :aws_secret_access_key => your_aws_secret_access_key
      )

#### Parameters

- options<~Hash> - config arguments for connection. Defaults to {}.

#### Returns

- SNS object with connection to AWS.

### Public Instance methods

add_permission(options = {})
confirm_subscription(arn, token, options = {})

Confirm a subscription

#### Parameters

- arn<~String> - Arn of topic to confirm subscription to
- token<~String> - Token sent to endpoint during subscribe action
- options<~Hash>:
  - AuthenticateOnUnsubscribe<~Boolean> - whether or not unsubscription should be authenticated, defaults to false

#### See Also

docs.amazonwebservices.com/sns/latest/api/API_ConfirmSubscription.html

create_topic(name)

Create a topic

#### Parameters

- name<~String> - Name of topic to create

#### See Also

docs.amazonwebservices.com/sns/latest/api/API_CreateTopic.html

delete_topic(arn)

Delete a topic

#### Parameters

- arn<~String> - The Arn of the topic to delete

#### See Also

docs.amazonwebservices.com/sns/latest/api/API_DeleteTopic.html

get_topic_attributes(arn)

Get attributes of a topic

#### Parameters

- arn<~Hash>: The Arn of the topic to get attributes for

#### See Also

docs.amazonwebservices.com/sns/latest/api/API_GetTopicAttributes.html

list_subscriptions(options = {})

List subscriptions

#### Parameters

- options<~Hash>:
  - ‘NextToken’<~String> - Token returned from previous request, used for pagination

#### See Also

docs.amazonwebservices.com/sns/latest/api/API_ListSubscriptions.html

list_subscriptions_by_topic(arn, options = {})

List subscriptions for a topic

#### Parameters

- arn<~String> - Arn of topic to list subscriptions for
- options<~Hash>:
  - ‘NextToken’<~String> - Token returned from previous request, used for pagination

#### See Also

docs.amazonwebservices.com/sns/latest/api/API_ListSubscriptionsByTopic.html

list_topics(options = {})

List topics

#### Parameters

- options<~Hash>:
  - ‘NextToken’<~String> - Token returned from previous request, used for pagination

#### See Also

docs.amazonwebservices.com/sns/latest/api/API_ListTopics.html

publish(arn, message, options = {})

Send a message to a topic

#### Parameters

- arn<~String> - Arn of topic to send message to
- message<~String> - Message to send to topic
- options<~Hash>:
  - MessageStructure<~String> - message structure, in [‘json’]
  - Subject<~String> - value to use for subject when delivering by email

#### See Also

docs.amazonwebservices.com/sns/latest/api/API_Publish.html

reload()
remove_permission(options = {})
set_topic_attributes(arn, attribute_name, attribute_value)

Set attributes of a topic

#### Parameters

- arn<~Hash> - The Arn of the topic to get attributes for
- attribute_name<~String> - Name of attribute to set, in [‘DisplayName’, ‘Policy’]
- attribute_value<~String> - Value to set attribute to

#### See Also

docs.amazonwebservices.com/sns/latest/api/API_SetTopicAttributes.html

subscribe(arn, endpoint, protocol)

Create a subscription

#### Parameters

- arn<~String> - Arn of topic to subscribe to
- endpoint<~String> - Endpoint to notify
- protocol<~String> - Protocol to notify endpoint with, in [‘email’, ‘email-json’, ‘http’, ‘https’, ‘sqs’]

#### See Also

docs.amazonwebservices.com/sns/latest/api/API_Subscribe.html

unsubscribe(arn)

Delete a subscription

#### Parameters

- arn<~String> - Arn of subscription to delete

#### See Also

docs.amazonwebservices.com/sns/latest/api/API_Unsubscribe.html

[Validate]