AddGrant

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).

NameDescriptionRequired

QueueName

The name of the queue you want to apply the permission to.

Type: String (example: MyQueue)

Yes

Grantee.EmailAddress

The e-mail address of the user receiving the permission. For SOAP requests, see About Specifying Grantees.

Type: String

Condition: Either Grantee.EmailAddress or Grantee.ID is required.

Conditional

Grantee.ID

The ID of the user (returned by ListGrants) receiving the permission. For SOAP requests, see About Specifying Grantees.

Type: String

Condition: Either Grantee.EmailAddress or Grantee.ID is required.

Conditional

Permission

The permission you want to add for the grantee. See Access Control for Queues for a list of available permissions.

Type: String (example: ReceiveMessage)

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.