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

sns-add-permission

Description

Adds a simple allow statement to the topic's access control policy, granting the specific users access to the specified service operations.

Syntax

sns-add-permission TopicArn  
      --aws-account-id  value[,value...]  
      --action-name value[,value...]  
      --label  value  
      [General Options]

Options

NameDescriptionRequired

TopicArn

Topic ARN that the statement will be added to.

Yes

--aws-account-id

AWS Account IDs of the users to whom the statement should apply.

Yes

--action-name

Amazon SNS actions to which the users should be granted access.

Valid values: Publish | Subscribe | Receive

Yes

--label

Short, unique label for the new policy statement.

Yes

Output

Returns a message stating that the request succeeded.

Example

This example grants permission to AWS Account ID 1111-2222-3333 to publish to topic ARN arn:aws:sns:us-east-1:365928882516:Foo.

sns-add-permission arn:aws:sns:us-east-1:365928882516:Foo --label FooPublish --action-name 
Publish --aws-account-id 111122223333