Method: Azure::Queue::QueueService#create_queue
- Defined in:
- lib/azure/queue/queue_service.rb
#create_queue(queue_name, options = {}) ⇒ Object
Public: Creates a new queue under the storage account.
Attributes
-
queue_name- String. The queue name. -
options- Hash. Optional parameters.
Options
Accepted key/value pairs in options parameter are:
-
:metadata- Hash. A hash of user defined metadata. -
:timeout- Integer. A timeout in seconds.
See msdn.microsoft.com/en-us/library/windowsazure/dd179342
Returns nil on success
125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/azure/queue/queue_service.rb', line 125 def create_queue(queue_name, ={}) query = { } query["timeout"] = [:timeout].to_s if [:timeout] uri = queue_uri(queue_name, query) headers = { } ([:metadata] || {}, headers) if [:metadata] call(:put, uri, nil, headers) nil end |