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. If unsuccessful, it returns an error response.
| 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.
http://queue.amazonaws.com/A29E9VSPHGOG23/queue2
?Action=ListGrants
&Version=2006-04-01
&AWSAccessKeyId={ACCESS_KEY_ID]
&Expires=[TIME]
&Signature=[SIGNATURE]
&Grantee.EmailAddress=[EMAIL_ADDRESS]
&Permission=ReceiveMessageIf 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.
http://queue.amazonaws.com/A29E9VSPHGOG23/queue2
?Action=ListGrants
&Version=[VERSION]
&AWSAccessKeyId={ACCESS_KEY_ID]
&Expires=[TIME]
&Signature=[SIGNATURE]
&Grantee.CanonicalUser=93ddb081b6ca9f35fbf3626dde06b73854d43b9a7b6305201550c90aa7bd1eefIf 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 queue specified.
http://service.amazonaws.com/A29E9VSPHGOG23/queue2
?Action=ListGrants
&Version=[VERSION]
&AWSAccessKeyId={ACCESS_KEY_ID]
&Expires=[TIME]
&Signature=[SIGNATURE]<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>