User guide

Creating and Using an Amazon SQS Queue (p. 121)
Programming Models
The SDK for .NET provides two programming models for working with Amazon SQS.These programming
models are known as the low-level and resource models. The following information describes these
models, how to use them, and why you would want to use them.
Low-Level APIs
The SDK for .NET provides low-level APIs for programming with Amazon SQS. These APIs typically
consist of sets of matching request-and-response objects that correspond to HTTP-based API calls
focusing on their corresponding service-level constructs.
The following example shows how to use the APIs to list accessible queues in Amazon SQS:
// using Amazon.SQS;
// using Amazon.SQS.Model;
var client = new AmazonSQSClient();
// List all queues that start with "aws".
var request = new ListQueuesRequest
{
QueueNamePrefix = "aws"
};
var response = client.ListQueues(request);
var urls = response.QueueUrls;
if (urls.Any())
{
Console.WriteLine("Queue URLs:");
foreach (var url in urls)
{
Console.WriteLine(" " + url);
}
}
else
{
Console.WriteLine("No queues.");
}
For additional examples, see the following:
Create an Amazon SQS Client (p. 122)
Create an Amazon SQS Queue (p. 123)
Send an Amazon SQS Message (p. 124)
Receive a Message from an Amazon SQS Queue (p. 124)
Delete a Message from an Amazon SQS Queue (p. 125)
For related API reference information, see Amazon.SQS, Amazon.SQS.Model, and Amazon.SQS.Util
in the AWS SDK for .NET API Reference.
Version v2.0.0
120
AWS SDK for .NET Developer Guide
Programming Models