Method: Azure::Queue::QueueService#list_queues
- Defined in:
- lib/azure/queue/queue_service.rb
#list_queues(options = {}) ⇒ Object
Public: Get a list of Queues from the server
Attributes
-
options- Hash. Optional parameters.
Options
Accepted key/value pairs in options parameter are:
-
:prefix- String. Filters the results to return only containers whose name begins with the specified prefix. (optional) -
:marker- String. An identifier the specifies the portion of the list to be returned. This value comes from the property Azure::Service::EnumerationResults.continuation_token when there are more containers available than were returned. The marker value may then be used here to request the next set of list items. (optional) -
:max_results- Integer. Specifies the maximum number of containers to return. If max_results is not specified, or is a value greater than 5,000, the server will return up to 5,000 items. If it is set to a value less than or equal to zero, the server will return status code 400 (Bad Request). (optional) -
:metadata- Boolean. Specifies whether or not to return the container metadata. (optional, Default=false) -
:timeout- Integer. A timeout in seconds.
NOTE: Metadata requested with the :metadata parameter must have been stored in accordance with the naming restrictions imposed by the 2009-09-19 version of the queue service. Beginning with that version, all metadata names must adhere to the naming conventions for C# identifiers.
See msdn.microsoft.com/en-us/library/azure/dd179466
Any metadata with invalid names which were previously stored, will be returned with the key “x-ms-invalid-name” in the metadata hash. This may contain multiple values and be an Array (vs a String if it only contains a single value).
Returns an Azure::Service::EnumerationResults
65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/azure/queue/queue_service.rb', line 65 def list_queues(={}) query = { } query["prefix"] = [:prefix] if [:prefix] query["marker"] = [:marker] if [:marker] query["maxresults"] = [:max_results].to_s if [:max_results] query["include"] = "metadata" if [:metadata] == true query["timeout"] = [:timeout].to_s if [:timeout] uri = collection_uri(query) response = call(:get, uri) Serialization.queue_enumeration_results_from_xml(response.body) end |