class AWS::SNS::Subscription

{Topic#confirm_subscription}.
Depending on the endpoint type, you may also need to use
To create a subscription, use the {Topic#subscribe} method.
Represents a subscription of a single endpoint to an SNS topic.

def ==(other)

Returns:
  • (Boolean) - Returns true if the subscriptions have the same
def ==(other)
  other.kind_of?(Subscription) and other.arn == arn
end

def exists?

Returns:
  • (Boolean) - Returns true if the subscription exists.

Other tags:
    Note: - This method requests the entire list of subscriptions
def exists?
  collection =
    if topic
      TopicSubscriptionCollection.new(topic,
                                      :config => config)
    else
      SubscriptionCollection.new(:config => config)
    end
  collection.include?(self)
end

def initialize(arn, opts = {})

Other tags:
    Private: -
def initialize(arn, opts = {})
  @arn = arn
  @topic = opts[:topic]
  @endpoint = opts[:endpoint]
  @protocol = opts[:protocol]
  @owner_id = opts[:owner_id]
  super
end

def inspect

Other tags:
    Private: -
def inspect
  "<#{self.class}:#{arn}>"
end

def unsubscribe

Returns:
  • (nil) -
def unsubscribe
  client.unsubscribe(:subscription_arn => arn)
  nil
end