The AddGrant action gives the specified user permission to access the specified queue. See Access Control for Queues for more details. When specifying the grantee, you can use either the grantee's e-mail address (example: user@example.com) or the user ID returned by a ListGrants request (example: 79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be).
The following table lists the special request parameters the action uses (in addition to the common request parameters listed in Common Request Parameters).
| Name | Description | Required |
|---|---|---|
| The name of the queue you want to apply the permission to. Type: String (example: | Yes |
| The e-mail address of the user receiving the permission. For SOAP requests, see About Specifying Grantees. Type: String Condition: Either | Conditional |
| The ID of the user (returned by Type: String Condition: Either | Conditional |
| The permission you want to add for the grantee. See Access Control for Queues for a list of available permissions. Type: String (example: | Yes |
The response contains no special elements besides the common elements listed in The Structure of a Response.
The action returns no errors besides the common errors listed in Common Errors.
The following example Query request adds a ReceiveMessage permission to the specified queue for the specified user.
http://queue.amazonaws.com/A29E9VSPHGOG23/queue2 ?Action=AddGrant &Version=2007-05-01 &AWSAccessKeyId=0GS7553JW74RRM612K02EXAMPLE &Expires=2007-05-12T12:00:00Z &Signature=Dqlp3Sd6ljTUA9Uf6SGtEExwUQEXAMPLE= &Grantee.EmailAddress=username@example.com &Permission=ReceiveMessage