Class: AWS::SNS::SubscriptionCollection

Inherits:
Object
  • Object
show all
Includes:
Core::Collection::WithNextToken
Defined in:
lib/aws/sns/subscription_collection.rb

Overview

Represents the collection of all subscriptions for the AWS account. For example:

# get the ARNs of all SQS queues with subscriptions to topics
# owned by this account
topic.subscriptions.
  select { |s| s.protocol == :sqs }.
  collect(&:endpoint)

Direct Known Subclasses

TopicSubscriptionCollection

Instance Method Summary collapse

Methods included from Core::Collection

#each, #each_batch, #enum, #first, #in_groups_of, #page

Instance Method Details

#[](arn) ⇒ Subscription

Returns a subscription with the given ARN. This does not make a request to AWS.

Parameters:

  • arn (String)

    The subscription ARN.

Returns:



34
35
36
# File 'lib/aws/sns/subscription_collection.rb', line 34

def [] arn
  Subscription.new(arn, :config => config)
end