Amazon Web ServicesAmazon SQS message-queue API
SetQueueAttributes
<p>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 <code>MessageRetentionPeriod</code> 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 <code>MessageRetentionPeriod</code> is reduced below the age of existing messages.</p> <note> <ul> <li> <p>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.</p> </li> <li> <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> </li> <li> <p>To remove the ability to change queue permissions, you must deny permission to the <code>AddPermission</code>, <code>RemovePermission</code>, and <code>SetQueueAttributes</code> actions in your IAM policy.</p> </li> </ul> </note>
The complete 23-action Amazon Simple Queue Service API, preserving AWS JSON 1.0, AWS Query compatibility, SigV4, and regional endpoint rules. Hub provides documentation and a local SDK/CLI; it does not proxy queue calls.
Request
- operationId
SetQueueAttributes- Server
https://sqs.{Region}.{PartitionResult#dnsSuffix}- Authentication
- awsSigV4
Request parameters
No URL, query, or header parameters.
Request body
stringrequired
Responses
200
object
Successful response.
error
string
Declared service error
{}