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)
-
(Boolean)- Returns true if the subscriptions have the same
def ==(other) other.kind_of?(Subscription) and other.arn == arn end
def exists?
-
(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 = {})
- 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
- Private: -
def inspect "<#{self.class}:#{arn}>" end
def unsubscribe
-
(nil)-
def unsubscribe client.unsubscribe(:subscription_arn => arn) nil end