azure-storage-blob 12.23.1__py3-none-any.whl → 12.24.0b1__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/_blob_client.py +28 -7
- azure/storage/blob/_blob_client_helpers.py +7 -3
- azure/storage/blob/_blob_service_client.py +1 -1
- azure/storage/blob/_container_client.py +2 -2
- azure/storage/blob/_container_client_helpers.py +4 -4
- azure/storage/blob/_deserialize.py +2 -2
- azure/storage/blob/_encryption.py +2 -0
- azure/storage/blob/_generated/_azure_blob_storage.py +1 -1
- azure/storage/blob/_generated/_configuration.py +2 -2
- azure/storage/blob/_generated/_serialization.py +265 -150
- azure/storage/blob/_generated/aio/_azure_blob_storage.py +1 -1
- azure/storage/blob/_generated/aio/_configuration.py +2 -2
- azure/storage/blob/_generated/aio/operations/_append_blob_operations.py +22 -4
- azure/storage/blob/_generated/aio/operations/_blob_operations.py +116 -26
- azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +40 -6
- azure/storage/blob/_generated/aio/operations/_container_operations.py +36 -18
- azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +32 -9
- azure/storage/blob/_generated/aio/operations/_service_operations.py +16 -8
- azure/storage/blob/_generated/models/_azure_blob_storage_enums.py +1 -0
- azure/storage/blob/_generated/operations/_append_blob_operations.py +34 -8
- azure/storage/blob/_generated/operations/_blob_operations.py +166 -51
- azure/storage/blob/_generated/operations/_block_blob_operations.py +62 -12
- azure/storage/blob/_generated/operations/_container_operations.py +54 -36
- azure/storage/blob/_generated/operations/_page_blob_operations.py +49 -18
- azure/storage/blob/_generated/operations/_service_operations.py +24 -16
- azure/storage/blob/_list_blobs_helper.py +1 -1
- azure/storage/blob/_models.py +4 -3
- azure/storage/blob/_serialize.py +1 -0
- azure/storage/blob/_shared/avro/schema.py +1 -0
- azure/storage/blob/_shared/base_client.py +8 -8
- azure/storage/blob/_shared/base_client_async.py +5 -5
- azure/storage/blob/_shared/models.py +5 -2
- azure/storage/blob/_shared/policies.py +6 -7
- azure/storage/blob/_shared/policies_async.py +1 -1
- azure/storage/blob/_shared/uploads.py +4 -4
- azure/storage/blob/_shared/uploads_async.py +4 -4
- azure/storage/blob/_shared_access_signature.py +0 -1
- azure/storage/blob/_version.py +1 -1
- azure/storage/blob/aio/_blob_client_async.py +30 -10
- azure/storage/blob/aio/_blob_service_client_async.py +7 -3
- azure/storage/blob/aio/_container_client_async.py +4 -4
- azure/storage/blob/aio/_lease_async.py +1 -1
- azure/storage/blob/aio/_list_blobs_helper.py +1 -2
- azure/storage/blob/aio/_models.py +1 -2
- {azure_storage_blob-12.23.1.dist-info → azure_storage_blob-12.24.0b1.dist-info}/METADATA +10 -10
- {azure_storage_blob-12.23.1.dist-info → azure_storage_blob-12.24.0b1.dist-info}/RECORD +49 -49
- {azure_storage_blob-12.23.1.dist-info → azure_storage_blob-12.24.0b1.dist-info}/LICENSE +0 -0
- {azure_storage_blob-12.23.1.dist-info → azure_storage_blob-12.24.0b1.dist-info}/WHEEL +0 -0
- {azure_storage_blob-12.23.1.dist-info → azure_storage_blob-12.24.0b1.dist-info}/top_level.txt +0 -0
@@ -73,7 +73,7 @@ def build_create_request(
|
|
73
73
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
74
74
|
|
75
75
|
blob_type: Literal["PageBlob"] = kwargs.pop("blob_type", _headers.pop("x-ms-blob-type", "PageBlob"))
|
76
|
-
version: Literal["
|
76
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
77
77
|
accept = _headers.pop("Accept", "application/xml")
|
78
78
|
|
79
79
|
# Construct URL
|
@@ -181,6 +181,8 @@ def build_upload_pages_request(
|
|
181
181
|
if_none_match: Optional[str] = None,
|
182
182
|
if_tags: Optional[str] = None,
|
183
183
|
request_id_parameter: Optional[str] = None,
|
184
|
+
structured_body_type: Optional[str] = None,
|
185
|
+
structured_content_length: Optional[int] = None,
|
184
186
|
**kwargs: Any
|
185
187
|
) -> HttpRequest:
|
186
188
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
@@ -189,7 +191,7 @@ def build_upload_pages_request(
|
|
189
191
|
comp: Literal["page"] = kwargs.pop("comp", _params.pop("comp", "page"))
|
190
192
|
page_write: Literal["update"] = kwargs.pop("page_write", _headers.pop("x-ms-page-write", "update"))
|
191
193
|
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
192
|
-
version: Literal["
|
194
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
193
195
|
accept = _headers.pop("Accept", "application/xml")
|
194
196
|
|
195
197
|
# Construct URL
|
@@ -255,6 +257,12 @@ def build_upload_pages_request(
|
|
255
257
|
_headers["x-ms-version"] = _SERIALIZER.header("version", version, "str")
|
256
258
|
if request_id_parameter is not None:
|
257
259
|
_headers["x-ms-client-request-id"] = _SERIALIZER.header("request_id_parameter", request_id_parameter, "str")
|
260
|
+
if structured_body_type is not None:
|
261
|
+
_headers["x-ms-structured-body"] = _SERIALIZER.header("structured_body_type", structured_body_type, "str")
|
262
|
+
if structured_content_length is not None:
|
263
|
+
_headers["x-ms-structured-content-length"] = _SERIALIZER.header(
|
264
|
+
"structured_content_length", structured_content_length, "int"
|
265
|
+
)
|
258
266
|
if content_type is not None:
|
259
267
|
_headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
|
260
268
|
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
@@ -289,7 +297,7 @@ def build_clear_pages_request(
|
|
289
297
|
|
290
298
|
comp: Literal["page"] = kwargs.pop("comp", _params.pop("comp", "page"))
|
291
299
|
page_write: Literal["clear"] = kwargs.pop("page_write", _headers.pop("x-ms-page-write", "clear"))
|
292
|
-
version: Literal["
|
300
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
293
301
|
accept = _headers.pop("Accept", "application/xml")
|
294
302
|
|
295
303
|
# Construct URL
|
@@ -388,7 +396,7 @@ def build_upload_pages_from_url_request(
|
|
388
396
|
|
389
397
|
comp: Literal["page"] = kwargs.pop("comp", _params.pop("comp", "page"))
|
390
398
|
page_write: Literal["update"] = kwargs.pop("page_write", _headers.pop("x-ms-page-write", "update"))
|
391
|
-
version: Literal["
|
399
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
392
400
|
accept = _headers.pop("Accept", "application/xml")
|
393
401
|
|
394
402
|
# Construct URL
|
@@ -495,7 +503,7 @@ def build_get_page_ranges_request(
|
|
495
503
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
496
504
|
|
497
505
|
comp: Literal["pagelist"] = kwargs.pop("comp", _params.pop("comp", "pagelist"))
|
498
|
-
version: Literal["
|
506
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
499
507
|
accept = _headers.pop("Accept", "application/xml")
|
500
508
|
|
501
509
|
# Construct URL
|
@@ -563,7 +571,7 @@ def build_get_page_ranges_diff_request(
|
|
563
571
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
564
572
|
|
565
573
|
comp: Literal["pagelist"] = kwargs.pop("comp", _params.pop("comp", "pagelist"))
|
566
|
-
version: Literal["
|
574
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
567
575
|
accept = _headers.pop("Accept", "application/xml")
|
568
576
|
|
569
577
|
# Construct URL
|
@@ -634,7 +642,7 @@ def build_resize_request(
|
|
634
642
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
635
643
|
|
636
644
|
comp: Literal["properties"] = kwargs.pop("comp", _params.pop("comp", "properties"))
|
637
|
-
version: Literal["
|
645
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
638
646
|
accept = _headers.pop("Accept", "application/xml")
|
639
647
|
|
640
648
|
# Construct URL
|
@@ -701,7 +709,7 @@ def build_update_sequence_number_request(
|
|
701
709
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
702
710
|
|
703
711
|
comp: Literal["properties"] = kwargs.pop("comp", _params.pop("comp", "properties"))
|
704
|
-
version: Literal["
|
712
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
705
713
|
accept = _headers.pop("Accept", "application/xml")
|
706
714
|
|
707
715
|
# Construct URL
|
@@ -760,7 +768,7 @@ def build_copy_incremental_request(
|
|
760
768
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
761
769
|
|
762
770
|
comp: Literal["incrementalcopy"] = kwargs.pop("comp", _params.pop("comp", "incrementalcopy"))
|
763
|
-
version: Literal["
|
771
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
764
772
|
accept = _headers.pop("Accept", "application/xml")
|
765
773
|
|
766
774
|
# Construct URL
|
@@ -836,6 +844,7 @@ class PageBlobOperations:
|
|
836
844
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
837
845
|
**kwargs: Any
|
838
846
|
) -> None:
|
847
|
+
# pylint: disable=line-too-long
|
839
848
|
"""The Create operation creates a new page blob.
|
840
849
|
|
841
850
|
:param content_length: The length of the request. Required.
|
@@ -892,7 +901,7 @@ class PageBlobOperations:
|
|
892
901
|
:rtype: None
|
893
902
|
:raises ~azure.core.exceptions.HttpResponseError:
|
894
903
|
"""
|
895
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
904
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
896
905
|
401: ClientAuthenticationError,
|
897
906
|
404: ResourceNotFoundError,
|
898
907
|
409: ResourceExistsError,
|
@@ -1026,6 +1035,8 @@ class PageBlobOperations:
|
|
1026
1035
|
timeout: Optional[int] = None,
|
1027
1036
|
range: Optional[str] = None,
|
1028
1037
|
request_id_parameter: Optional[str] = None,
|
1038
|
+
structured_body_type: Optional[str] = None,
|
1039
|
+
structured_content_length: Optional[int] = None,
|
1029
1040
|
lease_access_conditions: Optional[_models.LeaseAccessConditions] = None,
|
1030
1041
|
cpk_info: Optional[_models.CpkInfo] = None,
|
1031
1042
|
cpk_scope_info: Optional[_models.CpkScopeInfo] = None,
|
@@ -1033,6 +1044,7 @@ class PageBlobOperations:
|
|
1033
1044
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
1034
1045
|
**kwargs: Any
|
1035
1046
|
) -> None:
|
1047
|
+
# pylint: disable=line-too-long
|
1036
1048
|
"""The Upload Pages operation writes a range of pages to a page blob.
|
1037
1049
|
|
1038
1050
|
:param content_length: The length of the request. Required.
|
@@ -1056,6 +1068,13 @@ class PageBlobOperations:
|
|
1056
1068
|
limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
|
1057
1069
|
value is None.
|
1058
1070
|
:type request_id_parameter: str
|
1071
|
+
:param structured_body_type: Required if the request body is a structured message. Specifies
|
1072
|
+
the message schema version and properties. Default value is None.
|
1073
|
+
:type structured_body_type: str
|
1074
|
+
:param structured_content_length: Required if the request body is a structured message.
|
1075
|
+
Specifies the length of the blob/file content inside the message body. Will always be smaller
|
1076
|
+
than Content-Length. Default value is None.
|
1077
|
+
:type structured_content_length: int
|
1059
1078
|
:param lease_access_conditions: Parameter group. Default value is None.
|
1060
1079
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
1061
1080
|
:param cpk_info: Parameter group. Default value is None.
|
@@ -1071,7 +1090,7 @@ class PageBlobOperations:
|
|
1071
1090
|
:rtype: None
|
1072
1091
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1073
1092
|
"""
|
1074
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
1093
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
1075
1094
|
401: ClientAuthenticationError,
|
1076
1095
|
404: ResourceNotFoundError,
|
1077
1096
|
409: ResourceExistsError,
|
@@ -1143,6 +1162,8 @@ class PageBlobOperations:
|
|
1143
1162
|
if_none_match=_if_none_match,
|
1144
1163
|
if_tags=_if_tags,
|
1145
1164
|
request_id_parameter=request_id_parameter,
|
1165
|
+
structured_body_type=structured_body_type,
|
1166
|
+
structured_content_length=structured_content_length,
|
1146
1167
|
comp=comp,
|
1147
1168
|
page_write=page_write,
|
1148
1169
|
content_type=content_type,
|
@@ -1190,6 +1211,9 @@ class PageBlobOperations:
|
|
1190
1211
|
response_headers["x-ms-encryption-scope"] = self._deserialize(
|
1191
1212
|
"str", response.headers.get("x-ms-encryption-scope")
|
1192
1213
|
)
|
1214
|
+
response_headers["x-ms-structured-body"] = self._deserialize(
|
1215
|
+
"str", response.headers.get("x-ms-structured-body")
|
1216
|
+
)
|
1193
1217
|
|
1194
1218
|
if cls:
|
1195
1219
|
return cls(pipeline_response, None, response_headers) # type: ignore
|
@@ -1208,6 +1232,7 @@ class PageBlobOperations:
|
|
1208
1232
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
1209
1233
|
**kwargs: Any
|
1210
1234
|
) -> None:
|
1235
|
+
# pylint: disable=line-too-long
|
1211
1236
|
"""The Clear Pages operation clears a set of pages from a page blob.
|
1212
1237
|
|
1213
1238
|
:param content_length: The length of the request. Required.
|
@@ -1238,7 +1263,7 @@ class PageBlobOperations:
|
|
1238
1263
|
:rtype: None
|
1239
1264
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1240
1265
|
"""
|
1241
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
1266
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
1242
1267
|
401: ClientAuthenticationError,
|
1243
1268
|
404: ResourceNotFoundError,
|
1244
1269
|
409: ResourceExistsError,
|
@@ -1366,6 +1391,7 @@ class PageBlobOperations:
|
|
1366
1391
|
source_modified_access_conditions: Optional[_models.SourceModifiedAccessConditions] = None,
|
1367
1392
|
**kwargs: Any
|
1368
1393
|
) -> None:
|
1394
|
+
# pylint: disable=line-too-long
|
1369
1395
|
"""The Upload Pages operation writes a range of pages to a page blob where the contents are read
|
1370
1396
|
from a URL.
|
1371
1397
|
|
@@ -1415,7 +1441,7 @@ class PageBlobOperations:
|
|
1415
1441
|
:rtype: None
|
1416
1442
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1417
1443
|
"""
|
1418
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
1444
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
1419
1445
|
401: ClientAuthenticationError,
|
1420
1446
|
404: ResourceNotFoundError,
|
1421
1447
|
409: ResourceExistsError,
|
@@ -1560,6 +1586,7 @@ class PageBlobOperations:
|
|
1560
1586
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
1561
1587
|
**kwargs: Any
|
1562
1588
|
) -> _models.PageList:
|
1589
|
+
# pylint: disable=line-too-long
|
1563
1590
|
"""The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot
|
1564
1591
|
of a page blob.
|
1565
1592
|
|
@@ -1602,7 +1629,7 @@ class PageBlobOperations:
|
|
1602
1629
|
:rtype: ~azure.storage.blob.models.PageList
|
1603
1630
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1604
1631
|
"""
|
1605
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
1632
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
1606
1633
|
401: ClientAuthenticationError,
|
1607
1634
|
404: ResourceNotFoundError,
|
1608
1635
|
409: ResourceExistsError,
|
@@ -1699,6 +1726,7 @@ class PageBlobOperations:
|
|
1699
1726
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
1700
1727
|
**kwargs: Any
|
1701
1728
|
) -> _models.PageList:
|
1729
|
+
# pylint: disable=line-too-long
|
1702
1730
|
"""The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that
|
1703
1731
|
were changed between target blob and previous snapshot.
|
1704
1732
|
|
@@ -1753,7 +1781,7 @@ class PageBlobOperations:
|
|
1753
1781
|
:rtype: ~azure.storage.blob.models.PageList
|
1754
1782
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1755
1783
|
"""
|
1756
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
1784
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
1757
1785
|
401: ClientAuthenticationError,
|
1758
1786
|
404: ResourceNotFoundError,
|
1759
1787
|
409: ResourceExistsError,
|
@@ -1849,6 +1877,7 @@ class PageBlobOperations:
|
|
1849
1877
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
1850
1878
|
**kwargs: Any
|
1851
1879
|
) -> None:
|
1880
|
+
# pylint: disable=line-too-long
|
1852
1881
|
"""Resize the Blob.
|
1853
1882
|
|
1854
1883
|
:param blob_content_length: This header specifies the maximum size for the page blob, up to 1
|
@@ -1875,7 +1904,7 @@ class PageBlobOperations:
|
|
1875
1904
|
:rtype: None
|
1876
1905
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1877
1906
|
"""
|
1878
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
1907
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
1879
1908
|
401: ClientAuthenticationError,
|
1880
1909
|
404: ResourceNotFoundError,
|
1881
1910
|
409: ResourceExistsError,
|
@@ -1975,6 +2004,7 @@ class PageBlobOperations:
|
|
1975
2004
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
1976
2005
|
**kwargs: Any
|
1977
2006
|
) -> None:
|
2007
|
+
# pylint: disable=line-too-long
|
1978
2008
|
"""Update the sequence number of the blob.
|
1979
2009
|
|
1980
2010
|
:param sequence_number_action: Required if the x-ms-blob-sequence-number header is set for the
|
@@ -2003,7 +2033,7 @@ class PageBlobOperations:
|
|
2003
2033
|
:rtype: None
|
2004
2034
|
:raises ~azure.core.exceptions.HttpResponseError:
|
2005
2035
|
"""
|
2006
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
2036
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
2007
2037
|
401: ClientAuthenticationError,
|
2008
2038
|
404: ResourceNotFoundError,
|
2009
2039
|
409: ResourceExistsError,
|
@@ -2088,6 +2118,7 @@ class PageBlobOperations:
|
|
2088
2118
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
2089
2119
|
**kwargs: Any
|
2090
2120
|
) -> None:
|
2121
|
+
# pylint: disable=line-too-long
|
2091
2122
|
"""The Copy Incremental operation copies a snapshot of the source page blob to a destination page
|
2092
2123
|
blob. The snapshot is copied such that only the differential changes between the previously
|
2093
2124
|
copied snapshot are transferred to the destination. The copied snapshots are complete copies of
|
@@ -2114,7 +2145,7 @@ class PageBlobOperations:
|
|
2114
2145
|
:rtype: None
|
2115
2146
|
:raises ~azure.core.exceptions.HttpResponseError:
|
2116
2147
|
"""
|
2117
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
2148
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
2118
2149
|
401: ClientAuthenticationError,
|
2119
2150
|
404: ResourceNotFoundError,
|
2120
2151
|
409: ResourceExistsError,
|
@@ -47,7 +47,7 @@ def build_set_properties_request(
|
|
47
47
|
restype: Literal["service"] = kwargs.pop("restype", _params.pop("restype", "service"))
|
48
48
|
comp: Literal["properties"] = kwargs.pop("comp", _params.pop("comp", "properties"))
|
49
49
|
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
50
|
-
version: Literal["
|
50
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
51
51
|
accept = _headers.pop("Accept", "application/xml")
|
52
52
|
|
53
53
|
# Construct URL
|
@@ -83,7 +83,7 @@ def build_get_properties_request(
|
|
83
83
|
|
84
84
|
restype: Literal["service"] = kwargs.pop("restype", _params.pop("restype", "service"))
|
85
85
|
comp: Literal["properties"] = kwargs.pop("comp", _params.pop("comp", "properties"))
|
86
|
-
version: Literal["
|
86
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
87
87
|
accept = _headers.pop("Accept", "application/xml")
|
88
88
|
|
89
89
|
# Construct URL
|
@@ -117,7 +117,7 @@ def build_get_statistics_request(
|
|
117
117
|
|
118
118
|
restype: Literal["service"] = kwargs.pop("restype", _params.pop("restype", "service"))
|
119
119
|
comp: Literal["stats"] = kwargs.pop("comp", _params.pop("comp", "stats"))
|
120
|
-
version: Literal["
|
120
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
121
121
|
accept = _headers.pop("Accept", "application/xml")
|
122
122
|
|
123
123
|
# Construct URL
|
@@ -158,7 +158,7 @@ def build_list_containers_segment_request(
|
|
158
158
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
159
159
|
|
160
160
|
comp: Literal["list"] = kwargs.pop("comp", _params.pop("comp", "list"))
|
161
|
-
version: Literal["
|
161
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
162
162
|
accept = _headers.pop("Accept", "application/xml")
|
163
163
|
|
164
164
|
# Construct URL
|
@@ -200,7 +200,7 @@ def build_get_user_delegation_key_request(
|
|
200
200
|
restype: Literal["service"] = kwargs.pop("restype", _params.pop("restype", "service"))
|
201
201
|
comp: Literal["userdelegationkey"] = kwargs.pop("comp", _params.pop("comp", "userdelegationkey"))
|
202
202
|
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
203
|
-
version: Literal["
|
203
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
204
204
|
accept = _headers.pop("Accept", "application/xml")
|
205
205
|
|
206
206
|
# Construct URL
|
@@ -236,7 +236,7 @@ def build_get_account_info_request(
|
|
236
236
|
|
237
237
|
restype: Literal["account"] = kwargs.pop("restype", _params.pop("restype", "account"))
|
238
238
|
comp: Literal["properties"] = kwargs.pop("comp", _params.pop("comp", "properties"))
|
239
|
-
version: Literal["
|
239
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
240
240
|
accept = _headers.pop("Accept", "application/xml")
|
241
241
|
|
242
242
|
# Construct URL
|
@@ -276,7 +276,7 @@ def build_submit_batch_request(
|
|
276
276
|
|
277
277
|
comp: Literal["batch"] = kwargs.pop("comp", _params.pop("comp", "batch"))
|
278
278
|
multipart_content_type: Optional[str] = kwargs.pop("multipart_content_type", _headers.pop("Content-Type", None))
|
279
|
-
version: Literal["
|
279
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
280
280
|
accept = _headers.pop("Accept", "application/xml")
|
281
281
|
|
282
282
|
# Construct URL
|
@@ -319,7 +319,7 @@ def build_filter_blobs_request(
|
|
319
319
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
320
320
|
|
321
321
|
comp: Literal["blobs"] = kwargs.pop("comp", _params.pop("comp", "blobs"))
|
322
|
-
version: Literal["
|
322
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
323
323
|
accept = _headers.pop("Accept", "application/xml")
|
324
324
|
|
325
325
|
# Construct URL
|
@@ -379,6 +379,7 @@ class ServiceOperations:
|
|
379
379
|
request_id_parameter: Optional[str] = None,
|
380
380
|
**kwargs: Any
|
381
381
|
) -> None:
|
382
|
+
# pylint: disable=line-too-long
|
382
383
|
"""Sets properties for a storage account's Blob service endpoint, including properties for Storage
|
383
384
|
Analytics and CORS (Cross-Origin Resource Sharing) rules.
|
384
385
|
|
@@ -397,7 +398,7 @@ class ServiceOperations:
|
|
397
398
|
:rtype: None
|
398
399
|
:raises ~azure.core.exceptions.HttpResponseError:
|
399
400
|
"""
|
400
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
401
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
401
402
|
401: ClientAuthenticationError,
|
402
403
|
404: ResourceNotFoundError,
|
403
404
|
409: ResourceExistsError,
|
@@ -455,6 +456,7 @@ class ServiceOperations:
|
|
455
456
|
def get_properties(
|
456
457
|
self, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
|
457
458
|
) -> _models.StorageServiceProperties:
|
459
|
+
# pylint: disable=line-too-long
|
458
460
|
"""gets the properties of a storage account's Blob service, including properties for Storage
|
459
461
|
Analytics and CORS (Cross-Origin Resource Sharing) rules.
|
460
462
|
|
@@ -471,7 +473,7 @@ class ServiceOperations:
|
|
471
473
|
:rtype: ~azure.storage.blob.models.StorageServiceProperties
|
472
474
|
:raises ~azure.core.exceptions.HttpResponseError:
|
473
475
|
"""
|
474
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
476
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
475
477
|
401: ClientAuthenticationError,
|
476
478
|
404: ResourceNotFoundError,
|
477
479
|
409: ResourceExistsError,
|
@@ -528,6 +530,7 @@ class ServiceOperations:
|
|
528
530
|
def get_statistics(
|
529
531
|
self, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
|
530
532
|
) -> _models.StorageServiceStats:
|
533
|
+
# pylint: disable=line-too-long
|
531
534
|
"""Retrieves statistics related to replication for the Blob service. It is only available on the
|
532
535
|
secondary location endpoint when read-access geo-redundant replication is enabled for the
|
533
536
|
storage account.
|
@@ -545,7 +548,7 @@ class ServiceOperations:
|
|
545
548
|
:rtype: ~azure.storage.blob.models.StorageServiceStats
|
546
549
|
:raises ~azure.core.exceptions.HttpResponseError:
|
547
550
|
"""
|
548
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
551
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
549
552
|
401: ClientAuthenticationError,
|
550
553
|
404: ResourceNotFoundError,
|
551
554
|
409: ResourceExistsError,
|
@@ -610,6 +613,7 @@ class ServiceOperations:
|
|
610
613
|
request_id_parameter: Optional[str] = None,
|
611
614
|
**kwargs: Any
|
612
615
|
) -> _models.ListContainersSegmentResponse:
|
616
|
+
# pylint: disable=line-too-long
|
613
617
|
"""The List Containers Segment operation returns a list of the containers under the specified
|
614
618
|
account.
|
615
619
|
|
@@ -646,7 +650,7 @@ class ServiceOperations:
|
|
646
650
|
:rtype: ~azure.storage.blob.models.ListContainersSegmentResponse
|
647
651
|
:raises ~azure.core.exceptions.HttpResponseError:
|
648
652
|
"""
|
649
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
653
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
650
654
|
401: ClientAuthenticationError,
|
651
655
|
404: ResourceNotFoundError,
|
652
656
|
409: ResourceExistsError,
|
@@ -709,6 +713,7 @@ class ServiceOperations:
|
|
709
713
|
request_id_parameter: Optional[str] = None,
|
710
714
|
**kwargs: Any
|
711
715
|
) -> _models.UserDelegationKey:
|
716
|
+
# pylint: disable=line-too-long
|
712
717
|
"""Retrieves a user delegation key for the Blob service. This is only a valid operation when using
|
713
718
|
bearer token authentication.
|
714
719
|
|
@@ -727,7 +732,7 @@ class ServiceOperations:
|
|
727
732
|
:rtype: ~azure.storage.blob.models.UserDelegationKey
|
728
733
|
:raises ~azure.core.exceptions.HttpResponseError:
|
729
734
|
"""
|
730
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
735
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
731
736
|
401: ClientAuthenticationError,
|
732
737
|
404: ResourceNotFoundError,
|
733
738
|
409: ResourceExistsError,
|
@@ -790,6 +795,7 @@ class ServiceOperations:
|
|
790
795
|
def get_account_info( # pylint: disable=inconsistent-return-statements
|
791
796
|
self, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
|
792
797
|
) -> None:
|
798
|
+
# pylint: disable=line-too-long
|
793
799
|
"""Returns the sku name and account kind.
|
794
800
|
|
795
801
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
@@ -805,7 +811,7 @@ class ServiceOperations:
|
|
805
811
|
:rtype: None
|
806
812
|
:raises ~azure.core.exceptions.HttpResponseError:
|
807
813
|
"""
|
808
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
814
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
809
815
|
401: ClientAuthenticationError,
|
810
816
|
404: ResourceNotFoundError,
|
811
817
|
409: ResourceExistsError,
|
@@ -867,6 +873,7 @@ class ServiceOperations:
|
|
867
873
|
request_id_parameter: Optional[str] = None,
|
868
874
|
**kwargs: Any
|
869
875
|
) -> Iterator[bytes]:
|
876
|
+
# pylint: disable=line-too-long
|
870
877
|
"""The Batch operation allows multiple API calls to be embedded into a single HTTP request.
|
871
878
|
|
872
879
|
:param content_length: The length of the request. Required.
|
@@ -886,7 +893,7 @@ class ServiceOperations:
|
|
886
893
|
:rtype: Iterator[bytes]
|
887
894
|
:raises ~azure.core.exceptions.HttpResponseError:
|
888
895
|
"""
|
889
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
896
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
890
897
|
401: ClientAuthenticationError,
|
891
898
|
404: ResourceNotFoundError,
|
892
899
|
409: ResourceExistsError,
|
@@ -959,6 +966,7 @@ class ServiceOperations:
|
|
959
966
|
include: Optional[List[Union[str, _models.FilterBlobsIncludeItem]]] = None,
|
960
967
|
**kwargs: Any
|
961
968
|
) -> _models.FilterBlobSegment:
|
969
|
+
# pylint: disable=line-too-long
|
962
970
|
"""The Filter Blobs operation enables callers to list blobs across all containers whose tags match
|
963
971
|
a given search expression. Filter blobs searches across all containers within a storage
|
964
972
|
account but can be scoped within the expression to a single container.
|
@@ -996,7 +1004,7 @@ class ServiceOperations:
|
|
996
1004
|
:rtype: ~azure.storage.blob.models.FilterBlobSegment
|
997
1005
|
:raises ~azure.core.exceptions.HttpResponseError:
|
998
1006
|
"""
|
999
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
1007
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
1000
1008
|
401: ClientAuthenticationError,
|
1001
1009
|
404: ResourceNotFoundError,
|
1002
1010
|
409: ResourceExistsError,
|
@@ -110,7 +110,7 @@ class BlobPropertiesPaged(PageIterator):
|
|
110
110
|
if isinstance(item, BlobProperties):
|
111
111
|
return item
|
112
112
|
if isinstance(item, BlobItemInternal):
|
113
|
-
blob = get_blob_properties_from_generated_code(item)
|
113
|
+
blob = get_blob_properties_from_generated_code(item)
|
114
114
|
blob.container = self.container # type: ignore [assignment]
|
115
115
|
return blob
|
116
116
|
return item
|
azure/storage/blob/_models.py
CHANGED
@@ -472,7 +472,7 @@ class ContainerProperties(DictMixin):
|
|
472
472
|
)
|
473
473
|
|
474
474
|
@classmethod
|
475
|
-
def _from_generated(cls, generated):
|
475
|
+
def _from_generated(cls, generated):
|
476
476
|
props = cls()
|
477
477
|
props.name = generated.name
|
478
478
|
props.last_modified = generated.properties.last_modified
|
@@ -934,7 +934,7 @@ class ContainerSasPermissions(object):
|
|
934
934
|
delete_previous_version: bool = False,
|
935
935
|
tag: bool = False,
|
936
936
|
**kwargs: Any
|
937
|
-
) -> None:
|
937
|
+
) -> None:
|
938
938
|
self.read = read
|
939
939
|
self.add = kwargs.pop('add', False)
|
940
940
|
self.create = kwargs.pop('create', False)
|
@@ -1443,7 +1443,8 @@ class BlobProperties(DictMixin):
|
|
1443
1443
|
self.snapshot = kwargs.get('x-ms-snapshot')
|
1444
1444
|
self.version_id = kwargs.get('x-ms-version-id')
|
1445
1445
|
self.is_current_version = kwargs.get('x-ms-is-current-version')
|
1446
|
-
self.blob_type = BlobType(kwargs['x-ms-blob-type']) if
|
1446
|
+
self.blob_type = BlobType(kwargs['x-ms-blob-type']) if (
|
1447
|
+
kwargs.get('x-ms-blob-type')) else None # type: ignore [assignment]
|
1447
1448
|
self.metadata = kwargs.get('metadata') # type: ignore [assignment]
|
1448
1449
|
self.encrypted_metadata = kwargs.get('encrypted_metadata')
|
1449
1450
|
self.last_modified = kwargs.get('Last-Modified') # type: ignore [assignment]
|
azure/storage/blob/_serialize.py
CHANGED
@@ -957,6 +957,7 @@ class RecordSchema(NamedSchema):
|
|
957
957
|
raise SchemaParseException(
|
958
958
|
f'Invalid record type: {record_type!r}.')
|
959
959
|
|
960
|
+
nested_names = []
|
960
961
|
if record_type in [RECORD, ERROR]:
|
961
962
|
avro_name = names.get_name(name=name, namespace=namespace)
|
962
963
|
nested_names = names.new_with_default_namespace(namespace=avro_name.namespace)
|
@@ -64,13 +64,13 @@ _SERVICE_PARAMS = {
|
|
64
64
|
}
|
65
65
|
|
66
66
|
|
67
|
-
class StorageAccountHostsMixin(object):
|
67
|
+
class StorageAccountHostsMixin(object):
|
68
68
|
_client: Any
|
69
69
|
def __init__(
|
70
70
|
self,
|
71
71
|
parsed_url: Any,
|
72
72
|
service: str,
|
73
|
-
credential: Optional[Union[str, Dict[str, str], AzureNamedKeyCredential, AzureSasCredential, "AsyncTokenCredential", TokenCredential]] = None,
|
73
|
+
credential: Optional[Union[str, Dict[str, str], AzureNamedKeyCredential, AzureSasCredential, "AsyncTokenCredential", TokenCredential]] = None, # pylint: disable=line-too-long
|
74
74
|
**kwargs: Any
|
75
75
|
) -> None:
|
76
76
|
self._location_mode = kwargs.get("_location_mode", LocationMode.PRIMARY)
|
@@ -224,7 +224,7 @@ class StorageAccountHostsMixin(object): # pylint: disable=too-many-instance-att
|
|
224
224
|
return query_str.rstrip("?&"), credential
|
225
225
|
|
226
226
|
def _create_pipeline(
|
227
|
-
self, credential: Optional[Union[str, Dict[str, str], AzureNamedKeyCredential, AzureSasCredential, TokenCredential]] = None,
|
227
|
+
self, credential: Optional[Union[str, Dict[str, str], AzureNamedKeyCredential, AzureSasCredential, TokenCredential]] = None, # pylint: disable=line-too-long
|
228
228
|
**kwargs: Any
|
229
229
|
) -> Tuple[StorageConfiguration, Pipeline]:
|
230
230
|
self._credential_policy: Any = None
|
@@ -308,7 +308,7 @@ class StorageAccountHostsMixin(object): # pylint: disable=too-many-instance-att
|
|
308
308
|
enforce_https=False
|
309
309
|
)
|
310
310
|
|
311
|
-
Pipeline._prepare_multipart_mixed_request(request)
|
311
|
+
Pipeline._prepare_multipart_mixed_request(request) # pylint: disable=protected-access
|
312
312
|
body = serialize_batch_body(request.multipart_mixed_info[0], batch_id)
|
313
313
|
request.set_bytes_body(body)
|
314
314
|
|
@@ -358,13 +358,13 @@ class TransportWrapper(HttpTransport):
|
|
358
358
|
def __enter__(self):
|
359
359
|
pass
|
360
360
|
|
361
|
-
def __exit__(self, *args):
|
361
|
+
def __exit__(self, *args):
|
362
362
|
pass
|
363
363
|
|
364
364
|
|
365
365
|
def _format_shared_key_credential(
|
366
366
|
account_name: str,
|
367
|
-
credential: Optional[Union[str, Dict[str, str], AzureNamedKeyCredential, AzureSasCredential, "AsyncTokenCredential", TokenCredential]] = None
|
367
|
+
credential: Optional[Union[str, Dict[str, str], AzureNamedKeyCredential, AzureSasCredential, "AsyncTokenCredential", TokenCredential]] = None # pylint: disable=line-too-long
|
368
368
|
) -> Any:
|
369
369
|
if isinstance(credential, str):
|
370
370
|
if not account_name:
|
@@ -383,9 +383,9 @@ def _format_shared_key_credential(
|
|
383
383
|
|
384
384
|
def parse_connection_str(
|
385
385
|
conn_str: str,
|
386
|
-
credential: Optional[Union[str, Dict[str, str], AzureNamedKeyCredential, AzureSasCredential, TokenCredential]],
|
386
|
+
credential: Optional[Union[str, Dict[str, str], AzureNamedKeyCredential, AzureSasCredential, TokenCredential]],
|
387
387
|
service: str
|
388
|
-
) -> Tuple[str, Optional[str], Optional[Union[str, Dict[str, str], AzureNamedKeyCredential, AzureSasCredential, TokenCredential]]]:
|
388
|
+
) -> Tuple[str, Optional[str], Optional[Union[str, Dict[str, str], AzureNamedKeyCredential, AzureSasCredential, TokenCredential]]]: # pylint: disable=line-too-long
|
389
389
|
conn_str = conn_str.rstrip(";")
|
390
390
|
conn_settings_list = [s.split("=", 1) for s in conn_str.split(";")]
|
391
391
|
if any(len(tup) != 2 for tup in conn_settings_list):
|
@@ -127,16 +127,16 @@ class AsyncStorageAccountHostsMixin(object):
|
|
127
127
|
hosts = self._hosts
|
128
128
|
policies = [
|
129
129
|
QueueMessagePolicy(),
|
130
|
-
config.headers_policy,
|
131
130
|
config.proxy_policy,
|
132
131
|
config.user_agent_policy,
|
133
132
|
StorageContentValidation(),
|
134
|
-
StorageRequestHook(**kwargs),
|
135
|
-
self._credential_policy,
|
136
133
|
ContentDecodePolicy(response_encoding="utf-8"),
|
137
134
|
AsyncRedirectPolicy(**kwargs),
|
138
135
|
StorageHosts(hosts=hosts, **kwargs),
|
139
136
|
config.retry_policy,
|
137
|
+
config.headers_policy,
|
138
|
+
StorageRequestHook(**kwargs),
|
139
|
+
self._credential_policy,
|
140
140
|
config.logging_policy,
|
141
141
|
AsyncStorageResponseHook(**kwargs),
|
142
142
|
DistributedTracingPolicy(**kwargs),
|
@@ -207,7 +207,7 @@ class AsyncStorageAccountHostsMixin(object):
|
|
207
207
|
|
208
208
|
def parse_connection_str(
|
209
209
|
conn_str: str,
|
210
|
-
credential: Optional[Union[str, Dict[str, str], AzureNamedKeyCredential, AzureSasCredential, AsyncTokenCredential]],
|
210
|
+
credential: Optional[Union[str, Dict[str, str], AzureNamedKeyCredential, AzureSasCredential, AsyncTokenCredential]],
|
211
211
|
service: str
|
212
212
|
) -> Tuple[str, Optional[str], Optional[Union[str, Dict[str, str], AzureNamedKeyCredential, AzureSasCredential, AsyncTokenCredential]]]: # pylint: disable=line-too-long
|
213
213
|
conn_str = conn_str.rstrip(";")
|
@@ -276,5 +276,5 @@ class AsyncTransportWrapper(AsyncHttpTransport):
|
|
276
276
|
async def __aenter__(self):
|
277
277
|
pass
|
278
278
|
|
279
|
-
async def __aexit__(self, *args):
|
279
|
+
async def __aexit__(self, *args):
|
280
280
|
pass
|