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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8eb09fd448c403c8f348d9d50f1edd4f3824876e
4
- data.tar.gz: 86f0661c191d66ea65a979e145aea7ef76d97414
3
+ metadata.gz: 93583b9726a105be0a8a14bfd6ccd9abf3050617
4
+ data.tar.gz: ca52bd4560c7c0623bda0549845eb2dd6809c5d9
5
5
  SHA512:
6
- metadata.gz: 213bd465a59e3f6cdfbd24bc20e572f386d2d7e7f7d9f6661dd0058d6012f03920160f3d86b5c6b2fa124b484d4e823036e1ae8ae0066498ba16d35d7e53e7b2
7
- data.tar.gz: e543a1360919133f26f822c8ae76bca7ec72467805a7ee2aa11cc6a66b2f0b5d4d2f4df0f315ba5f3663754ec652852b5465ec4eb0e56bfe1b2a14a772e281cb
6
+ metadata.gz: 131e208024935b48d19f7a28ec80ba86f50a23894fb37087e11ea382c521986a0e0bcdddb74119b7ebe35ea5b093766bb59c0bd777c4be002a1592080a348238
7
+ data.tar.gz: b99f307c7a166babcf00da58d87ed7aefdc171d97cce2ad314ea3ab4846dedb17b7787f2d969d9727b69f4ec124cc785339147bfd8d9670b18d011c8a2da9ab0
@@ -47,6 +47,8 @@ module Azure::Storage
47
47
  # and also can be used to attach additional metadata
48
48
  # * +:metadata+ - Hash. Custom metadata values to store with the blob.
49
49
  # * +:timeout+ - Integer. A timeout in seconds.
50
+ # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
51
+ # in the analytics logs when storage analytics logging is enabled.
50
52
  # * +:if_modified_since+ - String. A DateTime value. Specify this conditional header to create a new blob
51
53
  # only if the blob has been modified since the specified date/time. If the blob has not been modified,
52
54
  # the Blob service returns status code 412 (Precondition Failed).
@@ -69,7 +71,7 @@ module Azure::Storage
69
71
 
70
72
  uri = blob_uri(container, blob, query)
71
73
 
72
- headers = StorageService.service_properties_headers
74
+ headers = StorageService.common_headers
73
75
 
74
76
  # set x-ms-blob-type to AppendBlob
75
77
  StorageService.with_header headers, 'x-ms-blob-type', 'AppendBlob'
@@ -90,7 +92,7 @@ module Azure::Storage
90
92
  add_blob_conditional_headers options, headers
91
93
 
92
94
  # call PutBlob with empty body
93
- response = call(:put, uri, nil, headers)
95
+ response = call(:put, uri, nil, headers, options)
94
96
 
95
97
  result = Serialization.blob_from_headers(response.headers)
96
98
  result.name = blob
@@ -116,6 +118,8 @@ module Azure::Storage
116
118
  # * +:max_size+ - Integer. The max length in bytes permitted for the append blob
117
119
  # * +:append_position+ - Integer. A number indicating the byte offset to compare. It will succeed only if the append position is equal to this number
118
120
  # * +:timeout+ - Integer. A timeout in seconds.
121
+ # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
122
+ # in the analytics logs when storage analytics logging is enabled.
119
123
  # * +:if_modified_since+ - String. A DateTime value. Specify this conditional header to append a block only if
120
124
  # the blob has been modified since the specified date/time. If the blob has not been modified,
121
125
  # the Blob service returns status code 412 (Precondition Failed).
@@ -138,13 +142,13 @@ module Azure::Storage
138
142
 
139
143
  uri = blob_uri(container, blob, query)
140
144
 
141
- headers = StorageService.service_properties_headers
145
+ headers = StorageService.common_headers
142
146
  StorageService.with_header headers, 'Content-MD5', options[:content_md5]
143
147
  StorageService.with_header headers, 'x-ms-lease-id', options[:lease_id]
144
148
 
145
149
  add_blob_conditional_headers options, headers
146
150
 
147
- response = call(:put, uri, content, headers)
151
+ response = call(:put, uri, content, headers, options)
148
152
  result = Serialization.blob_from_headers(response.headers)
149
153
  result.name = blob
150
154
 
@@ -56,6 +56,8 @@ module Azure::Storage
56
56
  # * +:get_content_md5+ - Boolean. Return the MD5 hash for the range. This option only valid if
57
57
  # start_range and end_range are specified. (optional)
58
58
  # * +:timeout+ - Integer. A timeout in seconds.
59
+ # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
60
+ # in the analytics logs when storage analytics logging is enabled.
59
61
  # * +:if_modified_since+ - String. A DateTime value. Specify this conditional header to get the blob
60
62
  # only if the blob has been modified since the specified date/time. If the blob has not been modified,
61
63
  # the Blob service returns status code 412 (Precondition Failed).
@@ -78,7 +80,7 @@ module Azure::Storage
78
80
  StorageService.with_query query, 'timeout', options[:timeout].to_s if options[:timeout]
79
81
  uri = blob_uri(container, blob, query)
80
82
 
81
- headers = StorageService.service_properties_headers
83
+ headers = StorageService.common_headers
82
84
  options[:start_range] = 0 if options[:end_range] and not options[:start_range]
83
85
  if options[:start_range]
84
86
  StorageService.with_header headers, 'x-ms-range', "bytes=#{options[:start_range]}-#{options[:end_range]}"
@@ -86,7 +88,7 @@ module Azure::Storage
86
88
  end
87
89
  add_blob_conditional_headers options, headers
88
90
 
89
- response = call(:get, uri, nil, headers)
91
+ response = call(:get, uri, nil, headers, options)
90
92
  result = Serialization.blob_from_headers(response.headers)
91
93
  result.name = blob unless result.name
92
94
  return result, response.body
@@ -106,6 +108,8 @@ module Azure::Storage
106
108
  # * +:snapshot+ - String. An opaque DateTime value that specifies the blob snapshot to
107
109
  # retrieve information from.
108
110
  # * +:timeout+ - Integer. A timeout in seconds.
111
+ # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
112
+ # in the analytics logs when storage analytics logging is enabled.
109
113
  # * +:if_modified_since+ - String. A DateTime value. Specify this conditional header to get the blob properties
110
114
  # only if the blob has been modified since the specified date/time. If the blob has not been modified,
111
115
  # the Blob service returns status code 412 (Precondition Failed).
@@ -127,14 +131,14 @@ module Azure::Storage
127
131
  StorageService.with_query query, 'snapshot', options[:snapshot]
128
132
  StorageService.with_query query, 'timeout', options[:timeout].to_s if options[:timeout]
129
133
 
130
- headers = StorageService.service_properties_headers
134
+ headers = StorageService.common_headers
131
135
  unless options.empty?
132
136
  add_blob_conditional_headers options, headers
133
137
  end
134
138
 
135
139
  uri = blob_uri(container, blob, query)
136
140
 
137
- response = call(:head, uri, nil, headers)
141
+ response = call(:head, uri, nil, headers, options)
138
142
 
139
143
  result = Serialization.blob_from_headers(response.headers)
140
144
 
@@ -195,6 +199,8 @@ module Azure::Storage
195
199
  # To set the sequence number to a value of your choosing, this property must be specified
196
200
  # together with :sequence_number_action
197
201
  # * +:timeout+ - Integer. A timeout in seconds.
202
+ # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
203
+ # in the analytics logs when storage analytics logging is enabled.
198
204
  # * +:if_modified_since+ - String. A DateTime value. Specify this conditional header to set the blob properties
199
205
  # only if the blob has been modified since the specified date/time. If the blob has not been modified,
200
206
  # the Blob service returns status code 412 (Precondition Failed).
@@ -241,7 +247,7 @@ module Azure::Storage
241
247
  StorageService.with_query query, 'timeout', options[:timeout].to_s if options[:timeout]
242
248
  uri = blob_uri(container, blob, query)
243
249
 
244
- headers = StorageService.service_properties_headers
250
+ headers = StorageService.common_headers
245
251
 
246
252
  unless options.empty?
247
253
  StorageService.with_header headers, 'x-ms-blob-content-type', options[:content_type]
@@ -263,7 +269,7 @@ module Azure::Storage
263
269
  add_blob_conditional_headers options, headers
264
270
  end
265
271
 
266
- call(:put, uri, nil, headers)
272
+ call(:put, uri, nil, headers, options)
267
273
  nil
268
274
  end
269
275
 
@@ -281,6 +287,8 @@ module Azure::Storage
281
287
  # * +:snapshot+ - String. An opaque DateTime value that specifies the blob snapshot to
282
288
  # retrieve information from.
283
289
  # * +:timeout+ - Integer. A timeout in seconds.
290
+ # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
291
+ # in the analytics logs when storage analytics logging is enabled.
284
292
  # * +:if_modified_since+ - String. A DateTime value. Specify this conditional header to get the blob metadata
285
293
  # only if the blob has been modified since the specified date/time. If the blob has not been modified,
286
294
  # the Blob service returns status code 412 (Precondition Failed).
@@ -302,13 +310,13 @@ module Azure::Storage
302
310
  StorageService.with_query query, 'snapshot', options[:snapshot]
303
311
  StorageService.with_query query, 'timeout', options[:timeout].to_s if options[:timeout]
304
312
 
305
- headers = StorageService.service_properties_headers
313
+ headers = StorageService.common_headers
306
314
  unless options.empty?
307
315
  add_blob_conditional_headers options, headers
308
316
  end
309
317
 
310
318
  uri = blob_uri(container, blob, query)
311
- response = call(:get, uri, nil, headers)
319
+ response = call(:get, uri, nil, headers, options)
312
320
  result = Serialization.blob_from_headers(response.headers)
313
321
 
314
322
  result.name = blob
@@ -330,6 +338,8 @@ module Azure::Storage
330
338
  #
331
339
  # Accepted key/value pairs in options parameter are:
332
340
  # * +:timeout+ - Integer. A timeout in seconds.
341
+ # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
342
+ # in the analytics logs when storage analytics logging is enabled.
333
343
  # * +:if_modified_since+ - String. A DateTime value. Specify this conditional header to set the blob metadata
334
344
  # only if the blob has been modified since the specified date/time. If the blob has not been modified,
335
345
  # the Blob service returns status code 412 (Precondition Failed).
@@ -352,13 +362,13 @@ module Azure::Storage
352
362
 
353
363
  uri = blob_uri(container, blob, query)
354
364
 
355
- headers = StorageService.service_properties_headers
365
+ headers = StorageService.common_headers
356
366
  StorageService.add_metadata_to_headers metadata, headers
357
367
  unless options.empty?
358
368
  add_blob_conditional_headers options, headers
359
369
  end
360
370
 
361
- call(:put, uri, nil, headers)
371
+ call(:put, uri, nil, headers, options)
362
372
  nil
363
373
  end
364
374
 
@@ -379,6 +389,8 @@ module Azure::Storage
379
389
  # * +:proposed_lease_id+ - String. Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request)
380
390
  # if the proposed lease ID is not in the correct format. (optional)
381
391
  # * +:timeout+ - Integer. A timeout in seconds.
392
+ # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
393
+ # in the analytics logs when storage analytics logging is enabled.
382
394
  # * +:if_modified_since+ - String. A DateTime value. Specify this conditional header to acquire the lease
383
395
  # only if the blob has been modified since the specified date/time. If the blob has not been modified,
