azure-storage-blob 12.19.0b1__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 +26 -6
- azure/storage/blob/_blob_service_client.py +11 -4
- azure/storage/blob/_container_client.py +45 -17
- azure/storage/blob/_download.py +5 -4
- 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 +48 -33
- 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 +6 -3
- azure/storage/blob/aio/_container_client_async.py +34 -13
- azure/storage/blob/aio/_download_async.py +11 -10
- 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.0b1.dist-info → azure_storage_blob-12.20.0.dist-info}/METADATA +11 -11
- azure_storage_blob-12.20.0.dist-info/RECORD +81 -0
- {azure_storage_blob-12.19.0b1.dist-info → azure_storage_blob-12.20.0.dist-info}/WHEEL +1 -1
- azure_storage_blob-12.19.0b1.dist-info/RECORD +0 -80
- {azure_storage_blob-12.19.0b1.dist-info → azure_storage_blob-12.20.0.dist-info}/LICENSE +0 -0
- {azure_storage_blob-12.19.0b1.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,
|
@@ -28,10 +27,6 @@ from .. import models as _models
|
|
28
27
|
from .._serialization import Serializer
|
29
28
|
from .._vendor import _convert_request
|
30
29
|
|
31
|
-
if sys.version_info >= (3, 8):
|
32
|
-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
|
33
|
-
else:
|
34
|
-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
|
35
30
|
T = TypeVar("T")
|
36
31
|
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
|
37
32
|
|
@@ -164,7 +159,7 @@ def build_upload_pages_request(
|
|
164
159
|
url: str,
|
165
160
|
*,
|
166
161
|
content_length: int,
|
167
|
-
content: IO,
|
162
|
+
content: IO[bytes],
|
168
163
|
transactional_content_md5: Optional[bytes] = None,
|
169
164
|
transactional_content_crc64: Optional[bytes] = None,
|
170
165
|
timeout: Optional[int] = None,
|
@@ -890,11 +885,6 @@ class PageBlobOperations:
|
|
890
885
|
:type cpk_scope_info: ~azure.storage.blob.models.CpkScopeInfo
|
891
886
|
:param modified_access_conditions: Parameter group. Default value is None.
|
892
887
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
893
|
-
:keyword blob_type: Specifies the type of blob to create: block blob, page blob, or append
|
894
|
-
blob. Default value is "PageBlob". Note that overriding this default value may result in
|
895
|
-
unsupported behavior.
|
896
|
-
:paramtype blob_type: str
|
897
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
898
888
|
:return: None or the result of cls(response)
|
899
889
|
:rtype: None
|
900
890
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -951,7 +941,7 @@ class PageBlobOperations:
|
|
951
941
|
_if_tags = modified_access_conditions.if_tags
|
952
942
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
953
943
|
|
954
|
-
|
944
|
+
_request = build_create_request(
|
955
945
|
url=self._config.url,
|
956
946
|
content_length=content_length,
|
957
947
|
blob_content_length=blob_content_length,
|
@@ -982,16 +972,15 @@ class PageBlobOperations:
|
|
982
972
|
legal_hold=legal_hold,
|
983
973
|
blob_type=blob_type,
|
984
974
|
version=self._config.version,
|
985
|
-
template_url=self.create.metadata["url"],
|
986
975
|
headers=_headers,
|
987
976
|
params=_params,
|
988
977
|
)
|
989
|
-
|
990
|
-
|
978
|
+
_request = _convert_request(_request)
|
979
|
+
_request.url = self._client.format_url(_request.url)
|
991
980
|
|
992
981
|
_stream = False
|
993
982
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
994
|
-
|
983
|
+
_request, stream=_stream, **kwargs
|
995
984
|
)
|
996
985
|
|
997
986
|
response = pipeline_response.http_response
|
@@ -1023,15 +1012,13 @@ class PageBlobOperations:
|
|
1023
1012
|
)
|
1024
1013
|
|
1025
1014
|
if cls:
|
1026
|
-
return cls(pipeline_response, None, response_headers)
|
1027
|
-
|
1028
|
-
create.metadata = {"url": "{url}"}
|
1015
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
1029
1016
|
|
1030
1017
|
@distributed_trace
|
1031
1018
|
def upload_pages( # pylint: disable=inconsistent-return-statements
|
1032
1019
|
self,
|
1033
1020
|
content_length: int,
|
1034
|
-
body: IO,
|
1021
|
+
body: IO[bytes],
|
1035
1022
|
transactional_content_md5: Optional[bytes] = None,
|
1036
1023
|
transactional_content_crc64: Optional[bytes] = None,
|
1037
1024
|
timeout: Optional[int] = None,
|
@@ -1049,7 +1036,7 @@ class PageBlobOperations:
|
|
1049
1036
|
:param content_length: The length of the request. Required.
|
1050
1037
|
:type content_length: int
|
1051
1038
|
:param body: Initial data. Required.
|
1052
|
-
:type body: IO
|
1039
|
+
:type body: IO[bytes]
|
1053
1040
|
:param transactional_content_md5: Specify the transactional md5 for the body, to be validated
|
1054
1041
|
by the service. Default value is None.
|
1055
1042
|
:type transactional_content_md5: bytes
|
@@ -1078,20 +1065,6 @@ class PageBlobOperations:
|
|
1078
1065
|
~azure.storage.blob.models.SequenceNumberAccessConditions
|
1079
1066
|
:param modified_access_conditions: Parameter group. Default value is None.
|
1080
1067
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
1081
|
-
:keyword comp: comp. Default value is "page". Note that overriding this default value may
|
1082
|
-
result in unsupported behavior.
|
1083
|
-
:paramtype comp: str
|
1084
|
-
:keyword page_write: Required. You may specify one of the following options:
|
1085
|
-
|
1086
|
-
|
1087
|
-
* Update: Writes the bytes specified by the request body into the specified range. The Range
|
1088
|
-
and Content-Length headers must match to perform the update.
|
1089
|
-
* Clear: Clears the specified range and releases the space used in storage for that range. To
|
1090
|
-
clear a range, set the Content-Length header to zero, and the Range header to a value that
|
1091
|
-
indicates the range to clear, up to maximum blob size. Default value is "update". Note that
|
1092
|
-
overriding this default value may result in unsupported behavior.
|
1093
|
-
:paramtype page_write: str
|
1094
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1095
1068
|
:return: None or the result of cls(response)
|
1096
1069
|
:rtype: None
|
1097
1070
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1147,7 +1120,7 @@ class PageBlobOperations:
|
|
1147
1120
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
1148
1121
|
_content = body
|
1149
1122
|
|
1150
|
-
|
1123
|
+
_request = build_upload_pages_request(
|
1151
1124
|
url=self._config.url,
|
1152
1125
|
content_length=content_length,
|
1153
1126
|
transactional_content_md5=transactional_content_md5,
|
@@ -1173,16 +1146,15 @@ class PageBlobOperations:
|
|
1173
1146
|
content_type=content_type,
|
1174
1147
|
version=self._config.version,
|
1175
1148
|
content=_content,
|
1176
|
-
template_url=self.upload_pages.metadata["url"],
|
1177
1149
|
headers=_headers,
|
1178
1150
|
params=_params,
|
1179
1151
|
)
|
1180
|
-
|
1181
|
-
|
1152
|
+
_request = _convert_request(_request)
|
1153
|
+
_request.url = self._client.format_url(_request.url)
|
1182
1154
|
|
1183
1155
|
_stream = False
|
1184
1156
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1185
|
-
|
1157
|
+
_request, stream=_stream, **kwargs
|
1186
1158
|
)
|
1187
1159
|
|
1188
1160
|
response = pipeline_response.http_response
|
@@ -1219,9 +1191,7 @@ class PageBlobOperations:
|
|
1219
1191
|
)
|
1220
1192
|
|
1221
1193
|
if cls:
|
1222
|
-
return cls(pipeline_response, None, response_headers)
|
1223
|
-
|
1224
|
-
upload_pages.metadata = {"url": "{url}"}
|
1194
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
1225
1195
|
|
1226
1196
|
@distributed_trace
|
1227
1197
|
def clear_pages( # pylint: disable=inconsistent-return-statements
|
@@ -1263,20 +1233,6 @@ class PageBlobOperations:
|
|
1263
1233
|
~azure.storage.blob.models.SequenceNumberAccessConditions
|
1264
1234
|
:param modified_access_conditions: Parameter group. Default value is None.
|
1265
1235
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
1266
|
-
:keyword comp: comp. Default value is "page". Note that overriding this default value may
|
1267
|
-
result in unsupported behavior.
|
1268
|
-
:paramtype comp: str
|
1269
|
-
:keyword page_write: Required. You may specify one of the following options:
|
1270
|
-
|
1271
|
-
|
1272
|
-
* Update: Writes the bytes specified by the request body into the specified range. The Range
|
1273
|
-
and Content-Length headers must match to perform the update.
|
1274
|
-
* Clear: Clears the specified range and releases the space used in storage for that range. To
|
1275
|
-
clear a range, set the Content-Length header to zero, and the Range header to a value that
|
1276
|
-
indicates the range to clear, up to maximum blob size. Default value is "clear". Note that
|
1277
|
-
overriding this default value may result in unsupported behavior.
|
1278
|
-
:paramtype page_write: str
|
1279
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1280
1236
|
:return: None or the result of cls(response)
|
1281
1237
|
:rtype: None
|
1282
1238
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1330,7 +1286,7 @@ class PageBlobOperations:
|
|
1330
1286
|
_if_tags = modified_access_conditions.if_tags
|
1331
1287
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
1332
1288
|
|
1333
|
-
|
1289
|
+
_request = build_clear_pages_request(
|
1334
1290
|
url=self._config.url,
|
1335
1291
|
content_length=content_length,
|
1336
1292
|
timeout=timeout,
|
@@ -1352,16 +1308,15 @@ class PageBlobOperations:
|
|
1352
1308
|
comp=comp,
|
1353
1309
|
page_write=page_write,
|
1354
1310
|
version=self._config.version,
|
1355
|
-
template_url=self.clear_pages.metadata["url"],
|
1356
1311
|
headers=_headers,
|
1357
1312
|
params=_params,
|
1358
1313
|
)
|
1359
|
-
|
1360
|
-
|
1314
|
+
_request = _convert_request(_request)
|
1315
|
+
_request.url = self._client.format_url(_request.url)
|
1361
1316
|
|
1362
1317
|
_stream = False
|
1363
1318
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1364
|
-
|
1319
|
+
_request, stream=_stream, **kwargs
|
1365
1320
|
)
|
1366
1321
|
|
1367
1322
|
response = pipeline_response.http_response
|
@@ -1389,9 +1344,7 @@ class PageBlobOperations:
|
|
1389
1344
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
1390
1345
|
|
1391
1346
|
if cls:
|
1392
|
-
return cls(pipeline_response, None, response_headers)
|
1393
|
-
|
1394
|
-
clear_pages.metadata = {"url": "{url}"}
|
1347
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
1395
1348
|
|
1396
1349
|
@distributed_trace
|
1397
1350
|
def upload_pages_from_url( # pylint: disable=inconsistent-return-statements
|
@@ -1458,20 +1411,6 @@ class PageBlobOperations:
|
|
1458
1411
|
:param source_modified_access_conditions: Parameter group. Default value is None.
|
1459
1412
|
:type source_modified_access_conditions:
|
1460
1413
|
~azure.storage.blob.models.SourceModifiedAccessConditions
|
1461
|
-
:keyword comp: comp. Default value is "page". Note that overriding this default value may
|
1462
|
-
result in unsupported behavior.
|
1463
|
-
:paramtype comp: str
|
1464
|
-
:keyword page_write: Required. You may specify one of the following options:
|
1465
|
-
|
1466
|
-
|
1467
|
-
* Update: Writes the bytes specified by the request body into the specified range. The Range
|
1468
|
-
and Content-Length headers must match to perform the update.
|
1469
|
-
* Clear: Clears the specified range and releases the space used in storage for that range. To
|
1470
|
-
clear a range, set the Content-Length header to zero, and the Range header to a value that
|
1471
|
-
indicates the range to clear, up to maximum blob size. Default value is "update". Note that
|
1472
|
-
overriding this default value may result in unsupported behavior.
|
1473
|
-
:paramtype page_write: str
|
1474
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1475
1414
|
:return: None or the result of cls(response)
|
1476
1415
|
:rtype: None
|
1477
1416
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1534,7 +1473,7 @@ class PageBlobOperations:
|
|
1534
1473
|
_source_if_none_match = source_modified_access_conditions.source_if_none_match
|
1535
1474
|
_source_if_unmodified_since = source_modified_access_conditions.source_if_unmodified_since
|
1536
1475
|
|
1537
|
-
|
1476
|
+
_request = build_upload_pages_from_url_request(
|
1538
1477
|
url=self._config.url,
|
1539
1478
|
source_url=source_url,
|
1540
1479
|
source_range=source_range,
|
@@ -1565,16 +1504,15 @@ class PageBlobOperations:
|
|
1565
1504
|
comp=comp,
|
1566
1505
|
page_write=page_write,
|
1567
1506
|
version=self._config.version,
|
1568
|
-
template_url=self.upload_pages_from_url.metadata["url"],
|
1569
1507
|
headers=_headers,
|
1570
1508
|
params=_params,
|
1571
1509
|
)
|
1572
|
-
|
1573
|
-
|
1510
|
+
_request = _convert_request(_request)
|
1511
|
+
_request.url = self._client.format_url(_request.url)
|
1574
1512
|
|
1575
1513
|
_stream = False
|
1576
1514
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1577
|
-
|
1515
|
+
_request, stream=_stream, **kwargs
|
1578
1516
|
)
|
1579
1517
|
|
1580
1518
|
response = pipeline_response.http_response
|
@@ -1608,9 +1546,7 @@ class PageBlobOperations:
|
|
1608
1546
|
)
|
1609
1547
|
|
1610
1548
|
if cls:
|
1611
|
-
return cls(pipeline_response, None, response_headers)
|
1612
|
-
|
1613
|
-
upload_pages_from_url.metadata = {"url": "{url}"}
|
1549
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
1614
1550
|
|
1615
1551
|
@distributed_trace
|
1616
1552
|
def get_page_ranges(
|
@@ -1663,10 +1599,6 @@ class PageBlobOperations:
|
|
1663
1599
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
1664
1600
|
:param modified_access_conditions: Parameter group. Default value is None.
|
1665
1601
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
1666
|
-
:keyword comp: comp. Default value is "pagelist". Note that overriding this default value may
|
1667
|
-
result in unsupported behavior.
|
1668
|
-
:paramtype comp: str
|
1669
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1670
1602
|
:return: PageList or the result of cls(response)
|
1671
1603
|
:rtype: ~azure.storage.blob.models.PageList
|
1672
1604
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1700,7 +1632,7 @@ class PageBlobOperations:
|
|
1700
1632
|
_if_tags = modified_access_conditions.if_tags
|
1701
1633
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
1702
1634
|
|
1703
|
-
|
1635
|
+
_request = build_get_page_ranges_request(
|
1704
1636
|
url=self._config.url,
|
1705
1637
|
snapshot=snapshot,
|
1706
1638
|
timeout=timeout,
|
@@ -1716,16 +1648,15 @@ class PageBlobOperations:
|
|
1716
1648
|
maxresults=maxresults,
|
1717
1649
|
comp=comp,
|
1718
1650
|
version=self._config.version,
|
1719
|
-
template_url=self.get_page_ranges.metadata["url"],
|
1720
1651
|
headers=_headers,
|
1721
1652
|
params=_params,
|
1722
1653
|
)
|
1723
|
-
|
1724
|
-
|
1654
|
+
_request = _convert_request(_request)
|
1655
|
+
_request.url = self._client.format_url(_request.url)
|
1725
1656
|
|
1726
1657
|
_stream = False
|
1727
1658
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1728
|
-
|
1659
|
+
_request, stream=_stream, **kwargs
|
1729
1660
|
)
|
1730
1661
|
|
1731
1662
|
response = pipeline_response.http_response
|
@@ -1751,11 +1682,9 @@ class PageBlobOperations:
|
|
1751
1682
|
deserialized = self._deserialize("PageList", pipeline_response)
|
1752
1683
|
|
1753
1684
|
if cls:
|
1754
|
-
return cls(pipeline_response, deserialized, response_headers)
|
1755
|
-
|
1756
|
-
return deserialized
|
1685
|
+
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
1757
1686
|
|
1758
|
-
|
1687
|
+
return deserialized # type: ignore
|
1759
1688
|
|
1760
1689
|
@distributed_trace
|
1761
1690
|
def get_page_ranges_diff(
|
@@ -1822,10 +1751,6 @@ class PageBlobOperations:
|
|
1822
1751
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
1823
1752
|
:param modified_access_conditions: Parameter group. Default value is None.
|
1824
1753
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
1825
|
-
:keyword comp: comp. Default value is "pagelist". Note that overriding this default value may
|
1826
|
-
result in unsupported behavior.
|
1827
|
-
:paramtype comp: str
|
1828
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1829
1754
|
:return: PageList or the result of cls(response)
|
1830
1755
|
:rtype: ~azure.storage.blob.models.PageList
|
1831
1756
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1859,7 +1784,7 @@ class PageBlobOperations:
|
|
1859
1784
|
_if_tags = modified_access_conditions.if_tags
|
1860
1785
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
1861
1786
|
|
1862
|
-
|
1787
|
+
_request = build_get_page_ranges_diff_request(
|
1863
1788
|
url=self._config.url,
|
1864
1789
|
snapshot=snapshot,
|
1865
1790
|
timeout=timeout,
|
@@ -1877,16 +1802,15 @@ class PageBlobOperations:
|
|
1877
1802
|
maxresults=maxresults,
|
1878
1803
|
comp=comp,
|
1879
1804
|
version=self._config.version,
|
1880
|
-
template_url=self.get_page_ranges_diff.metadata["url"],
|
1881
1805
|
headers=_headers,
|
1882
1806
|
params=_params,
|
1883
1807
|
)
|
1884
|
-
|
1885
|
-
|
1808
|
+
_request = _convert_request(_request)
|
1809
|
+
_request.url = self._client.format_url(_request.url)
|
1886
1810
|
|
1887
1811
|
_stream = False
|
1888
1812
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1889
|
-
|
1813
|
+
_request, stream=_stream, **kwargs
|
1890
1814
|
)
|
1891
1815
|
|
1892
1816
|
response = pipeline_response.http_response
|
@@ -1912,11 +1836,9 @@ class PageBlobOperations:
|
|
1912
1836
|
deserialized = self._deserialize("PageList", pipeline_response)
|
1913
1837
|
|
1914
1838
|
if cls:
|
1915
|
-
return cls(pipeline_response, deserialized, response_headers)
|
1839
|
+
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
1916
1840
|
|
1917
|
-
return deserialized
|
1918
|
-
|
1919
|
-
get_page_ranges_diff.metadata = {"url": "{url}"}
|
1841
|
+
return deserialized # type: ignore
|
1920
1842
|
|
1921
1843
|
@distributed_trace
|
1922
1844
|
def resize( # pylint: disable=inconsistent-return-statements
|
@@ -1952,10 +1874,6 @@ class PageBlobOperations:
|
|
1952
1874
|
:type cpk_scope_info: ~azure.storage.blob.models.CpkScopeInfo
|
1953
1875
|
:param modified_access_conditions: Parameter group. Default value is None.
|
1954
1876
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
1955
|
-
:keyword comp: comp. Default value is "properties". Note that overriding this default value may
|
1956
|
-
result in unsupported behavior.
|
1957
|
-
:paramtype comp: str
|
1958
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1959
1877
|
:return: None or the result of cls(response)
|
1960
1878
|
:rtype: None
|
1961
1879
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1999,7 +1917,7 @@ class PageBlobOperations:
|
|
1999
1917
|
_if_tags = modified_access_conditions.if_tags
|
2000
1918
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
2001
1919
|
|
2002
|
-
|
1920
|
+
_request = build_resize_request(
|
2003
1921
|
url=self._config.url,
|
2004
1922
|
blob_content_length=blob_content_length,
|
2005
1923
|
timeout=timeout,
|
@@ -2016,16 +1934,15 @@ class PageBlobOperations:
|
|
2016
1934
|
request_id_parameter=request_id_parameter,
|
2017
1935
|
comp=comp,
|
2018
1936
|
version=self._config.version,
|
2019
|
-
template_url=self.resize.metadata["url"],
|
2020
1937
|
headers=_headers,
|
2021
1938
|
params=_params,
|
2022
1939
|
)
|
2023
|
-
|
2024
|
-
|
1940
|
+
_request = _convert_request(_request)
|
1941
|
+
_request.url = self._client.format_url(_request.url)
|
2025
1942
|
|
2026
1943
|
_stream = False
|
2027
1944
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2028
|
-
|
1945
|
+
_request, stream=_stream, **kwargs
|
2029
1946
|
)
|
2030
1947
|
|
2031
1948
|
response = pipeline_response.http_response
|
@@ -2049,9 +1966,7 @@ class PageBlobOperations:
|
|
2049
1966
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
2050
1967
|
|
2051
1968
|
if cls:
|
2052
|
-
return cls(pipeline_response, None, response_headers)
|
2053
|
-
|
2054
|
-
resize.metadata = {"url": "{url}"}
|
1969
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
2055
1970
|
|
2056
1971
|
@distributed_trace
|
2057
1972
|
def update_sequence_number( # pylint: disable=inconsistent-return-statements
|
@@ -2088,10 +2003,6 @@ class PageBlobOperations:
|
|
2088
2003
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
2089
2004
|
:param modified_access_conditions: Parameter group. Default value is None.
|
2090
2005
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
2091
|
-
:keyword comp: comp. Default value is "properties". Note that overriding this default value may
|
2092
|
-
result in unsupported behavior.
|
2093
|
-
:paramtype comp: str
|
2094
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
2095
2006
|
:return: None or the result of cls(response)
|
2096
2007
|
:rtype: None
|
2097
2008
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2125,7 +2036,7 @@ class PageBlobOperations:
|
|
2125
2036
|
_if_tags = modified_access_conditions.if_tags
|
2126
2037
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
2127
2038
|
|
2128
|
-
|
2039
|
+
_request = build_update_sequence_number_request(
|
2129
2040
|
url=self._config.url,
|
2130
2041
|
sequence_number_action=sequence_number_action,
|
2131
2042
|
timeout=timeout,
|
@@ -2139,16 +2050,15 @@ class PageBlobOperations:
|
|
2139
2050
|
request_id_parameter=request_id_parameter,
|
2140
2051
|
comp=comp,
|
2141
2052
|
version=self._config.version,
|
2142
|
-
template_url=self.update_sequence_number.metadata["url"],
|
2143
2053
|
headers=_headers,
|
2144
2054
|
params=_params,
|
2145
2055
|
)
|
2146
|
-
|
2147
|
-
|
2056
|
+
_request = _convert_request(_request)
|
2057
|
+
_request.url = self._client.format_url(_request.url)
|
2148
2058
|
|
2149
2059
|
_stream = False
|
2150
2060
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2151
|
-
|
2061
|
+
_request, stream=_stream, **kwargs
|
2152
2062
|
)
|
2153
2063
|
|
2154
2064
|
response = pipeline_response.http_response
|
@@ -2172,9 +2082,7 @@ class PageBlobOperations:
|
|
2172
2082
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
2173
2083
|
|
2174
2084
|
if cls:
|
2175
|
-
return cls(pipeline_response, None, response_headers)
|
2176
|
-
|
2177
|
-
update_sequence_number.metadata = {"url": "{url}"}
|
2085
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
2178
2086
|
|
2179
2087
|
@distributed_trace
|
2180
2088
|
def copy_incremental( # pylint: disable=inconsistent-return-statements
|
@@ -2207,10 +2115,6 @@ class PageBlobOperations:
|
|
2207
2115
|
:type request_id_parameter: str
|
2208
2116
|
:param modified_access_conditions: Parameter group. Default value is None.
|
2209
2117
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
2210
|
-
:keyword comp: comp. Default value is "incrementalcopy". Note that overriding this default
|
2211
|
-
value may result in unsupported behavior.
|
2212
|
-
:paramtype comp: str
|
2213
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
2214
2118
|
:return: None or the result of cls(response)
|
2215
2119
|
:rtype: None
|
2216
2120
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2241,7 +2145,7 @@ class PageBlobOperations:
|
|
2241
2145
|
_if_tags = modified_access_conditions.if_tags
|
2242
2146
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
2243
2147
|
|
2244
|
-
|
2148
|
+
_request = build_copy_incremental_request(
|
2245
2149
|
url=self._config.url,
|
2246
2150
|
copy_source=copy_source,
|
2247
2151
|
timeout=timeout,
|
@@ -2253,16 +2157,15 @@ class PageBlobOperations:
|
|
2253
2157
|
request_id_parameter=request_id_parameter,
|
2254
2158
|
comp=comp,
|
2255
2159
|
version=self._config.version,
|
2256
|
-
template_url=self.copy_incremental.metadata["url"],
|
2257
2160
|
headers=_headers,
|
2258
2161
|
params=_params,
|
2259
2162
|
)
|
2260
|
-
|
2261
|
-
|
2163
|
+
_request = _convert_request(_request)
|
2164
|
+
_request.url = self._client.format_url(_request.url)
|
2262
2165
|
|
2263
2166
|
_stream = False
|
2264
2167
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2265
|
-
|
2168
|
+
_request, stream=_stream, **kwargs
|
2266
2169
|
)
|
2267
2170
|
|
2268
2171
|
response = pipeline_response.http_response
|
@@ -2285,6 +2188,4 @@ class PageBlobOperations:
|
|
2285
2188
|
response_headers["x-ms-copy-status"] = self._deserialize("str", response.headers.get("x-ms-copy-status"))
|
2286
2189
|
|
2287
2190
|
if cls:
|
2288
|
-
return cls(pipeline_response, None, response_headers)
|
2289
|
-
|
2290
|
-
copy_incremental.metadata = {"url": "{url}"}
|
2191
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|