SqsClient
Welcome to the Amazon SQS API Reference.
Amazon SQS is a reliable, highly-scalable hosted queue for storing messages as they travel between applications or microservices. Amazon SQS moves data between distributed application components and helps you decouple these components.
For information on the permissions you need to use this API, see Identity and access management in the Amazon SQS Developer Guide.
You can use Amazon Web Services SDKs to access Amazon SQS using your favorite programming language. The SDKs perform tasks such as the following automatically:
Cryptographically sign your service requests
Retry requests
Handle error responses
Additional information
Amazon SQS Developer Guide
Command Line InterfaceAmazon SQS in the
Amazon Web Services General Reference
Functions
Adds a permission to a queue for a specific principal. This allows sharing access to the queue.
Cancels a specified message movement task. A message movement can only be cancelled when the current status is RUNNING. Cancelling a message movement task does not revert the messages that have already been moved. It can only stop the messages that have not been moved yet.
Changes the visibility timeout of a specified message in a queue to a new value. The default visibility timeout for a message is 30 seconds. The minimum is 0 seconds. The maximum is 12 hours. For more information, see Visibility Timeout in the Amazon SQS Developer Guide.
Changes the visibility timeout of multiple messages. This is a batch version of <a>ChangeMessageVisibility</a>.
The result of the action on each message is reported individually in the response. You can send up to 10 <a>ChangeMessageVisibility</a>
requests with each ChangeMessageVisibilityBatch
action.
Creates a new standard or FIFO queue. You can pass one or more attributes in the request. Keep the following in mind:
Deletes the specified message from the specified queue. To select the message to delete, use the ReceiptHandle
of the message (not the MessageId
which you receive when you send the message). Amazon SQS can delete a message from a queue even if a visibility timeout setting causes the message to be locked by another consumer. Amazon SQS automatically deletes messages left in a queue longer than the retention period configured for the queue.
Deletes up to ten messages from the specified queue. This is a batch version of <a>DeleteMessage</a>.
The result of the action on each message is reported individually in the response.
Deletes the queue specified by the QueueUrl
, regardless of the queue's contents.
Gets attributes for the specified queue.
The GetQueueUrl
API returns the URL of an existing Amazon SQS queue. This is useful when you know the queue's name but need to retrieve its URL for further operations.
Returns a list of your queues that have the RedrivePolicy
queue attribute configured with a dead-letter queue.
Gets the most recent message movement tasks (up to 10) under a specific source queue.
Returns a list of your queues in the current region. The response includes a maximum of 1,000 results. If you specify a value for the optional QueueNamePrefix
parameter, only queues with a name that begins with the specified value are returned.
List all cost allocation tags added to the specified Amazon SQS queue. For an overview, see Tagging Your Amazon SQS Queues in the Amazon SQS Developer Guide.
Deletes available messages in a queue (including in-flight messages) specified by the QueueURL
parameter.
Retrieves one or more messages (up to 10), from the specified queue. Using the WaitTimeSeconds
parameter enables long-poll support. For more information, see Amazon SQS Long Polling in the Amazon SQS Developer Guide.
Revokes any permissions in the queue policy that matches the specified Label
parameter.
Delivers a message to the specified queue.
You can use SendMessageBatch
to send up to 10 messages to the specified queue by assigning either identical or different values to each message (or by not assigning values at all). This is a batch version of <a>SendMessage</a>.
For a FIFO queue, multiple messages within a single batch are enqueued in the order they are sent.
Sets the value of one or more queue attributes, like a policy. When you change a queue's attributes, the change can take up to 60 seconds for most of the attributes to propagate throughout the Amazon SQS system. Changes made to the MessageRetentionPeriod
attribute can take up to 15 minutes and will impact existing messages in the queue potentially causing them to be expired and deleted if the MessageRetentionPeriod
is reduced below the age of existing messages.
Starts an asynchronous task to move messages from a specified source queue to a specified destination queue.
Add cost allocation tags to the specified Amazon SQS queue. For an overview, see Tagging Your Amazon SQS Queues in the Amazon SQS Developer Guide.
Remove cost allocation tags from the specified Amazon SQS queue. For an overview, see Tagging Your Amazon SQS Queues in the Amazon SQS Developer Guide.
Inherited functions
Adds a permission to a queue for a specific principal. This allows sharing access to the queue.
Cancels a specified message movement task. A message movement can only be cancelled when the current status is RUNNING. Cancelling a message movement task does not revert the messages that have already been moved. It can only stop the messages that have not been moved yet.
Changes the visibility timeout of a specified message in a queue to a new value. The default visibility timeout for a message is 30 seconds. The minimum is 0 seconds. The maximum is 12 hours. For more information, see Visibility Timeout in the Amazon SQS Developer Guide.
Changes the visibility timeout of multiple messages. This is a batch version of <a>ChangeMessageVisibility</a>.
The result of the action on each message is reported individually in the response. You can send up to 10 <a>ChangeMessageVisibility</a>
requests with each ChangeMessageVisibilityBatch
action.
Creates a new standard or FIFO queue. You can pass one or more attributes in the request. Keep the following in mind:
Deletes the specified message from the specified queue. To select the message to delete, use the ReceiptHandle
of the message (not the MessageId
which you receive when you send the message). Amazon SQS can delete a message from a queue even if a visibility timeout setting causes the message to be locked by another consumer. Amazon SQS automatically deletes messages left in a queue longer than the retention period configured for the queue.
Deletes up to ten messages from the specified queue. This is a batch version of <a>DeleteMessage</a>.
The result of the action on each message is reported individually in the response.
Deletes the queue specified by the QueueUrl
, regardless of the queue's contents.
Gets attributes for the specified queue.
The GetQueueUrl
API returns the URL of an existing Amazon SQS queue. This is useful when you know the queue's name but need to retrieve its URL for further operations.
Returns a list of your queues that have the RedrivePolicy
queue attribute configured with a dead-letter queue.
Paginate over ListDeadLetterSourceQueuesResponse results.
Gets the most recent message movement tasks (up to 10) under a specific source queue.
Returns a list of your queues in the current region. The response includes a maximum of 1,000 results. If you specify a value for the optional QueueNamePrefix
parameter, only queues with a name that begins with the specified value are returned.
Paginate over ListQueuesResponse results.
List all cost allocation tags added to the specified Amazon SQS queue. For an overview, see Tagging Your Amazon SQS Queues in the Amazon SQS Developer Guide.
Deletes available messages in a queue (including in-flight messages) specified by the QueueURL
parameter.
Retrieves one or more messages (up to 10), from the specified queue. Using the WaitTimeSeconds
parameter enables long-poll support. For more information, see Amazon SQS Long Polling in the Amazon SQS Developer Guide.
Revokes any permissions in the queue policy that matches the specified Label
parameter.
Delivers a message to the specified queue.
You can use SendMessageBatch
to send up to 10 messages to the specified queue by assigning either identical or different values to each message (or by not assigning values at all). This is a batch version of <a>SendMessage</a>.
For a FIFO queue, multiple messages within a single batch are enqueued in the order they are sent.
Sets the value of one or more queue attributes, like a policy. When you change a queue's attributes, the change can take up to 60 seconds for most of the attributes to propagate throughout the Amazon SQS system. Changes made to the MessageRetentionPeriod
attribute can take up to 15 minutes and will impact existing messages in the queue potentially causing them to be expired and deleted if the MessageRetentionPeriod
is reduced below the age of existing messages.
Starts an asynchronous task to move messages from a specified source queue to a specified destination queue.
Add cost allocation tags to the specified Amazon SQS queue. For an overview, see Tagging Your Amazon SQS Queues in the Amazon SQS Developer Guide.
Remove cost allocation tags from the specified Amazon SQS queue. For an overview, see Tagging Your Amazon SQS Queues in the Amazon SQS Developer Guide.
Create a copy of the client with one or more configuration values overridden. This method allows the caller to perform scoped config overrides for one or more client operations.