Class: AWS::SNS

Inherits:
Object
  • Object
show all
Includes:
Core::ServiceInterface
Defined in:
lib/aws/sns.rb,
lib/aws/sns/topic.rb,
lib/aws/sns/client.rb,
lib/aws/sns/errors.rb,
lib/aws/sns/policy.rb,
lib/aws/sns/request.rb,
lib/aws/sns/subscription.rb,
lib/aws/sns/topic_collection.rb,
lib/aws/sns/has_delivery_policy.rb,
lib/aws/sns/subscription_collection.rb,
lib/aws/sns/topic_subscription_collection.rb

Overview

This class is the starting point for working with Amazon Simple Notification Service (SNS).

To use Amazon SNS you must first sign up here.

For more information about Amazon SNS:

Credentials

You can setup default credentials for all AWS services via AWS.config:

AWS.config(
  :access_key_id => 'YOUR_ACCESS_KEY_ID',
  :secret_access_key => 'YOUR_SECRET_ACCESS_KEY')

Or you can set them directly on the SNS interface:

sns = AWS::SNS.new(
  :access_key_id => 'YOUR_ACCESS_KEY_ID',
  :secret_access_key => 'YOUR_SECRET_ACCESS_KEY')

Defined Under Namespace

Modules: Errors, HasDeliveryPolicy Classes: Client, Policy, Subscription, SubscriptionCollection, Topic, TopicCollection, TopicSubscriptionCollection

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::ServiceInterface

#initialize, #inspect

Instance Attribute Details

#clientClient (readonly)

Returns the low-level SNS client object.

Returns:

  • (Client)

    the low-level SNS client object



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/aws/sns.rb', line 46

class SNS

  AWS.register_autoloads(self) do
    autoload :Client,                      'client'
    autoload :Errors,                      'errors'
    autoload :Policy,                      'policy'
    autoload :HasDeliveryPolicy,           'has_delivery_policy'
    autoload :Request,                     'request'
    autoload :Subscription,                'subscription'
    autoload :SubscriptionCollection,      'subscription_collection'
    autoload :Topic,                       'topic'
    autoload :TopicCollection,             'topic_collection'
    autoload :TopicSubscriptionCollection, 'topic_subscription_collection'
  end

  include Core::ServiceInterface

  # @return [TopicCollection] Returns a topic collection for managing
  #   SNS topics.
  def topics
    TopicCollection.new(:config => config)
  end

  # @return [SubscriptionCollection] Returns a subscription
  #   collection for managing SNS subscriptions.
  def subscriptions
    SubscriptionCollection.new(:config => config)
  end

end

Instance Method Details

#subscriptionsSubscriptionCollection

Returns a subscription collection for managing SNS subscriptions.

Returns:



71
72
73
# File 'lib/aws/sns.rb', line 71

def subscriptions
  SubscriptionCollection.new(:config => config)
end

#topicsTopicCollection

Returns a topic collection for managing SNS topics.

Returns:

  • (TopicCollection)

    Returns a topic collection for managing SNS topics.



65
66
67
# File 'lib/aws/sns.rb', line 65

def topics
  TopicCollection.new(:config => config)
end