384
396
  # the Blob service returns status code 412 (Precondition Failed).
@@ -417,6 +429,8 @@ module Azure::Storage
417
429
  #
418
430
  # Accepted key/value pairs in options parameter are:
419
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.
420
434
  # * +:if_modified_since+ - String. A DateTime value. Specify this conditional header to renew the lease
421
435
  # only if the blob has been modified since the specified date/time. If the blob has not been modified,
422
436
  # the Blob service returns status code 412 (Precondition Failed).
@@ -451,6 +465,8 @@ module Azure::Storage
451
465
  #
452
466
  # Accepted key/value pairs in options parameter are:
453
467
  # * +:timeout+ - Integer. A timeout in seconds.
468
+ # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
469
+ # in the analytics logs when storage analytics logging is enabled.
454
470
  # * +:if_modified_since+ - String. A DateTime value. Specify this conditional header to change the lease
455
471
  # only if the blob has been modified since the specified date/time. If the blob has not been modified,
456
472
  # the Blob service returns status code 412 (Precondition Failed).
@@ -485,6 +501,8 @@ module Azure::Storage
485
501
  #
486
502
  # Accepted key/value pairs in options parameter are:
487
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.
488
506
  # * +:if_modified_since+ - String. A DateTime value. Specify this conditional header to release the lease
489
507
  # only if the blob has been modified since the specified date/time. If the blob has not been modified,
490
508
  # the Blob service returns status code 412 (Precondition Failed).
@@ -531,6 +549,8 @@ module Azure::Storage
531
549
  # If this option is not used, a fixed-duration lease breaks after the remaining lease
532
550
  # period elapses, and an infinite lease breaks immediately.
533
551
  # * +:timeout+ - Integer. A timeout in seconds.
552
+ # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
553
+ # in the analytics logs when storage analytics logging is enabled.
534
554
  # * +:if_modified_since+ - String. A DateTime value. Specify this conditional header to break the lease
535
555
  # only if the blob has been modified since the specified date/time. If the blob has not been modified,
536
556
  # the Blob service returns status code 412 (Precondition Failed).
@@ -565,6 +585,8 @@ module Azure::Storage
565
585
  # Accepted key/value pairs in options parameter are:
566
586
  # * +:metadata+ - Hash. Custom metadata values to store with the blob snapshot.
567
587
  # * +:timeout+ - Integer. A timeout in seconds.
588
+ # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
589
+ # in the analytics logs when storage analytics logging is enabled.
568
590
  # * +:if_modified_since+ - String. A DateTime value. Specify this conditional header to create the blob snapshot
569
591
  # only if the blob has been modified since the specified date/time. If the blob has not been modified,
570
592
  # the Blob service returns status code 412 (Precondition Failed).
@@ -587,13 +609,13 @@ module Azure::Storage
587
609
 
588
610
  uri = blob_uri(container, blob, query)
589
611
 
590
- headers = StorageService.service_properties_headers
612
+ headers = StorageService.common_headers
591
613
  unless options.empty?
592
614
  StorageService.add_metadata_to_headers(options[:metadata], headers)
593
615
  add_blob_conditional_headers(options, headers)
594
616
  end
595
617
 
596
- response = call(:put, uri, nil, headers)
618
+ response = call(:put, uri, nil, headers, options)
597
619
 
598
620
  response.headers['x-ms-snapshot']
599
621
  end
@@ -640,6 +662,8 @@ module Azure::Storage
640
662
  # blob's ETag value does not match the value specified. If the values are
641
663
  # identical, the Blob service returns status code 412 (Precondition Failed).
642
664
  # * +:timeout+ - Integer. A timeout in seconds.
665
+ # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
666
+ # in the analytics logs when storage analytics logging is enabled.
643
667
  #
644
668
  # See http://msdn.microsoft.com/en-us/library/azure/dd894037.aspx
645
669
  #
