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

included, #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

  autoload :Client, 'aws/sns/client'
  autoload :Errors, 'aws/sns/errors'
  autoload :Policy, 'aws/sns/policy'
  autoload :HasDeliveryPolicy, 'aws/sns/has_delivery_policy'
  autoload :Request, 'aws/sns/request'
  autoload :Subscription, 'aws/sns/subscription'
  autoload :SubscriptionCollection, 'aws/sns/subscription_collection'
  autoload :Topic, 'aws/sns/topic'
  autoload :TopicCollection, 'aws/sns/topic_collection'
  autoload :TopicSubscriptionCollection, 'aws/sns/topic_subscription_collection'

  include Core::ServiceInterface

  endpoint_prefix 'sns'

  # @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