RemoveGrant

The RemoveGrant action revokes a grant for the specified queue. See Access Control for Queues for more details about grants. Only the owner of the queue or a grantee with FullControl permissions for the queue can add or remove grants. 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 the grant is currently applied to.

Type: String (example: MyQueue)

Yes

Grantee.EmailAddress

The e-mail address of the user who is losing the grant. 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) who is losing the grant. 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 remove.

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 removes ReceiveMessage access rights on the queue named queue2 from the user with the specified e-mail address.