Method: Aws::Sqs::Queue#set_attribute
- Defined in:
- lib/sqs/sqs.rb
#set_attribute(attribute, value) ⇒ Object
Sets new queue attribute value. Not all attributes may be changed: ApproximateNumberOfMessages (for example) is a read only attribute. Returns a value to be assigned to attribute. Currently, ‘VisibilityTimeout’ is the only settable queue attribute. Attempting to set non-existent attributes generates an indignant exception.
queue.set_attribute(‘VisibilityTimeout’, ‘100’) #=> ‘100’ queue.get_attribute(‘VisibilityTimeout’) #=> ‘100’
249 250 251 252 |
# File 'lib/sqs/sqs.rb', line 249 def set_attribute(attribute, value) @sqs.interface.set_queue_attributes(@url, attribute, value) value end |