ListQueueTags - Amazon Simple Queue Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

ListQueueTags

List all cost allocation tags added to the specified Amazon SQS queue. For an overview, see Tagging Your Amazon SQS Queues in the Amazon SQS Developer Guide.

Note

Cross-account permissions don't apply to this action. For more information, see Grant cross-account permissions to a role and a username in the Amazon SQS Developer Guide.

Request Syntax

{ "QueueUrl": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

QueueUrl

The URL of the queue.

Type: String

Required: Yes

Response Syntax

{ "Tags": { "string" : "string" } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Tags

The list of all tags added to the specified queue.

Type: String to string map

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidAddress

The accountId is invalid.

HTTP Status Code: 400

InvalidSecurity

When the request to a queue is not HTTPS and SigV4.

HTTP Status Code: 400

QueueDoesNotExist

The specified queue doesn't exist.

HTTP Status Code: 400

RequestThrottled

The request was denied due to request throttling.

  • The rate of requests per second exceeds the Amazon KMS request quota for an account and Region.

  • A burst or sustained high rate of requests to change the state of the same KMS key. This condition is often known as a "hot key."

  • Requests for operations on KMS keys in a Amazon CloudHSM key store might be throttled at a lower-than-expected rate when the Amazon CloudHSM cluster associated with the Amazon CloudHSM key store is processing numerous commands, including those unrelated to the Amazon CloudHSM key store.

HTTP Status Code: 400

UnsupportedOperation

Error code 400. Unsupported operation.

HTTP Status Code: 400

Examples

This example illustrates one usage of ListQueueTags.

Example

Using Amazon JSON protocol (default)

Sample Request

POST / HTTP/1.1 Host: sqs.us-east-1.amazonaws.com X-Amz-Target: AmazonSQS.ListQueueTags X-Amz-Date: <Date> Content-Type: application/x-amz-json-1.0 Authorization: <AuthParams> Content-Length: <PayloadSizeBytes> Connection: Keep-Alive { "QueueUrl": "https://sqs.us-east-1.amazonaws.com/177715257436/MyQueue/" }

Sample Response

HTTP/1.1 200 OK x-amzn-RequestId: <requestId> Content-Length: <PayloadSizeBytes> Date: <Date> Content-Type: application/x-amz-json-1.0 { "Tags": { "QueueType": "Production" } }

Example

Using Amazon query protocol

Sample Request

POST /177715257436/MyQueue HTTP/1.1 Host: sqs.us-east-1.amazonaws.com Content-Type: application/x-www-form-urlencoded X-Amz-Date: <Date> Authorization: <AuthParams> Content-Length: <PayloadSizeBytes> Connection: Keep-Alive Action=ListQueueTags

Sample Response

HTTP/1.1 200 OK <?xml version="1.0"?> <ListQueueTagsResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"> <ListQueueTagsResult> <Tag> <Key>QueueType</Key> <Value>Production</Value> </Tag> </ListQueueTagsResult> <ResponseMetadata> <RequestId>02c89a6b-9fc0-564a-9ed1-c61b5cacdc6d</RequestId> </ResponseMetadata> </ListQueueTagsResponse>

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: