AWS SDK Version 2 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

.NET Framework 3.5
 
Deletes the messages in a queue specified by the queue URL. When you use the PurgeQueue API, the deleted messages in the queue cannot be retrieved.

When you purge a queue, the message deletion process takes up to 60 seconds. All messages sent to the queue before calling PurgeQueue will be deleted; messages sent to the queue while it is being purged may be deleted. While the queue is being purged, messages sent to the queue before PurgeQueue was called may be received, but will be deleted within the next minute.

Namespace: Amazon.SQS
Assembly: AWSSDK.dll
Version: (assembly version)

Syntax

C#
public virtual PurgeQueueResponse PurgeQueue(
         String queueUrl
)

Parameters

queueUrl
Type: System.String

The queue URL of the queue to delete the messages from when using the PurgeQueue API.

Return Value
Type: Amazon.SQS.Model.PurgeQueueResponse
The response from the PurgeQueue service method, as returned by SQS.

Exceptions

ExceptionCondition
PurgeQueueInProgressException Indicates that the specified queue previously received a PurgeQueue request within the last 60 seconds, the time it can take to delete the messages in the queue.
QueueDoesNotExistException The queue referred to does not exist.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5