@@ -656,7 +680,7 @@ module Azure::Storage
656
680
  StorageService.with_query query, 'timeout', options[:timeout].to_s if options[:timeout]
657
681
 
658
682
  uri = blob_uri(destination_container, destination_blob, query)
659
- headers = StorageService.service_properties_headers
683
+ headers = StorageService.common_headers
660
684
  StorageService.with_header headers, 'x-ms-copy-source', source_blob_uri
661
685
 
662
686
  unless options.empty?
@@ -664,7 +688,7 @@ module Azure::Storage
664
688
  StorageService.add_metadata_to_headers options[:metadata], headers
665
689
  end
666
690
 
667
- response = call(:put, uri, nil, headers)
691
+ response = call(:put, uri, nil, headers, options)
668
692
  return response.headers['x-ms-copy-id'], response.headers['x-ms-copy-status']
669
693
  end
670
694
 
@@ -711,6 +735,8 @@ module Azure::Storage
711
735
  # blob's ETag value does not match the value specified. If the values are
712
736
  # identical, the Blob service returns status code 412 (Precondition Failed).
713
737
  # * +:timeout+ - Integer. A timeout in seconds.
738
+ # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
739
+ # in the analytics logs when storage analytics logging is enabled.
714
740
  #
715
741
  # See http://msdn.microsoft.com/en-us/library/azure/dd894037.aspx
716
742
  #
@@ -742,6 +768,8 @@ module Azure::Storage
742
768
  # Accepted key/value pairs in options parameter are:
743
769
  # * +:lease_id+ - String. The lease id if the destination blob has an active infinite lease
744
770
  # * +:timeout+ - Integer. A timeout in seconds.
771
+ # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
772
+ # in the analytics logs when storage analytics logging is enabled.
745
773
  #
746
774
  # See https://msdn.microsoft.com/en-us/library/azure/jj159098.aspx
747
775
  #
@@ -752,14 +780,14 @@ module Azure::Storage
752
780
  StorageService.with_query query, 'copyid', copy_id
753
781
 
754
782
  uri = blob_uri(container, blob, query);
755
- headers = StorageService.service_properties_headers
783
+ headers = StorageService.common_headers
756
784
  StorageService.with_header headers, 'x-ms-copy-action', 'abort';
757
785
 
758
786
  unless options.empty?
759
787
  StorageService.with_header headers, 'x-ms-lease-id', options[:lease_id]
760
788
  end
761
789
 
762
- response = call(:put, uri, nil, headers)
790
+ response = call(:put, uri, nil, headers, options)
763
791
  nil
764
792
  end
765
793
 
@@ -784,6 +812,8 @@ module Azure::Storage
784
812
  # * +:only+ - Deletes only the snapshots for the blob, but leaves the blob
785
813
  # * +:include+ - Deletes the blob and all of the snapshots for the blob
786
814
  # * +:timeout+ - Integer. A timeout in seconds.
815
+ # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
816
+ # in the analytics logs when storage analytics logging is enabled.
787
817
  # * +:if_modified_since+ - String. A DateTime value. Specify this conditional header to create the blob snapshot
788
818
  # only if the blob has been modified since the specified date/time. If the blob has not been modified,
789
819
  # the Blob service returns status code 412 (Precondition Failed).
@@ -809,11 +839,11 @@ module Azure::Storage
809
839
 
810
840
  options[:delete_snapshots] = :include unless options[:delete_snapshots]
811
841
 
812
- headers = StorageService.service_properties_headers
842
+ headers = StorageService.common_headers
813
843
  StorageService.with_header headers, 'x-ms-delete-snapshots', options[:delete_snapshots].to_s if options[:delete_snapshots] && options[:snapshot] == nil
814
844
  add_blob_conditional_headers options, headers
815
845
 
816
- call(:delete, uri, nil, headers)
846
+ call(:delete, uri, nil, headers, options)
817
847
  nil
818
848
  end
819
849
 
