| Did this page help you? Yes No Tell us about it... |
The GetQueueAttributes action returns one or all
attributes of a queue.
![]() | Note |
|---|---|
Some API operations take lists of parameters. These lists are specified using the &Attribute.1=this &Attribute.2=that |
The following table lists the special request parameters the
GetQueueAttributes action uses in addition to the common request parameters
all actions use (for more information, see Common Query Parameters).
| Name | Description | Required |
|---|---|---|
|
|
The attribute you want to get.
Type: String Valid values: Default: None |
Yes |
The following table lists the response elements the GetQueueAttributes
action returns in addition to the common response elements all actions return (for more
information, see Responses
section in the Amazon SQS Developer Guide.
| Name | Description |
|---|---|
|
|
An element containing each attribute's information. Ancestor: Children:
|
The following table lists the special errors the GetQueueAttributes action
returns in addition to the common errors all actions return (for more information, see Common Errors).
| Error | Description | HTTP Status Code |
|---|---|---|
|
|
Unknown attribute |
400 |
The following example Query request gets all the attribute values for the specified queue.
http://sqs.us-east-1.amazonaws.com/123456789012/testQueue/ ?Action=GetQueueAttributes &AttributeName=All &Version=2009-02-01 &SignatureMethod=HmacSHA256 &Expires=2009-04-18T22%3A52%3A43PST &AWSAccessKeyId=0GS7553JW74RRM612K02EXAMPLE &SignatureVersion=2 &Signature=Dqlp3Sd6ljTUA9Uf6SGtEExwUQEXAMPLE
<GetQueueAttributesResponse>
<GetQueueAttributesResult>
<Attribute>
<Name>VisibilityTimeout</Name>
<Value>30</Value>
</Attribute>
<Attribute>
<Name>ApproximateNumberOfMessages</Name>
<Value>0</Value>
</Attribute>
<Attribute>
<Name>ApproximateNumberOfMessagesNotVisible</Name>
<Value>0</Value>
</Attribute>
<Attribute>
<Name>CreatedTimestamp</Name>
<Value>1286771522</Value>
</Attribute>
<Attribute>
<Name>LastModifiedTimestamp</Name>
<Value>1286771522</Value>
</Attribute>
<Attribute>
<Name>QueueArn</Name>
<Value>arn:aws:sqs:us-east-1:123456789012:qfoo</Value>
</Attribute>
<Attribute>
<Name>MaximumMessageSize</Name>
<Value>8192</Value>
</Attribute>
<Attribute>
<Name>MessageRetentionPeriod</Name>
<Value>345600</Value>
</Attribute>
</GetQueueAttributesResult>
<ResponseMetadata>
<RequestId>1ea71be5-b5a2-4f9d-b85a-945d8d08cd0b</RequestId>
</ResponseMetadata>
</GetQueueAttributesResponse>