Amazon Web ServicesAmazon SQS message-queue API
AddPermission
Adds a permission to a queue for a specific principal. This allows sharing access to the queue.
When you create a queue, you have full control access rights for the queue. Only you, the owner of the queue, can grant or deny permissions to the queue. For more information about these permissions, see Allow Developers to Write Messages to a Shared Queue in the Amazon SQS Developer Guide.
AddPermission generates a policy for you. You can use
SetQueueAttributes to upload your policy. For more information, see Using Custom Policies with the Amazon SQS Access Policy Language in the Amazon SQS Developer Guide.
An Amazon SQS policy can have a maximum of seven actions per statement.
To remove the ability to change queue permissions, you must deny permission to the AddPermission, RemovePermission, and SetQueueAttributes actions in your IAM policy.
Amazon SQS AddPermission does not support adding a non-account principal.
Cross-account permissions don't apply to this action. For more information, see Grant cross-account permissions to a role and a username in the Amazon SQS Developer Guide.
The complete 23-action Amazon Simple Queue Service API, preserving AWS JSON 1.0, AWS Query compatibility, SigV4, and regional endpoint rules. The web Playground does not yet have an AWS SigV4 and region-selection execution adapter; use the local SDK/CLI to call SQS.
Request
- operationId
AddPermission- Server
https://sqs.{Region}.{PartitionResult#dnsSuffix}- Authentication
- awsSigV4
Request parameters
No URL, query, or header parameters.
Request body
stringrequired
Responses
200
object
Successful response.
error
string
Declared service error
{}