Skip to content

Add Permission

sns_add_permission R Documentation

Adds a statement to a topic's access control policy, granting access for the specified Amazon Web Services accounts to the specified actions

Description

Adds a statement to a topic's access control policy, granting access for the specified Amazon Web Services accounts to the specified actions.

To remove the ability to change topic permissions, you must deny permissions to the add_permission, remove_permission, and set_topic_attributes actions in your IAM policy.

Usage

sns_add_permission(TopicArn, Label, AWSAccountId, ActionName)

Arguments

TopicArn

[required] The ARN of the topic whose access control policy you wish to modify.

Label

[required] A unique identifier for the new policy statement.

AWSAccountId

[required] The Amazon Web Services account IDs of the users (principals) who will be given access to the specified actions. The users must have Amazon Web Services account, but do not need to be signed up for this service.

ActionName

[required] The action you want to allow for the specified principal(s).

Valid values: Any Amazon SNS action name, for example publish.

Value

An empty list.

Request syntax

svc$add_permission(
  TopicArn = "string",
  Label = "string",
  AWSAccountId = list(
    "string"
  ),
  ActionName = list(
    "string"
  )
)