Module Smaws_Client_SQS.AddPermission

val request : Smaws_Lib.Context.t -> add_permission_request -> (unit, [> Smaws_Lib.Protocols.AwsJson.error | `InvalidAddress of invalid_address | `InvalidSecurity of invalid_security | `OverLimit of over_limit | `QueueDoesNotExist of queue_does_not_exist | `RequestThrottled of request_throttled | `UnsupportedOperation of unsupported_operation ]) Stdlib.result

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.