You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::SNS::Subscription

Inherits:
Resources::Resource show all
Defined in:
(unknown)

Instance Attribute Summary collapse

Attributes inherited from Resources::Resource

#client, #identifiers

Instance Method Summary collapse

Methods inherited from Resources::Resource

add_data_attribute, add_identifier, #data, data_attributes, #data_loaded?, identifiers, #load, #wait_until

Methods included from Resources::OperationMethods

#add_batch_operation, #add_operation, #batch_operation, #batch_operation_names, #batch_operations, #operation, #operation_names, #operations

Constructor Details

#initialize(arn, options = {}) ⇒ Object #initialize(options = {}) ⇒ Object

Overloads:

  • #initialize(arn, options = {}) ⇒ Object

    Parameters:

    • arn (String)

    Options Hash (options):

    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

  • #initialize(options = {}) ⇒ Object

    Options Hash (options):

    • :arn (required, String)
    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

Instance Attribute Details

#arnString (readonly)

Returns:

  • (String)

#attributesHash<String,String> (readonly)

A map of the subscription\'s attributes. Attributes in this map include the following:

  • SubscriptionArn -- the subscription\'s ARN

  • TopicArn -- the topic ARN that the subscription is associated with

  • Owner -- the AWS account ID of the subscription\'s owner

  • ConfirmationWasAuthenticated -- true if the subscription confirmation request was authenticated

  • DeliveryPolicy -- the JSON serialization of the subscription\'s delivery policy

  • EffectiveDeliveryPolicy -- the JSON serialization of the effective delivery policy that takes into account the topic delivery policy and account system defaults

Returns:

  • (Hash<String,String>)

    A map of the subscription\'s attributes.

Instance Method Details

#deleteStruct

Deletes a subscription. If the subscription requires authentication for deletion, only the owner of the subscription or the topic's owner can unsubscribe, and an AWS signature is required. If the Unsubscribe call does not require authentication and the requester is not the subscription owner, a final cancellation message is delivered to the endpoint, so that the endpoint owner can easily resubscribe to the topic if the Unsubscribe request was unintended.

Examples:

Request syntax example with placeholder values


subscription.delete()

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#set_attributes(options = {}) ⇒ Struct

Allows a subscription owner to set an attribute of the topic to a new value.

Examples:

Request syntax example with placeholder values


subscription.set_attributes({
  attribute_name: "attributeName", # required
  attribute_value: "attributeValue",
})

Options Hash (options):

  • :attribute_name (required, String)

    The name of the attribute you want to set. Only a subset of the subscriptions attributes are mutable.

    Valid values: DeliveryPolicy | RawMessageDelivery

  • :attribute_value (String)

    The new value for the attribute in JSON format.

Returns:

  • (Struct)

    Returns an empty response.

See Also: