AWS SDK for .NET Documentation
AmazonSQSClient Class
AmazonAmazon.SQSAmazonSQSClient Did this page help you?   Yes   No    Tell us about it...
AmazonSQSClient is an implementation of AmazonSQS; the client allows you to manage your AmazonSQS resources.
If you want to use the AmazonSQSClient from a Medium Trust hosting environment, please create the client with an AmazonSQSConfig object whose UseSecureStringForAwsSecretKey property is false.
Declaration Syntax
C#
public class AmazonSQSClient : AmazonSQS, 
	IDisposable
Members
All MembersConstructorsMethods



IconMemberDescription
AmazonSQSClient()()()()
Constructs AmazonSQSClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.
CopyC#
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSAccessKey" value="********************"/>
        <add key="AWSSecretKey" value="****************************************"/>
    </appSettings>
</configuration>

AmazonSQSClient(RegionEndpoint)
Constructs AmazonSQSClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.
CopyC#
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSAccessKey" value="********************"/>
        <add key="AWSSecretKey" value="****************************************"/>
    </appSettings>
</configuration>

AmazonSQSClient(AmazonSQSConfig)
Constructs AmazonSQSClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.
CopyC#
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSAccessKey" value="********************"/>
        <add key="AWSSecretKey" value="****************************************"/>
    </appSettings>
</configuration>

AmazonSQSClient(String, String)
Constructs AmazonSQSClient with AWS Access Key ID and AWS Secret Key

AmazonSQSClient(String, String, RegionEndpoint)
Constructs AmazonSQSClient with AWS Access Key ID and AWS Secret Key

AmazonSQSClient(String, String, AmazonSQSConfig)
Constructs AmazonSQSClient with AWS Access Key ID, AWS Secret Key and an AmazonSQS Configuration object. If the config object's UseSecureStringForAwsSecretKey is false, the AWS Secret Key is stored as a clear-text string. Please use this option only if the application environment doesn't allow the use of SecureStrings.

AmazonSQSClient(String, SecureString, AmazonSQSConfig)
Constructs an AmazonSQSClient with AWS Access Key ID, AWS Secret Key and an AmazonSQS Configuration object

AmazonSQSClient(String, SecureString, RegionEndpoint)
Constructs an AmazonSQSClient with AWS Access Key ID, AWS Secret Key and an AmazonSQS Configuration object

AmazonSQSClient(AWSCredentials)
Constructs AmazonSQSClient with AWSCredentials

AmazonSQSClient(AWSCredentials, RegionEndpoint)
Constructs AmazonSQSClient with AWSCredentials

AmazonSQSClient(AWSCredentials, AmazonSQSConfig)
Constructs AmazonSQSClient with AWSCredentials and an AmazonSQS Configuration object.

AmazonSQSClient(String, String, String)
Constructs AmazonSQSClient with AWS Access Key ID and AWS Secret Key

AmazonSQSClient(String, String, String, RegionEndpoint)
Constructs AmazonSQSClient with AWS Access Key ID and AWS Secret Key

AmazonSQSClient(String, String, String, AmazonSQSConfig)
Constructs AmazonSQSClient with AWS Access Key ID, AWS Secret Key and an AmazonSQSConfig Configuration object. If the config object's UseSecureStringForAwsSecretKey is false, the AWS Secret Key is stored as a clear-text string. Please use this option only if the application environment doesn't allow the use of SecureStrings.

AddPermission(AddPermissionRequest)
Adds the specified permission(s) to a queue for the specified principal(s).

ChangeMessageVisibility(ChangeMessageVisibilityRequest)
Extends the read lock timeout of a single message in a queue.

ChangeMessageVisibilityBatch(ChangeMessageVisibilityBatchRequest)
Extends the read lock timeout of multiple messages in a queue.

CreateQueue(CreateQueueRequest)
Creates a new queue, or returns the URL of an existing one.

DeleteMessage(DeleteMessageRequest)
Unconditionally removes the specified message from the specified queue.

DeleteMessageBatch(DeleteMessageBatchRequest)
Removes multiple messages from the specified queue.

DeleteQueue(DeleteQueueRequest)

Deletes the queue specified by the queue URL, regardless of whether the queue is empty.


Dispose()()()()
Disposes of all managed and unmanaged resources.

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetQueueAttributes(GetQueueAttributesRequest)
Gets one or all attributes of a queue.

GetQueueUrl(GetQueueUrlRequest)
Returns the URL of an existing queue.

GetType()()()()
Gets the type of the current instance.
(Inherited from Object.)
ListDeadLetterSourceQueues(ListDeadLetterSourceQueuesRequest)
Given a queue, lists the queues that are configured to use that queue as a Dead Letter Queue.

ListQueues(ListQueuesRequest)
Returns a list of your queues. The maximum number of queues that can be returned is 1000.

ReceiveMessage(ReceiveMessageRequest)

Retrieves one or more messages from the specified queue, including the message body and message ID of each message. Messages returned by this action stay in the queue until you delete them. However, once a message is returned to a ReceiveMessage request, it is not returned on subsequent ReceiveMessage requests for the duration of the VisibilityTimeout. If you do not specify a VisibilityTimeout in the request, the overall visibility timeout for the queue is used for the returned messages.

If a message is available in the queue, the call will return immediately. Otherwise, it will wait up to WaitTimeSeconds for a message to arrive. If you do not specify WaitTimeSeconds in the request, the queue attribute by the same name is used to determine how long to wait.

You could ask for additional information about each message through the attributes. Attributes that can be requested are [SenderId, ApproximateFirstReceiveTimestamp, ApproximateReceiveCount, SentTimestamp].


RemovePermission(RemovePermissionRequest)
Removes the permission with the specified statement id from the queue.

SendMessage(SendMessageRequest)
Delivers a message to the specified queue.

SendMessageBatch(SendMessageBatchRequest)
Sends multiple messages to a queue.

SetQueueAttributes(SetQueueAttributesRequest)

Sets the value of one or more queue attributes. Currently, you can set only one attribute per request. Valid attributes that can be set are [VisibilityTimeout, Policy, MaximumMessageSize, MessageRetentionPeriod, WaitTimeSeconds].


ToString()()()()
Returns a string that represents the current object.
(Inherited from Object.)
Remarks
Amazon Simple Queue Service (Amazon SQS) offers a reliable, highly scalable hosted queue for storing messages as they travel between computers. By using Amazon SQS, developers can simply move data between distributed application components performing different tasks, without losing messages or requiring each component to be always available. Amazon SQS works by exposing Amazon's web-scale messaging infrastructure as a web service. Any computer on the Internet can add or read messages without any installed software or special firewall configurations. Components of applications using Amazon SQS can run independently, and do not need to be on the same network, developed with the same technologies, or running at the same time.
Inheritance Hierarchy
Object
AmazonSQSClient
See Also

Assembly: AWSSDK (Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)