Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.1.0
info:
title: Amazon Simple Queue Service Queues API
version: '2012-11-05'
description: Generated from AWS's published Smithy model for Amazon Simple Queue Service. 10 operation(s).
contact:
name: Amazon Web Services
url: https://aws.amazon.com/contact-us/
license:
name: Apache 2.0
identifier: Apache-2.0
url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://sqs.{region}.amazonaws.com
variables:
region:
default: us-east-1
security:
- sigv4: []
paths:
/#CreateQueue:
post:
operationId: CreateQueue
summary: Create Queue
description: 'Creates a new standard or FIFO queue. You can pass one or more attributes in the request. Keep the following
in mind: If you don''t specify the FifoQueue attribute, Amazon SQS creates a standard queue. You can''t change the
queue type after you create it and you can''t convert an existing standard queue into a FIFO queue. You must either
create a new FIFO queue for your application or delete your existing standard queue and recreate it as a FIFO queue.
For more information, see Moving From a standard queue to a FIFO queue in the Amazon SQS Developer Guide. If you don''t
provide a value for an attribute, the queue is created with the default value for the attribute. If you delete a queue,
you must wait at least 60 seconds before creating a queue with the same name. To successfully create a new queue,
you must provide a queue name that adheres to the limits related to queues and is unique within the scope of your
queues. After you create a queue, you must wait at least one second after the queue is created to be able to use the
queue. To retrieve the URL of a queue, use the GetQueueUrl action. This action only requires the QueueName parameter.
When creating queues, keep the following poi'
responses:
'200':
description: Success
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/CreateQueueResult'
'404':
description: InvalidAddress
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidAddress'
'400':
description: InvalidAttributeName; InvalidAttributeValue; QueueDeletedRecently; QueueNameExists; UnsupportedOperation
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidAttributeName'
'403':
description: InvalidSecurity; RequestThrottled
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidSecurity'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- AmazonSQS.CreateQueue
requestBody:
required: true
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/CreateQueueRequest'
tags:
- Queues
/#DeleteQueue:
post:
operationId: DeleteQueue
summary: Delete Queue
description: 'Deletes the queue specified by the QueueUrl, regardless of the queue''s contents. Be careful with the
DeleteQueue action: When you delete a queue, any messages in the queue are no longer available. When you delete a
queue, the deletion process takes up to 60 seconds. Requests you send involving that queue during the 60 seconds might
succeed. For example, a SendMessage request might succeed, but after 60 seconds the queue and the message you sent
no longer exist. When you delete a queue, you must wait at least 60 seconds before creating a queue with the same
name. Cross-account permissions don''t apply to this action. For more information, see Grant cross-account permissions
to a role and a username in the Amazon SQS Developer Guide. The delete operation uses the HTTP GET verb.'
responses:
'200':
description: Success
content:
application/x-amz-json-1.0:
schema:
type: string
'404':
description: InvalidAddress
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidAddress'
'403':
description: InvalidSecurity; RequestThrottled
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidSecurity'
'400':
description: QueueDoesNotExist; UnsupportedOperation
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/QueueDoesNotExist'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- AmazonSQS.DeleteQueue
requestBody:
required: true
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/DeleteQueueRequest'
tags:
- Queues
/#ListQueues:
post:
operationId: ListQueues
summary: List Queues
description: 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. The listQueues methods supports pagination. Set parameter MaxResults in the request to specify
the maximum number of results to be returned in the response. If you do not set MaxResults, the response includes
a maximum of 1,000 results. If you set MaxResults and there are additional results to display, the response includes
a value for NextToken. Use NextToken as a parameter in your next request to listQueues to receive the next page of
results. Cross-account permissions don't apply to this action. For more information, see Grant cross-account permissions
to a role and a username in the Amazon SQS Developer Guide.
responses:
'200':
description: Success
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/ListQueuesResult'
'404':
description: InvalidAddress
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidAddress'
'403':
description: InvalidSecurity; RequestThrottled
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidSecurity'
'400':
description: UnsupportedOperation
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/UnsupportedOperation'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- AmazonSQS.ListQueues
requestBody:
required: true
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/ListQueuesRequest'
tags:
- Queues
/#TagQueue:
post:
operationId: TagQueue
summary: Tag Queue
description: '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. When you use queue tags, keep the following guidelines in mind: Adding more
than 50 tags to a queue isn''t recommended. Tags don''t have any semantic meaning. Amazon SQS interprets tags as character
strings. Tags are case-sensitive. A new tag with a key identical to that of an existing tag overwrites the existing
tag. For a full list of tag restrictions, see Quotas related to queues in the Amazon SQS Developer Guide. Cross-account
permissions don''t apply to this action. For more information, see Grant cross-account permissions to a role and a
username in the Amazon SQS Developer Guide.'
responses:
'200':
description: Success
content:
application/x-amz-json-1.0:
schema:
type: string
'404':
description: InvalidAddress
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidAddress'
'403':
description: InvalidSecurity; RequestThrottled
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidSecurity'
'400':
description: QueueDoesNotExist; UnsupportedOperation
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/QueueDoesNotExist'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- AmazonSQS.TagQueue
requestBody:
required: true
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/TagQueueRequest'
tags:
- Queues
/#UntagQueue:
post:
operationId: UntagQueue
summary: Untag Queue
description: 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. Cross-account permissions don't apply to this action. For more information,
see Grant cross-account permissions to a role and a username in the Amazon SQS Developer Guide.
responses:
'200':
description: Success
content:
application/x-amz-json-1.0:
schema:
type: string
'404':
description: InvalidAddress
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidAddress'
'403':
description: InvalidSecurity; RequestThrottled
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidSecurity'
'400':
description: QueueDoesNotExist; UnsupportedOperation
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/QueueDoesNotExist'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- AmazonSQS.UntagQueue
requestBody:
required: true
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/UntagQueueRequest'
tags:
- Queues
/#PurgeQueue:
post:
operationId: PurgeQueue
summary: Purge Queue
description: Deletes available messages in a queue (including in-flight messages) specified by the QueueURL parameter.
When you use the PurgeQueue action, you can't retrieve any messages deleted from a queue. The message deletion process
takes up to 60 seconds. We recommend waiting for 60 seconds regardless of your queue's size. Messages sent to the
queue before you call PurgeQueue might be received but are deleted within the next minute. Messages sent to the queue
after you call PurgeQueue might be deleted while the queue is being purged.
responses:
'200':
description: Success
content:
application/x-amz-json-1.0:
schema:
type: string
'404':
description: InvalidAddress
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidAddress'
'403':
description: InvalidSecurity; PurgeQueueInProgress; RequestThrottled
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidSecurity'
'400':
description: QueueDoesNotExist; UnsupportedOperation
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/QueueDoesNotExist'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- AmazonSQS.PurgeQueue
requestBody:
required: true
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/PurgeQueueRequest'
tags:
- Queues
/#GetQueueAttributes:
post:
operationId: GetQueueAttributes
summary: Get Queue Attributes
description: Gets attributes for the specified queue. To determine whether a queue is FIFO, you can check whether QueueName
ends with the .fifo suffix.
responses:
'200':
description: Success
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/GetQueueAttributesResult'
'404':
description: InvalidAddress
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidAddress'
'400':
description: InvalidAttributeName; QueueDoesNotExist; UnsupportedOperation
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidAttributeName'
'403':
description: InvalidSecurity; RequestThrottled
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidSecurity'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- AmazonSQS.GetQueueAttributes
requestBody:
required: true
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/GetQueueAttributesRequest'
tags:
- Queues
/#SetQueueAttributes:
post:
operationId: SetQueueAttributes
summary: Set Queue Attributes
description: 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. In the future, new attributes might be added. If you write code that calls this action, we recommend that
you structure your code so that it can handle new attributes gracefully. Cross-account permissions don't apply to
this action. For more information, see Grant cross-account permissions to a role and a username in the Amazon SQS
Developer Guide. To remove the ability to change queue permissions, you must deny permission to the AddPermission,
RemovePermission, and SetQueueAttributes actions in your IAM policy.
responses:
'200':
description: Success
content:
application/x-amz-json-1.0:
schema:
type: string
'404':
description: InvalidAddress
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidAddress'
'400':
description: InvalidAttributeName; InvalidAttributeValue; QueueDoesNotExist; UnsupportedOperation
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidAttributeName'
'403':
description: InvalidSecurity; OverLimit; RequestThrottled
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidSecurity'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- AmazonSQS.SetQueueAttributes
requestBody:
required: true
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/SetQueueAttributesRequest'
tags:
- Queues
/#GetQueueUrl:
post:
operationId: GetQueueUrl
summary: Get Queue Url
description: 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. To access a queue owned by another Amazon Web Services account,
use the QueueOwnerAWSAccountId parameter to specify the account ID of the queue's owner. Note that the queue owner
must grant you the necessary permissions to access the queue. For more information about accessing shared queues,
see the AddPermission API or Allow developers to write messages to a shared queue in the Amazon SQS Developer Guide.
responses:
'200':
description: Success
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/GetQueueUrlResult'
'404':
description: InvalidAddress
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidAddress'
'403':
description: InvalidSecurity; RequestThrottled
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidSecurity'
'400':
description: QueueDoesNotExist; UnsupportedOperation
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/QueueDoesNotExist'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- AmazonSQS.GetQueueUrl
requestBody:
required: true
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/GetQueueUrlRequest'
tags:
- Queues
/#ListDeadLetterSourceQueues:
post:
operationId: ListDeadLetterSourceQueues
summary: List Dead Letter Source Queues
description: Returns a list of your queues that have the RedrivePolicy queue attribute configured with a dead-letter
queue. The ListDeadLetterSourceQueues methods supports pagination. Set parameter MaxResults in the request to specify
the maximum number of results to be returned in the response. If you do not set MaxResults, the response includes
a maximum of 1,000 results. If you set MaxResults and there are additional results to display, the response includes
a value for NextToken. Use NextToken as a parameter in your next request to ListDeadLetterSourceQueues to receive
the next page of results. For more information about using dead-letter queues, see Using Amazon SQS Dead-Letter Queues
in the Amazon SQS Developer Guide.
responses:
'200':
description: Success
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/ListDeadLetterSourceQueuesResult'
'404':
description: InvalidAddress
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidAddress'
'403':
description: InvalidSecurity; RequestThrottled
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/InvalidSecurity'
'400':
description: QueueDoesNotExist; UnsupportedOperation
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/QueueDoesNotExist'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- AmazonSQS.ListDeadLetterSourceQueues
requestBody:
required: true
content:
application/x-amz-json-1.0:
schema:
$ref: '#/components/schemas/ListDeadLetterSourceQueuesRequest'
tags:
- Queues
components:
securitySchemes:
sigv4:
type: apiKey
in: header
name: Authorization
description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
x-aws-sigv4:
signingName: sqs
schemas:
CreateQueueRequest:
type: object
properties:
QueueName:
type: string
description: 'The name of the new queue. The following limits apply to this name: A queue name can have up to 80
characters. Valid values: alphanumeric characters, hyphens (-), and underscores (_). A FIFO queue name must end
with the .fifo suffix. Queue URLs and names are case-sensitive.'
Attributes:
type: object
additionalProperties:
type: string
description: 'A map of attributes with their corresponding values. The following lists the names, descriptions,
and values of the special request parameters that the CreateQueue action uses: DelaySeconds – The length of time,
in seconds, for which the delivery of all messages in the queue is delayed. Valid values: An integer from 0 to
900 seconds (15 minutes). Default: 0. MaximumMessageSize – The limit of how many bytes a message can contain before
Amazon SQS rejects it. Valid values: An integer from 1,024 bytes (1 KiB) to 1,048,576 bytes (1 MiB). Default:
1,048,576 bytes (1 MiB). MessageRetentionPeriod – T'
tags:
type: object
additionalProperties:
type: string
description: '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. When you use queue tags, keep the following guidelines in mind:
Adding more than 50 tags to a queue isn''t recommended. Tags don''t have any semantic meaning. Amazon SQS interprets
tags as character strings. Tags are case-sensitive. A new tag with a key identical to that of an existing tag
overwrites the existing tag. For a full list of tag restrictions, see Quotas related to queues in the Amazon SQS
Developer Guide. To be able to tag a queue on creat'
required:
- QueueName
CreateQueueResult:
type: object
properties:
QueueUrl:
type: string
description: The URL of the created Amazon SQS queue.
DeleteQueueRequest:
type: object
properties:
QueueUrl:
type: string
description: The URL of the Amazon SQS queue to delete. Queue URLs and names are case-sensitive.
required:
- QueueUrl
GetQueueAttributesRequest:
type: object
properties:
QueueUrl:
type: string
description: The URL of the Amazon SQS queue whose attribute information is retrieved. Queue URLs and names are
case-sensitive.
AttributeNames:
type: array
items:
type: string
enum:
- All
- Policy
- VisibilityTimeout
- MaximumMessageSize
- MessageRetentionPeriod
- ApproximateNumberOfMessages
- ApproximateNumberOfMessagesNotVisible
- CreatedTimestamp
- LastModifiedTimestamp
- QueueArn
- ApproximateNumberOfMessagesDelayed
- DelaySeconds
- ReceiveMessageWaitTimeSeconds
- RedrivePolicy
- FifoQueue
- ContentBasedDeduplication
- KmsMasterKeyId
- KmsDataKeyReusePeriodSeconds
- DeduplicationScope
- FifoThroughputLimit
- RedriveAllowPolicy
- SqsManagedSseEnabled
description: 'A list of attributes for which to retrieve information. The AttributeNames parameter is optional,
but if you don''t specify values for this parameter, the request returns empty results. In the future, new attributes
might be added. If you write code that calls this action, we recommend that you structure your code so that it
can handle new attributes gracefully. The following attributes are supported: The ApproximateNumberOfMessagesDelayed,
ApproximateNumberOfMessagesNotVisible, and ApproximateNumberOfMessages metrics may not achieve consistency until
at least 1 minute after the producers stop '
required:
- QueueUrl
GetQueueAttributesResult:
type: object
properties:
Attributes:
type: object
additionalProperties:
type: string
description: A map of attributes to their respective values.
GetQueueUrlRequest:
type: object
properties:
QueueName:
type: string
description: (Required) The name of the queue for which you want to fetch the URL. The name can be up to 80 characters
long and can include alphanumeric characters, hyphens (-), and underscores (_). Queue URLs and names are case-sensitive.
QueueOwnerAWSAccountId:
type: string
description: (Optional) The Amazon Web Services account ID of the account that created the queue. This is only required
when you are attempting to access a queue owned by another Amazon Web Services account.
required:
- QueueName
GetQueueUrlResult:
type: object
properties:
QueueUrl:
type: string
description: The URL of the queue.
InvalidAddress:
type: object
properties:
message:
type: string
InvalidAttributeName:
type: object
properties:
message:
type: string
InvalidSecurity:
type: object
properties:
message:
type: string
ListDeadLetterSourceQueuesRequest:
type: object
properties:
QueueUrl:
type: string
description: The URL of a dead-letter queue. Queue URLs and names are case-sensitive.
NextToken:
type: string
description: Pagination token to request the next set of results.
MaxResults:
type: integer
description: Maximum number of results to include in the response. Value range is 1 to 1000. You must set MaxResults
to receive a value for NextToken in the response.
required:
- QueueUrl
ListDeadLetterSourceQueuesResult:
type: object
properties:
queueUrls:
type: array
items:
type: string
description: A list of source queue URLs that have the RedrivePolicy queue attribute configured with a dead-letter
queue.
NextToken:
type: string
description: Pagination token to include in the next request. Token value is null if there are no additional results
to request, or if you did not set MaxResults in the request.
required:
- queueUrls
ListQueuesRequest:
type: object
properties:
QueueNamePrefix:
type: string
description: A string to use for filtering the list results. Only those queues whose name begins with the specified
string are returned. Queue URLs and names are case-sensitive.
NextToken:
type: string
description: Pagination token to request the next set of results.
MaxResults:
type: integer
description: Maximum number of results to include in the response. Value range is 1 to 1000. You must set MaxResults
to receive a value for NextToken in the response.
ListQueuesResult:
type: object
properties:
QueueUrls:
type: array
items:
type: string
description: A list of queue URLs, up to 1,000 entries, or the value of MaxResults that you sent in the request.
NextToken:
type: string
description: Pagination token to include in the next request. Token value is null if there are no additional results
to request, or if you did not set MaxResults in the request.
PurgeQueueRequest:
type: object
properties:
QueueUrl:
type: string
description: The URL of the queue from which the PurgeQueue action deletes messages. Queue URLs and names are case-sensitive.
required:
- QueueUrl
QueueDoesNotExist:
type: object
properties:
message:
type: string
SetQueueAttributesRequest:
type: object
properties:
QueueUrl:
type: string
description: The URL of the Amazon SQS queue whose attributes are set. Queue URLs and names are case-sensitive.
Attributes:
type: object
additionalProperties:
type: string
description: 'A map of attributes to set. The following lists the names, descriptions, and values of the special
request parameters that the SetQueueAttributes action uses: DelaySeconds – The length of time, in seconds, for
which the delivery of all messages in the queue is delayed. Valid values: An integer from 0 to 900 (15 minutes).
Default: 0. MaximumMessageSize – The limit of how many bytes a message can contain before Amazon SQS rejects it.
Valid values: An integer from 1,024 bytes (1 KiB) up to 1,048,576 bytes (1 MiB). Default: 1,048,576 bytes (1 MiB).
MessageRetentionPeriod – The length of time, in s'
required:
- QueueUrl
- Attributes
TagQueueRequest:
type: object
properties:
QueueUrl:
type: string
description: The URL of the queue.
Tags:
type: object
additionalProperties:
type: string
description: The list of tags to be added to the specified queue.
required:
- QueueUrl
- Tags
UnsupportedOperation:
type: object
properties:
message:
type: string
UntagQueueRequest:
type: object
properties:
QueueUrl:
type: string
description: The URL of the queue.
TagKeys:
type: array
items:
type: string
description: The list of tags to be removed from the specified queue.
required:
- QueueUrl
- TagKeys
x-provenance:
method: harvested
publisher: Amazon Web Services
source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/sqs/service/2012-11-05/sqs-2012-11-05.json
note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)