Amazon Simple Notification Service
CLI Reference (API Version 2010-03-31)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

sns-get-topic-attributes

Description

Returns all the attributes of a topic.

Syntax

sns-get-topic-attributes TopicArn  
      [General Options]

Options

NameDescriptionRequired

TopicArn

The ARN of the topic whose attributes you want to return.

Yes

Output

Returns the following information:

  • topic owner

  • number of pending subscriptions

  • topic policy

  • number of confirmed subscriptions

  • number of deleted subscriptions

  • topic ARN

Examples

Example Request

This example returns a list of attributes from a topic with ARN arn:aws:sns:us-east-1:365928882516:Foo.

$PROMPT> sns-get-topic-attributes arn:aws:sns:us-east-1:365928882516:Foo

Example Response

Owner                   054794666394
SubscriptionsPending    0
Policy                  {"Version":"2008-10-17","Id":"__default_policy_ID",
"Statement":[{"Sid":"__default_statement_ID","Effect":"Allow","Principal":{
"AWS":"*"},"Action":["SNS:Publish","SNS:RemovePermission","SNS:SetTopicAttr
ibutes","SNS:DeleteTopic","SNS:ListSubscriptionsByTopic","SNS:GetTopicAttri
butes","SNS:Receive","SNS:AddPermission","SNS:Subscribe"],"Resource":"arn:a
ws:sns:us-east-1:054794666394:Foo","Condition":{"StringEquals":{"AWS:So
urceOwner":"054794666394"}}}]}
SubscriptionsConfirmed  2
SubscriptionsDeleted    0
TopicArn                arn:aws:sns:us-east-1:054794666394:Foo