Menu
Amazon Simple Notification Service
CLI Reference (API Version 2010-03-31)

sns-add-permission

The Amazon SNS CLI has been deprecated and is no longer supported. Please use the AWS Unified CLI or the AWS Tools for Windows PowerShell instead. To map the old SNS CLI commands to the AWS Unified CLI or PowerShell, see Migrating Amazon SNS CLI Commands to AWS CLI and PowerShell Commands.


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