class AWS::SNS::TopicSubscriptionCollection

Represents the collection of all subscriptions for a particular topic. For example:

# get the e-mail addressess that receive plain-text
# messages sent to the topic
topic.subscriptions.
  select { |s| s.protocol == :email }.
  map(&:endpoint)

Attributes

topic[R]

@return [Topic] The topic to which all the subscriptions belong.

Public Class Methods

new(topic, opts = {}) click to toggle source

@api private

Calls superclass method AWS::Core::Model::new
# File lib/aws/sns/topic_subscription_collection.rb, line 32
def initialize(topic, opts = {})
  @topic = topic
  super
end

Protected Instance Methods

client_method() click to toggle source
# File lib/aws/sns/topic_subscription_collection.rb, line 43
def client_method
  :list_subscriptions_by_topic
end
request_options() click to toggle source
# File lib/aws/sns/topic_subscription_collection.rb, line 47
def request_options
  { :topic_arn => topic.arn }
end