@@ -44,7 +44,7 @@ module Azure::Storage
44
44
  @host = client.storage_blob_host
45
45
  end
46
46
 
47
- def call(method, uri, body=nil, headers={})
47
+ def call(method, uri, body=nil, headers={}, options={})
48
48
  # Force the request.body to the content encoding of specified in the header
49
49
  # (content encoding probably shouldn't be used this way)
50
50
  if headers && !body.nil?
@@ -96,6 +96,9 @@ module Azure::Storage
96
96
  #
97
97
  # * +:timeout+ - Integer. A timeout in seconds.
98
98
  #
99
+ # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
100
+ # in the analytics logs when storage analytics logging is enabled.
101
+ #
99
102
  # NOTE: Metadata requested with the :metadata parameter must have been stored in
100
103
  # accordance with the naming restrictions imposed by the 2009-09-19 version of the Blob
101
104
  # service. Beginning with that version, all metadata names must adhere to the naming
@@ -120,7 +123,7 @@ module Azure::Storage
120
123
  end
121
124
 
122
125
  uri = containers_uri(query)
123
- response = call(:get, uri)
126
+ response = call(:get, uri, nil, {}, options)
124
127
 
125
128
  Serialization.container_enumeration_results_from_xml(response.body)
126
129
  end
@@ -142,6 +145,8 @@ module Azure::Storage
142
145
  # * +:proposed_lease_id+ - String. Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request)
143
146
  # if the proposed lease ID is not in the correct format. (optional)
144
147
  # * +:timeout+ - Integer. A timeout in seconds.
148
+ # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
149
+ # in the analytics logs when storage analytics logging is enabled.
145
150
  # * +:if_modified_since+ - String. A DateTime value. Specify this conditional header to acquire the lease
146
151
  # only if the blob has been modified since the specified date/time. If the blob has not been modified,
147
152
  # the Blob service returns status code 412 (Precondition Failed).
@@ -174,13 +179,13 @@ module Azure::Storage
174
179
  duration = -1
175
180
  duration = options[:duration] if options[:duration]
176
181
 
177
- headers = Service::StorageService.service_properties_headers
182
+ headers = Service::StorageService.common_headers
178
183
  Service::StorageService.with_header headers, 'x-ms-lease-action', 'acquire'
179
184
  Service::StorageService.with_header headers, 'x-ms-lease-duration', duration.to_s if duration
180
185
  Service::StorageService.with_header headers, 'x-ms-proposed-lease-id', options[:proposed_lease_id]
181
186
  add_blob_conditional_headers options, headers
182
187
 
183
- response = call(:put, uri, nil, headers)
188
+ response = call(:put, uri, nil, headers, options)
184
189
  response.headers['x-ms-lease-id']
185
190
  end
186
191
 
@@ -200,6 +205,8 @@ module Azure::Storage
200
205
  #
201
206
  # Accepted key/value pairs in options parameter are:
202
207
  # * +:timeout+ - Integer. A timeout in seconds.
208
+ # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
209
+ # in the analytics logs when storage analytics logging is enabled.
203
210
  # * +:if_modified_since+ - String. A DateTime value. Specify this conditional header to renew the lease
204
211
  # only if the blob has been modified since the specified date/time. If the blob has not been modified,
205
212
  # the Blob service returns status code 412 (Precondition Failed).
@@ -228,12 +235,12 @@ module Azure::Storage
228
235
  uri = container_uri(container, query)
229
236
  end
230
237
 
231
- headers = Service::StorageService.service_properties_headers
238
+ headers = Service::StorageService.common_headers
232
239
  Service::StorageService.with_header headers, 'x-ms-lease-action', 'renew'
233
240
  Service::StorageService.with_header headers, 'x-ms-lease-id', lease
234
241
  add_blob_conditional_headers options, headers
235
242
 
236
- response = call(:put, uri, nil, headers)
243
+ response = call(:put, uri, nil, headers, options)
237
244
  response.headers['x-ms-lease-id']
