Amazon Simple Queue Service
API Reference (API Version 2012-11-05)

DeleteQueue

Deletes the queue specified by the QueueUrl, regardless of the queue's contents. If the specified queue doesn't exist, Amazon SQS returns a successful response.

Important

Be careful with the DeleteQueue action: When you delete a queue, any messages in the queue are no longer available.

When you delete a queue, the deletion process takes up to 60 seconds. Requests you send involving that queue during the 60 seconds might succeed. For example, a SendMessage request might succeed, but after 60 seconds the queue and the message you sent no longer exist.

When you delete a queue, you must wait at least 60 seconds before creating a queue with the same name.

Note

Cross-account permissions don't apply to this action. For more information, see see Grant Cross-Account Permissions to a Role and a User Name in the Amazon Simple Queue Service Developer Guide.

Request Parameters

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

QueueUrl

The URL of the Amazon SQS queue to delete.

Queue URLs and names are case-sensitive.

Type: String

Required: Yes

Errors

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

Example

The following example query request deletes the specified queue. The structure of AUTHPARAMS depends on the signature of the API request. For more information, see Examples of Signed Signature Version 4 Requests in the Amazon Web Services General Reference.

Sample Request

https://sqs.us-east-2.amazonaws.com/123456789012/MyQueue/ ?Action=DeleteQueue &Expires=2020-04-18T22%3A52%3A43PST &Version=2012-11-05 &AUTHPARAMS

Sample Response

<DeleteQueueResponse> <ResponseMetadata> <RequestId>6fde8d1e-52cd-4581-8cd9-c512f4c64223</RequestId> </ResponseMetadata> </DeleteQueueResponse>

See Also

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