SetQueueAttributes

Sets an attribute of a queue. Currently, you can set only the VisibilityTimeout attribute for a queue. See Visibility Timeout for more information.

[Important]Important

Before the 2007-05-01 release introduced the SetQueueAttributes action, you set the visibility timeout by using the SetVisibilityTimeout action. As of the 2007-05-01 release of Amazon SQS, the SetVisibilityTimeout action has been deprecated.

The following table lists the special request parameters the action uses (in addition to the common request parameters listed in Common Request Parameters).

NameDescriptionRequired

Attribute

The attribute you want to set.

Type: String

Valid value: VisibilityTimeout

Yes

Value

The value of the attribute you want to set.

Type: For visibility timeout, the value must be an integer from 0 to 86400 (24 hours).

Yes

The response contains no special elements besides the common elements listed in The Structure of a Response.

The following table lists the special errors the action returns (in addition to the common errors listed in Common Errors).

ErrorDescriptionHTTP Status Code

InvalidAttributeName

Unknown attribute

400

The following example Query request sets the visibility timeout to 35 seconds for the specified queue.