add_permission¶
Operation¶
add_permission
async
¶
add_permission(input: AddPermissionInput, plugins: list[Plugin] | None = None) -> AddPermissionOutput
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.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
AddPermissionInput
|
An instance of |
required |
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
AddPermissionOutput
|
An instance of |
Input¶
AddPermissionInput
dataclass
¶
Dataclass for AddPermissionInput structure.
Attributes¶
action_name
class-attribute
instance-attribute
¶
action_name: list[str] | None = None
The action you want to allow for the specified principal(s).
Valid values: Any Amazon SNS action name, for example Publish.
aws_account_id
class-attribute
instance-attribute
¶
aws_account_id: list[str] | None = None
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.
label
class-attribute
instance-attribute
¶
label: str | None = None
A unique identifier for the new policy statement.
topic_arn
class-attribute
instance-attribute
¶
topic_arn: str | None = None
The ARN of the topic whose access control policy you wish to modify.
Output¶
AddPermissionOutput
dataclass
¶
Dataclass for AddPermissionOutput structure.