add_permission
(**kwargs)¶Adds a statement to a topic's access control policy, granting access for the specified Amazon Web Services accounts to the specified actions.
Note
To remove the ability to change topic permissions, you must deny permissions to the AddPermission
, RemovePermission
, and SetTopicAttributes
actions in your IAM policy.
See also: AWS API Documentation
Request Syntax
response = client.add_permission(
TopicArn='string',
Label='string',
AWSAccountId=[
'string',
],
ActionName=[
'string',
]
)
[REQUIRED]
The ARN of the topic whose access control policy you wish to modify.
[REQUIRED]
A unique identifier for the new policy statement.
[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.
[REQUIRED]
The action you want to allow for the specified principal(s).
Valid values: Any Amazon SNS action name, for example Publish
.
None
Exceptions
SNS.Client.exceptions.InvalidParameterException
SNS.Client.exceptions.InternalErrorException
SNS.Client.exceptions.AuthorizationErrorException
SNS.Client.exceptions.NotFoundException