Amazon Web ServicesAmazon SQS 消息队列 API
创建队列
创建新的 Amazon SQS 标准或 FIFO 队列。 官方英文详细说明: <p>Creates a new standard or FIFO queue. You can pass one or more attributes in the request. Keep the following in mind:</p> <ul> <li> <p>If you don't specify the <code>FifoQueue</code> attribute, Amazon SQS creates a standard queue.</p> <note> <p>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 <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-moving">Moving From a standard queue to a FIFO queue</a> in the <i>Amazon SQS Developer Guide</i>. </p> </note> </li> <li> <p>If you don't provide a value for an attribute, the queue is created with the default value for the attribute.</p> </li> <li> <p>If you delete a queue, you must wait at least 60 seconds before creating a queue with the same name.</p> </li> </ul> <p>To successfully create a new queue, you must provide a queue name that adheres to the <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/limits-queues.html">limits related to queues</a> and is unique within the scope of your queues.</p> <note> <p>After you create a queue, you must wait at least one second after the queue is created to be able to use the queue.</p> </note> <p>To retrieve the URL of a queue, use the <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_GetQueueUrl.html"> <code>GetQueueUrl</code> </a> action. This action only requires the <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_CreateQueue.html#API_CreateQueue_RequestSyntax"> <code>QueueName</code> </a> parameter.</p> <p>When creating queues, keep the following points in mind:</p> <ul> <li> <p>If you specify the name of an existing queue and provide the exact same names and values for all its attributes, the <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_CreateQueue.html"> <code>CreateQueue</code> </a> action will return the URL of the existing queue instead of creating a new one.</p> </li> <li> <p>If you attempt to create a queue with a name that already exists but with different attribute names or values, the <code>CreateQueue</code> action will return an error. This ensures that existing queues are not inadvertently altered.</p> </li> </ul> <note> <p>Cross-account permissions don't apply to this action. For more information, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name">Grant cross-account permissions to a role and a username</a> in the <i>Amazon SQS Developer Guide</i>.</p> </note>
Amazon Simple Queue Service 的完整 23 个官方 action;保留 AWS JSON 1.0、AWS Query 兼容性、SigV4 与区域 Endpoint 规则。Hub 提供文档和本地 SDK/CLI,不代理队列调用。
请求
- operationId
CreateQueue- 服务器
https://sqs.{Region}.{PartitionResult#dnsSuffix}- 认证
- awsSigV4
请求参数
无 URL、查询或 Header 参数。
Body 参数
string必填
响应
200
string
成功响应。
error
string
Declared service error