azure-storage-blob 12.19.1__py3-none-any.whl → 12.20.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- azure/storage/blob/__init__.py +17 -5
- azure/storage/blob/_blob_client.py +23 -7
- azure/storage/blob/_blob_service_client.py +9 -3
- azure/storage/blob/_container_client.py +37 -13
- azure/storage/blob/_download.py +3 -3
- azure/storage/blob/_encryption.py +254 -165
- azure/storage/blob/_generated/_azure_blob_storage.py +21 -3
- azure/storage/blob/_generated/_configuration.py +4 -11
- azure/storage/blob/_generated/_serialization.py +41 -49
- azure/storage/blob/_generated/aio/_azure_blob_storage.py +23 -3
- azure/storage/blob/_generated/aio/_configuration.py +4 -11
- azure/storage/blob/_generated/aio/operations/_append_blob_operations.py +24 -58
- azure/storage/blob/_generated/aio/operations/_blob_operations.py +123 -306
- azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +37 -86
- azure/storage/blob/_generated/aio/operations/_container_operations.py +98 -289
- azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +51 -150
- azure/storage/blob/_generated/aio/operations/_service_operations.py +49 -125
- azure/storage/blob/_generated/models/_models_py3.py +31 -31
- azure/storage/blob/_generated/operations/_append_blob_operations.py +25 -59
- azure/storage/blob/_generated/operations/_blob_operations.py +123 -306
- azure/storage/blob/_generated/operations/_block_blob_operations.py +39 -88
- azure/storage/blob/_generated/operations/_container_operations.py +100 -291
- azure/storage/blob/_generated/operations/_page_blob_operations.py +52 -151
- azure/storage/blob/_generated/operations/_service_operations.py +50 -126
- azure/storage/blob/_lease.py +1 -0
- azure/storage/blob/_models.py +3 -4
- azure/storage/blob/_serialize.py +1 -0
- azure/storage/blob/_shared/authentication.py +1 -1
- azure/storage/blob/_shared/avro/avro_io.py +0 -6
- azure/storage/blob/_shared/avro/avro_io_async.py +0 -6
- azure/storage/blob/_shared/avro/datafile.py +0 -4
- azure/storage/blob/_shared/avro/datafile_async.py +0 -4
- azure/storage/blob/_shared/avro/schema.py +4 -4
- azure/storage/blob/_shared/base_client.py +72 -87
- azure/storage/blob/_shared/base_client_async.py +115 -27
- azure/storage/blob/_shared/models.py +120 -27
- azure/storage/blob/_shared/parser.py +7 -6
- azure/storage/blob/_shared/policies.py +96 -66
- azure/storage/blob/_shared/policies_async.py +48 -21
- azure/storage/blob/_shared/response_handlers.py +14 -16
- azure/storage/blob/_shared/shared_access_signature.py +3 -3
- azure/storage/blob/_shared_access_signature.py +38 -27
- azure/storage/blob/_upload_helpers.py +4 -7
- azure/storage/blob/_version.py +1 -1
- azure/storage/blob/aio/__init__.py +13 -4
- azure/storage/blob/aio/_blob_client_async.py +17 -6
- azure/storage/blob/aio/_blob_service_client_async.py +4 -2
- azure/storage/blob/aio/_container_client_async.py +26 -9
- azure/storage/blob/aio/_download_async.py +9 -9
- azure/storage/blob/aio/_encryption_async.py +72 -0
- azure/storage/blob/aio/_lease_async.py +1 -1
- azure/storage/blob/aio/_upload_helpers.py +8 -10
- {azure_storage_blob-12.19.1.dist-info → azure_storage_blob-12.20.0.dist-info}/METADATA +10 -10
- azure_storage_blob-12.20.0.dist-info/RECORD +81 -0
- {azure_storage_blob-12.19.1.dist-info → azure_storage_blob-12.20.0.dist-info}/WHEEL +1 -1
- azure/storage/blob/_generated/py.typed +0 -1
- azure_storage_blob-12.19.1.dist-info/RECORD +0 -81
- {azure_storage_blob-12.19.1.dist-info → azure_storage_blob-12.20.0.dist-info}/LICENSE +0 -0
- {azure_storage_blob-12.19.1.dist-info → azure_storage_blob-12.20.0.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
# pylint: disable=too-many-lines
|
1
|
+
# pylint: disable=too-many-lines,too-many-statements
|
2
2
|
# coding=utf-8
|
3
3
|
# --------------------------------------------------------------------------
|
4
4
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
@@ -7,8 +7,7 @@
|
|
7
7
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
8
8
|
# --------------------------------------------------------------------------
|
9
9
|
import datetime
|
10
|
-
import
|
11
|
-
from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union
|
10
|
+
from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union
|
12
11
|
|
13
12
|
from azure.core.exceptions import (
|
14
13
|
ClientAuthenticationError,
|
@@ -38,10 +37,6 @@ from ...operations._page_blob_operations import (
|
|
38
37
|
build_upload_pages_request,
|
39
38
|
)
|
40
39
|
|
41
|
-
if sys.version_info >= (3, 8):
|
42
|
-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
|
43
|
-
else:
|
44
|
-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
|
45
40
|
T = TypeVar("T")
|
46
41
|
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
|
47
42
|
|
@@ -138,11 +133,6 @@ class PageBlobOperations:
|
|
138
133
|
:type cpk_scope_info: ~azure.storage.blob.models.CpkScopeInfo
|
139
134
|
:param modified_access_conditions: Parameter group. Default value is None.
|
140
135
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
141
|
-
:keyword blob_type: Specifies the type of blob to create: block blob, page blob, or append
|
142
|
-
blob. Default value is "PageBlob". Note that overriding this default value may result in
|
143
|
-
unsupported behavior.
|
144
|
-
:paramtype blob_type: str
|
145
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
146
136
|
:return: None or the result of cls(response)
|
147
137
|
:rtype: None
|
148
138
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -199,7 +189,7 @@ class PageBlobOperations:
|
|
199
189
|
_if_tags = modified_access_conditions.if_tags
|
200
190
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
201
191
|
|
202
|
-
|
192
|
+
_request = build_create_request(
|
203
193
|
url=self._config.url,
|
204
194
|
content_length=content_length,
|
205
195
|
blob_content_length=blob_content_length,
|
@@ -230,16 +220,15 @@ class PageBlobOperations:
|
|
230
220
|
legal_hold=legal_hold,
|
231
221
|
blob_type=blob_type,
|
232
222
|
version=self._config.version,
|
233
|
-
template_url=self.create.metadata["url"],
|
234
223
|
headers=_headers,
|
235
224
|
params=_params,
|
236
225
|
)
|
237
|
-
|
238
|
-
|
226
|
+
_request = _convert_request(_request)
|
227
|
+
_request.url = self._client.format_url(_request.url)
|
239
228
|
|
240
229
|
_stream = False
|
241
230
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
242
|
-
|
231
|
+
_request, stream=_stream, **kwargs
|
243
232
|
)
|
244
233
|
|
245
234
|
response = pipeline_response.http_response
|
@@ -271,15 +260,13 @@ class PageBlobOperations:
|
|
271
260
|
)
|
272
261
|
|
273
262
|
if cls:
|
274
|
-
return cls(pipeline_response, None, response_headers)
|
275
|
-
|
276
|
-
create.metadata = {"url": "{url}"}
|
263
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
277
264
|
|
278
265
|
@distributed_trace_async
|
279
266
|
async def upload_pages( # pylint: disable=inconsistent-return-statements
|
280
267
|
self,
|
281
268
|
content_length: int,
|
282
|
-
body: IO,
|
269
|
+
body: IO[bytes],
|
283
270
|
transactional_content_md5: Optional[bytes] = None,
|
284
271
|
transactional_content_crc64: Optional[bytes] = None,
|
285
272
|
timeout: Optional[int] = None,
|
@@ -297,7 +284,7 @@ class PageBlobOperations:
|
|
297
284
|
:param content_length: The length of the request. Required.
|
298
285
|
:type content_length: int
|
299
286
|
:param body: Initial data. Required.
|
300
|
-
:type body: IO
|
287
|
+
:type body: IO[bytes]
|
301
288
|
:param transactional_content_md5: Specify the transactional md5 for the body, to be validated
|
302
289
|
by the service. Default value is None.
|
303
290
|
:type transactional_content_md5: bytes
|
@@ -326,20 +313,6 @@ class PageBlobOperations:
|
|
326
313
|
~azure.storage.blob.models.SequenceNumberAccessConditions
|
327
314
|
:param modified_access_conditions: Parameter group. Default value is None.
|
328
315
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
329
|
-
:keyword comp: comp. Default value is "page". Note that overriding this default value may
|
330
|
-
result in unsupported behavior.
|
331
|
-
:paramtype comp: str
|
332
|
-
:keyword page_write: Required. You may specify one of the following options:
|
333
|
-
|
334
|
-
|
335
|
-
* Update: Writes the bytes specified by the request body into the specified range. The Range
|
336
|
-
and Content-Length headers must match to perform the update.
|
337
|
-
* Clear: Clears the specified range and releases the space used in storage for that range. To
|
338
|
-
clear a range, set the Content-Length header to zero, and the Range header to a value that
|
339
|
-
indicates the range to clear, up to maximum blob size. Default value is "update". Note that
|
340
|
-
overriding this default value may result in unsupported behavior.
|
341
|
-
:paramtype page_write: str
|
342
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
343
316
|
:return: None or the result of cls(response)
|
344
317
|
:rtype: None
|
345
318
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -395,7 +368,7 @@ class PageBlobOperations:
|
|
395
368
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
396
369
|
_content = body
|
397
370
|
|
398
|
-
|
371
|
+
_request = build_upload_pages_request(
|
399
372
|
url=self._config.url,
|
400
373
|
content_length=content_length,
|
401
374
|
transactional_content_md5=transactional_content_md5,
|
@@ -421,16 +394,15 @@ class PageBlobOperations:
|
|
421
394
|
content_type=content_type,
|
422
395
|
version=self._config.version,
|
423
396
|
content=_content,
|
424
|
-
template_url=self.upload_pages.metadata["url"],
|
425
397
|
headers=_headers,
|
426
398
|
params=_params,
|
427
399
|
)
|
428
|
-
|
429
|
-
|
400
|
+
_request = _convert_request(_request)
|
401
|
+
_request.url = self._client.format_url(_request.url)
|
430
402
|
|
431
403
|
_stream = False
|
432
404
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
433
|
-
|
405
|
+
_request, stream=_stream, **kwargs
|
434
406
|
)
|
435
407
|
|
436
408
|
response = pipeline_response.http_response
|
@@ -467,9 +439,7 @@ class PageBlobOperations:
|
|
467
439
|
)
|
468
440
|
|
469
441
|
if cls:
|
470
|
-
return cls(pipeline_response, None, response_headers)
|
471
|
-
|
472
|
-
upload_pages.metadata = {"url": "{url}"}
|
442
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
473
443
|
|
474
444
|
@distributed_trace_async
|
475
445
|
async def clear_pages( # pylint: disable=inconsistent-return-statements
|
@@ -511,20 +481,6 @@ class PageBlobOperations:
|
|
511
481
|
~azure.storage.blob.models.SequenceNumberAccessConditions
|
512
482
|
:param modified_access_conditions: Parameter group. Default value is None.
|
513
483
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
514
|
-
:keyword comp: comp. Default value is "page". Note that overriding this default value may
|
515
|
-
result in unsupported behavior.
|
516
|
-
:paramtype comp: str
|
517
|
-
:keyword page_write: Required. You may specify one of the following options:
|
518
|
-
|
519
|
-
|
520
|
-
* Update: Writes the bytes specified by the request body into the specified range. The Range
|
521
|
-
and Content-Length headers must match to perform the update.
|
522
|
-
* Clear: Clears the specified range and releases the space used in storage for that range. To
|
523
|
-
clear a range, set the Content-Length header to zero, and the Range header to a value that
|
524
|
-
indicates the range to clear, up to maximum blob size. Default value is "clear". Note that
|
525
|
-
overriding this default value may result in unsupported behavior.
|
526
|
-
:paramtype page_write: str
|
527
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
528
484
|
:return: None or the result of cls(response)
|
529
485
|
:rtype: None
|
530
486
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -578,7 +534,7 @@ class PageBlobOperations:
|
|
578
534
|
_if_tags = modified_access_conditions.if_tags
|
579
535
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
580
536
|
|
581
|
-
|
537
|
+
_request = build_clear_pages_request(
|
582
538
|
url=self._config.url,
|
583
539
|
content_length=content_length,
|
584
540
|
timeout=timeout,
|
@@ -600,16 +556,15 @@ class PageBlobOperations:
|
|
600
556
|
comp=comp,
|
601
557
|
page_write=page_write,
|
602
558
|
version=self._config.version,
|
603
|
-
template_url=self.clear_pages.metadata["url"],
|
604
559
|
headers=_headers,
|
605
560
|
params=_params,
|
606
561
|
)
|
607
|
-
|
608
|
-
|
562
|
+
_request = _convert_request(_request)
|
563
|
+
_request.url = self._client.format_url(_request.url)
|
609
564
|
|
610
565
|
_stream = False
|
611
566
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
612
|
-
|
567
|
+
_request, stream=_stream, **kwargs
|
613
568
|
)
|
614
569
|
|
615
570
|
response = pipeline_response.http_response
|
@@ -637,9 +592,7 @@ class PageBlobOperations:
|
|
637
592
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
638
593
|
|
639
594
|
if cls:
|
640
|
-
return cls(pipeline_response, None, response_headers)
|
641
|
-
|
642
|
-
clear_pages.metadata = {"url": "{url}"}
|
595
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
643
596
|
|
644
597
|
@distributed_trace_async
|
645
598
|
async def upload_pages_from_url( # pylint: disable=inconsistent-return-statements
|
@@ -706,20 +659,6 @@ class PageBlobOperations:
|
|
706
659
|
:param source_modified_access_conditions: Parameter group. Default value is None.
|
707
660
|
:type source_modified_access_conditions:
|
708
661
|
~azure.storage.blob.models.SourceModifiedAccessConditions
|
709
|
-
:keyword comp: comp. Default value is "page". Note that overriding this default value may
|
710
|
-
result in unsupported behavior.
|
711
|
-
:paramtype comp: str
|
712
|
-
:keyword page_write: Required. You may specify one of the following options:
|
713
|
-
|
714
|
-
|
715
|
-
* Update: Writes the bytes specified by the request body into the specified range. The Range
|
716
|
-
and Content-Length headers must match to perform the update.
|
717
|
-
* Clear: Clears the specified range and releases the space used in storage for that range. To
|
718
|
-
clear a range, set the Content-Length header to zero, and the Range header to a value that
|
719
|
-
indicates the range to clear, up to maximum blob size. Default value is "update". Note that
|
720
|
-
overriding this default value may result in unsupported behavior.
|
721
|
-
:paramtype page_write: str
|
722
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
723
662
|
:return: None or the result of cls(response)
|
724
663
|
:rtype: None
|
725
664
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -782,7 +721,7 @@ class PageBlobOperations:
|
|
782
721
|
_source_if_none_match = source_modified_access_conditions.source_if_none_match
|
783
722
|
_source_if_unmodified_since = source_modified_access_conditions.source_if_unmodified_since
|
784
723
|
|
785
|
-
|
724
|
+
_request = build_upload_pages_from_url_request(
|
786
725
|
url=self._config.url,
|
787
726
|
source_url=source_url,
|
788
727
|
source_range=source_range,
|
@@ -813,16 +752,15 @@ class PageBlobOperations:
|
|
813
752
|
comp=comp,
|
814
753
|
page_write=page_write,
|
815
754
|
version=self._config.version,
|
816
|
-
template_url=self.upload_pages_from_url.metadata["url"],
|
817
755
|
headers=_headers,
|
818
756
|
params=_params,
|
819
757
|
)
|
820
|
-
|
821
|
-
|
758
|
+
_request = _convert_request(_request)
|
759
|
+
_request.url = self._client.format_url(_request.url)
|
822
760
|
|
823
761
|
_stream = False
|
824
762
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
825
|
-
|
763
|
+
_request, stream=_stream, **kwargs
|
826
764
|
)
|
827
765
|
|
828
766
|
response = pipeline_response.http_response
|
@@ -856,9 +794,7 @@ class PageBlobOperations:
|
|
856
794
|
)
|
857
795
|
|
858
796
|
if cls:
|
859
|
-
return cls(pipeline_response, None, response_headers)
|
860
|
-
|
861
|
-
upload_pages_from_url.metadata = {"url": "{url}"}
|
797
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
862
798
|
|
863
799
|
@distributed_trace_async
|
864
800
|
async def get_page_ranges(
|
@@ -911,10 +847,6 @@ class PageBlobOperations:
|
|
911
847
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
912
848
|
:param modified_access_conditions: Parameter group. Default value is None.
|
913
849
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
914
|
-
:keyword comp: comp. Default value is "pagelist". Note that overriding this default value may
|
915
|
-
result in unsupported behavior.
|
916
|
-
:paramtype comp: str
|
917
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
918
850
|
:return: PageList or the result of cls(response)
|
919
851
|
:rtype: ~azure.storage.blob.models.PageList
|
920
852
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -948,7 +880,7 @@ class PageBlobOperations:
|
|
948
880
|
_if_tags = modified_access_conditions.if_tags
|
949
881
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
950
882
|
|
951
|
-
|
883
|
+
_request = build_get_page_ranges_request(
|
952
884
|
url=self._config.url,
|
953
885
|
snapshot=snapshot,
|
954
886
|
timeout=timeout,
|
@@ -964,16 +896,15 @@ class PageBlobOperations:
|
|
964
896
|
maxresults=maxresults,
|
965
897
|
comp=comp,
|
966
898
|
version=self._config.version,
|
967
|
-
template_url=self.get_page_ranges.metadata["url"],
|
968
899
|
headers=_headers,
|
969
900
|
params=_params,
|
970
901
|
)
|
971
|
-
|
972
|
-
|
902
|
+
_request = _convert_request(_request)
|
903
|
+
_request.url = self._client.format_url(_request.url)
|
973
904
|
|
974
905
|
_stream = False
|
975
906
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
976
|
-
|
907
|
+
_request, stream=_stream, **kwargs
|
977
908
|
)
|
978
909
|
|
979
910
|
response = pipeline_response.http_response
|
@@ -999,11 +930,9 @@ class PageBlobOperations:
|
|
999
930
|
deserialized = self._deserialize("PageList", pipeline_response)
|
1000
931
|
|
1001
932
|
if cls:
|
1002
|
-
return cls(pipeline_response, deserialized, response_headers)
|
1003
|
-
|
1004
|
-
return deserialized
|
933
|
+
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
1005
934
|
|
1006
|
-
|
935
|
+
return deserialized # type: ignore
|
1007
936
|
|
1008
937
|
@distributed_trace_async
|
1009
938
|
async def get_page_ranges_diff(
|
@@ -1070,10 +999,6 @@ class PageBlobOperations:
|
|
1070
999
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
1071
1000
|
:param modified_access_conditions: Parameter group. Default value is None.
|
1072
1001
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
1073
|
-
:keyword comp: comp. Default value is "pagelist". Note that overriding this default value may
|
1074
|
-
result in unsupported behavior.
|
1075
|
-
:paramtype comp: str
|
1076
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1077
1002
|
:return: PageList or the result of cls(response)
|
1078
1003
|
:rtype: ~azure.storage.blob.models.PageList
|
1079
1004
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1107,7 +1032,7 @@ class PageBlobOperations:
|
|
1107
1032
|
_if_tags = modified_access_conditions.if_tags
|
1108
1033
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
1109
1034
|
|
1110
|
-
|
1035
|
+
_request = build_get_page_ranges_diff_request(
|
1111
1036
|
url=self._config.url,
|
1112
1037
|
snapshot=snapshot,
|
1113
1038
|
timeout=timeout,
|
@@ -1125,16 +1050,15 @@ class PageBlobOperations:
|
|
1125
1050
|
maxresults=maxresults,
|
1126
1051
|
comp=comp,
|
1127
1052
|
version=self._config.version,
|
1128
|
-
template_url=self.get_page_ranges_diff.metadata["url"],
|
1129
1053
|
headers=_headers,
|
1130
1054
|
params=_params,
|
1131
1055
|
)
|
1132
|
-
|
1133
|
-
|
1056
|
+
_request = _convert_request(_request)
|
1057
|
+
_request.url = self._client.format_url(_request.url)
|
1134
1058
|
|
1135
1059
|
_stream = False
|
1136
1060
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
1137
|
-
|
1061
|
+
_request, stream=_stream, **kwargs
|
1138
1062
|
)
|
1139
1063
|
|
1140
1064
|
response = pipeline_response.http_response
|
@@ -1160,11 +1084,9 @@ class PageBlobOperations:
|
|
1160
1084
|
deserialized = self._deserialize("PageList", pipeline_response)
|
1161
1085
|
|
1162
1086
|
if cls:
|
1163
|
-
return cls(pipeline_response, deserialized, response_headers)
|
1087
|
+
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
1164
1088
|
|
1165
|
-
return deserialized
|
1166
|
-
|
1167
|
-
get_page_ranges_diff.metadata = {"url": "{url}"}
|
1089
|
+
return deserialized # type: ignore
|
1168
1090
|
|
1169
1091
|
@distributed_trace_async
|
1170
1092
|
async def resize( # pylint: disable=inconsistent-return-statements
|
@@ -1200,10 +1122,6 @@ class PageBlobOperations:
|
|
1200
1122
|
:type cpk_scope_info: ~azure.storage.blob.models.CpkScopeInfo
|
1201
1123
|
:param modified_access_conditions: Parameter group. Default value is None.
|
1202
1124
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
1203
|
-
:keyword comp: comp. Default value is "properties". Note that overriding this default value may
|
1204
|
-
result in unsupported behavior.
|
1205
|
-
:paramtype comp: str
|
1206
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1207
1125
|
:return: None or the result of cls(response)
|
1208
1126
|
:rtype: None
|
1209
1127
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1247,7 +1165,7 @@ class PageBlobOperations:
|
|
1247
1165
|
_if_tags = modified_access_conditions.if_tags
|
1248
1166
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
1249
1167
|
|
1250
|
-
|
1168
|
+
_request = build_resize_request(
|
1251
1169
|
url=self._config.url,
|
1252
1170
|
blob_content_length=blob_content_length,
|
1253
1171
|
timeout=timeout,
|
@@ -1264,16 +1182,15 @@ class PageBlobOperations:
|
|
1264
1182
|
request_id_parameter=request_id_parameter,
|
1265
1183
|
comp=comp,
|
1266
1184
|
version=self._config.version,
|
1267
|
-
template_url=self.resize.metadata["url"],
|
1268
1185
|
headers=_headers,
|
1269
1186
|
params=_params,
|
1270
1187
|
)
|
1271
|
-
|
1272
|
-
|
1188
|
+
_request = _convert_request(_request)
|
1189
|
+
_request.url = self._client.format_url(_request.url)
|
1273
1190
|
|
1274
1191
|
_stream = False
|
1275
1192
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
1276
|
-
|
1193
|
+
_request, stream=_stream, **kwargs
|
1277
1194
|
)
|
1278
1195
|
|
1279
1196
|
response = pipeline_response.http_response
|
@@ -1297,9 +1214,7 @@ class PageBlobOperations:
|
|
1297
1214
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
1298
1215
|
|
1299
1216
|
if cls:
|
1300
|
-
return cls(pipeline_response, None, response_headers)
|
1301
|
-
|
1302
|
-
resize.metadata = {"url": "{url}"}
|
1217
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
1303
1218
|
|
1304
1219
|
@distributed_trace_async
|
1305
1220
|
async def update_sequence_number( # pylint: disable=inconsistent-return-statements
|
@@ -1336,10 +1251,6 @@ class PageBlobOperations:
|
|
1336
1251
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
1337
1252
|
:param modified_access_conditions: Parameter group. Default value is None.
|
1338
1253
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
1339
|
-
:keyword comp: comp. Default value is "properties". Note that overriding this default value may
|
1340
|
-
result in unsupported behavior.
|
1341
|
-
:paramtype comp: str
|
1342
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1343
1254
|
:return: None or the result of cls(response)
|
1344
1255
|
:rtype: None
|
1345
1256
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1373,7 +1284,7 @@ class PageBlobOperations:
|
|
1373
1284
|
_if_tags = modified_access_conditions.if_tags
|
1374
1285
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
1375
1286
|
|
1376
|
-
|
1287
|
+
_request = build_update_sequence_number_request(
|
1377
1288
|
url=self._config.url,
|
1378
1289
|
sequence_number_action=sequence_number_action,
|
1379
1290
|
timeout=timeout,
|
@@ -1387,16 +1298,15 @@ class PageBlobOperations:
|
|
1387
1298
|
request_id_parameter=request_id_parameter,
|
1388
1299
|
comp=comp,
|
1389
1300
|
version=self._config.version,
|
1390
|
-
template_url=self.update_sequence_number.metadata["url"],
|
1391
1301
|
headers=_headers,
|
1392
1302
|
params=_params,
|
1393
1303
|
)
|
1394
|
-
|
1395
|
-
|
1304
|
+
_request = _convert_request(_request)
|
1305
|
+
_request.url = self._client.format_url(_request.url)
|
1396
1306
|
|
1397
1307
|
_stream = False
|
1398
1308
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
1399
|
-
|
1309
|
+
_request, stream=_stream, **kwargs
|
1400
1310
|
)
|
1401
1311
|
|
1402
1312
|
response = pipeline_response.http_response
|
@@ -1420,9 +1330,7 @@ class PageBlobOperations:
|
|
1420
1330
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
1421
1331
|
|
1422
1332
|
if cls:
|
1423
|
-
return cls(pipeline_response, None, response_headers)
|
1424
|
-
|
1425
|
-
update_sequence_number.metadata = {"url": "{url}"}
|
1333
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
1426
1334
|
|
1427
1335
|
@distributed_trace_async
|
1428
1336
|
async def copy_incremental( # pylint: disable=inconsistent-return-statements
|
@@ -1455,10 +1363,6 @@ class PageBlobOperations:
|
|
1455
1363
|
:type request_id_parameter: str
|
1456
1364
|
:param modified_access_conditions: Parameter group. Default value is None.
|
1457
1365
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
1458
|
-
:keyword comp: comp. Default value is "incrementalcopy". Note that overriding this default
|
1459
|
-
value may result in unsupported behavior.
|
1460
|
-
:paramtype comp: str
|
1461
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1462
1366
|
:return: None or the result of cls(response)
|
1463
1367
|
:rtype: None
|
1464
1368
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1489,7 +1393,7 @@ class PageBlobOperations:
|
|
1489
1393
|
_if_tags = modified_access_conditions.if_tags
|
1490
1394
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
1491
1395
|
|
1492
|
-
|
1396
|
+
_request = build_copy_incremental_request(
|
1493
1397
|
url=self._config.url,
|
1494
1398
|
copy_source=copy_source,
|
1495
1399
|
timeout=timeout,
|
@@ -1501,16 +1405,15 @@ class PageBlobOperations:
|
|
1501
1405
|
request_id_parameter=request_id_parameter,
|
1502
1406
|
comp=comp,
|
1503
1407
|
version=self._config.version,
|
1504
|
-
template_url=self.copy_incremental.metadata["url"],
|
1505
1408
|
headers=_headers,
|
1506
1409
|
params=_params,
|
1507
1410
|
)
|
1508
|
-
|
1509
|
-
|
1411
|
+
_request = _convert_request(_request)
|
1412
|
+
_request.url = self._client.format_url(_request.url)
|
1510
1413
|
|
1511
1414
|
_stream = False
|
1512
1415
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
1513
|
-
|
1416
|
+
_request, stream=_stream, **kwargs
|
1514
1417
|
)
|
1515
1418
|
|
1516
1419
|
response = pipeline_response.http_response
|
@@ -1533,6 +1436,4 @@ class PageBlobOperations:
|
|
1533
1436
|
response_headers["x-ms-copy-status"] = self._deserialize("str", response.headers.get("x-ms-copy-status"))
|
1534
1437
|
|
1535
1438
|
if cls:
|
1536
|
-
return cls(pipeline_response, None, response_headers)
|
1537
|
-
|
1538
|
-
copy_incremental.metadata = {"url": "{url}"}
|
1439
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|