Gets one or all attributes of a queue. Queues currently have two attributes you can get:
ApproximateNumberOfMessages (see Resources Required to Process Messages for more information)
VisibilityTimeout (see Visibility Timeout for more information)
![]() | Important |
|---|---|
Before the 2007-05-01 release introduced the |
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 attribute you want to get. Setting this value to Type: String Valid values: | Yes |
The following table lists the response elements the action returns (in addition to the common response elements listed in The Structure of a Response). See the Sample Response.
| Name | Description |
|---|---|
| The attribute. Type: String Valid Values: Ancestor: |
| An element containing each attribute's information. Ancestor: Child: |
| The value for the attribute. Type: String Ancestor: |
The following table lists the special errors the action returns (in addition to the common errors listed in Common Errors).
| Error | Description | HTTP Status Code |
|---|---|---|
InvalidAttributeName | Unknown attribute | 400 |
The following example Query request gets all the attribute values for the specified queue.
http://queue.amazon.com/A29E9VSPHGOG23/queue2 ?Action=GetQueueAttributes &Attribute=All &AWSAccessKeyId=0GS7553JW74RRM612K02EXAMPLE &Version=2007-05-01 &Expires=2007-05-12T12:00:00Z &Signature=Dqlp3Sd6ljTUA9Uf6SGtEExwUQEXAMPLE=
<GetQueueAttributesResponse>
<AttributedValue>
<Attribute>ApproximateNumberOfMessages</Attribute>
<Value>2900</Value>
</AttributedValue>
<AttributedValue>
<Attribute>VisibilityTimeout</Attribute>
<Value>35</Value>
</AttributedValue>
<ResponseStatus>
<StatusCode>Success</StatusCode>
<RequestId>cb919c0a-9bce-4afe-9b48-9bdf2412bb67</RequestId>
</ResponseStatus>
</GetQueueAttributesResponse>