238
245
  end
239
246
 
@@ -252,6 +259,8 @@ module Azure::Storage
252
259
  #
253
260
  # Accepted key/value pairs in options parameter are:
254
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.
255
264
  # * +:if_modified_since+ - String. A DateTime value. Specify this conditional header to change the lease
256
265
  # only if the blob has been modified since the specified date/time. If the blob has not been modified,
257
266
  # the Blob service returns status code 412 (Precondition Failed).
@@ -281,13 +290,13 @@ module Azure::Storage
281
290
  uri = container_uri(container, query)
282
291
  end
283
292
 
284
- headers = Service::StorageService.service_properties_headers
293
+ headers = Service::StorageService.common_headers
285
294
  Service::StorageService.with_header headers, 'x-ms-lease-action', 'change'
286
295
  Service::StorageService.with_header headers, 'x-ms-lease-id', lease
287
296
  Service::StorageService.with_header headers, 'x-ms-proposed-lease-id', proposed_lease
288
297
  add_blob_conditional_headers options, headers
289
298
 
290
- response = call(:put, uri, nil, headers)
299
+ response = call(:put, uri, nil, headers, options)
291
300
  response.headers['x-ms-lease-id']
292
301
  end
293
302
 
@@ -306,6 +315,8 @@ module Azure::Storage
306
315
  #
307
316
  # Accepted key/value pairs in options parameter are:
308
317
  # * +:timeout+ - Integer. A timeout in seconds.
318
+ # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
319
+ # in the analytics logs when storage analytics logging is enabled.
309
320
  # * +:if_modified_since+ - String. A DateTime value. Specify this conditional header to release the lease
310
321
  # only if the blob has been modified since the specified date/time. If the blob has not been modified,
311
322
  # the Blob service returns status code 412 (Precondition Failed).
@@ -334,12 +345,12 @@ module Azure::Storage
334
345
  uri = container_uri(container, query)
335
346
  end
336
347
 
337
- headers = Service::StorageService.service_properties_headers
348
+ headers = Service::StorageService.common_headers
338
349
  Service::StorageService.with_header headers, 'x-ms-lease-action', 'release'
339
350
  Service::StorageService.with_header headers, 'x-ms-lease-id', lease
340
351
  add_blob_conditional_headers options, headers
341
352
 
342
- call(:put, uri, nil, headers)
353
+ call(:put, uri, nil, headers, options)
343
354
  nil
344
355
  end
345
356
 
@@ -370,6 +381,8 @@ module Azure::Storage
370
381
  # If this option is not used, a fixed-duration lease breaks after the remaining lease
371
382
  # period elapses, and an infinite lease breaks immediately.
372
383
  # * +:timeout+ - Integer. A timeout in seconds.
384
+ # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded
385
+ # in the analytics logs when storage analytics logging is enabled.
373
386
  # * +:if_modified_since+ - String. A DateTime value. Specify this conditional header to acquire the lease
374
387
  # only if the blob has been modified since the specified date/time. If the blob has not been modified,
375
388
  # the Blob service returns status code 412 (Precondition Failed).
@@ -400,12 +413,12 @@ module Azure::Storage
400
413
  uri = container_uri(container, query)
401
414
  end
402
415
 
403
- headers = Service::StorageService.service_properties_headers
416
+ headers = Service::StorageService.common_headers
404
417
  Service::StorageService.with_header headers, 'x-ms-lease-action', 'break'
405
418
  Service::StorageService.with_header headers, 'x-ms-lease-break-period', options[:break_period].to_s if options[:break_period]
406
419
  add_blob_conditional_headers options, headers
407
420
 
408
- response = call(:put, uri, nil, headers)
421
+ response = call(:put, uri, nil, headers, options)
409
422
  response.headers['x-ms-lease-time'].to_i
410
423
  end
411
424