The ListGrants action lists the grants (permissions) for the use of this queue. Only the owner of the queue or a user with FullControl permission can use the ListGrants action.
Returns Success and a list of grants assigned to the specified user. It returns an error message if unsuccessful.
| Name | Description | Type | Value |
|---|---|---|---|
QueueName | Specifies the queue to apply the grant to. | Required. The name of the queue, as specified when the queue was created. | MyQueue |
Grantee.EmailAddress | The email address of the user receiving the grant. | String | email_alias@server_domain.com |
Permission | If specified, the type of grant, or permission, to list for the specified grantee. See Access Control Overview for a list of available grants. | Optional. String. | ReceiveMessage |
The following request lists all the ReceiveMessage grants for the user with the specified email address
<soapenv:Body>
<ac:ListGrants xmlns:ac="http://access.amazonaws.com/doc/2006-01-01/">
<ac:Request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ac:Grantee xsi:type="ac:AmazonCustomerByEmail">
<ac:EmailAddress>chriscustomer@email.com</ac:EmailAddress>
</ac:Grantee>
<ac:Permission>ReceiveMessage</ac:Permission>
</ac:Request>
</ac:ListGrants>
</soapenv:Body>If the Permission is omitted from the request, all the grants for a user are listed. The following request lists all the grants for the user identified by the specified Canonical User ID.
<soapenv:Body>
<ac:ListGrants xmlns:ac="http://access.amazonaws.com/doc/2006-01-01/">
<ac:Request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ac:Grantee xsi:type="ac:CanonicalUser">
<ac:ID>93ddb081b6ca9f35fbf3626dde06b73854d43b9a7b6305201550c90aa7bd1eef</ac:ID>
</ac:Grantee>
</ac:Request>
</ac:ListGrants>
</soapenv:Body>
If both the Permission and the Grantee are omitted from the request, all the grants for all the users are listed. The following request lists all the grants on the queue specified.
<soapenv:Body>
<ac:ListGrants xmlns:ac="http://access.amazonaws.com/doc/2006-01-01/">
<ac:Request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
</ac:Request>
</ac:ListGrants>
</soapenv:Body>
<ListGrantsResponse xmlns="http://access.amazonaws.com/doc/2006-01-01/">
<GrantList>
<Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser">
<ID>79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be</ID>
<DisplayName>filesinc</DisplayName>
</Grantee>
<Permission>ReceiveMessage</Permission>
</GrantList>
<GrantList>
<Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser">
<ID>a9a7b886d6fd24a52fe8ca5bef65f89a64e0193f23000e241bf9b1c61be666e9</ID>
<DisplayName>chriscustomer</DisplayName>
</Grantee>
<Permission>FullControl</Permission>
</GrantList>
<ResponseStatus>
<StatusCode>Success</StatusCode>
</ResponseStatus>
</ListGrantsResponse>