azure-storage-blob 12.23.0b1__py3-none-any.whl → 12.24.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/_blob_client.py +34 -10
- azure/storage/blob/_blob_client_helpers.py +7 -3
- azure/storage/blob/_blob_service_client.py +1 -1
- azure/storage/blob/_container_client.py +8 -2
- azure/storage/blob/_container_client_helpers.py +11 -6
- azure/storage/blob/_deserialize.py +2 -2
- azure/storage/blob/_encryption.py +15 -10
- azure/storage/blob/_generated/_azure_blob_storage.py +3 -2
- azure/storage/blob/_generated/_configuration.py +2 -2
- azure/storage/blob/_generated/_serialization.py +267 -150
- azure/storage/blob/_generated/aio/_azure_blob_storage.py +3 -2
- azure/storage/blob/_generated/aio/_configuration.py +2 -2
- azure/storage/blob/_generated/aio/operations/_append_blob_operations.py +23 -11
- azure/storage/blob/_generated/aio/operations/_blob_operations.py +137 -73
- azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +42 -16
- azure/storage/blob/_generated/aio/operations/_container_operations.py +49 -44
- azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +35 -23
- azure/storage/blob/_generated/aio/operations/_service_operations.py +30 -25
- azure/storage/blob/_generated/models/_azure_blob_storage_enums.py +1 -0
- azure/storage/blob/_generated/operations/_append_blob_operations.py +35 -15
- azure/storage/blob/_generated/operations/_blob_operations.py +187 -98
- azure/storage/blob/_generated/operations/_block_blob_operations.py +64 -22
- azure/storage/blob/_generated/operations/_container_operations.py +67 -62
- azure/storage/blob/_generated/operations/_page_blob_operations.py +52 -32
- azure/storage/blob/_generated/operations/_service_operations.py +38 -33
- 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 +10 -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 +14 -16
- azure/storage/blob/_shared/policies_async.py +19 -6
- azure/storage/blob/_shared/request_handlers.py +2 -3
- azure/storage/blob/_shared/response_handlers.py +2 -2
- 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 +36 -13
- azure/storage/blob/aio/_blob_service_client_async.py +7 -3
- azure/storage/blob/aio/_container_client_async.py +10 -4
- azure/storage/blob/aio/_download_async.py +94 -71
- 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.0b1.dist-info → azure_storage_blob-12.24.0.dist-info}/METADATA +10 -10
- azure_storage_blob-12.24.0.dist-info/RECORD +84 -0
- {azure_storage_blob-12.23.0b1.dist-info → azure_storage_blob-12.24.0.dist-info}/WHEEL +1 -1
- azure/storage/blob/_generated/_vendor.py +0 -16
- azure_storage_blob-12.23.0b1.dist-info/RECORD +0 -85
- {azure_storage_blob-12.23.0b1.dist-info → azure_storage_blob-12.24.0.dist-info}/LICENSE +0 -0
- {azure_storage_blob-12.23.0b1.dist-info → azure_storage_blob-12.24.0.dist-info}/top_level.txt +0 -0
@@ -19,13 +19,11 @@ from azure.core.exceptions import (
|
|
19
19
|
map_error,
|
20
20
|
)
|
21
21
|
from azure.core.pipeline import PipelineResponse
|
22
|
-
from azure.core.
|
23
|
-
from azure.core.rest import HttpRequest
|
22
|
+
from azure.core.rest import AsyncHttpResponse, HttpRequest
|
24
23
|
from azure.core.tracing.decorator_async import distributed_trace_async
|
25
24
|
from azure.core.utils import case_insensitive_dict
|
26
25
|
|
27
26
|
from ... import models as _models
|
28
|
-
from ..._vendor import _convert_request
|
29
27
|
from ...operations._page_blob_operations import (
|
30
28
|
build_clear_pages_request,
|
31
29
|
build_copy_incremental_request,
|
@@ -86,6 +84,7 @@ class PageBlobOperations:
|
|
86
84
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
87
85
|
**kwargs: Any
|
88
86
|
) -> None:
|
87
|
+
# pylint: disable=line-too-long
|
89
88
|
"""The Create operation creates a new page blob.
|
90
89
|
|
91
90
|
:param content_length: The length of the request. Required.
|
@@ -142,7 +141,7 @@ class PageBlobOperations:
|
|
142
141
|
:rtype: None
|
143
142
|
:raises ~azure.core.exceptions.HttpResponseError:
|
144
143
|
"""
|
145
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
144
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
146
145
|
401: ClientAuthenticationError,
|
147
146
|
404: ResourceNotFoundError,
|
148
147
|
409: ResourceExistsError,
|
@@ -228,7 +227,6 @@ class PageBlobOperations:
|
|
228
227
|
headers=_headers,
|
229
228
|
params=_params,
|
230
229
|
)
|
231
|
-
_request = _convert_request(_request)
|
232
230
|
_request.url = self._client.format_url(_request.url)
|
233
231
|
|
234
232
|
_stream = False
|
@@ -277,6 +275,8 @@ class PageBlobOperations:
|
|
277
275
|
timeout: Optional[int] = None,
|
278
276
|
range: Optional[str] = None,
|
279
277
|
request_id_parameter: Optional[str] = None,
|
278
|
+
structured_body_type: Optional[str] = None,
|
279
|
+
structured_content_length: Optional[int] = None,
|
280
280
|
lease_access_conditions: Optional[_models.LeaseAccessConditions] = None,
|
281
281
|
cpk_info: Optional[_models.CpkInfo] = None,
|
282
282
|
cpk_scope_info: Optional[_models.CpkScopeInfo] = None,
|
@@ -284,6 +284,7 @@ class PageBlobOperations:
|
|
284
284
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
285
285
|
**kwargs: Any
|
286
286
|
) -> None:
|
287
|
+
# pylint: disable=line-too-long
|
287
288
|
"""The Upload Pages operation writes a range of pages to a page blob.
|
288
289
|
|
289
290
|
:param content_length: The length of the request. Required.
|
@@ -307,6 +308,13 @@ class PageBlobOperations:
|
|
307
308
|
limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
|
308
309
|
value is None.
|
309
310
|
:type request_id_parameter: str
|
311
|
+
:param structured_body_type: Required if the request body is a structured message. Specifies
|
312
|
+
the message schema version and properties. Default value is None.
|
313
|
+
:type structured_body_type: str
|
314
|
+
:param structured_content_length: Required if the request body is a structured message.
|
315
|
+
Specifies the length of the blob/file content inside the message body. Will always be smaller
|
316
|
+
than Content-Length. Default value is None.
|
317
|
+
:type structured_content_length: int
|
310
318
|
:param lease_access_conditions: Parameter group. Default value is None.
|
311
319
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
312
320
|
:param cpk_info: Parameter group. Default value is None.
|
@@ -322,7 +330,7 @@ class PageBlobOperations:
|
|
322
330
|
:rtype: None
|
323
331
|
:raises ~azure.core.exceptions.HttpResponseError:
|
324
332
|
"""
|
325
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
333
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
326
334
|
401: ClientAuthenticationError,
|
327
335
|
404: ResourceNotFoundError,
|
328
336
|
409: ResourceExistsError,
|
@@ -394,6 +402,8 @@ class PageBlobOperations:
|
|
394
402
|
if_none_match=_if_none_match,
|
395
403
|
if_tags=_if_tags,
|
396
404
|
request_id_parameter=request_id_parameter,
|
405
|
+
structured_body_type=structured_body_type,
|
406
|
+
structured_content_length=structured_content_length,
|
397
407
|
comp=comp,
|
398
408
|
page_write=page_write,
|
399
409
|
content_type=content_type,
|
@@ -402,7 +412,6 @@ class PageBlobOperations:
|
|
402
412
|
headers=_headers,
|
403
413
|
params=_params,
|
404
414
|
)
|
405
|
-
_request = _convert_request(_request)
|
406
415
|
_request.url = self._client.format_url(_request.url)
|
407
416
|
|
408
417
|
_stream = False
|
@@ -442,6 +451,9 @@ class PageBlobOperations:
|
|
442
451
|
response_headers["x-ms-encryption-scope"] = self._deserialize(
|
443
452
|
"str", response.headers.get("x-ms-encryption-scope")
|
444
453
|
)
|
454
|
+
response_headers["x-ms-structured-body"] = self._deserialize(
|
455
|
+
"str", response.headers.get("x-ms-structured-body")
|
456
|
+
)
|
445
457
|
|
446
458
|
if cls:
|
447
459
|
return cls(pipeline_response, None, response_headers) # type: ignore
|
@@ -460,6 +472,7 @@ class PageBlobOperations:
|
|
460
472
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
461
473
|
**kwargs: Any
|
462
474
|
) -> None:
|
475
|
+
# pylint: disable=line-too-long
|
463
476
|
"""The Clear Pages operation clears a set of pages from a page blob.
|
464
477
|
|
465
478
|
:param content_length: The length of the request. Required.
|
@@ -490,7 +503,7 @@ class PageBlobOperations:
|
|
490
503
|
:rtype: None
|
491
504
|
:raises ~azure.core.exceptions.HttpResponseError:
|
492
505
|
"""
|
493
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
506
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
494
507
|
401: ClientAuthenticationError,
|
495
508
|
404: ResourceNotFoundError,
|
496
509
|
409: ResourceExistsError,
|
@@ -564,7 +577,6 @@ class PageBlobOperations:
|
|
564
577
|
headers=_headers,
|
565
578
|
params=_params,
|
566
579
|
)
|
567
|
-
_request = _convert_request(_request)
|
568
580
|
_request.url = self._client.format_url(_request.url)
|
569
581
|
|
570
582
|
_stream = False
|
@@ -619,6 +631,7 @@ class PageBlobOperations:
|
|
619
631
|
source_modified_access_conditions: Optional[_models.SourceModifiedAccessConditions] = None,
|
620
632
|
**kwargs: Any
|
621
633
|
) -> None:
|
634
|
+
# pylint: disable=line-too-long
|
622
635
|
"""The Upload Pages operation writes a range of pages to a page blob where the contents are read
|
623
636
|
from a URL.
|
624
637
|
|
@@ -668,7 +681,7 @@ class PageBlobOperations:
|
|
668
681
|
:rtype: None
|
669
682
|
:raises ~azure.core.exceptions.HttpResponseError:
|
670
683
|
"""
|
671
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
684
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
672
685
|
401: ClientAuthenticationError,
|
673
686
|
404: ResourceNotFoundError,
|
674
687
|
409: ResourceExistsError,
|
@@ -760,7 +773,6 @@ class PageBlobOperations:
|
|
760
773
|
headers=_headers,
|
761
774
|
params=_params,
|
762
775
|
)
|
763
|
-
_request = _convert_request(_request)
|
764
776
|
_request.url = self._client.format_url(_request.url)
|
765
777
|
|
766
778
|
_stream = False
|
@@ -814,6 +826,7 @@ class PageBlobOperations:
|
|
814
826
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
815
827
|
**kwargs: Any
|
816
828
|
) -> _models.PageList:
|
829
|
+
# pylint: disable=line-too-long
|
817
830
|
"""The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot
|
818
831
|
of a page blob.
|
819
832
|
|
@@ -856,7 +869,7 @@ class PageBlobOperations:
|
|
856
869
|
:rtype: ~azure.storage.blob.models.PageList
|
857
870
|
:raises ~azure.core.exceptions.HttpResponseError:
|
858
871
|
"""
|
859
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
872
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
860
873
|
401: ClientAuthenticationError,
|
861
874
|
404: ResourceNotFoundError,
|
862
875
|
409: ResourceExistsError,
|
@@ -904,7 +917,6 @@ class PageBlobOperations:
|
|
904
917
|
headers=_headers,
|
905
918
|
params=_params,
|
906
919
|
)
|
907
|
-
_request = _convert_request(_request)
|
908
920
|
_request.url = self._client.format_url(_request.url)
|
909
921
|
|
910
922
|
_stream = False
|
@@ -932,7 +944,7 @@ class PageBlobOperations:
|
|
932
944
|
response_headers["x-ms-version"] = self._deserialize("str", response.headers.get("x-ms-version"))
|
933
945
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
934
946
|
|
935
|
-
deserialized = self._deserialize("PageList", pipeline_response)
|
947
|
+
deserialized = self._deserialize("PageList", pipeline_response.http_response)
|
936
948
|
|
937
949
|
if cls:
|
938
950
|
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
@@ -954,6 +966,7 @@ class PageBlobOperations:
|
|
954
966
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
955
967
|
**kwargs: Any
|
956
968
|
) -> _models.PageList:
|
969
|
+
# pylint: disable=line-too-long
|
957
970
|
"""The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that
|
958
971
|
were changed between target blob and previous snapshot.
|
959
972
|
|
@@ -1008,7 +1021,7 @@ class PageBlobOperations:
|
|
1008
1021
|
:rtype: ~azure.storage.blob.models.PageList
|
1009
1022
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1010
1023
|
"""
|
1011
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
1024
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
1012
1025
|
401: ClientAuthenticationError,
|
1013
1026
|
404: ResourceNotFoundError,
|
1014
1027
|
409: ResourceExistsError,
|
@@ -1058,7 +1071,6 @@ class PageBlobOperations:
|
|
1058
1071
|
headers=_headers,
|
1059
1072
|
params=_params,
|
1060
1073
|
)
|
1061
|
-
_request = _convert_request(_request)
|
1062
1074
|
_request.url = self._client.format_url(_request.url)
|
1063
1075
|
|
1064
1076
|
_stream = False
|
@@ -1086,7 +1098,7 @@ class PageBlobOperations:
|
|
1086
1098
|
response_headers["x-ms-version"] = self._deserialize("str", response.headers.get("x-ms-version"))
|
1087
1099
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
1088
1100
|
|
1089
|
-
deserialized = self._deserialize("PageList", pipeline_response)
|
1101
|
+
deserialized = self._deserialize("PageList", pipeline_response.http_response)
|
1090
1102
|
|
1091
1103
|
if cls:
|
1092
1104
|
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
@@ -1105,6 +1117,7 @@ class PageBlobOperations:
|
|
1105
1117
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
1106
1118
|
**kwargs: Any
|
1107
1119
|
) -> None:
|
1120
|
+
# pylint: disable=line-too-long
|
1108
1121
|
"""Resize the Blob.
|
1109
1122
|
|
1110
1123
|
:param blob_content_length: This header specifies the maximum size for the page blob, up to 1
|
@@ -1131,7 +1144,7 @@ class PageBlobOperations:
|
|
1131
1144
|
:rtype: None
|
1132
1145
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1133
1146
|
"""
|
1134
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
1147
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
1135
1148
|
401: ClientAuthenticationError,
|
1136
1149
|
404: ResourceNotFoundError,
|
1137
1150
|
409: ResourceExistsError,
|
@@ -1190,7 +1203,6 @@ class PageBlobOperations:
|
|
1190
1203
|
headers=_headers,
|
1191
1204
|
params=_params,
|
1192
1205
|
)
|
1193
|
-
_request = _convert_request(_request)
|
1194
1206
|
_request.url = self._client.format_url(_request.url)
|
1195
1207
|
|
1196
1208
|
_stream = False
|
@@ -1232,6 +1244,7 @@ class PageBlobOperations:
|
|
1232
1244
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
1233
1245
|
**kwargs: Any
|
1234
1246
|
) -> None:
|
1247
|
+
# pylint: disable=line-too-long
|
1235
1248
|
"""Update the sequence number of the blob.
|
1236
1249
|
|
1237
1250
|
:param sequence_number_action: Required if the x-ms-blob-sequence-number header is set for the
|
@@ -1260,7 +1273,7 @@ class PageBlobOperations:
|
|
1260
1273
|
:rtype: None
|
1261
1274
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1262
1275
|
"""
|
1263
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
1276
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
1264
1277
|
401: ClientAuthenticationError,
|
1265
1278
|
404: ResourceNotFoundError,
|
1266
1279
|
409: ResourceExistsError,
|
@@ -1306,7 +1319,6 @@ class PageBlobOperations:
|
|
1306
1319
|
headers=_headers,
|
1307
1320
|
params=_params,
|
1308
1321
|
)
|
1309
|
-
_request = _convert_request(_request)
|
1310
1322
|
_request.url = self._client.format_url(_request.url)
|
1311
1323
|
|
1312
1324
|
_stream = False
|
@@ -1346,6 +1358,7 @@ class PageBlobOperations:
|
|
1346
1358
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
1347
1359
|
**kwargs: Any
|
1348
1360
|
) -> None:
|
1361
|
+
# pylint: disable=line-too-long
|
1349
1362
|
"""The Copy Incremental operation copies a snapshot of the source page blob to a destination page
|
1350
1363
|
blob. The snapshot is copied such that only the differential changes between the previously
|
1351
1364
|
copied snapshot are transferred to the destination. The copied snapshots are complete copies of
|
@@ -1372,7 +1385,7 @@ class PageBlobOperations:
|
|
1372
1385
|
:rtype: None
|
1373
1386
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1374
1387
|
"""
|
1375
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
1388
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
1376
1389
|
401: ClientAuthenticationError,
|
1377
1390
|
404: ResourceNotFoundError,
|
1378
1391
|
409: ResourceExistsError,
|
@@ -1413,7 +1426,6 @@ class PageBlobOperations:
|
|
1413
1426
|
headers=_headers,
|
1414
1427
|
params=_params,
|
1415
1428
|
)
|
1416
|
-
_request = _convert_request(_request)
|
1417
1429
|
_request.url = self._client.format_url(_request.url)
|
1418
1430
|
|
1419
1431
|
_stream = False
|
@@ -15,16 +15,16 @@ from azure.core.exceptions import (
|
|
15
15
|
ResourceExistsError,
|
16
16
|
ResourceNotFoundError,
|
17
17
|
ResourceNotModifiedError,
|
18
|
+
StreamClosedError,
|
19
|
+
StreamConsumedError,
|
18
20
|
map_error,
|
19
21
|
)
|
20
22
|
from azure.core.pipeline import PipelineResponse
|
21
|
-
from azure.core.
|
22
|
-
from azure.core.rest import HttpRequest
|
23
|
+
from azure.core.rest import AsyncHttpResponse, HttpRequest
|
23
24
|
from azure.core.tracing.decorator_async import distributed_trace_async
|
24
25
|
from azure.core.utils import case_insensitive_dict
|
25
26
|
|
26
27
|
from ... import models as _models
|
27
|
-
from ..._vendor import _convert_request
|
28
28
|
from ...operations._service_operations import (
|
29
29
|
build_filter_blobs_request,
|
30
30
|
build_get_account_info_request,
|
@@ -71,6 +71,7 @@ class ServiceOperations:
|
|
71
71
|
request_id_parameter: Optional[str] = None,
|
72
72
|
**kwargs: Any
|
73
73
|
) -> None:
|
74
|
+
# pylint: disable=line-too-long
|
74
75
|
"""Sets properties for a storage account's Blob service endpoint, including properties for Storage
|
75
76
|
Analytics and CORS (Cross-Origin Resource Sharing) rules.
|
76
77
|
|
@@ -89,7 +90,7 @@ class ServiceOperations:
|
|
89
90
|
:rtype: None
|
90
91
|
:raises ~azure.core.exceptions.HttpResponseError:
|
91
92
|
"""
|
92
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
93
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
93
94
|
401: ClientAuthenticationError,
|
94
95
|
404: ResourceNotFoundError,
|
95
96
|
409: ResourceExistsError,
|
@@ -119,7 +120,6 @@ class ServiceOperations:
|
|
119
120
|
headers=_headers,
|
120
121
|
params=_params,
|
121
122
|
)
|
122
|
-
_request = _convert_request(_request)
|
123
123
|
_request.url = self._client.format_url(_request.url)
|
124
124
|
|
125
125
|
_stream = False
|
@@ -148,6 +148,7 @@ class ServiceOperations:
|
|
148
148
|
async def get_properties(
|
149
149
|
self, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
|
150
150
|
) -> _models.StorageServiceProperties:
|
151
|
+
# pylint: disable=line-too-long
|
151
152
|
"""gets the properties of a storage account's Blob service, including properties for Storage
|
152
153
|
Analytics and CORS (Cross-Origin Resource Sharing) rules.
|
153
154
|
|
@@ -164,7 +165,7 @@ class ServiceOperations:
|
|
164
165
|
:rtype: ~azure.storage.blob.models.StorageServiceProperties
|
165
166
|
:raises ~azure.core.exceptions.HttpResponseError:
|
166
167
|
"""
|
167
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
168
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
168
169
|
401: ClientAuthenticationError,
|
169
170
|
404: ResourceNotFoundError,
|
170
171
|
409: ResourceExistsError,
|
@@ -189,7 +190,6 @@ class ServiceOperations:
|
|
189
190
|
headers=_headers,
|
190
191
|
params=_params,
|
191
192
|
)
|
192
|
-
_request = _convert_request(_request)
|
193
193
|
_request.url = self._client.format_url(_request.url)
|
194
194
|
|
195
195
|
_stream = False
|
@@ -211,7 +211,7 @@ class ServiceOperations:
|
|
211
211
|
response_headers["x-ms-request-id"] = self._deserialize("str", response.headers.get("x-ms-request-id"))
|
212
212
|
response_headers["x-ms-version"] = self._deserialize("str", response.headers.get("x-ms-version"))
|
213
213
|
|
214
|
-
deserialized = self._deserialize("StorageServiceProperties", pipeline_response)
|
214
|
+
deserialized = self._deserialize("StorageServiceProperties", pipeline_response.http_response)
|
215
215
|
|
216
216
|
if cls:
|
217
217
|
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
@@ -222,6 +222,7 @@ class ServiceOperations:
|
|
222
222
|
async def get_statistics(
|
223
223
|
self, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
|
224
224
|
) -> _models.StorageServiceStats:
|
225
|
+
# pylint: disable=line-too-long
|
225
226
|
"""Retrieves statistics related to replication for the Blob service. It is only available on the
|
226
227
|
secondary location endpoint when read-access geo-redundant replication is enabled for the
|
227
228
|
storage account.
|
@@ -239,7 +240,7 @@ class ServiceOperations:
|
|
239
240
|
:rtype: ~azure.storage.blob.models.StorageServiceStats
|
240
241
|
:raises ~azure.core.exceptions.HttpResponseError:
|
241
242
|
"""
|
242
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
243
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
243
244
|
401: ClientAuthenticationError,
|
244
245
|
404: ResourceNotFoundError,
|
245
246
|
409: ResourceExistsError,
|
@@ -264,7 +265,6 @@ class ServiceOperations:
|
|
264
265
|
headers=_headers,
|
265
266
|
params=_params,
|
266
267
|
)
|
267
|
-
_request = _convert_request(_request)
|
268
268
|
_request.url = self._client.format_url(_request.url)
|
269
269
|
|
270
270
|
_stream = False
|
@@ -287,7 +287,7 @@ class ServiceOperations:
|
|
287
287
|
response_headers["x-ms-version"] = self._deserialize("str", response.headers.get("x-ms-version"))
|
288
288
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
289
289
|
|
290
|
-
deserialized = self._deserialize("StorageServiceStats", pipeline_response)
|
290
|
+
deserialized = self._deserialize("StorageServiceStats", pipeline_response.http_response)
|
291
291
|
|
292
292
|
if cls:
|
293
293
|
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
@@ -305,6 +305,7 @@ class ServiceOperations:
|
|
305
305
|
request_id_parameter: Optional[str] = None,
|
306
306
|
**kwargs: Any
|
307
307
|
) -> _models.ListContainersSegmentResponse:
|
308
|
+
# pylint: disable=line-too-long
|
308
309
|
"""The List Containers Segment operation returns a list of the containers under the specified
|
309
310
|
account.
|
310
311
|
|
@@ -341,7 +342,7 @@ class ServiceOperations:
|
|
341
342
|
:rtype: ~azure.storage.blob.models.ListContainersSegmentResponse
|
342
343
|
:raises ~azure.core.exceptions.HttpResponseError:
|
343
344
|
"""
|
344
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
345
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
345
346
|
401: ClientAuthenticationError,
|
346
347
|
404: ResourceNotFoundError,
|
347
348
|
409: ResourceExistsError,
|
@@ -368,7 +369,6 @@ class ServiceOperations:
|
|
368
369
|
headers=_headers,
|
369
370
|
params=_params,
|
370
371
|
)
|
371
|
-
_request = _convert_request(_request)
|
372
372
|
_request.url = self._client.format_url(_request.url)
|
373
373
|
|
374
374
|
_stream = False
|
@@ -390,7 +390,7 @@ class ServiceOperations:
|
|
390
390
|
response_headers["x-ms-request-id"] = self._deserialize("str", response.headers.get("x-ms-request-id"))
|
391
391
|
response_headers["x-ms-version"] = self._deserialize("str", response.headers.get("x-ms-version"))
|
392
392
|
|
393
|
-
deserialized = self._deserialize("ListContainersSegmentResponse", pipeline_response)
|
393
|
+
deserialized = self._deserialize("ListContainersSegmentResponse", pipeline_response.http_response)
|
394
394
|
|
395
395
|
if cls:
|
396
396
|
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
@@ -405,6 +405,7 @@ class ServiceOperations:
|
|
405
405
|
request_id_parameter: Optional[str] = None,
|
406
406
|
**kwargs: Any
|
407
407
|
) -> _models.UserDelegationKey:
|
408
|
+
# pylint: disable=line-too-long
|
408
409
|
"""Retrieves a user delegation key for the Blob service. This is only a valid operation when using
|
409
410
|
bearer token authentication.
|
410
411
|
|
@@ -423,7 +424,7 @@ class ServiceOperations:
|
|
423
424
|
:rtype: ~azure.storage.blob.models.UserDelegationKey
|
424
425
|
:raises ~azure.core.exceptions.HttpResponseError:
|
425
426
|
"""
|
426
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
427
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
427
428
|
401: ClientAuthenticationError,
|
428
429
|
404: ResourceNotFoundError,
|
429
430
|
409: ResourceExistsError,
|
@@ -453,7 +454,6 @@ class ServiceOperations:
|
|
453
454
|
headers=_headers,
|
454
455
|
params=_params,
|
455
456
|
)
|
456
|
-
_request = _convert_request(_request)
|
457
457
|
_request.url = self._client.format_url(_request.url)
|
458
458
|
|
459
459
|
_stream = False
|
@@ -476,7 +476,7 @@ class ServiceOperations:
|
|
476
476
|
response_headers["x-ms-version"] = self._deserialize("str", response.headers.get("x-ms-version"))
|
477
477
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
478
478
|
|
479
|
-
deserialized = self._deserialize("UserDelegationKey", pipeline_response)
|
479
|
+
deserialized = self._deserialize("UserDelegationKey", pipeline_response.http_response)
|
480
480
|
|
481
481
|
if cls:
|
482
482
|
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
@@ -487,6 +487,7 @@ class ServiceOperations:
|
|
487
487
|
async def get_account_info( # pylint: disable=inconsistent-return-statements
|
488
488
|
self, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
|
489
489
|
) -> None:
|
490
|
+
# pylint: disable=line-too-long
|
490
491
|
"""Returns the sku name and account kind.
|
491
492
|
|
492
493
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
@@ -502,7 +503,7 @@ class ServiceOperations:
|
|
502
503
|
:rtype: None
|
503
504
|
:raises ~azure.core.exceptions.HttpResponseError:
|
504
505
|
"""
|
505
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
506
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
506
507
|
401: ClientAuthenticationError,
|
507
508
|
404: ResourceNotFoundError,
|
508
509
|
409: ResourceExistsError,
|
@@ -527,7 +528,6 @@ class ServiceOperations:
|
|
527
528
|
headers=_headers,
|
528
529
|
params=_params,
|
529
530
|
)
|
530
|
-
_request = _convert_request(_request)
|
531
531
|
_request.url = self._client.format_url(_request.url)
|
532
532
|
|
533
533
|
_stream = False
|
@@ -565,6 +565,7 @@ class ServiceOperations:
|
|
565
565
|
request_id_parameter: Optional[str] = None,
|
566
566
|
**kwargs: Any
|
567
567
|
) -> AsyncIterator[bytes]:
|
568
|
+
# pylint: disable=line-too-long
|
568
569
|
"""The Batch operation allows multiple API calls to be embedded into a single HTTP request.
|
569
570
|
|
570
571
|
:param content_length: The length of the request. Required.
|
@@ -584,7 +585,7 @@ class ServiceOperations:
|
|
584
585
|
:rtype: AsyncIterator[bytes]
|
585
586
|
:raises ~azure.core.exceptions.HttpResponseError:
|
586
587
|
"""
|
587
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
588
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
588
589
|
401: ClientAuthenticationError,
|
589
590
|
404: ResourceNotFoundError,
|
590
591
|
409: ResourceExistsError,
|
@@ -615,9 +616,9 @@ class ServiceOperations:
|
|
615
616
|
headers=_headers,
|
616
617
|
params=_params,
|
617
618
|
)
|
618
|
-
_request = _convert_request(_request)
|
619
619
|
_request.url = self._client.format_url(_request.url)
|
620
620
|
|
621
|
+
_decompress = kwargs.pop("decompress", True)
|
621
622
|
_stream = True
|
622
623
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
623
624
|
_request, stream=_stream, **kwargs
|
@@ -626,6 +627,10 @@ class ServiceOperations:
|
|
626
627
|
response = pipeline_response.http_response
|
627
628
|
|
628
629
|
if response.status_code not in [200]:
|
630
|
+
try:
|
631
|
+
await response.read() # Load the body in memory and close the socket
|
632
|
+
except (StreamConsumedError, StreamClosedError):
|
633
|
+
pass
|
629
634
|
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
630
635
|
error = self._deserialize.failsafe_deserialize(_models.StorageError, pipeline_response)
|
631
636
|
raise HttpResponseError(response=response, model=error)
|
@@ -635,7 +640,7 @@ class ServiceOperations:
|
|
635
640
|
response_headers["x-ms-request-id"] = self._deserialize("str", response.headers.get("x-ms-request-id"))
|
636
641
|
response_headers["x-ms-version"] = self._deserialize("str", response.headers.get("x-ms-version"))
|
637
642
|
|
638
|
-
deserialized = response.stream_download(self._client._pipeline)
|
643
|
+
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
|
639
644
|
|
640
645
|
if cls:
|
641
646
|
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
@@ -653,6 +658,7 @@ class ServiceOperations:
|
|
653
658
|
include: Optional[List[Union[str, _models.FilterBlobsIncludeItem]]] = None,
|
654
659
|
**kwargs: Any
|
655
660
|
) -> _models.FilterBlobSegment:
|
661
|
+
# pylint: disable=line-too-long
|
656
662
|
"""The Filter Blobs operation enables callers to list blobs across all containers whose tags match
|
657
663
|
a given search expression. Filter blobs searches across all containers within a storage
|
658
664
|
account but can be scoped within the expression to a single container.
|
@@ -690,7 +696,7 @@ class ServiceOperations:
|
|
690
696
|
:rtype: ~azure.storage.blob.models.FilterBlobSegment
|
691
697
|
:raises ~azure.core.exceptions.HttpResponseError:
|
692
698
|
"""
|
693
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
699
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
694
700
|
401: ClientAuthenticationError,
|
695
701
|
404: ResourceNotFoundError,
|
696
702
|
409: ResourceExistsError,
|
@@ -717,7 +723,6 @@ class ServiceOperations:
|
|
717
723
|
headers=_headers,
|
718
724
|
params=_params,
|
719
725
|
)
|
720
|
-
_request = _convert_request(_request)
|
721
726
|
_request.url = self._client.format_url(_request.url)
|
722
727
|
|
723
728
|
_stream = False
|
@@ -740,7 +745,7 @@ class ServiceOperations:
|
|
740
745
|
response_headers["x-ms-version"] = self._deserialize("str", response.headers.get("x-ms-version"))
|
741
746
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
742
747
|
|
743
|
-
deserialized = self._deserialize("FilterBlobSegment", pipeline_response)
|
748
|
+
deserialized = self._deserialize("FilterBlobSegment", pipeline_response.http_response)
|
744
749
|
|
745
750
|
if cls:
|
746
751
|
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
@@ -389,3 +389,4 @@ class StorageErrorCode(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
389
389
|
AUTHORIZATION_PERMISSION_MISMATCH = "AuthorizationPermissionMismatch"
|
390
390
|
AUTHORIZATION_SERVICE_MISMATCH = "AuthorizationServiceMismatch"
|
391
391
|
AUTHORIZATION_RESOURCE_TYPE_MISMATCH = "AuthorizationResourceTypeMismatch"
|
392
|
+
BLOB_ACCESS_TIER_NOT_SUPPORTED_FOR_ACCOUNT_TYPE = "BlobAccessTierNotSupportedForAccountType"
|