azure-storage 0.11.0.preview → 0.11.1.preview
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/azure/storage/blob/append.rb +8 -4
- data/lib/azure/storage/blob/blob.rb +48 -18
- data/lib/azure/storage/blob/blob_service.rb +25 -12
- data/lib/azure/storage/blob/block.rb +22 -14
- data/lib/azure/storage/blob/container.rb +58 -32
- data/lib/azure/storage/blob/page.rb +20 -8
- data/lib/azure/storage/blob/serialization.rb +18 -0
- data/lib/azure/storage/core/auth/shared_access_signature_generator.rb +2 -2
- data/lib/azure/storage/core/filter/retry_filter.rb +10 -4
- data/lib/azure/storage/queue/queue_service.rb +116 -90
- data/lib/azure/storage/service/serialization.rb +1 -1
- data/lib/azure/storage/service/storage_service.rb +20 -8
- data/lib/azure/storage/table/table_service.rb +133 -81
- data/lib/azure/storage/version.rb +1 -1
- metadata +2 -2
@@ -122,8 +122,26 @@ module Azure::Storage
|
|
122
122
|
end
|
123
123
|
end
|
124
124
|
|
125
|
+
if ((xml > "Blobs") > "BlobPrefix").any?
|
126
|
+
if xml.Blobs.BlobPrefix.count == 0
|
127
|
+
results.push(blob_prefix_from_xml(xml.Blobs.BlobPrefix))
|
128
|
+
else
|
129
|
+
xml.Blobs.BlobPrefix.each { |blob_prefix|
|
130
|
+
results.push(blob_prefix_from_xml(blob_prefix))
|
131
|
+
}
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
125
135
|
results
|
126
136
|
end
|
137
|
+
|
138
|
+
def self.blob_prefix_from_xml(xml)
|
139
|
+
xml = slopify(xml)
|
140
|
+
expect_node("BlobPrefix", xml)
|
141
|
+
|
142
|
+
name = xml.Name.text if (xml > "Name").any?
|
143
|
+
name
|
144
|
+
end
|
127
145
|
|
128
146
|
def self.blob_from_xml(xml)
|
129
147
|
xml = slopify(xml)
|
@@ -313,9 +313,9 @@ module Azure::Storage::Core
|
|
313
313
|
def signed_uri(uri, use_account_sas, options)
|
314
314
|
parsed_query = CGI::parse(uri.query || '').inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
315
315
|
|
316
|
-
if options[:
|
316
|
+
if options[:service] == nil and uri.host != nil
|
317
317
|
host_splits = uri.host.split('.')
|
318
|
-
options[:
|
318
|
+
options[:service] = host_splits[1].chr if host_splits.length > 1 && host_splits[0] == @account_name
|
319
319
|
end
|
320
320
|
|
321
321
|
sas_params = if use_account_sas
|
@@ -79,20 +79,26 @@ module Azure::Storage::Core::Filter
|
|
79
79
|
retry_data[:retryable] = true;
|
80
80
|
return true
|
81
81
|
end
|
82
|
+
|
83
|
+
error_message = retry_data[:error].inspect
|
82
84
|
|
83
|
-
if
|
85
|
+
if error_message.include?('SocketError: Hostname not known')
|
84
86
|
# Retry on local DNS resolving
|
85
87
|
# When uses resolv-replace.rb to replace the libc resolver
|
86
88
|
# Reference:
|
87
89
|
# https://makandracards.com/ninjaconcept/30815-fixing-socketerror-getaddrinfo-name-or-service-not-known-with-ruby-s-resolv-replace-rb
|
88
90
|
# http://www.subelsky.com/2014/05/fixing-socketerror-getaddrinfo-name-or.html
|
89
91
|
retry_data[:retryable] = true;
|
90
|
-
elsif
|
92
|
+
elsif error_message.include?('getaddrinfo: Name or service not known')
|
91
93
|
# When uses the default resolver
|
92
94
|
retry_data[:retryable] = true;
|
93
|
-
elsif
|
95
|
+
elsif error_message.downcase.include?('timeout')
|
96
|
+
retry_data[:retryable] = true;
|
97
|
+
elsif error_message.include?('Errno::ECONNRESET')
|
98
|
+
retry_data[:retryable] = true;
|
99
|
+
elsif error_message.include?('Errno::EACCES')
|
94
100
|
retry_data[:retryable] = false;
|
95
|
-
elsif
|
101
|
+
elsif error_message.include?('NOSUPPORT')
|
96
102
|
retry_data[:retryable] = false;
|
97
103
|
end
|
98
104
|
|
@@ -41,27 +41,29 @@ module Azure::Storage
|
|
41
41
|
#
|
42
42
|
# ==== Attributes
|
43
43
|
#
|
44
|
-
# * +options+
|
44
|
+
# * +options+ - Hash. Optional parameters.
|
45
45
|
#
|
46
46
|
# ==== Options
|
47
47
|
#
|
48
48
|
# Accepted key/value pairs in options parameter are:
|
49
|
-
# * +:prefix+
|
50
|
-
#
|
51
|
-
# * +:marker+
|
52
|
-
#
|
53
|
-
#
|
54
|
-
#
|
55
|
-
#
|
56
|
-
#
|
57
|
-
# * +:max_results+
|
58
|
-
#
|
59
|
-
#
|
60
|
-
#
|
61
|
-
#
|
62
|
-
# * +:metadata+
|
63
|
-
#
|
64
|
-
# * +:timeout+
|
49
|
+
# * +:prefix+ - String. Filters the results to return only containers
|
50
|
+
# whose name begins with the specified prefix. (optional)
|
51
|
+
# * +:marker+ - String. An identifier the specifies the portion of the
|
52
|
+
# list to be returned. This value comes from the property
|
53
|
+
# Azure::Service::EnumerationResults.continuation_token when there
|
54
|
+
# are more containers available than were returned. The
|
55
|
+
# marker value may then be used here to request the next set
|
56
|
+
# of list items. (optional)
|
57
|
+
# * +:max_results+ - Integer. Specifies the maximum number of containers to return.
|
58
|
+
# If max_results is not specified, or is a value greater than
|
59
|
+
# 5,000, the server will return up to 5,000 items. If it is set
|
60
|
+
# to a value less than or equal to zero, the server will return
|
61
|
+
# status code 400 (Bad Request). (optional)
|
62
|
+
# * +:metadata+ - Boolean. Specifies whether or not to return the container metadata.
|
63
|
+
# (optional, Default=false)
|
64
|
+
# * +:timeout+ - Integer. A timeout in seconds.
|
65
|
+
# * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
|
66
|
+
# in the analytics logs when storage analytics logging is enabled.
|
65
67
|
#
|
66
68
|
# NOTE: Metadata requested with the :metadata parameter must have been stored in
|
67
69
|
# accordance with the naming restrictions imposed by the 2009-09-19 version of the queue
|
@@ -84,7 +86,7 @@ module Azure::Storage
|
|
84
86
|
query["timeout"] = options[:timeout].to_s if options[:timeout]
|
85
87
|
|
86
88
|
uri = collection_uri(query)
|
87
|
-
response = call(:get, uri)
|
89
|
+
response = call(:get, uri, nil, {}, options)
|
88
90
|
|
89
91
|
Serialization.queue_enumeration_results_from_xml(response.body)
|
90
92
|
end
|
@@ -100,13 +102,15 @@ module Azure::Storage
|
|
100
102
|
#
|
101
103
|
# ==== Attributes
|
102
104
|
#
|
103
|
-
# * +queue_name+
|
104
|
-
# * +options+
|
105
|
+
# * +queue_name+ - String. The name of the queue.
|
106
|
+
# * +options+ - Hash. Optional parameters.
|
105
107
|
#
|
106
108
|
# ==== Options
|
107
109
|
#
|
108
110
|
# Accepted key/value pairs in options parameter are:
|
109
|
-
# * +:timeout+
|
111
|
+
# * +:timeout+ - Integer. A timeout in seconds.
|
112
|
+
# * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
|
113
|
+
# in the analytics logs when storage analytics logging is enabled.
|
110
114
|
#
|
111
115
|
# See http://msdn.microsoft.com/en-us/library/azure/dd179454
|
112
116
|
#
|
@@ -115,7 +119,7 @@ module Azure::Storage
|
|
115
119
|
query = { }
|
116
120
|
query["timeout"] = options[:timeout].to_s if options[:timeout]
|
117
121
|
uri = messages_uri(queue_name, query)
|
118
|
-
call(:delete, uri)
|
122
|
+
call(:delete, uri, nil, {}, options)
|
119
123
|
nil
|
120
124
|
end
|
121
125
|
|
@@ -123,14 +127,16 @@ module Azure::Storage
|
|
123
127
|
#
|
124
128
|
# ==== Attributes
|
125
129
|
#
|
126
|
-
# * +queue_name+
|
127
|
-
# * +options+
|
130
|
+
# * +queue_name+ - String. The queue name.
|
131
|
+
# * +options+ - Hash. Optional parameters.
|
128
132
|
#
|
129
133
|
# ==== Options
|
130
134
|
#
|
131
135
|
# Accepted key/value pairs in options parameter are:
|
132
|
-
# * +:metadata+
|
133
|
-
# * +:timeout+
|
136
|
+
# * +:metadata+ - Hash. A hash of user defined metadata.
|
137
|
+
# * +:timeout+ - Integer. A timeout in seconds.
|
138
|
+
# * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
|
139
|
+
# in the analytics logs when storage analytics logging is enabled.
|
134
140
|
#
|
135
141
|
# See http://msdn.microsoft.com/en-us/library/azure/dd179342
|
136
142
|
#
|
@@ -144,7 +150,7 @@ module Azure::Storage
|
|
144
150
|
headers = { }
|
145
151
|
Service::StorageService.add_metadata_to_headers(options[:metadata] || {}, headers) if options[:metadata]
|
146
152
|
|
147
|
-
call(:put, uri, nil, headers)
|
153
|
+
call(:put, uri, nil, headers, options)
|
148
154
|
nil
|
149
155
|
end
|
150
156
|
|
@@ -152,13 +158,15 @@ module Azure::Storage
|
|
152
158
|
#
|
153
159
|
# ==== Attributes
|
154
160
|
#
|
155
|
-
# * +queue_name+
|
156
|
-
# * +options+
|
161
|
+
# * +queue_name+ - String. The queue name.
|
162
|
+
# * +options+ - Hash. Optional parameters.
|
157
163
|
#
|
158
164
|
# ==== Options
|
159
165
|
#
|
160
166
|
# Accepted key/value pairs in options parameter are:
|
161
|
-
# * +:timeout+
|
167
|
+
# * +:timeout+ - Integer. A timeout in seconds.
|
168
|
+
# * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
|
169
|
+
# in the analytics logs when storage analytics logging is enabled.
|
162
170
|
#
|
163
171
|
# See http://msdn.microsoft.com/en-us/library/azure/dd179436
|
164
172
|
#
|
@@ -169,7 +177,7 @@ module Azure::Storage
|
|
169
177
|
|
170
178
|
uri = queue_uri(queue_name, query)
|
171
179
|
|
172
|
-
call(:delete, uri)
|
180
|
+
call(:delete, uri, nil, {}, options)
|
173
181
|
nil
|
174
182
|
end
|
175
183
|
|
@@ -177,13 +185,15 @@ module Azure::Storage
|
|
177
185
|
#
|
178
186
|
# ==== Attributes
|
179
187
|
#
|
180
|
-
# * +queue_name+
|
181
|
-
# * +options+
|
188
|
+
# * +queue_name+ - String. The queue name.
|
189
|
+
# * +options+ - Hash. Optional parameters.
|
182
190
|
#
|
183
191
|
# ==== Options
|
184
192
|
#
|
185
193
|
# Accepted key/value pairs in options parameter are:
|
186
|
-
# * +:timeout+
|
194
|
+
# * +:timeout+ - Integer. A timeout in seconds.
|
195
|
+
# * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
|
196
|
+
# in the analytics logs when storage analytics logging is enabled.
|
187
197
|
#
|
188
198
|
# See http://msdn.microsoft.com/en-us/library/azure/dd179384
|
189
199
|
#
|
@@ -198,7 +208,7 @@ module Azure::Storage
|
|
198
208
|
|
199
209
|
uri = queue_uri(queue_name, query)
|
200
210
|
|
201
|
-
response = call(:get, uri)
|
211
|
+
response = call(:get, uri, nil, {}, options)
|
202
212
|
|
203
213
|
approximate_messages_count = response.headers["x-ms-approximate-messages-count"]
|
204
214
|
metadata = Serialization.metadata_from_headers(response.headers)
|
@@ -211,14 +221,16 @@ module Azure::Storage
|
|
211
221
|
#
|
212
222
|
# ==== Attributes
|
213
223
|
#
|
214
|
-
# * +queue_name+
|
215
|
-
# * +metadata+
|
216
|
-
# * +options+
|
224
|
+
# * +queue_name+ - String. The queue name.
|
225
|
+
# * +metadata+ - Hash. A hash of user defined metadata
|
226
|
+
# * +options+ - Hash. Optional parameters.
|
217
227
|
#
|
218
228
|
# ==== Options
|
219
229
|
#
|
220
230
|
# Accepted key/value pairs in options parameter are:
|
221
|
-
# * +:timeout+
|
231
|
+
# * +:timeout+ - Integer. A timeout in seconds.
|
232
|
+
# * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
|
233
|
+
# in the analytics logs when storage analytics logging is enabled.
|
222
234
|
#
|
223
235
|
# See http://msdn.microsoft.com/en-us/library/azure/dd179348
|
224
236
|
#
|
@@ -232,7 +244,7 @@ module Azure::Storage
|
|
232
244
|
headers ={}
|
233
245
|
Service::StorageService.add_metadata_to_headers(metadata || {}, headers)
|
234
246
|
|
235
|
-
call(:put, uri, nil, headers)
|
247
|
+
call(:put, uri, nil, headers, options)
|
236
248
|
nil
|
237
249
|
end
|
238
250
|
|
@@ -240,13 +252,15 @@ module Azure::Storage
|
|
240
252
|
#
|
241
253
|
# ==== Attributes
|
242
254
|
#
|
243
|
-
# * +queue_name+
|
244
|
-
# * +options+
|
255
|
+
# * +queue_name+ - String. The queue name.
|
256
|
+
# * +options+ - Hash. Optional parameters.
|
245
257
|
#
|
246
258
|
# ==== Options
|
247
259
|
#
|
248
260
|
# Accepted key/value pairs in options parameter are:
|
249
|
-
# * +:timeout+
|
261
|
+
# * +:timeout+ - Integer. A timeout in seconds.
|
262
|
+
# * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
|
263
|
+
# in the analytics logs when storage analytics logging is enabled.
|
250
264
|
#
|
251
265
|
# See http://msdn.microsoft.com/en-us/library/azure/jj159101
|
252
266
|
#
|
@@ -255,7 +269,7 @@ module Azure::Storage
|
|
255
269
|
query = { "comp" => "acl" }
|
256
270
|
query["timeout"] = options[:timeout].to_s if options[:timeout]
|
257
271
|
|
258
|
-
response = call(:get, queue_uri(queue_name, query))
|
272
|
+
response = call(:get, queue_uri(queue_name, query), nil, {}, options)
|
259
273
|
|
260
274
|
signed_identifiers = []
|
261
275
|
signed_identifiers = Serialization.signed_identifiers_from_xml(response.body) unless response.body == nil or response.body.length < 1
|
@@ -266,14 +280,16 @@ module Azure::Storage
|
|
266
280
|
#
|
267
281
|
# ==== Attributes
|
268
282
|
#
|
269
|
-
# * +queue_name+
|
270
|
-
# * +options+
|
283
|
+
# * +queue_name+ - String. The queue name.
|
284
|
+
# * +options+ - Hash. Optional parameters.
|
271
285
|
#
|
272
286
|
# ==== Options
|
273
287
|
#
|
274
288
|
# Accepted key/value pairs in options parameter are:
|
275
|
-
# * +:signed_identifiers+
|
276
|
-
# * +:timeout+
|
289
|
+
# * +:signed_identifiers+ - Array. A list of Azure::Storage::Entity::SignedIdentifier instances
|
290
|
+
# * +:timeout+ - Integer. A timeout in seconds.
|
291
|
+
# * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
|
292
|
+
# in the analytics logs when storage analytics logging is enabled.
|
277
293
|
#
|
278
294
|
# See http://msdn.microsoft.com/en-us/library/azure/jj159099
|
279
295
|
#
|
@@ -286,7 +302,7 @@ module Azure::Storage
|
|
286
302
|
body = nil
|
287
303
|
body = Serialization.signed_identifiers_to_xml(options[:signed_identifiers]) if options[:signed_identifiers] && options[:signed_identifiers].length > 0
|
288
304
|
|
289
|
-
call(:put, uri, body, {})
|
305
|
+
call(:put, uri, body, {}, options)
|
290
306
|
nil
|
291
307
|
end
|
292
308
|
|
@@ -301,15 +317,17 @@ module Azure::Storage
|
|
301
317
|
# ==== Options
|
302
318
|
#
|
303
319
|
# Accepted key/value pairs in options parameter are:
|
304
|
-
# * +:visibility_timeout+
|
305
|
-
#
|
306
|
-
#
|
307
|
-
#
|
308
|
-
#
|
309
|
-
# * +:message_ttl+
|
310
|
-
#
|
311
|
-
# * +:encode+
|
312
|
-
# * +:timeout+
|
320
|
+
# * +:visibility_timeout+ - Integer. Specifies the new visibility timeout value, in seconds, relative to server
|
321
|
+
# time. The new value must be larger than or equal to 0, and cannot be larger than 7
|
322
|
+
# days. The visibility timeout of a message cannot be set to a value later than the
|
323
|
+
# expiry time. :visibility_timeout should be set to a value smaller than the
|
324
|
+
# time-to-live value. If not specified, the default value is 0.
|
325
|
+
# * +:message_ttl+ - Integer. Specifies the time-to-live interval for the message, in seconds. The maximum
|
326
|
+
# time-to-live allowed is 7 days. If not specified, the default time-to-live is 7 days.
|
327
|
+
# * +:encode+ - Boolean. If set to true, the message will be base64 encoded.
|
328
|
+
# * +:timeout+ - Integer. A timeout in seconds.
|
329
|
+
# * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
|
330
|
+
# in the analytics logs when storage analytics logging is enabled.
|
313
331
|
#
|
314
332
|
# See http://msdn.microsoft.com/en-us/library/azure/dd179346
|
315
333
|
#
|
@@ -326,7 +344,7 @@ module Azure::Storage
|
|
326
344
|
uri = messages_uri(queue_name, query)
|
327
345
|
body = Serialization.message_to_xml(message_text, options[:encode])
|
328
346
|
|
329
|
-
call(:post, uri, body, {})
|
347
|
+
call(:post, uri, body, {}, options)
|
330
348
|
nil
|
331
349
|
end
|
332
350
|
|
@@ -334,16 +352,18 @@ module Azure::Storage
|
|
334
352
|
#
|
335
353
|
# ==== Attributes
|
336
354
|
#
|
337
|
-
# * +queue_name+
|
338
|
-
# * +message_id+
|
339
|
-
# * +pop_receipt+
|
340
|
-
#
|
341
|
-
# * +options+
|
355
|
+
# * +queue_name+ - String. The queue name.
|
356
|
+
# * +message_id+ - String. The id of the message.
|
357
|
+
# * +pop_receipt+ - String. The valid pop receipt value returned from an earlier call to the Get Messages or
|
358
|
+
# Update Message operation.
|
359
|
+
# * +options+ - Hash. Optional parameters.
|
342
360
|
#
|
343
361
|
# ==== Options
|
344
362
|
#
|
345
363
|
# Accepted key/value pairs in options parameter are:
|
346
|
-
# * +:timeout+
|
364
|
+
# * +:timeout+ - Integer. A timeout in seconds.
|
365
|
+
# * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
|
366
|
+
# in the analytics logs when storage analytics logging is enabled.
|
347
367
|
#
|
348
368
|
# See http://msdn.microsoft.com/en-us/library/azure/dd179347
|
349
369
|
#
|
@@ -392,7 +412,7 @@ module Azure::Storage
|
|
392
412
|
|
393
413
|
uri = message_uri(queue_name, message_id, query)
|
394
414
|
|
395
|
-
call(:delete, uri)
|
415
|
+
call(:delete, uri, nil, {}, options)
|
396
416
|
nil
|
397
417
|
end
|
398
418
|
|
@@ -400,15 +420,17 @@ module Azure::Storage
|
|
400
420
|
#
|
401
421
|
# ==== Attributes
|
402
422
|
#
|
403
|
-
# * +queue_name+
|
404
|
-
# * +options+
|
423
|
+
# * +queue_name+ - String. The queue name.
|
424
|
+
# * +options+ - Hash. Optional parameters.
|
405
425
|
#
|
406
426
|
# ==== Options
|
407
427
|
#
|
408
428
|
# Accepted key/value pairs in options parameter are:
|
409
|
-
# * +:number_of_messages+
|
410
|
-
# * +:decode+
|
411
|
-
# * +:timeout+
|
429
|
+
# * +:number_of_messages+ - Integer. How many messages to return. (optional, Default: 1)
|
430
|
+
# * +:decode+ - Boolean. Boolean value indicating if the message should be base64 decoded.
|
431
|
+
# * +:timeout+ - Integer. A timeout in seconds.
|
432
|
+
# * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
|
433
|
+
# in the analytics logs when storage analytics logging is enabled.
|
412
434
|
#
|
413
435
|
# See http://msdn.microsoft.com/en-us/library/azure/dd179472
|
414
436
|
#
|
@@ -421,7 +443,7 @@ module Azure::Storage
|
|
421
443
|
query["timeout"] = options[:timeout].to_s if options[:timeout]
|
422
444
|
|
423
445
|
uri = messages_uri(queue_name, query)
|
424
|
-
response = call(:get, uri)
|
446
|
+
response = call(:get, uri, nil, {}, options)
|
425
447
|
|
426
448
|
messages = Serialization.queue_messages_from_xml(response.body, options[:decode])
|
427
449
|
messages
|
@@ -431,16 +453,18 @@ module Azure::Storage
|
|
431
453
|
#
|
432
454
|
# ==== Attributes
|
433
455
|
#
|
434
|
-
# * +queue_name+
|
435
|
-
# * +visibility_timeout+
|
436
|
-
# * +options+
|
456
|
+
# * +queue_name+ - String. The queue name.
|
457
|
+
# * +visibility_timeout+ - Integer. The new visibility timeout value, in seconds, relative to server time.
|
458
|
+
# * +options+ - Hash. Optional parameters.
|
437
459
|
#
|
438
460
|
# ==== Options
|
439
461
|
#
|
440
462
|
# Accepted key/value pairs in options parameter are:
|
441
|
-
# * +:number_of_messages+
|
442
|
-
# * +:timeout+
|
443
|
-
# * +:
|
463
|
+
# * +:number_of_messages+ - Integer. How many messages to return. (optional, Default: 1)
|
464
|
+
# * +:timeout+ - Integer. A timeout in seconds.
|
465
|
+
# * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
|
466
|
+
# in the analytics logs when storage analytics logging is enabled.
|
467
|
+
# * +:decode+ - Boolean. Boolean value indicating if the message should be base64 decoded.
|
444
468
|
#
|
445
469
|
# See http://msdn.microsoft.com/en-us/library/azure/dd179474
|
446
470
|
#
|
@@ -453,7 +477,7 @@ module Azure::Storage
|
|
453
477
|
query["timeout"] = options[:timeout].to_s if options[:timeout]
|
454
478
|
|
455
479
|
uri = messages_uri(queue_name, query)
|
456
|
-
response = call(:get, uri)
|
480
|
+
response = call(:get, uri, nil, {}, options)
|
457
481
|
|
458
482
|
messages = Serialization.queue_messages_from_xml(response.body, options[:decode])
|
459
483
|
messages
|
@@ -463,20 +487,22 @@ module Azure::Storage
|
|
463
487
|
#
|
464
488
|
# ==== Attributes
|
465
489
|
#
|
466
|
-
# * +queue_name+
|
467
|
-
# * +message_id+
|
468
|
-
# * +pop_receipt+
|
469
|
-
#
|
470
|
-
# * +message_text+
|
471
|
-
#
|
472
|
-
# * +visibility_timeout+
|
473
|
-
# * +options+
|
490
|
+
# * +queue_name+ - String. The queue name.
|
491
|
+
# * +message_id+ - String. The id of the message.
|
492
|
+
# * +pop_receipt+ - String. The valid pop receipt value returned from an earlier call to the Get Messages or
|
493
|
+
# update Message operation.
|
494
|
+
# * +message_text+ - String. The message contents. Note that the message content must be in a format that may
|
495
|
+
# be encoded with UTF-8.
|
496
|
+
# * +visibility_timeout+ - Integer. The new visibility timeout value, in seconds, relative to server time.
|
497
|
+
# * +options+ - Hash. Optional parameters.
|
474
498
|
#
|
475
499
|
# ==== Options
|
476
500
|
#
|
477
501
|
# Accepted key/value pairs in options parameter are:
|
478
|
-
# * +:encode+
|
479
|
-
# * +:timeout+
|
502
|
+
# * +:encode+ - Boolean. If set to true, the message will be base64 encoded.
|
503
|
+
# * +:timeout+ - Integer. A timeout in seconds.
|
504
|
+
# * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
|
505
|
+
# in the analytics logs when storage analytics logging is enabled.
|
480
506
|
#
|
481
507
|
# See http://msdn.microsoft.com/en-us/library/azure/hh452234
|
482
508
|
#
|
@@ -517,7 +543,7 @@ module Azure::Storage
|
|
517
543
|
uri = message_uri(queue_name, message_id, query)
|
518
544
|
body = Serialization.message_to_xml(message_text, options[:encode])
|
519
545
|
|
520
|
-
response = call(:put, uri, body, {})
|
546
|
+
response = call(:put, uri, body, {}, options)
|
521
547
|
new_pop_receipt = response.headers["x-ms-popreceipt"]
|
522
548
|
time_next_visible = response.headers["x-ms-time-next-visible"]
|
523
549
|
return new_pop_receipt, time_next_visible
|