User guide

Resource APIs
The SDK for .NET provides the AWS Resource APIs for .NET for programming with Amazon SQS.These
resource APIs provide a resource-level programming model that enables you to write code to work more
directly with Amazon SQS resources as compared to their low-level API counterparts. (For more information
about the AWS Resource APIs for .NET, including how to download and reference these resource APIs,
see AWS Resource APIs for .NET (p. 41).)
The following example shows how to use the AWS Resource APIs for .NET to list accessible queues in
Amazon SQS
// using Amazon.SQS.Resources;
var sqs = new SQS();
// List all queues that start with "aws".
var queues = sqs.GetQueues("aws");
if (queues.Any())
{
Console.WriteLine("Queue URLs:");
foreach (var queue in queues)
{
Console.WriteLine(" " + queue.Url);
}
}
else
{
Console.WriteLine("No queues.");
}
For related API reference information, see Amazon.SQS.Resources.
Creating and Using an Amazon SQS Queue with
the AWS SDK for .NET
This topic demonstrates how to use the AWS SDK for .NET to create and use an Amazon Simple Queue
Service (Amazon SQS) queue.
The sample code in this topic is written in C#, but you can use the AWS SDK for .NET with any language
that is compatible with the Microsoft .NET Framework.
Topics
Create an Amazon SQS Client (p. 122)
Create an Amazon SQS Queue (p. 123)
Amazon SQS Queue URLs (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)
Related Resources (p. 126)
Version v2.0.0
121
AWS SDK for .NET Developer Guide
Creating and Using an Amazon SQS Queue